- const wxString& name = "wxTreeCtrl");
-
- // accessors
- // ---------
- //
- int GetCount() const;
-
- // indent
- int GetIndent() const;
- void SetIndent(int indent);
- // image list
- wxImageList *GetImageList(int which = wxIMAGE_LIST_NORMAL) const;
- void SetImageList(wxImageList *imageList, int which = wxIMAGE_LIST_NORMAL);
-
- // navigation inside the tree
- long GetNextItem(long item, int code) const;
- bool ItemHasChildren(long item) const;
- long GetChild(long item) const;
- long GetParent(long item) const;
- long GetFirstVisibleItem() const;
- long GetNextVisibleItem(long item) const;
- long GetSelection() const;
- long GetRootItem() const;
-
- // generic function for (g|s)etting item attributes
- bool GetItem(wxTreeItem& info) const;
- bool SetItem(wxTreeItem& info);
- // item state
- int GetItemState(long item, long stateMask) const;
- bool SetItemState(long item, long state, long stateMask);
- // item image
- bool SetItemImage(long item, int image, int selImage);
- // item text
- wxString GetItemText(long item) const;
- void SetItemText(long item, const wxString& str);
- // custom data associated with the item
- long GetItemData(long item) const;
- bool SetItemData(long item, long data);
- // convenience function
- bool IsItemExpanded(long item)
- {
- return (GetItemState(item, wxTREE_STATE_EXPANDED) &
- wxTREE_STATE_EXPANDED) != 0;
- }
+ const wxString& name = wxTreeCtrlNameStr);
+
+ // implement base class pure virtuals
+ // ----------------------------------
+
+ virtual unsigned int GetCount() const;
+
+ virtual unsigned int GetIndent() const;
+ virtual void SetIndent(unsigned int indent);
+
+ virtual void SetImageList(wxImageList *imageList);
+ virtual void SetStateImageList(wxImageList *imageList);
+
+ virtual wxString GetItemText(const wxTreeItemId& item) const;
+ virtual int GetItemImage(const wxTreeItemId& item,
+ wxTreeItemIcon which = wxTreeItemIcon_Normal) const;
+ virtual wxTreeItemData *GetItemData(const wxTreeItemId& item) const;
+ virtual wxColour GetItemTextColour(const wxTreeItemId& item) const;
+ virtual wxColour GetItemBackgroundColour(const wxTreeItemId& item) const;
+ virtual wxFont GetItemFont(const wxTreeItemId& item) const;
+
+ virtual void SetItemText(const wxTreeItemId& item, const wxString& text);
+ virtual void SetItemImage(const wxTreeItemId& item, int image,
+ wxTreeItemIcon which = wxTreeItemIcon_Normal);
+ virtual void SetItemData(const wxTreeItemId& item, wxTreeItemData *data);
+ virtual void SetItemHasChildren(const wxTreeItemId& item, bool has = true);
+ virtual void SetItemBold(const wxTreeItemId& item, bool bold = true);
+ virtual void SetItemDropHighlight(const wxTreeItemId& item,
+ bool highlight = true);
+ virtual void SetItemTextColour(const wxTreeItemId& item,
+ const wxColour& col);
+ virtual void SetItemBackgroundColour(const wxTreeItemId& item,
+ const wxColour& col);
+ virtual void SetItemFont(const wxTreeItemId& item, const wxFont& font);
+
+ // item status inquiries
+ // ---------------------
+
+ virtual bool IsVisible(const wxTreeItemId& item) const;
+ virtual bool ItemHasChildren(const wxTreeItemId& item) const;
+ virtual bool IsExpanded(const wxTreeItemId& item) const;
+ virtual bool IsSelected(const wxTreeItemId& item) const;
+ virtual bool IsBold(const wxTreeItemId& item) const;
+
+ virtual size_t GetChildrenCount(const wxTreeItemId& item,
+ bool recursively = true) const;
+
+ // navigation
+ // ----------
+
+ virtual wxTreeItemId GetRootItem() const;
+ virtual wxTreeItemId GetSelection() const;
+ virtual size_t GetSelections(wxArrayTreeItemIds& selections) const;
+
+ virtual wxTreeItemId GetItemParent(const wxTreeItemId& item) const;
+ virtual wxTreeItemId GetFirstChild(const wxTreeItemId& item,
+ wxTreeItemIdValue& cookie) const;
+ virtual wxTreeItemId GetNextChild(const wxTreeItemId& item,
+ wxTreeItemIdValue& cookie) const;
+ virtual wxTreeItemId GetLastChild(const wxTreeItemId& item) const;
+
+ virtual wxTreeItemId GetNextSibling(const wxTreeItemId& item) const;
+ virtual wxTreeItemId GetPrevSibling(const wxTreeItemId& item) const;
+
+ virtual wxTreeItemId GetFirstVisibleItem() const;
+ virtual wxTreeItemId GetNextVisible(const wxTreeItemId& item) const;
+ virtual wxTreeItemId GetPrevVisible(const wxTreeItemId& item) const;