X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/371a5b4e62eb415107e045588f614fa49e866e78..487f2d58e9d1c28cc54e9800affd91623adadac7:/include/wx/generic/treectlg.h?ds=sidebyside diff --git a/include/wx/generic/treectlg.h b/include/wx/generic/treectlg.h index c27a8608b0..e4e7ecbceb 100644 --- a/include/wx/generic/treectlg.h +++ b/include/wx/generic/treectlg.h @@ -12,7 +12,7 @@ #ifndef _GENERIC_TREECTRL_H_ #define _GENERIC_TREECTRL_H_ -#if defined(__GNUG__) && !defined(__APPLE__) +#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) #pragma interface "treectlg.h" #endif @@ -221,9 +221,11 @@ public: // the same! // get the first child of this item - wxTreeItemId GetFirstChild(const wxTreeItemId& item, long& cookie) const; + wxTreeItemId GetFirstChild(const wxTreeItemId& item, + wxTreeItemIdValue& cookie) const; // get the next child - wxTreeItemId GetNextChild(const wxTreeItemId& item, long& cookie) const; + wxTreeItemId GetNextChild(const wxTreeItemId& item, + wxTreeItemIdValue& cookie) const; // get the last child of this item - this method doesn't use cookies wxTreeItemId GetLastChild(const wxTreeItemId& item) const; @@ -342,14 +344,24 @@ public: // NB: this function is not reentrant and not MT-safe (FIXME)! void SortChildren(const wxTreeItemId& item); +#if WXWIN_COMPATIBILITY_2_4 // deprecated functions: use Set/GetItemImage directly - // get the selected item image int GetItemSelectedImage(const wxTreeItemId& item) const { return GetItemImage(item, wxTreeItemIcon_Selected); } - // set the selected item image void SetItemSelectedImage(const wxTreeItemId& item, int image) { SetItemImage(item, image, wxTreeItemIcon_Selected); } + // use the versions taking wxTreeItemIdValue cookies (note that + // GetNextChild() is not inside wxDEPRECATED on purpose, as otherwise we + // get twice as many warnings without any added benefit: it is always used + // with GetFirstChild() anyhow) + wxDEPRECATED( wxTreeItemId GetFirstChild(const wxTreeItemId& item, + long& cookie) const ); + wxTreeItemId GetNextChild(const wxTreeItemId& item, + long& cookie) const; +#endif // WXWIN_COMPATIBILITY_2_4 + + // implementation only from now on // overridden base class virtuals @@ -362,7 +374,7 @@ public: void OnKillFocus( wxFocusEvent &event ); void OnChar( wxKeyEvent &event ); void OnMouse( wxMouseEvent &event ); - void OnIdle( wxIdleEvent &event ); + void OnInternalIdle( ); // implementation helpers protected: @@ -376,7 +388,9 @@ protected: wxGenericTreeItem *m_anchor; wxGenericTreeItem *m_current, - *m_key_current; + *m_key_current, + // A hint to select a parent item after deleting a child + *m_select_me; unsigned short m_indent; unsigned short m_spacing; int m_lineHeight; @@ -403,9 +417,6 @@ protected: wxTimer *m_renameTimer; - wxBitmap *m_arrowRight, - *m_arrowDown; - // incremental search data wxString m_findPrefix; wxTimer *m_findTimer; @@ -432,9 +443,7 @@ protected: // find the first item starting with the given prefix after the given item wxTreeItemId FindItem(const wxTreeItemId& id, const wxString& prefix) const; - bool HasButtons(void) const - { return (m_imageListButtons != NULL) - || HasFlag(wxTR_TWIST_BUTTONS|wxTR_HAS_BUTTONS); } + bool HasButtons() const { return HasFlag(wxTR_HAS_BUTTONS); } void CalculateLineHeight(); int GetLineHeight(wxGenericTreeItem *item) const;