Lines Matching refs:item
75 // normal tree item state (whether it is selected or not).
77 // which corresponds to an app-defined item state (for example,
97 // member functions of wxTreeItem because they must know the tree the item
105 virtual wxString GetItemText(const wxTreeItemId& item) const = 0;
106 // get one of the images associated with the item (normal by default)
107 virtual int GetItemImage(const wxTreeItemId& item,
109 // get the data associated with the item
110 virtual wxTreeItemData *GetItemData(const wxTreeItemId& item) const = 0;
112 // get the item's text colour
113 virtual wxColour GetItemTextColour(const wxTreeItemId& item) const = 0;
115 // get the item's background colour
116 virtual wxColour GetItemBackgroundColour(const wxTreeItemId& item) const = 0;
118 // get the item's font
119 virtual wxFont GetItemFont(const wxTreeItemId& item) const = 0;
125 virtual void SetItemText(const wxTreeItemId& item, const wxString& text) = 0;
126 // get one of the images associated with the item (normal by default)
127 virtual void SetItemImage(const wxTreeItemId& item,
130 // associate some data with the item
131 virtual void SetItemData(const wxTreeItemId& item, wxTreeItemData *data) = 0;
133 // force appearance of [+] button near the item. This is useful to
137 virtual void SetItemHasChildren(const wxTreeItemId& item,
140 // the item will be shown in bold
141 virtual void SetItemBold(const wxTreeItemId& item, bool bold = true) = 0;
143 // the item will be shown with a drop highlight
144 virtual void SetItemDropHighlight(const wxTreeItemId& item,
148 virtual void SetItemTextColour(const wxTreeItemId& item,
152 virtual void SetItemBackgroundColour(const wxTreeItemId& item,
156 virtual void SetItemFont(const wxTreeItemId& item,
159 // item status inquiries
162 // is the item visible (it might be outside the view or not expanded)?
163 virtual bool IsVisible(const wxTreeItemId& item) const = 0;
164 // does the item has any children?
165 virtual bool ItemHasChildren(const wxTreeItemId& item) const = 0;
167 bool HasChildren(const wxTreeItemId& item) const
168 { return ItemHasChildren(item); }
169 // is the item expanded (only makes sense if HasChildren())?
170 virtual bool IsExpanded(const wxTreeItemId& item) const = 0;
171 // is this item currently selected (the same as has focus)?
172 virtual bool IsSelected(const wxTreeItemId& item) const = 0;
173 // is item text in bold font?
174 virtual bool IsBold(const wxTreeItemId& item) const = 0;
186 virtual size_t GetChildrenCount(const wxTreeItemId& item,
192 // wxTreeItemId.IsOk() will return false if there is no such item
194 // get the root tree item
197 // get the item currently selected (may return NULL if no selection)
200 // get the items currently selected, return the number of such item
206 // get the parent of this item (may return NULL if root)
207 virtual wxTreeItemId GetItemParent(const wxTreeItemId& item) const = 0;
216 // get the first child of this item
217 virtual wxTreeItemId GetFirstChild(const wxTreeItemId& item,
220 virtual wxTreeItemId GetNextChild(const wxTreeItemId& item,
222 // get the last child of this item - this method doesn't use cookies
223 virtual wxTreeItemId GetLastChild(const wxTreeItemId& item) const = 0;
225 // get the next sibling of this item
226 virtual wxTreeItemId GetNextSibling(const wxTreeItemId& item) const = 0;
228 virtual wxTreeItemId GetPrevSibling(const wxTreeItemId& item) const = 0;
230 // get first visible item
232 // get the next visible item: item must be visible itself!
234 virtual wxTreeItemId GetNextVisible(const wxTreeItemId& item) const = 0;
235 // get the previous visible item: item must be visible itself!
236 virtual wxTreeItemId GetPrevVisible(const wxTreeItemId& item) const = 0;
246 // insert a new item in as the first child of the parent
255 // insert a new item after a given one
265 // insert a new item before the one with the given index
275 // insert a new item in as the last child of the parent
284 // delete this item and associated data if any
285 virtual void Delete(const wxTreeItemId& item) = 0;
286 // delete all children (but don't delete the item itself)
288 virtual void DeleteChildren(const wxTreeItemId& item) = 0;
293 // expand this item
294 virtual void Expand(const wxTreeItemId& item) = 0;
295 // expand the item and all its childs and thats childs
296 void ExpandAllChildren(const wxTreeItemId& item);
299 // collapse the item without removing its children
300 virtual void Collapse(const wxTreeItemId& item) = 0;
302 // collapse the item and all its childs and thats childs
303 void CollapseAllChildren(const wxTreeItemId& item);
307 // collapse the item and remove all children
308 virtual void CollapseAndReset(const wxTreeItemId& item) = 0;
310 virtual void Toggle(const wxTreeItemId& item) = 0;
312 // remove the selection from currently selected item (if any)
316 // select this item
317 virtual void SelectItem(const wxTreeItemId& item, bool select = true) = 0;
318 // unselect this item
319 void UnselectItem(const wxTreeItemId& item) { SelectItem(item, false); }
320 // toggle item selection
321 void ToggleItemSelection(const wxTreeItemId& item)
323 SelectItem(item, !IsSelected(item));
326 // make sure this item is visible (expanding the parent item and/or
327 // scrolling to this item if necessary)
328 virtual void EnsureVisible(const wxTreeItemId& item) = 0;
329 // scroll to this item (but don't expand its parent)
330 virtual void ScrollTo(const wxTreeItemId& item) = 0;
332 // start editing the item label: this (temporarily) replaces the item
333 // with a one line edit control. The item will be selected if it hadn't
336 virtual wxTextCtrl *EditLabel(const wxTreeItemId& item,
338 // returns the same pointer as StartEdit() if the item is being edited,
339 // NULL otherwise (it's assumed that no more than one item may be
342 // end editing and accept or discard the changes to item label
343 virtual void EndEditLabel(const wxTreeItemId& item,
350 // or +1 if the first item is less than, equal to or greater than the
352 // of item labels (GetText)
359 // sort the children of this item using OnCompareItems
362 virtual void SortChildren(const wxTreeItemId& item) = 0;
367 // determine to which item (if any) belongs the given point (the
376 // get the bounding rectangle of the item (or of its label only)
377 virtual bool GetBoundingRect(const wxTreeItemId& item,
396 // pos is the position at which to insert the item or (size_t)-1 to append