X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/6daa06370bdb080d3555b1e0f90292489a5e64f9..cd2df130f8162dc2cf9794c1507cd4bddce53910:/include/wx/generic/treectrl.h diff --git a/include/wx/generic/treectrl.h b/include/wx/generic/treectrl.h index 6397ef5820..49e3e4fb3f 100644 --- a/include/wx/generic/treectrl.h +++ b/include/wx/generic/treectrl.h @@ -59,7 +59,7 @@ public: //protected: // not for gcc // for wxTreeCtrl usage only wxTreeItemId(wxGenericTreeItem *pItem) { m_pItem = pItem; } - + wxGenericTreeItem *m_pItem; }; @@ -91,7 +91,7 @@ protected: // ----------------------------------------------------------------------------- // wxTreeEvent - the event generated by the tree control // ----------------------------------------------------------------------------- -class WXDLLEXPORT wxTreeEvent : public wxCommandEvent +class WXDLLEXPORT wxTreeEvent : public wxNotifyEvent { friend class wxTreeCtrl; public: @@ -148,7 +148,7 @@ typedef void (wxEvtHandler::*wxTreeEventFunction)(wxTreeEvent&); #define EVT_TREE_GET_INFO(id, fn) { wxEVT_COMMAND_TREE_GET_INFO, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, (wxObject *) NULL }, #define EVT_TREE_SET_INFO(id, fn) { wxEVT_COMMAND_TREE_SET_INFO, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, (wxObject *) NULL }, -// GetItem() is the item being expanded/collapsed, the "ING" versions can use +// GetItem() is the item being expanded/collapsed, the "ING" versions can use #define EVT_TREE_ITEM_EXPANDED(id, fn) { wxEVT_COMMAND_TREE_ITEM_EXPANDED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, (wxObject *) NULL }, #define EVT_TREE_ITEM_EXPANDING(id, fn) { wxEVT_COMMAND_TREE_ITEM_EXPANDING, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, (wxObject *) NULL }, #define EVT_TREE_ITEM_COLLAPSED(id, fn) { wxEVT_COMMAND_TREE_ITEM_COLLAPSED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, (wxObject *) NULL }, @@ -256,6 +256,9 @@ public: // usage and loading time. void SetItemHasChildren(const wxTreeItemId& item, bool has = TRUE); + // the item will be shown in bold + void SetItemBold(const wxTreeItemId& item, bool bold = TRUE); + // item status inquiries // --------------------- @@ -269,6 +272,8 @@ public: bool IsExpanded(const wxTreeItemId& item) const; // is this item currently selected (the same as has focus)? bool IsSelected(const wxTreeItemId& item) const; + // is item text in bold font? + bool IsBold(const wxTreeItemId& item) const; // number of children // ------------------ @@ -419,7 +424,8 @@ protected: wxTreeItemData *data); void AdjustMyScrollbars(); - void PaintLevel( wxGenericTreeItem *item, wxDC &dc, int level, int &y ); + void PaintLevel( wxGenericTreeItem *item, wxDC& dc, int level, int &y ); + void PaintItem( wxGenericTreeItem *item, wxDC& dc); void CalculateLevel( wxGenericTreeItem *item, wxDC &dc, int level, int &y ); void CalculatePositions();