X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/6e2f308461d54c1a8df63feff4a652c56f993801..d65e9d5707e2e80127ef85927d191c4911169f13:/include/wx/msw/listctrl.h diff --git a/include/wx/msw/listctrl.h b/include/wx/msw/listctrl.h index fa74009fc9..280c3f842b 100644 --- a/include/wx/msw/listctrl.h +++ b/include/wx/msw/listctrl.h @@ -14,8 +14,10 @@ #include "wx/textctrl.h" #include "wx/dynarray.h" +#include "wx/vector.h" class WXDLLIMPEXP_FWD_CORE wxImageList; +class wxMSWListItemData; // define this symbol to indicate the availability of SetColumnsOrder() and // related functions @@ -171,7 +173,7 @@ public: bool SetItemColumnImage(long item, long column, int image); // Gets the item text - wxString GetItemText(long item) const; + wxString GetItemText(long item, int col = 0) const; // Sets the item text void SetItemText(long item, const wxString& str); @@ -286,7 +288,7 @@ public: void ClearAll(); // Edit the label - wxTextCtrl* EditLabel(long item, wxClassInfo* textControlClass = CLASSINFO(wxTextCtrl)); + wxTextCtrl* EditLabel(long item, wxClassInfo* textControlClass = wxCLASSINFO(wxTextCtrl)); // End label editing, optionally cancelling the edit bool EndEditLabel(bool cancel); @@ -353,7 +355,7 @@ public: // or zero if the two items are equivalent. // data is arbitrary data to be passed to the sort function. - bool SortItems(wxListCtrlCompare fn, wxUIntPtr data); + bool SortItems(wxListCtrlCompare fn, wxIntPtr data); // IMPLEMENTATION virtual bool MSWCommand(WXUINT param, WXWORD id); @@ -400,6 +402,9 @@ protected: // free memory taken by all internal data void FreeAllInternalData(); + // get the internal data object for this item (may return NULL) + wxMSWListItemData *MSWGetItemData(long item) const; + // get the item attribute, either by quering it for virtual control, or by // returning the one previously set using setter methods for a normal one wxListItemAttr *DoGetItemColumnAttr(long item, long column) const; @@ -417,10 +422,9 @@ protected: // keep track of inserted/deleted columns long m_count; // Keep track of item count to save calls to // ListView_GetItemCount - bool m_ignoreChangeMessages; - // true if we have any internal data (user data & attributes) - bool m_AnyInternalData; + // all wxMSWListItemData objects we use + wxVector m_internalData; // true if we have any items with custom attributes bool m_hasAnyAttr;