A tile view control for displaying items in a grid layout. More...
#include <STileView.h>
Classes | |
struct | ItemInfo |
Information about an item in the tile view. More... | |
Public Member Functions | |
STileView () | |
Constructor for STileView. | |
~STileView () | |
Destructor for STileView. | |
BOOL | SetAdapter (ILvAdapter *adapter) OVERRIDE |
Sets the adapter for the tile view. | |
ILvAdapter * | GetAdapter () SCONST OVERRIDE |
Gets the adapter for the tile view. | |
void | SetItemLocator (ITileViewItemLocator *pItemLocator) OVERRIDE |
Sets the item locator for the tile view. | |
ITileViewItemLocator * | GetItemLocator () SCONST OVERRIDE |
Gets the item locator for the tile view. | |
void | SetSel (int iItem, BOOL bNotify=FALSE) OVERRIDE |
Sets the selected item. | |
int | GetSel () SCONST OVERRIDE |
Gets the selected item. | |
void | EnsureVisible (int iItem) OVERRIDE |
Ensures the specified item is visible. | |
IItemPanel * | HitTest (const POINT *pt) SCONST OVERRIDE |
Performs a hit test on the tile view. | |
SItemPanel * | HitTest (CPoint &pt) const |
Performs a hit test on the tile view. | |
Protected Member Functions | |
virtual void | OnItemSetCapture (SOsrPanel *pItem, BOOL bCapture) |
Handles the capture of an item. | |
virtual BOOL | OnItemGetRect (const SOsrPanel *pItem, CRect &rcItem) const |
Gets the rectangle of an item. | |
virtual BOOL | IsItemRedrawDelay () const |
Checks if item redraw is delayed. | |
void | onDataSetChanged () |
Handles data set changes. | |
void | onDataSetInvalidated () |
Handles data set invalidation. | |
void | onItemDataChanged (int iItem) |
Handles data changes for a specific item. | |
BOOL | OnItemClick (IEvtArgs *pEvt) |
Handles item click events. | |
virtual BOOL | OnScroll (BOOL bVertical, UINT uCode, int nPos) |
Handles scroll events. | |
virtual int | GetScrollLineSize (BOOL bVertical) |
Gets the scroll line size. | |
virtual BOOL | CreateChildren (SXmlNode xmlNode) |
Creates child windows from an XML node. | |
virtual BOOL | UpdateToolTip (CPoint pt, SwndToolTipInfo &tipInfo) |
Updates the tooltip. | |
virtual UINT WINAPI | OnGetDlgCode () const |
Gets the dialog code for the window. | |
virtual BOOL | OnSetCursor (const CPoint &pt) |
Sets the cursor. | |
virtual void | OnColorize (COLORREF cr) |
Handles colorization. | |
virtual void | OnScaleChanged (int nScale) |
Handles scale changes. | |
virtual HRESULT | OnLanguageChanged () |
Handles language changes. | |
virtual void | OnRebuildFont () |
Rebuilds the font. | |
void | DispatchMessage2Items (UINT uMsg, WPARAM wParam, LPARAM lParam) |
Dispatches messages to items. | |
void | UpdateScrollBar () |
Updates the scroll bars. | |
void | RedrawItem (SOsrPanel *pItem) |
Redraws a specific item. | |
SItemPanel * | GetItemPanel (int iItem) |
Gets the item panel by index. | |
CRect | CalcItemDrawRect (int iItem) const |
Calculates the drawing rectangle for an item. | |
void | UpdateVisibleItems () |
Updates the visible items. | |
void | UpdateVisibleItem (int iItem) |
Updates a specific visible item. | |
void | OnPaint (IRenderTarget *pRT) |
Handles the paint event. | |
void | OnSize (UINT nType, CSize size) |
Handles the size event. | |
void | OnDestroy () |
Handles the destroy event. | |
LRESULT | OnMouseEvent (UINT uMsg, WPARAM wParam, LPARAM lParam) |
Handles mouse events. | |
LRESULT | OnKeyEvent (UINT uMsg, WPARAM wParam, LPARAM lParam) |
Handles key events. | |
void | OnKeyDown (TCHAR nChar, UINT nRepCnt, UINT nFlags) |
Handles the key down event. | |
void | OnMouseLeave () |
Handles the mouse leave event. | |
BOOL | OnMouseWheel (UINT nFlags, short zDelta, CPoint pt) |
Handles the mouse wheel event. | |
void | OnKillFocus (SWND wndFocus) |
Handles the kill focus event. | |
void | OnSetFocus (SWND wndOld) |
Handles the set focus event. | |
LRESULT | OnSetScale (UINT uMsg, WPARAM wParam, LPARAM lParam) |
Handles the set scale event. | |
void | OnShowWindow (BOOL bShow, UINT nStatus) |
Handles the show window event. | |
virtual HRESULT | SetAttribute (const SNS::SStringW &amp;amp;amp;strAttribName, const SNS::SStringW &amp;amp;amp;strValue, BOOL bLoading=FALSE) |
Protected Attributes | |
SAutoRefPtr< ILvAdapter > | m_adapter |
SAutoRefPtr< ILvDataSetObserver > | m_observer |
SAutoRefPtr< ITileViewItemLocator > | m_tvItemLocator |
bool | m_bPendingUpdate |
int | m_iPendingUpdateItem |
int | m_iPendingViewItem |
int | m_iFirstVisible |
SList< ItemInfo > | m_lstItems |
SOsrPanel * | m_itemCapture |
int | m_iSelItem |
SOsrPanel * | m_pHoverItem |
SArray< SList< SItemPanel * > * > | m_itemRecycle |
SXmlDoc | m_xmlTemplate |
SLayoutSize | m_nMarginSize |
BOOL | m_bWantTab |
BOOL | m_bDatasetInvalidated |
Friends | |
class | STileViewDataSetObserver |
A tile view control for displaying items in a grid layout.
This class represents a tile view control that can display items in a grid layout with various customization options.
Definition at line 30 of file STileView.h.
STileView::STileView | ( | ) |
Constructor for STileView.
Definition at line 39 of file STileView.cpp.
STileView::~STileView | ( | ) |
Destructor for STileView.
Definition at line 60 of file STileView.cpp.
|
protected |
Calculates the drawing rectangle for an item.
iItem | Index of the item. |
Definition at line 478 of file STileView.cpp.
|
protectedvirtual |
Creates child windows from an XML node.
xmlNode | XML node containing the child window definitions. |
Reimplemented from SWindow.
Definition at line 779 of file STileView.cpp.
|
protected |
Dispatches messages to items.
uMsg | Message identifier. |
wParam | Additional message-specific information. |
lParam | Additional message-specific information. |
Definition at line 985 of file STileView.cpp.
void STileView::EnsureVisible | ( | int | iItem | ) |
Ensures the specified item is visible.
iItem | Index of the item to make visible. |
Definition at line 716 of file STileView.cpp.
ILvAdapter * STileView::GetAdapter | ( | ) |
Gets the adapter for the tile view.
Definition at line 1033 of file STileView.cpp.
ITileViewItemLocator * STileView::GetItemLocator | ( | ) |
Gets the item locator for the tile view.
Definition at line 1038 of file STileView.cpp.
|
protected |
Gets the item panel by index.
iItem | Index of the item. |
Definition at line 761 of file STileView.cpp.
|
protectedvirtual |
Gets the scroll line size.
bVertical | Flag indicating if the scroll is vertical. |
Reimplemented from SPanel.
Definition at line 756 of file STileView.cpp.
int STileView::GetSel | ( | ) |
Gets the selected item.
Definition at line 1043 of file STileView.cpp.
IItemPanel * STileView::HitTest | ( | const POINT * | pt | ) |
Performs a hit test on the tile view.
pt | Pointer to the point to test. |
SItemPanel * STileView::HitTest | ( | CPoint & | pt | ) | const |
Performs a hit test on the tile view.
pt | The point to test. |
Definition at line 520 of file STileView.cpp.
|
protectedvirtual |
Checks if item redraw is delayed.
Definition at line 473 of file STileView.cpp.
|
protectedvirtual |
Handles colorization.
cr | Color reference. |
Reimplemented from SPanel.
Definition at line 963 of file STileView.cpp.
|
protected |
Handles data set changes.
Definition at line 172 of file STileView.cpp.
|
protected |
Handles data set invalidation.
Definition at line 189 of file STileView.cpp.
|
protected |
Handles the destroy event.
Definition at line 440 of file STileView.cpp.
|
protectedvirtual |
Gets the dialog code for the window.
Definition at line 881 of file STileView.cpp.
|
protected |
Handles item click events.
pEvt | Pointer to the event arguments. |
Definition at line 952 of file STileView.cpp.
|
protected |
Handles data changes for a specific item.
iItem | Index of the item. |
Definition at line 205 of file STileView.cpp.
|
protectedvirtual |
Gets the rectangle of an item.
pItem | Pointer to the item panel. |
rcItem | Rectangle to receive the item position. |
Definition at line 492 of file STileView.cpp.
|
protectedvirtual |
Handles the capture of an item.
pItem | Pointer to the item panel. |
bCapture | Flag indicating if the item should be captured. |
Definition at line 501 of file STileView.cpp.
|
protected |
Handles the key down event.
nChar | Virtual key code of the key. |
nRepCnt | Repeat count for the key. |
nFlags | Flags associated with the key event. |
Definition at line 627 of file STileView.cpp.
|
protected |
Handles key events.
uMsg | Message identifier. |
wParam | Additional message-specific information. |
lParam | Additional message-specific information. |
Definition at line 600 of file STileView.cpp.
|
protected |
Handles the kill focus event.
wndFocus | Handle to the window receiving focus. |
Definition at line 893 of file STileView.cpp.
|
protectedvirtual |
Handles language changes.
Reimplemented from SWindow.
Definition at line 978 of file STileView.cpp.
|
protected |
Handles mouse events.
uMsg | Message identifier. |
wParam | Additional message-specific information. |
lParam | Additional message-specific information. |
Definition at line 545 of file STileView.cpp.
|
protected |
Handles the mouse leave event.
Definition at line 616 of file STileView.cpp.
|
protected |
Handles the mouse wheel event.
nFlags | Flags associated with the mouse event. |
zDelta | Wheel delta. |
pt | Mouse position. |
Definition at line 741 of file STileView.cpp.
|
protected |
Handles the paint event.
pRT | Pointer to the rendering target. |
Definition at line 222 of file STileView.cpp.
|
protectedvirtual |
|
protectedvirtual |
Handles scale changes.
nScale | New scale value. |
Reimplemented from SPanel.
Definition at line 969 of file STileView.cpp.
|
protectedvirtual |
Handles scroll events.
bVertical | Flag indicating if the scroll is vertical. |
uCode | Scroll code. |
nPos | Scroll position. |
Reimplemented from SPanel.
Definition at line 274 of file STileView.cpp.
|
protectedvirtual |
Sets the cursor.
pt | Mouse position. |
Reimplemented from SWindow.
Definition at line 932 of file STileView.cpp.
|
protected |
Handles the set focus event.
wndOld | Handle to the window losing focus. |
Definition at line 909 of file STileView.cpp.
|
protected |
Handles the set scale event.
uMsg | Message identifier. |
wParam | Additional message-specific information. |
lParam | Additional message-specific information. |
Definition at line 924 of file STileView.cpp.
|
protected |
Handles the show window event.
bShow | Flag indicating if the window is being shown. |
nStatus | Status of the window. Paint event. Size event. Destroy event. Mouse wheel event. Mouse leave event. Key down event. Kill focus event. Set focus event. Set scale event. Show window event. Mouse event range. Key event range. IME key event range. IME character event. IME request event. |
Definition at line 1005 of file STileView.cpp.
|
protected |
Handles the size event.
nType | Type of size change. |
size | New size. |
Definition at line 429 of file STileView.cpp.
|
protected |
Redraws a specific item.
pItem | Pointer to the item panel. |
Definition at line 515 of file STileView.cpp.
BOOL STileView::SetAdapter | ( | ILvAdapter * | adapter | ) |
Sets the adapter for the tile view.
adapter | Pointer to the adapter. |
Definition at line 66 of file STileView.cpp.
|
inlineprotectedvirtual |
< Margin size for items.
< Flag indicating if tabbing is wanted.
Reimplemented from SPanel.
Definition at line 373 of file STileView.h.
void STileView::SetItemLocator | ( | ITileViewItemLocator * | pItemLocator | ) |
Sets the item locator for the tile view.
pItemLocator | Pointer to the item locator. |
Definition at line 795 of file STileView.cpp.
void STileView::SetSel | ( | int | iItem, |
BOOL | bNotify = FALSE ) |
Sets the selected item.
iItem | Index of the item to select. |
bNotify | Flag indicating if a notification should be sent. |
Definition at line 815 of file STileView.cpp.
|
protected |
Updates the scroll bars.
Definition at line 135 of file STileView.cpp.
|
protectedvirtual |
Updates the tooltip.
pt | Mouse position. |
tipInfo | Tooltip information. |
Reimplemented from SWindow.
Definition at line 806 of file STileView.cpp.
|
protected |
Updates a specific visible item.
iItem | Index of the item. |
Definition at line 195 of file STileView.cpp.
|
protected |
Updates the visible items.
Definition at line 293 of file STileView.cpp.
|
friend |
Definition at line 36 of file STileView.h.
|
protected |
Adapter for the tile view.
Definition at line 379 of file STileView.h.
|
protected |
Flag indicating if the data set is invalidated.
Definition at line 410 of file STileView.h.
|
protected |
Flag indicating if an update is pending due to data set changes.
Definition at line 393 of file STileView.h.
|
protected |
Flag indicating if tabbing is wanted.
Definition at line 409 of file STileView.h.
|
protected |
Index of the first visible item.
Definition at line 397 of file STileView.h.
|
protected |
Index of the item to update, -1 for all, -2 for nothing.
Definition at line 394 of file STileView.h.
|
protected |
Index of the item to view, -1 for initialization.
Definition at line 395 of file STileView.h.
|
protected |
Index of the selected item.
Definition at line 402 of file STileView.h.
|
protected |
Item panel that has been set capture.
Definition at line 400 of file STileView.h.
|
protected |
Definition at line 405 of file STileView.h.
|
protected |
Definition at line 398 of file STileView.h.
|
protected |
Margin size for items.
Definition at line 408 of file STileView.h.
|
protected |
Data set observer.
Definition at line 380 of file STileView.h.
|
protected |
Item panel under the hover state.
Definition at line 403 of file STileView.h.
|
protected |
Item locator for the tile view.
Definition at line 381 of file STileView.h.
|
protected |
XML template for item panels.
Definition at line 407 of file STileView.h.