X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/e54c96f187f46c06bd36be8cd52b35c19884aa2b..2b3416df5d2fe261c67dfc08156ab5745e28c1af:/interface/treectrl.h diff --git a/interface/treectrl.h b/interface/treectrl.h index 342c8d5d56..e63eef6432 100644 --- a/interface/treectrl.h +++ b/interface/treectrl.h @@ -33,16 +33,16 @@ class wxTreeItemData : public wxClientData public: /** Default constructor. - + In addition, the following methods are added in wxPython for accessing the object: - + @b GetData() - + Returns a reference to the Python Object - + @b SetData(obj) - + Associates a new Python Object with the wxTreeItemData */ @@ -80,41 +80,41 @@ public: in wxTreeEvent. @beginStyleTable - @style{wxTR_EDIT_LABELS}: + @style{wxTR_EDIT_LABELS} Use this style if you wish the user to be able to edit labels in the tree control. - @style{wxTR_NO_BUTTONS}: + @style{wxTR_NO_BUTTONS} For convenience to document that no buttons are to be drawn. - @style{wxTR_HAS_BUTTONS}: + @style{wxTR_HAS_BUTTONS} Use this style to show + and - buttons to the left of parent items. - @style{wxTR_NO_LINES}: + @style{wxTR_NO_LINES} Use this style to hide vertical level connectors. - @style{wxTR_FULL_ROW_HIGHLIGHT}: + @style{wxTR_FULL_ROW_HIGHLIGHT} Use this style to have the background colour and the selection highlight extend over the entire horizontal row of the tree control window. (This flag is ignored under Windows unless you specify wxTR_NO_LINES as well.) - @style{wxTR_LINES_AT_ROOT}: + @style{wxTR_LINES_AT_ROOT} Use this style to show lines between root nodes. Only applicable if wxTR_HIDE_ROOT is set and wxTR_NO_LINES is not set. - @style{wxTR_HIDE_ROOT}: + @style{wxTR_HIDE_ROOT} Use this style to suppress the display of the root node, effectively causing the first-level nodes to appear as a series of root nodes. - @style{wxTR_ROW_LINES}: + @style{wxTR_ROW_LINES} Use this style to draw a contrasting border between displayed rows. - @style{wxTR_HAS_VARIABLE_ROW_HEIGHT}: + @style{wxTR_HAS_VARIABLE_ROW_HEIGHT} Use this style to cause row heights to be just big enough to fit the content. If not set, all rows use the largest row height. The default is that this flag is unset. Generic only. - @style{wxTR_SINGLE}: + @style{wxTR_SINGLE} For convenience to document that only one item may be selected at a time. Selecting another item causes the current selection, if any, to be deselected. This is the default. - @style{wxTR_MULTIPLE}: + @style{wxTR_MULTIPLE} Use this style to allow a range of items to be selected. If a second range is selected, the current range, if any, is deselected. - @style{wxTR_DEFAULT_STYLE}: + @style{wxTR_DEFAULT_STYLE} The set of flags that are closest to the defaults for the native control for a particular toolkit. @endStyleTable @@ -132,7 +132,7 @@ public: //@{ /** Constructor, creating and showing a tree control. - + @param parent Parent window. Must not be @NULL. @param id @@ -149,7 +149,7 @@ public: Window validator. @param name Window name. - + @see Create(), wxValidator */ wxTreeCtrl(); @@ -228,14 +228,14 @@ public: /** Collapses the root item. - + @see ExpandAll() */ void CollapseAll(); /** Collapses this item and all of its children, recursively. - + @see ExpandAllChildren() */ void CollapseAllChildren(const wxTreeItemId& item); @@ -286,7 +286,7 @@ public: If the user changed the label (i.e. s/he does not press ESC or leave the text control without changes, a EVT_TREE_END_LABEL_EDIT event will be sent which can be vetoed as well. - + @see EndEditLabel(), wxTreeEvent */ void EditLabel(const wxTreeItemId& item); @@ -294,7 +294,7 @@ public: /** Ends label editing. If @a cancelEdit is @true, the edit will be cancelled. This function is currently supported under Windows only. - + @see EditLabel() */ void EndEditLabel(bool cancelEdit); @@ -357,7 +357,7 @@ public: /** Returns the edit control being currently used to edit a label. Returns @NULL if no label is being edited. - @b NB: It is currently only implemented for wxMSW. + @note It is currently only implemented for wxMSW. */ wxTextCtrl* GetEditControl() const; @@ -370,7 +370,7 @@ public: GetFirstChild and GetNextChild should be the same variable. Returns an invalid tree item (i.e. IsOk() returns @false) if there are no further children. - + @see GetNextChild(), GetNextSibling() */ wxTreeItemId GetFirstChild(const wxTreeItemId& item, @@ -399,33 +399,16 @@ public: //@{ /** Returns the font of the item label. - */ - wxTreeItemData* GetItemData(const wxTreeItemId& item) const; - const See also - wxTreeItemData -wxPython note: -wxPython provides the following shortcut method: - - - - - - - - GetPyData(item) - - - - - Returns the Python Object - associated with the wxTreeItemData for the given item Id. - - - - - + @see wxTreeItemData + @beginWxPythonOnly + wxPython provides the following shortcut method: + @li GetPyData(item): Returns the Python Object associated with the + wxTreeItemData for the given item Id. + @endWxPythonOnly + */ + wxTreeItemData* GetItemData(const wxTreeItemId& item) const; wxFont GetItemFont(const wxTreeItemId& item) const; //@} @@ -467,7 +450,7 @@ wxPython provides the following shortcut method: /** Returns the last child of the item (or an invalid tree item if this item has no children). - + @see GetFirstChild(), GetNextSibling(), GetLastChild() */ @@ -481,7 +464,7 @@ wxPython provides the following shortcut method: enumeration on one and the same object simultaneously). The cookie passed to GetFirstChild and GetNextChild should be the same. Returns an invalid tree item if there are no further children. - + @see GetFirstChild() */ wxTreeItemId GetNextChild(const wxTreeItemId& item, @@ -491,7 +474,7 @@ wxPython provides the following shortcut method: Returns the next sibling of the specified item; call GetPrevSibling() for the previous sibling. Returns an invalid tree item if there are no further siblings. - + @see GetPrevSibling() */ wxTreeItemId GetNextSibling(const wxTreeItemId& item) const; @@ -507,7 +490,7 @@ wxPython provides the following shortcut method: Returns the previous sibling of the specified item; call GetNextSibling() for the next sibling. Returns an invalid tree item if there are no further children. - + @see GetNextSibling() */ wxTreeItemId GetPrevSibling(const wxTreeItemId& item) const; @@ -522,7 +505,7 @@ wxPython provides the following shortcut method: /** Returns @true if the control will use a quick calculation for the best size, looking only at the first and last items. The default is @false. - + @see SetQuickBestSize() */ bool GetQuickBestSize() const; @@ -557,49 +540,49 @@ wxPython provides the following shortcut method: Calculates which (if any) item is under the given point, returning the tree item id at this point plus extra information @e flags. @a flags is a bitlist of the following: - + wxTREE_HITTEST_ABOVE - + Above the client area. - + wxTREE_HITTEST_BELOW - + Below the client area. - + wxTREE_HITTEST_NOWHERE - + In the client area but below the last item. - + wxTREE_HITTEST_ONITEMBUTTON - + On the button associated with an item. - + wxTREE_HITTEST_ONITEMICON - + On the bitmap associated with an item. - + wxTREE_HITTEST_ONITEMINDENT - + In the indentation associated with an item. - + wxTREE_HITTEST_ONITEMLABEL - + On the label (string) associated with an item. - + wxTREE_HITTEST_ONITEMRIGHT - + In the area to the right of an item. - + wxTREE_HITTEST_ONITEMSTATEICON - + On the state icon for a tree view item that is in a user-defined state. - + wxTREE_HITTEST_TOLEFT - + To the right of the client area. - + wxTREE_HITTEST_TORIGHT - + To the left of the client area. */ wxTreeItemId HitTest(const wxPoint& point, int& flags) const; @@ -770,7 +753,7 @@ wxPython note: Sets the item's font. All items in the tree should have the same height to avoid text clipping, so the fonts height should be the same for all of them, although font attributes may vary. - + @see SetItemBold() */ void SetItemFont(const wxTreeItemId& item, const wxFont& font); @@ -813,7 +796,7 @@ wxPython note: the best size, looking only at the first and last items. Otherwise, it will look at all items. The default is @false. - + @see GetQuickBestSize() */ void SetQuickBestSize(bool quickBestSize); @@ -839,7 +822,7 @@ wxPython note: OnCompareItems() method of wxTreeCtrl. You should override that method to change the sort order (the default is ascending case-sensitive alphabetical order). - + @see wxTreeItemData, OnCompareItems() */ void SortChildren(const wxTreeItemId& item);