- // accessors
- // ---------
-
- // get the total number of items in the control
- size_t GetCount() const;
-
- // indent is the number of pixels the children are indented relative to
- // the parents position. SetIndent() also redraws the control
- // immediately.
- unsigned int GetIndent() const;
- void SetIndent(unsigned int indent);
-
- // spacing is the number of pixels between the start and the Text
- // not implemented under wxMSW
- unsigned int GetSpacing() const { return 18; } // return wxGTK default
- void SetSpacing(unsigned int WXUNUSED(spacing)) { }
-
- // image list: these functions allow to associate an image list with
- // the control and retrieve it. Note that the control does _not_ delete
- // the associated image list when it's deleted in order to allow image
- // lists to be shared between different controls.
- //
- // The normal image list is for the icons which correspond to the
- // normal tree item state (whether it is selected or not).
- // Additionally, the application might choose to show a state icon
- // which corresponds to an app-defined item state (for example,
- // checked/unchecked) which are taken from the state image list.
- wxImageList *GetImageList() const;
- wxImageList *GetStateImageList() const;
-
- void SetImageList(wxImageList *imageList);
- void SetStateImageList(wxImageList *imageList);
- void AssignImageList(wxImageList *imageList);
- void AssignStateImageList(wxImageList *imageList);
-
- // Functions to work with tree ctrl items. Unfortunately, they can _not_ be
- // member functions of wxTreeItem because they must know the tree the item
- // belongs to for Windows implementation and storing the pointer to
- // wxTreeCtrl in each wxTreeItem is just too much waste.
-
- // accessors
- // ---------
-
- // retrieve items label
- wxString GetItemText(const wxTreeItemId& item) const;
- // get one of the images associated with the item (normal by default)
- int GetItemImage(const wxTreeItemId& item,
- wxTreeItemIcon which = wxTreeItemIcon_Normal) const;
- // get the data associated with the item
- wxTreeItemData *GetItemData(const wxTreeItemId& item) const;
-
- // get the item's text colour
- wxColour GetItemTextColour(const wxTreeItemId& item) const;
-
- // get the item's background colour
- wxColour GetItemBackgroundColour(const wxTreeItemId& item) const;
-
- // get the item's font
- wxFont GetItemFont(const wxTreeItemId& item) const;
-
- // modifiers
- // ---------
-
- // set items label
- void SetItemText(const wxTreeItemId& item, const wxString& text);
- // get one of the images associated with the item (normal by default)
- void SetItemImage(const wxTreeItemId& item, int image,
- wxTreeItemIcon which = wxTreeItemIcon_Normal);
- // associate some data with the item
- void SetItemData(const wxTreeItemId& item, wxTreeItemData *data);