X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/5445a26cc480e03c4dcf2ba54b0881e1fa9330e5..1f0acb435592470b421b80df854fbbb08cd2853f:/include/wx/palmos/listctrl.h?ds=inline diff --git a/include/wx/palmos/listctrl.h b/include/wx/palmos/listctrl.h index 19a6725883..aad5f3cdba 100644 --- a/include/wx/palmos/listctrl.h +++ b/include/wx/palmos/listctrl.h @@ -1,10 +1,10 @@ ///////////////////////////////////////////////////////////////////////////// // Name: wx/palmos/listctrl.h // Purpose: wxListCtrl class -// Author: William Osborne -// Modified by: +// Author: William Osborne - minimal working wxPalmOS port +// Modified by: Yunhui Fu // Created: 10/13/04 -// RCS-ID: $Id: +// RCS-ID: $Id$ // Copyright: (c) William Osborne // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -12,10 +12,6 @@ #ifndef _WX_LISTCTRL_H_ #define _WX_LISTCTRL_H_ -#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) - #pragma interface "listctrl.h" -#endif - #if wxUSE_LISTCTRL #include "wx/control.h" @@ -24,7 +20,7 @@ #include "wx/textctrl.h" -class WXDLLEXPORT wxImageList; +class WXDLLIMPEXP_FWD_CORE wxImageList; /* The wxListCtrl can show lists of items in four different modes: @@ -72,15 +68,12 @@ class WXDLLEXPORT wxImageList; - addition of further convenience functions to avoid use of wxListItem in some functions - state/overlay images: probably not needed. - - in Win95, you can be called back to supply other information - besides text, such as state information. This saves no memory - and is probably superfluous to requirements. - testing of whole API, extending current sample. */ -class WXDLLEXPORT wxListCtrl: public wxControl +class WXDLLIMPEXP_CORE wxListCtrl: public wxControl { public: /* @@ -95,7 +88,7 @@ public: const wxSize& size = wxDefaultSize, long style = wxLC_ICON, const wxValidator& validator = wxDefaultValidator, - const wxString& name = _T("wxListCtrl")) + const wxString& name = wxListCtrlNameStr) { Init(); @@ -110,7 +103,7 @@ public: const wxSize& size = wxDefaultSize, long style = wxLC_ICON, const wxValidator& validator = wxDefaultValidator, - const wxString& name = _T("wxListCtrl")); + const wxString& name = wxListCtrlNameStr); // Attributes @@ -161,6 +154,7 @@ public: // Sets the item image bool SetItemImage(long item, int image, int selImage) ; + bool SetItemColumnImage(long item, long column, int image); // Gets the item text wxString GetItemText(long item) const ; @@ -172,7 +166,8 @@ public: long GetItemData(long item) const ; // Sets the item data - bool SetItemData(long item, long data) ; + bool SetItemPtrData(long item, wxUIntPtr data); + bool SetItemData(long item, long data) { return SetItemPtrData(item, data); } // Gets the item rectangle bool GetItemRect(long item, wxRect& rect, int code = wxLIST_RECT_BOUNDS) const ; @@ -216,9 +211,6 @@ public: // Add or remove a single window style void SetSingleStyle(long style, bool add = true) ; - // Set the whole window style - void SetWindowStyleFlag(long style) ; - // Searches for an item, starting from 'item'. // item can be -1 to find the first item that matches the // specified flags. @@ -229,12 +221,6 @@ public: wxImageList *GetImageList(int which) const ; // Sets the image list - // N.B. There's a quirk in the Win95 list view implementation. - // If in wxLC_LIST mode, it'll *still* display images by the labels if - // there's a small-icon image list set for the control - even though you - // haven't specified wxLIST_MASK_IMAGE when inserting. - // So you have to set a NULL small-icon image list to be sure that - // the wxLC_LIST mode works without icons. Of course, you may want icons... void SetImageList(wxImageList *imageList, int which) ; void AssignImageList(wxImageList *imageList, int which) ; @@ -270,7 +256,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); @@ -357,10 +343,6 @@ public: static wxVisualAttributes GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL); - - // obsolete stuff, for compatibility only -- don't use - wxDEPRECATED( int GetItemSpacing(bool isSmall) const); - protected: // common part of all ctors void Init(); @@ -394,22 +376,21 @@ protected: // return the text for the given column of the given item virtual wxString OnGetItemText(long item, long column) const; - // return the icon for the given item + // return the icon for the given item. In report view, OnGetItemImage will + // only be called for the first column. See OnGetItemColumnImage for + // details. virtual int OnGetItemImage(long item) const; // return the attribute for the item (may return NULL if none) virtual wxListItemAttr *OnGetItemAttr(long item) const; private: - // process NM_CUSTOMDRAW notification message - WXLPARAM OnCustomDraw(WXLPARAM lParam); DECLARE_DYNAMIC_CLASS(wxListCtrl) DECLARE_EVENT_TABLE() - DECLARE_NO_COPY_CLASS(wxListCtrl) + wxDECLARE_NO_COPY_CLASS(wxListCtrl); }; #endif // wxUSE_LISTCTRL #endif // _WX_LISTCTRL_H_ -