X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/ec157c8f95dfa40b19202a320e7a1d60995d2c8e..7bd30a12ade503fd135c686ecc98a6f6d5fecbeb:/include/wx/palmos/treectrl.h diff --git a/include/wx/palmos/treectrl.h b/include/wx/palmos/treectrl.h index c73ffc730e..32b5fc9656 100644 --- a/include/wx/palmos/treectrl.h +++ b/include/wx/palmos/treectrl.h @@ -1,10 +1,10 @@ ///////////////////////////////////////////////////////////////////////////// // Name: wx/palmos/treectrl.h // Purpose: wxTreeCtrl class -// Author: William Osborne +// Author: William Osborne - minimal working wxPalmOS port // Modified by: // Created: 10/13/04 -// RCS-ID: $Id: +// RCS-ID: $Id$ // Copyright: (c) William Osborne // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -16,10 +16,6 @@ // headers // ---------------------------------------------------------------------------- -#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) - #pragma interface "treectrl.h" -#endif - #if wxUSE_TREECTRL #include "wx/textctrl.h" @@ -27,33 +23,10 @@ #include "wx/treebase.h" #include "wx/hashmap.h" -#ifdef __GNUWIN32__ - // Cygwin windows.h defines these identifiers - #undef GetFirstChild - #undef GetNextSibling -#endif // Cygwin - // fwd decl -class WXDLLEXPORT wxImageList; -class WXDLLEXPORT wxDragImage; -struct WXDLLEXPORT wxTreeViewItem; - -// NB: all the following flags are for compatbility only and will be removed in the -// next versions - -// flags for deprecated `Expand(int action)' -enum -{ - wxTREE_EXPAND_EXPAND, - wxTREE_EXPAND_COLLAPSE, - wxTREE_EXPAND_COLLAPSE_RESET, - wxTREE_EXPAND_TOGGLE -}; - -// flags for deprecated InsertItem() variant (their values are the same as of -// TVI_FIRST and TVI_LAST) -#define wxTREE_INSERT_FIRST 0xFFFF0001 -#define wxTREE_INSERT_LAST 0xFFFF0002 +class WXDLLIMPEXP_CORE wxImageList; +class WXDLLIMPEXP_CORE wxDragImage; +struct WXDLLIMPEXP_FWD_CORE wxTreeViewItem; // hash storing attributes for our items WX_DECLARE_EXPORTED_VOIDPTR_HASH_MAP(wxTreeItemAttr *, wxMapTreeAttr); @@ -62,7 +35,7 @@ WX_DECLARE_EXPORTED_VOIDPTR_HASH_MAP(wxTreeItemAttr *, wxMapTreeAttr); // wxTreeCtrl // ---------------------------------------------------------------------------- -class WXDLLEXPORT wxTreeCtrl : public wxControl +class WXDLLIMPEXP_CORE wxTreeCtrl : public wxControl { public: // creation @@ -92,7 +65,7 @@ public: // --------- // get the total number of items in the control - size_t GetCount() const; + virtual unsigned int GetCount() const; // indent is the number of pixels the children are indented relative to // the parents position. SetIndent() also redraws the control @@ -324,7 +297,7 @@ public: // been before. textCtrlClass parameter allows you to create an edit // control of arbitrary user-defined class deriving from wxTextCtrl. wxTextCtrl* EditLabel(const wxTreeItemId& item, - wxClassInfo* textCtrlClass = CLASSINFO(wxTextCtrl)); + wxClassInfo* textCtrlClass = wxCLASSINFO(wxTextCtrl)); // returns the same pointer as StartEdit() if the item is being edited, // NULL otherwise (it's assumed that no more than one item may be // edited simultaneously) @@ -363,42 +336,6 @@ public: wxRect& rect, bool textOnly = false) const; - // deprecated - // ---------- - -#if WXWIN_COMPATIBILITY_2_4 - // these methods are deprecated and will be removed in future versions of - // wxWidgets, they're here for compatibility only, don't use them in new - // code (the comments indicate why these methods are now useless and how to - // replace them) - - // use Expand, Collapse, CollapseAndReset or Toggle - wxDEPRECATED( void ExpandItem(const wxTreeItemId& item, int action) ); - - // use AddRoot, PrependItem or AppendItem - wxDEPRECATED( wxTreeItemId InsertItem(const wxTreeItemId& parent, - const wxString& text, - int image = -1, int selImage = -1, - long insertAfter = wxTREE_INSERT_LAST) ); - - // use Set/GetImageList and Set/GetStateImageList - wxImageList *GetImageList(int) const { return GetImageList(); } - void SetImageList(wxImageList *imageList, int) { SetImageList(imageList); } - - // use Set/GetItemImage directly - int GetItemSelectedImage(const wxTreeItemId& item) const - { return GetItemImage(item, wxTreeItemIcon_Selected); } - void SetItemSelectedImage(const wxTreeItemId& item, int image) - { SetItemImage(item, image, wxTreeItemIcon_Selected); } - - // use the versions taking wxTreeItemIdValue cookies - wxDEPRECATED( wxTreeItemId GetFirstChild(const wxTreeItemId& item, - long& cookie) const ); - wxDEPRECATED( wxTreeItemId GetNextChild(const wxTreeItemId& item, - long& cookie) const ); -#endif // WXWIN_COMPATIBILITY_2_4 - - // implementation // -------------- @@ -462,7 +399,7 @@ private: void DeleteTextCtrl(); // support for additional item images which we implement using - // wxTreeItemIndirectData technique - see the comments in msw/treectrl.cpp + // wxTreeItemIndirectData technique void SetIndirectItemData(const wxTreeItemId& item, class wxTreeItemIndirectData *data); bool HasIndirectData(const wxTreeItemId& item) const; @@ -488,10 +425,9 @@ private: friend class wxTreeSortHelper; DECLARE_DYNAMIC_CLASS(wxTreeCtrl) - DECLARE_NO_COPY_CLASS(wxTreeCtrl) + wxDECLARE_NO_COPY_CLASS(wxTreeCtrl); }; #endif // wxUSE_TREECTRL -#endif - // _WX_TREECTRL_H_ +#endif // _WX_TREECTRL_H_