]> git.saurik.com Git - wxWidgets.git/blobdiff - interface/treectrl.h
Add wxPopupWindow
[wxWidgets.git] / interface / treectrl.h
index 60cd8526884799b0c1b1b865458d745f89a17de7..e63eef6432912d78eab29d491beaaeb2f9be3282 100644 (file)
@@ -1,6 +1,6 @@
 /////////////////////////////////////////////////////////////////////////////
 // Name:        treectrl.h
-// Purpose:     documentation for wxTreeItemData class
+// Purpose:     interface of wxTreeItemData
 // Author:      wxWidgets team
 // RCS-ID:      $Id$
 // Licence:     wxWindows license
     @library{wxcore}
     @category{FIXME}
 
-    @seealso
-    wxTreeCtrl
+    @see wxTreeCtrl
 */
 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
     */
@@ -66,6 +65,7 @@ public:
 };
 
 
+
 /**
     @class wxTreeCtrl
     @wxheader{treectrl.h}
@@ -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
@@ -123,8 +123,7 @@ public:
     @category{ctrl}
     @appearance{treectrl.png}
 
-    @seealso
-    wxTreeItemData, @ref overview_wxtreectrloverview "wxTreeCtrl overview",
+    @see wxTreeItemData, @ref overview_wxtreectrloverview "wxTreeCtrl overview",
     wxListBox, wxListCtrl, wxImageList, wxTreeEvent
 */
 class wxTreeCtrl : public wxControl
@@ -133,7 +132,7 @@ public:
     //@{
     /**
         Constructor, creating and showing a tree control.
-        
+
         @param parent
             Parent window. Must not be @NULL.
         @param id
@@ -150,7 +149,7 @@ public:
             Window validator.
         @param name
             Window name.
-        
+
         @see Create(), wxValidator
     */
     wxTreeCtrl();
@@ -229,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);
@@ -287,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);
@@ -295,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);
@@ -358,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;
 
@@ -371,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,
@@ -400,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;
     //@}
 
@@ -468,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()
     */
@@ -482,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,
@@ -492,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;
@@ -508,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;
@@ -523,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;
@@ -558,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;
@@ -667,8 +649,8 @@ wxPython provides the following shortcut method:
         positive value if the first item is less than, equal to or greater than the
         second one.
         Please note that you @b must use wxRTTI macros
-        DECLARE_DYNAMIC_CLASS and
-        IMPLEMENT_DYNAMIC_CLASS if you override this
+        DECLARE_DYNAMIC_CLASS() and
+        IMPLEMENT_DYNAMIC_CLASS() if you override this
         function because otherwise the base class considers that it is not overridden
         and uses the default comparison, i.e. sorts the items alphabetically, which
         allows it optimize away the calls to the virtual function completely.
@@ -771,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);
@@ -814,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);
@@ -840,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);
@@ -875,6 +857,7 @@ wxPython note:
 };
 
 
+
 /**
     @class wxTreeEvent
     @wxheader{treectrl.h}
@@ -884,8 +867,7 @@ wxPython note:
     @library{wxbase}
     @category{events}
 
-    @seealso
-    wxTreeCtrl
+    @see wxTreeCtrl
 */
 class wxTreeEvent : public wxNotifyEvent
 {
@@ -944,3 +926,4 @@ public:
     */
     void SetToolTip(const wxString& tooltip);
 };
+