X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/6c02c32922ecd6b3272c89669e3fe1304cd9dfac..138618acb91e2a879a735c5806f9f728220f14df:/include/wx/msw/listctrl.h diff --git a/include/wx/msw/listctrl.h b/include/wx/msw/listctrl.h index 6f6a05f3c3..5de83175f9 100644 --- a/include/wx/msw/listctrl.h +++ b/include/wx/msw/listctrl.h @@ -21,8 +21,9 @@ #include "wx/control.h" #include "wx/event.h" #include "wx/hash.h" +#include "wx/textctrl.h" + -class WXDLLEXPORT wxTextCtrl; class WXDLLEXPORT wxImageList; /* @@ -190,6 +191,14 @@ public: // view, otherwise the large icon view. int GetItemSpacing(bool isSmall) const; + // Foreground colour of an item. + void SetItemTextColour( long item, const wxColour& col); + wxColour GetItemTextColour( long item ) const; + + // Background colour of an item. + void SetItemBackgroundColour( long item, const wxColour &col); + wxColour GetItemBackgroundColour( long item ) const; + // Gets the number of selected items in the list control int GetSelectedItemCount() const; @@ -231,6 +240,10 @@ public: // returns true if it is a virtual list control bool IsVirtual() const { return (GetWindowStyle() & wxLC_VIRTUAL) != 0; } + // refresh items selectively (only useful for virtual list controls) + void RefreshItem(long item); + void RefreshItems(long itemFrom, long itemTo); + // Operations //////////////////////////////////////////////////////////////////////////// @@ -343,8 +356,8 @@ protected: // common part of all ctors void Init(); - // free memory taken by all attributes and recreate the hash table - void FreeAllAttrs(bool dontRecreate = FALSE); + // free memory taken by all internal data + void FreeAllInternalData(); wxTextCtrl* m_textCtrl; // The control used for editing a label wxImageList * m_imageListNormal; // The image list for normal icons @@ -358,8 +371,8 @@ protected: int m_colCount; // Windows doesn't have GetColumnCount so must // keep track of inserted/deleted columns - // the hash table we use for storing pointers to the items attributes - wxHashTable m_attrs; + // TRUE if we have any internal data (user data & attributes) + bool m_AnyInternalData; // TRUE if we have any items with custom attributes bool m_hasAnyAttr; @@ -379,11 +392,15 @@ protected: private: bool DoCreateControl(int x, int y, int w, int h); + // process NM_CUSTOMDRAW notification message + WXLPARAM OnCustomDraw(WXLPARAM lParam); + DECLARE_DYNAMIC_CLASS(wxListCtrl) DECLARE_EVENT_TABLE() + DECLARE_NO_COPY_CLASS(wxListCtrl) }; #endif // wxUSE_LISTCTRL -#endif - // _WX_LISTCTRL_H_ +#endif // _WX_LISTCTRL_H_ +