soui 5.0.0.1
Soui5 Doc
 
Loading...
Searching...
No Matches
SListCtrl Class Reference

List Control. More...

#include <SListCtrl.h>

Inheritance diagram for SListCtrl:
SPanel IScrollBarHost

Public Member Functions

 SListCtrl ()
 Constructor.
 
virtual ~SListCtrl ()
 Destructor.
 
int InsertColumn (int nIndex, LPCTSTR pszText, int nWidth, UINT fmt, LPARAM lParam=0)
 Insert a column.
 
int InsertItem (int nItem, LPCTSTR pszText, int nImage=-1)
 Insert an item.
 
BOOL SetItemData (int nItem, LPARAM dwData)
 Set the data associated with an item.
 
LPARAM GetItemData (int nItem)
 Get the data associated with an item.
 
BOOL SetSubItem (int nItem, int nSubItem, const DXLVSUBITEM *plv)
 Set a subitem.
 
BOOL GetSubItem (int nItem, int nSubItem, DXLVSUBITEM *plv) const
 Get a subitem.
 
BOOL SetSubItemText (int nItem, int nSubItem, LPCTSTR pszText)
 Set the text of a subitem.
 
SStringT GetSubItemText (int nItem, int nSubItem) const
 Get the text of a subitem.
 
int GetSelectedItem ()
 Get the selected item.
 
void SetSelectedItem (int nItem)
 Set the selected item.
 
int GetItemCount () const
 Get the total number of items.
 
BOOL SetItemCount (int nItems, int nGrowBy)
 Set the total number of items.
 
int GetColumnCount () const
 Get the total number of columns.
 
int GetCountPerPage (BOOL bPartial)
 Get the number of items per page.
 
void DeleteItem (int nItem)
 Delete a specific item.
 
void DeleteColumn (int iCol)
 Delete a specific column.
 
void DeleteAllItems ()
 Delete all items.
 
BOOL SortItems (PFNLVCOMPAREEX pfnCompare, void *pContext)
 Sort items using a comparison function.
 
BOOL GetCheckState (int nItem)
 Get the check state of an item.
 
BOOL SetCheckState (int nItem, BOOL bCheck)
 Set the check state of an item.
 
int GetCheckedItemCount ()
 Get the number of checked items.
 
SHeaderCtrlGetHeaderCtrl () const
 Get the header control.
 
int GetFirstCheckedItem ()
 Get the first checked item.
 
int GetLastCheckedItem ()
 Get the last checked item.
 
VOID EnableMultiSelection (BOOL enable)
 Enable or disable multiple selection.
 
VOID EnableCheckBox (BOOL enable)
 Enable or disable checkboxes.
 
VOID EnableHotTrack (BOOL enable)
 Enable or disable hot tracking.
 
- Public Member Functions inherited from SPanel
 SPanel ()
 Constructor for SPanel.
 
virtual ~SPanel ()
 Destructor for SPanel.
 
BOOL ShowScrollBar (int wBar, BOOL bShow) OVERRIDE
 Shows or hides a scrollbar.
 
BOOL EnableScrollBar (int wBar, BOOL bEnable) OVERRIDE
 Enables or disables a scrollbar.
 
BOOL IsScrollBarEnable (BOOL bVertical) SCONST OVERRIDE
 Checks if a scrollbar is enabled.
 
void SetScrollInfo (SCROLLINFO si, BOOL bVertical) OVERRIDE
 Sets the scroll information for a scrollbar.
 
BOOL SetScrollPos (BOOL bVertical, int nNewPos, BOOL bRedraw) OVERRIDE
 Sets the scroll position for a scrollbar.
 
int GetScrollPos (BOOL bVertical) SCONST OVERRIDE
 Gets the scroll position for a scrollbar.
 
BOOL SetScrollRange (BOOL bVertical, int nMinPos, int nMaxPos, BOOL bRedraw) OVERRIDE
 Sets the scroll range for a scrollbar.
 
BOOL GetScrollRange (BOOL bVertical, LPINT lpMinPos, LPINT lpMaxPos) SCONST OVERRIDE
 Gets the scroll range for a scrollbar.
 
BOOL HasScrollBar (BOOL bVertical) SCONST OVERRIDE
 Checks if a scrollbar is present.
 
virtual void WINAPI GetClientRect (LPRECT pRect) const
 Gets the client rectangle.
 
virtual CRect GetClientRect () const
 Gets the client rectangle.
 

Protected Types

typedef SArray< DXLVITEMArrLvItem
 
- Protected Types inherited from IScrollBarHost
enum  kSbConst { Timer_Wait = 100 , Timer_Go = 101 , kTime_Wait = 200 , kTime_Go = 100 }
 

Protected Member Functions

virtual BOOL CreateChildren (SXmlNode xmlNode)
 Create child items from XML configuration.
 
int HitTest (const CPoint &pt)
 Hit test to determine the item under the mouse.
 
int GetTopIndex () const
 Get the index of the top visible item.
 
CRect GetItemRect (int nItem, int nSubItem=0)
 Get the rectangle of an item.
 
virtual void DrawItem (IRenderTarget *pRT, CRect rcItem, int nItem)
 Draw an item.
 
void RedrawItem (int nItem)
 Redraw a specific item.
 
void NotifySelChange (int nOldSel, int nNewSel, BOOL checkBox=FALSE)
 Notify of selection change.
 
void OnPaint (IRenderTarget *pRT)
 Paint the control.
 
void OnDestroy ()
 Handle destroy event.
 
BOOL OnHeaderClick (IEvtArgs *pEvt)
 Handle header click event.
 
BOOL OnHeaderSizeChanging (IEvtArgs *pEvt)
 Handle header size changing event.
 
BOOL OnHeaderSwap (IEvtArgs *pEvt)
 Handle header swap event.
 
virtual BOOL OnScroll (BOOL bVertical, UINT uCode, int nPos)
 Handle scroll event.
 
void OnLButtonDown (UINT nFlags, CPoint pt)
 Handle left mouse button down event.
 
void OnLButtonDbClick (UINT nFlags, CPoint pt)
 Handle left mouse button double-click event.
 
void OnLButtonUp (UINT nFlags, CPoint pt)
 Handle left mouse button up event.
 
void OnMouseMove (UINT nFlags, CPoint pt)
 Handle mouse move event.
 
void OnMouseLeave ()
 Handle mouse leave event.
 
void OnSize (UINT nType, CSize size)
 Handle size change event.
 
void UpdateChildrenPosition () OVERRIDE
 Update the position of child items.
 
CRect GetListRect ()
 Get the rectangle of the list.
 
void UpdateScrollBar ()
 Update the scroll bar.
 
void UpdateHeaderCtrl ()
 Update the header control.
 
BOOL HitCheckBox (const CPoint &pt)
 Hit test to determine if the point is on a checkbox.
 
virtual HRESULT SetAttribute (const SNS::SStringW &amp;amp;amp;amp;strAttribName, const SNS::SStringW &amp;amp;amp;amp;strValue, BOOL bLoading=FALSE)
 
- Protected Member Functions inherited from SPanel
CRect GetScrollBarRect (BOOL bVert) SCONST OVERRIDE
 Gets the rectangle of a scrollbar.
 
ISkinObjGetScrollBarSkin (BOOL bVert) SCONST OVERRIDE
 Gets the skin for a scrollbar.
 
const SCROLLINFO * GetScrollBarInfo (BOOL bVert) SCONST OVERRIDE
 Gets the scroll information for a scrollbar.
 
int GetScrollBarArrowSize (BOOL bVert) SCONST OVERRIDE
 Gets the arrow size for a scrollbar.
 
void OnScrollUpdatePart (BOOL bVert, int iPart) OVERRIDE
 Updates a part of the scrollbar.
 
void OnScrollUpdateThumbTrack (BOOL bVert, int nPos) OVERRIDE
 Updates the thumb track of the scrollbar.
 
ISwndContainerGetScrollBarContainer () OVERRIDE
 Gets the container for the scrollbar.
 
void OnScrollCommand (BOOL bVert, int iCmd, int nPos) OVERRIDE
 Handles scroll commands.
 
void OnScrollSetTimer (BOOL bVert, char id, UINT uElapse) OVERRIDE
 Sets a timer for the scrollbar.
 
void OnScrollKillTimer (BOOL bVert, char id) OVERRIDE
 Kills a timer for the scrollbar.
 
const IInterpolator * GetScrollInterpolator () SCONST OVERRIDE
 Gets the interpolator for the scrollbar.
 
int GetScrollFadeFrames () SCONST OVERRIDE
 Gets the number of fade frames for the scrollbar.
 
BYTE GetScrollThumbTrackMinAlpha () SCONST OVERRIDE
 Gets the minimum alpha value for the scrollbar thumb track.
 
virtual int GetScrollLineSize (BOOL bVertical)
 Gets the line size for scrolling.
 
virtual void OnColorize (COLORREF cr)
 Handles colorization events.
 
virtual void OnScaleChanged (int nScale)
 Handles scale change events.
 
virtual void OnContainerChanged (ISwndContainer *pOldContainer, ISwndContainer *pNewContainer)
 Handles container change events.
 
int GetSbWidth () const
 Gets the width of the scrollbar.
 
void ScrollUpdate ()
 Updates the scrollbar.
 
HRESULT OnAttrScrollbarSkin (SStringW strValue, BOOL bLoading)
 Handles the scrollbar skin attribute.
 
int OnCreate (LPVOID)
 Handles the WM_CREATE message.
 
void OnDestroy ()
 Handles the WM_DESTROY message.
 
void OnNcPaint (IRenderTarget *pRT)
 Handles the WM_NCPAINT message.
 
virtual BOOL OnNcHitTest (CPoint pt)
 Handles the WM_NCHITTEST message.
 
void OnNcLButtonDown (UINT nFlags, CPoint point)
 Handles the WM_NCLBUTTONDOWN message.
 
void OnNcLButtonUp (UINT nFlags, CPoint pt)
 Handles the WM_NCLBUTTONUP message.
 
void OnNcMouseMove (UINT nFlags, CPoint point)
 Handles the WM_NCMOUSEMOVE message.
 
void OnNcMouseLeave ()
 Handles the WM_NCMOUSELEAVE message.
 
LRESULT OnNcCalcSize (BOOL bCalcValidRects, LPARAM lParam)
 Handles the WM_NCCALCSIZE message.
 
BOOL OnMouseWheel (UINT nFlags, short zDelta, CPoint pt)
 Handles the WM_MOUSEWHEEL message.
 
void OnTimer (char cTimerID)
 Handles the WM_TIMER message.
 
void OnShowWindow (BOOL bShow, UINT nStatus)
 Handles the WM_SHOWWINDOW message.
 
void OnEnable (BOOL bEnable, UINT uStatus)
 Handles the WM_ENABLE message.
 
void OnVScroll (UINT nSBCode, UINT nPos, HWND hwnd)
 Handles the WM_VSCROLL message.
 
void OnHScroll (UINT nSBCode, UINT nPos, HWND hwnd)
 Handles the WM_HSCROLL message.
 
- Protected Member Functions inherited from IScrollBarHost
CRect GetScrollBarRect (BOOL bVert) SCONST PURE
 Gets the rectangle of the scrollbar.
 
ISkinObjGetScrollBarSkin (BOOL bVert) SCONST PURE
 Gets the skin for the scrollbar.
 
const SCROLLINFO * GetScrollBarInfo (BOOL bVert) SCONST PURE
 Gets the scroll information for the scrollbar.
 
int GetScrollBarArrowSize (BOOL bVert) SCONST PURE
 Gets the arrow size for the scrollbar.
 
void OnScrollUpdatePart (BOOL bVert, int iPart) PURE
 Updates a part of the scrollbar.
 
void OnScrollUpdateThumbTrack (BOOL bVert, int nPos) PURE
 Updates the thumb track of the scrollbar.
 
ISwndContainerGetScrollBarContainer () PURE
 Gets the container for the scrollbar.
 
BOOL IsScrollBarEnable (BOOL bVertical) SCONST PURE
 Checks if the scrollbar is enabled.
 
void OnScrollCommand (BOOL bVert, int iCmd, int nPos) PURE
 Handles scroll commands.
 
void OnScrollSetTimer (BOOL bVert, char id, UINT uElapse) PURE
 Sets a timer for the scrollbar.
 
void OnScrollKillTimer (BOOL bVert, char id) PURE
 Kills a timer for the scrollbar.
 
const IInterpolator * GetScrollInterpolator () SCONST PURE
 Gets the interpolator for the scrollbar.
 
int GetScrollFadeFrames () SCONST PURE
 Gets the number of fade frames for the scrollbar.
 
BYTE GetScrollThumbTrackMinAlpha () SCONST PURE
 Gets the minimum alpha value for the scrollbar thumb track.
 

Protected Attributes

int m_nHeaderHeight
 
int m_nItemHeight
 
int m_nSelectItem
 
int m_nHoverItem
 
BOOL m_bHotTrack
 
CPoint m_ptIcon
 
CPoint m_ptText
 
COLORREF m_crItemBg
 
COLORREF m_crItemBg2
 
COLORREF m_crItemSelBg
 
COLORREF m_crItemHotBg
 
COLORREF m_crText
 
COLORREF m_crSelText
 
SAutoRefPtr< ISkinObjm_pItemSkin
 
SAutoRefPtr< ISkinObjm_pIconSkin
 
SAutoRefPtr< ISkinObjm_pCheckSkin
 
BOOL m_bCheckBox
 
BOOL m_bMultiSelection
 
SHeaderCtrlm_pHeader
 
ArrLvItem m_arrItems
 
CPoint m_ptOrigin
 
- Protected Attributes inherited from SPanel
SCROLLINFO m_siVer
 
SCROLLINFO m_siHoz
 
SAutoRefPtr< SSkinScrollbarm_pSkinSb
 
CRect m_rcClient
 
SLayoutSize m_nSbLeft
 
SLayoutSize m_nSbRight
 
SLayoutSize m_nSbTop
 
SLayoutSize m_nSbBottom
 
ScrollBarID m_dragSb
 
ScrollBarID m_hitSb
 
UINT m_wBarVisible
 
UINT m_wBarEnable
 
SScrollBarHandler m_sbVert
 
SScrollBarHandler m_sbHorz
 
DWORD m_dwUpdateTime
 
DWORD m_dwUpdateInterval
 
short m_zDelta
 
int m_nScrollSpeed
 
SAutoRefPtr< IInterpolator > m_fadeInterpolator
 
int m_fadeFrames
 
BYTE m_bySbThumbTrackMinAlpha
 

Detailed Description

List Control.

A control that displays a list of items with multiple columns and subitems.

Definition at line 83 of file SListCtrl.h.

Member Typedef Documentation

◆ ArrLvItem

typedef SArray<DXLVITEM> SListCtrl::ArrLvItem
protected

Array of items

Definition at line 482 of file SListCtrl.h.

Constructor & Destructor Documentation

◆ SListCtrl()

SNSBEGIN SListCtrl::SListCtrl ( )

Constructor.

Definition at line 11 of file SListCtrl.cpp.

◆ ~SListCtrl()

SListCtrl::~SListCtrl ( )
virtual

Destructor.

Definition at line 39 of file SListCtrl.cpp.

Member Function Documentation

◆ CreateChildren()

BOOL SListCtrl::CreateChildren ( SXmlNode xmlNode)
protectedvirtual

Create child items from XML configuration.

Parameters
xmlNodeXML node for the child items
Returns
TRUE if successful, FALSE otherwise

Reimplemented from SWindow.

Definition at line 56 of file SListCtrl.cpp.

◆ DeleteAllItems()

void SListCtrl::DeleteAllItems ( )

Delete all items.

Definition at line 407 of file SListCtrl.cpp.

◆ DeleteColumn()

void SListCtrl::DeleteColumn ( int iCol)

Delete a specific column.

Parameters
iColIndex of the column to delete

Definition at line 380 of file SListCtrl.cpp.

◆ DeleteItem()

void SListCtrl::DeleteItem ( int nItem)

Delete a specific item.

Parameters
nItemIndex of the item to delete

Definition at line 356 of file SListCtrl.cpp.

◆ DrawItem()

void SListCtrl::DrawItem ( IRenderTarget * pRT,
CRect rcItem,
int nItem )
protectedvirtual

Draw an item.

Parameters
pRTRendering target handle
rcItemRectangle for the item
nItemIndex of the item

Definition at line 567 of file SListCtrl.cpp.

◆ EnableCheckBox()

VOID SListCtrl::EnableCheckBox ( BOOL enable)
inline

Enable or disable checkboxes.

Parameters
enableEnable flag

Definition at line 283 of file SListCtrl.h.

◆ EnableHotTrack()

VOID SListCtrl::EnableHotTrack ( BOOL enable)
inline

Enable or disable hot tracking.

Parameters
enableEnable flag

Definition at line 292 of file SListCtrl.h.

◆ EnableMultiSelection()

VOID SListCtrl::EnableMultiSelection ( BOOL enable)
inline

Enable or disable multiple selection.

Parameters
enableEnable flag

Definition at line 274 of file SListCtrl.h.

◆ GetCheckedItemCount()

int SListCtrl::GetCheckedItemCount ( )

Get the number of checked items.

Returns
Number of checked items

Definition at line 938 of file SListCtrl.cpp.

◆ GetCheckState()

BOOL SListCtrl::GetCheckState ( int nItem)

Get the check state of an item.

Parameters
nItemIndex of the item
Returns
Check state of the item

Definition at line 915 of file SListCtrl.cpp.

◆ GetColumnCount()

int SListCtrl::GetColumnCount ( ) const

Get the total number of columns.

Returns
Number of columns

Definition at line 708 of file SListCtrl.cpp.

◆ GetCountPerPage()

int SListCtrl::GetCountPerPage ( BOOL bPartial)

Get the number of items per page.

Parameters
bPartialWhether to include partial items
Returns
Number of items per page

Definition at line 507 of file SListCtrl.cpp.

◆ GetFirstCheckedItem()

int SListCtrl::GetFirstCheckedItem ( )

Get the first checked item.

Returns
Index of the first checked item

Definition at line 952 of file SListCtrl.cpp.

◆ GetHeaderCtrl()

SHeaderCtrl * SListCtrl::GetHeaderCtrl ( ) const

Get the header control.

Returns
Pointer to the header control

Definition at line 984 of file SListCtrl.cpp.

◆ GetItemCount()

int SListCtrl::GetItemCount ( ) const

Get the total number of items.

Returns
Number of items

Definition at line 199 of file SListCtrl.cpp.

◆ GetItemData()

LPARAM SListCtrl::GetItemData ( int nItem)

Get the data associated with an item.

Parameters
nItemIndex of the item
Returns
Additional data

Definition at line 109 of file SListCtrl.cpp.

◆ GetItemRect()

CRect SListCtrl::GetItemRect ( int nItem,
int nSubItem = 0 )
protected

Get the rectangle of an item.

Parameters
nItemIndex of the item
nSubItemIndex of the subitem
Returns
Rectangle of the item

Definition at line 432 of file SListCtrl.cpp.

◆ GetLastCheckedItem()

int SListCtrl::GetLastCheckedItem ( )

Get the last checked item.

Returns
Index of the last checked item

Definition at line 968 of file SListCtrl.cpp.

◆ GetListRect()

CRect SListCtrl::GetListRect ( )
protected

Get the rectangle of the list.

Returns
Rectangle of the list

Definition at line 228 of file SListCtrl.cpp.

◆ GetSelectedItem()

int SListCtrl::GetSelectedItem ( )

Get the selected item.

Returns
Index of the selected item

Definition at line 186 of file SListCtrl.cpp.

◆ GetSubItem()

BOOL SListCtrl::GetSubItem ( int nItem,
int nSubItem,
DXLVSUBITEM * plv ) const

Get a subitem.

Parameters
nItemIndex of the item
nSubItemIndex of the subitem
plvPointer to the subitem structure
Returns
TRUE if successful, FALSE otherwise

Definition at line 139 of file SListCtrl.cpp.

◆ GetSubItemText()

SStringT SListCtrl::GetSubItemText ( int nItem,
int nSubItem ) const

Get the text of a subitem.

Parameters
nItemIndex of the item
nSubItemIndex of the subitem
Returns
Text of the subitem

Definition at line 177 of file SListCtrl.cpp.

◆ GetTopIndex()

int SListCtrl::GetTopIndex ( ) const
protected

Get the index of the top visible item.

Returns
Index of the top visible item

Definition at line 716 of file SListCtrl.cpp.

◆ HitCheckBox()

BOOL SListCtrl::HitCheckBox ( const CPoint & pt)
protected

Hit test to determine if the point is on a checkbox.

Parameters
ptMouse coordinates
Returns
TRUE if on a checkbox, FALSE otherwise

Definition at line 547 of file SListCtrl.cpp.

◆ HitTest()

int SListCtrl::HitTest ( const CPoint & pt)
protected

Hit test to determine the item under the mouse.

Parameters
ptMouse coordinates
Returns
Index of the item or -1 if no item

Definition at line 465 of file SListCtrl.cpp.

◆ InsertColumn()

int SListCtrl::InsertColumn ( int nIndex,
LPCTSTR pszText,
int nWidth,
UINT fmt,
LPARAM lParam = 0 )

Insert a column.

Parameters
nIndexIndex at which to insert the column
pszTextColumn title
nWidthColumn width
fmtFormat flags
lParamAdditional parameter
Returns
Index of the inserted column

Definition at line 43 of file SListCtrl.cpp.

◆ InsertItem()

int SListCtrl::InsertItem ( int nItem,
LPCTSTR pszText,
int nImage = -1 )

Insert an item.

Parameters
nItemIndex at which to insert the item
pszTextText of the item
nImageIcon index
Returns
Index of the inserted item

Definition at line 75 of file SListCtrl.cpp.

◆ NotifySelChange()

void SListCtrl::NotifySelChange ( int nOldSel,
int nNewSel,
BOOL checkBox = FALSE )
protected

Notify of selection change.

Parameters
nOldSelOld selected index
nNewSelNew selected index
checkBoxWhether the change is due to a checkbox

Definition at line 721 of file SListCtrl.cpp.

◆ OnDestroy()

void SListCtrl::OnDestroy ( )
protected

Handle destroy event.

Definition at line 701 of file SListCtrl.cpp.

◆ OnHeaderClick()

BOOL SListCtrl::OnHeaderClick ( IEvtArgs * pEvt)
protected

Handle header click event.

Parameters
pEvtEvent arguments
Returns
TRUE if handled, FALSE otherwise

Definition at line 875 of file SListCtrl.cpp.

◆ OnHeaderSizeChanging()

BOOL SListCtrl::OnHeaderSizeChanging ( IEvtArgs * pEvt)
protected

Handle header size changing event.

Parameters
pEvtEvent arguments
Returns
TRUE if handled, FALSE otherwise

Definition at line 880 of file SListCtrl.cpp.

◆ OnHeaderSwap()

BOOL SListCtrl::OnHeaderSwap ( IEvtArgs * pEvt)
protected

Handle header swap event.

Parameters
pEvtEvent arguments
Returns
TRUE if handled, FALSE otherwise

Definition at line 888 of file SListCtrl.cpp.

◆ OnLButtonDbClick()

void SListCtrl::OnLButtonDbClick ( UINT nFlags,
CPoint pt )
protected

Handle left mouse button double-click event.

Parameters
nFlagsFlags
ptMouse coordinates

Definition at line 846 of file SListCtrl.cpp.

◆ OnLButtonDown()

void SListCtrl::OnLButtonDown ( UINT nFlags,
CPoint pt )
protected

Handle left mouse button down event.

Parameters
nFlagsFlags
ptMouse coordinates

Definition at line 832 of file SListCtrl.cpp.

◆ OnLButtonUp()

void SListCtrl::OnLButtonUp ( UINT nFlags,
CPoint pt )
protected

Handle left mouse button up event.

Parameters
nFlagsFlags
ptMouse coordinates

Definition at line 857 of file SListCtrl.cpp.

◆ OnMouseLeave()

void SListCtrl::OnMouseLeave ( )
protected

Handle mouse leave event.

Definition at line 905 of file SListCtrl.cpp.

◆ OnMouseMove()

void SListCtrl::OnMouseMove ( UINT nFlags,
CPoint pt )
protected

Handle mouse move event.

Parameters
nFlagsFlags
ptMouse coordinates

Definition at line 895 of file SListCtrl.cpp.

◆ OnPaint()

void SListCtrl::OnPaint ( IRenderTarget * pRT)
protected

Paint the control.

Parameters
pRTRendering target handle

Definition at line 526 of file SListCtrl.cpp.

◆ OnScroll()

BOOL SListCtrl::OnScroll ( BOOL bVertical,
UINT uCode,
int nPos )
protectedvirtual

Handle scroll event.

Parameters
bVerticalWhether the scroll is vertical
uCodeScroll type
nPosScroll position
Returns
TRUE if handled, FALSE otherwise

Reimplemented from SPanel.

Definition at line 810 of file SListCtrl.cpp.

◆ OnSize()

void SListCtrl::OnSize ( UINT nType,
CSize size )
protected

Handle size change event.

Parameters
nTypeSize change type
sizeNew size

Definition at line 868 of file SListCtrl.cpp.

◆ RedrawItem()

void SListCtrl::RedrawItem ( int nItem)
protected

Redraw a specific item.

Parameters
nItemIndex of the item to redraw

Definition at line 481 of file SListCtrl.cpp.

◆ SetAttribute()

virtual HRESULT SListCtrl::SetAttribute ( const SNS::SStringW &amp;amp;amp;amp; strAttribName,
const SNS::SStringW &amp;amp;amp;amp; strValue,
BOOL bLoading = FALSE )
inlineprotectedvirtual

Reimplemented from SPanel.

Definition at line 489 of file SListCtrl.h.

◆ SetCheckState()

BOOL SListCtrl::SetCheckState ( int nItem,
BOOL bCheck )

Set the check state of an item.

Parameters
nItemIndex of the item
bCheckCheck state to set
Returns
TRUE if successful, FALSE otherwise

Definition at line 924 of file SListCtrl.cpp.

◆ SetItemCount()

BOOL SListCtrl::SetItemCount ( int nItems,
int nGrowBy )

Set the total number of items.

Parameters
nItemsNumber of items
nGrowByGrowth increment
Returns
TRUE if successful, FALSE otherwise

Definition at line 207 of file SListCtrl.cpp.

◆ SetItemData()

BOOL SListCtrl::SetItemData ( int nItem,
LPARAM dwData )

Set the data associated with an item.

Parameters
nItemIndex of the item
dwDataAdditional data
Returns
TRUE if successful, FALSE otherwise

Definition at line 99 of file SListCtrl.cpp.

◆ SetSelectedItem()

void SListCtrl::SetSelectedItem ( int nItem)

Set the selected item.

Parameters
nItemIndex of the item to select

Definition at line 191 of file SListCtrl.cpp.

◆ SetSubItem()

BOOL SListCtrl::SetSubItem ( int nItem,
int nSubItem,
const DXLVSUBITEM * plv )

Set a subitem.

Parameters
nItemIndex of the item
nSubItemIndex of the subitem
plvPointer to the subitem structure
Returns
TRUE if successful, FALSE otherwise

Definition at line 119 of file SListCtrl.cpp.

◆ SetSubItemText()

BOOL SListCtrl::SetSubItemText ( int nItem,
int nSubItem,
LPCTSTR pszText )

Set the text of a subitem.

Parameters
nItemIndex of the item
nSubItemIndex of the subitem
pszTextText to set
Returns
TRUE if successful, FALSE otherwise

Definition at line 156 of file SListCtrl.cpp.

◆ SortItems()

BOOL SListCtrl::SortItems ( PFNLVCOMPAREEX pfnCompare,
void * pContext )

Sort items using a comparison function.

Parameters
pfnCompareComparison function
pContextContext for the comparison function
Returns
TRUE if successful, FALSE otherwise

Definition at line 517 of file SListCtrl.cpp.

◆ UpdateChildrenPosition()

void SListCtrl::UpdateChildrenPosition ( )
protected

Update the position of child items.

Definition at line 862 of file SListCtrl.cpp.

◆ UpdateHeaderCtrl()

void SListCtrl::UpdateHeaderCtrl ( )
protected

Update the header control.

Definition at line 345 of file SListCtrl.cpp.

◆ UpdateScrollBar()

void SListCtrl::UpdateScrollBar ( )
protected

Update the scroll bar.

Definition at line 240 of file SListCtrl.cpp.

Member Data Documentation

◆ m_arrItems

ArrLvItem SListCtrl::m_arrItems
protected

Array of items

Definition at line 485 of file SListCtrl.h.

◆ m_bCheckBox

BOOL SListCtrl::m_bCheckBox
protected

Checkbox enable flag

Definition at line 478 of file SListCtrl.h.

◆ m_bHotTrack

BOOL SListCtrl::m_bHotTrack
protected

Hot tracking flag

Definition at line 463 of file SListCtrl.h.

◆ m_bMultiSelection

BOOL SListCtrl::m_bMultiSelection
protected

Multiple selection enable flag

Definition at line 479 of file SListCtrl.h.

◆ m_crItemBg

COLORREF SListCtrl::m_crItemBg
protected

Background color

Definition at line 468 of file SListCtrl.h.

◆ m_crItemBg2

COLORREF SListCtrl::m_crItemBg2
protected

Background color for even rows

Definition at line 469 of file SListCtrl.h.

◆ m_crItemHotBg

COLORREF SListCtrl::m_crItemHotBg
protected

Hot item background color

Definition at line 471 of file SListCtrl.h.

◆ m_crItemSelBg

COLORREF SListCtrl::m_crItemSelBg
protected

Selected item background color

Definition at line 470 of file SListCtrl.h.

◆ m_crSelText

COLORREF SListCtrl::m_crSelText
protected

Selected text color

Definition at line 473 of file SListCtrl.h.

◆ m_crText

COLORREF SListCtrl::m_crText
protected

Text color

Definition at line 472 of file SListCtrl.h.

◆ m_nHeaderHeight

int SListCtrl::m_nHeaderHeight
protected

Height of the header

Definition at line 458 of file SListCtrl.h.

◆ m_nHoverItem

int SListCtrl::m_nHoverItem
protected

Index of the item under the mouse

Definition at line 462 of file SListCtrl.h.

◆ m_nItemHeight

int SListCtrl::m_nItemHeight
protected

Height of the items

Definition at line 459 of file SListCtrl.h.

◆ m_nSelectItem

int SListCtrl::m_nSelectItem
protected

Index of the selected item

Definition at line 461 of file SListCtrl.h.

◆ m_pCheckSkin

SAutoRefPtr<ISkinObj> SListCtrl::m_pCheckSkin
protected

Skin for checkboxes

Definition at line 477 of file SListCtrl.h.

◆ m_pHeader

SHeaderCtrl* SListCtrl::m_pHeader
protected

Header control

Definition at line 484 of file SListCtrl.h.

◆ m_pIconSkin

SAutoRefPtr<ISkinObj> SListCtrl::m_pIconSkin
protected

Skin for icons

Definition at line 476 of file SListCtrl.h.

◆ m_pItemSkin

SAutoRefPtr<ISkinObj> SListCtrl::m_pItemSkin
protected

Skin for items

Definition at line 475 of file SListCtrl.h.

◆ m_ptIcon

CPoint SListCtrl::m_ptIcon
protected

Icon position

Definition at line 465 of file SListCtrl.h.

◆ m_ptOrigin

CPoint SListCtrl::m_ptOrigin
protected

Origin point

Definition at line 486 of file SListCtrl.h.

◆ m_ptText

CPoint SListCtrl::m_ptText
protected

Text position

Definition at line 466 of file SListCtrl.h.


The documentation for this class was generated from the following files: