]> Creatis software - bbtk.git/blobdiff - kernel/src/ThirdParty/wx/treemultictrl/wxTreeMultiCtrl.h
Feature #1774
[bbtk.git] / kernel / src / ThirdParty / wx / treemultictrl / wxTreeMultiCtrl.h
index d997e3ec5721d09760cbab869accf9917082d00f..456dcf62968d7ad7a045765a748e0f5ab550b368 100644 (file)
@@ -1,11 +1,38 @@
-//---------------------------------------------------------------------------\r
-// $RCSfile: wxTreeMultiCtrl.h,v $\r
-// $Source: /cvs/creatis/bbtk/kernel/src/ThirdParty/wx/treemultictrl/wxTreeMultiCtrl.h,v $\r
-// $Revision: 1.1 $\r
-// $Date: 2008/03/28 13:42:19 $\r
-//---------------------------------------------------------------------------\r
-// Author:      Jorgen Bodde\r
-// Copyright:   (c) Jorgen Bodde\r
+/*
+ # ---------------------------------------------------------------------
+ #
+ # Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image
+ #                        pour la SantÈ)
+ # Authors : Eduardo Davila, Frederic Cervenansky, Claire Mouton
+ # Previous Authors : Laurent Guigues, Jean-Pierre Roux
+ # CreaTools website : www.creatis.insa-lyon.fr/site/fr/creatools_accueil
+ #
+ #  This software is governed by the CeCILL-B license under French law and
+ #  abiding by the rules of distribution of free software. You can  use,
+ #  modify and/ or redistribute the software under the terms of the CeCILL-B
+ #  license as circulated by CEA, CNRS and INRIA at the following URL
+ #  http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
+ #  or in the file LICENSE.txt.
+ #
+ #  As a counterpart to the access to the source code and  rights to copy,
+ #  modify and redistribute granted by the license, users are provided only
+ #  with a limited warranty  and the software's author,  the holder of the
+ #  economic rights,  and the successive licensors  have only  limited
+ #  liability.
+ #
+ #  The fact that you are presently reading this means that you have had
+ #  knowledge of the CeCILL-B license and that you accept its terms.
+ # ------------------------------------------------------------------------ */
+
+
+//---------------------------------------------------------------------------
+// $RCSfile: wxTreeMultiCtrl.h,v $
+// $Source: /cvs/creatis/bbtk/kernel/src/ThirdParty/wx/treemultictrl/wxTreeMultiCtrl.h,v $
+// $Revision: 1.3 $
+// $Date: 2012/11/16 08:49:16 $
+//---------------------------------------------------------------------------
+// Author:      Jorgen Bodde
+// Copyright:   (c) Jorgen Bodde
 // License:     wxWidgets License
 //---------------------------------------------------------------------------
 
@@ -184,13 +211,13 @@ public:
 
     wxTreeMultiItem(TreeMultiItemBase *ptr) {
         _item = ptr;
-    };\r
-\r
-    // Returns the TreeMultiItemBase class. This shoult *NOT* be\r
-    // used if you don't know what you are doing! This means never use it. */\r
-    TreeMultiItemBase *GetItem() const {\r
-        return _item;\r
-    };\r
+    };
+
+    // Returns the TreeMultiItemBase class. This shoult *NOT* be
+    // used if you don't know what you are doing! This means never use it. */
+    TreeMultiItemBase *GetItem() const {
+        return _item;
+    };
 
 #endif // _NO_DOXYGEN_
 
@@ -198,21 +225,21 @@ public:
         classes from the wxTreeMultiCtrl.
     */
     void operator=(const wxTreeMultiItem &item) {
-        _item = item._item;\r
-    };\r
-\r
-   /** Equality operator. It returns true if the items are identical or if both items are invalid. */\r
-    bool operator==(wxTreeMultiItem const& item) const {return (this->GetItem() == item.GetItem());}\r
-\r
-   /** Inequality operator. It returns true if the items are different or one of them is invalid. */\r
-    bool operator!=(wxTreeMultiItem const& item) const {return (this->GetItem() != item.GetItem());}\r
-\r
-        /** Returns the parent of the current wxTreeMultiItem. This means the wxTreeMultiNode is returned. It can\r
-            be useful to check or clear the checkbox at this level. */\r
-        wxTreeMultiItem GetParent() const{\r
-                wxCHECK(IsOk(), wxTreeMultiItem(0));\r
-                return wxTreeMultiItem(_item->GetParent());\r
-        };\r
+        _item = item._item;
+    };
+
+   /** Equality operator. It returns true if the items are identical or if both items are invalid. */
+    bool operator==(wxTreeMultiItem const& item) const {return (this->GetItem() == item.GetItem());}
+
+   /** Inequality operator. It returns true if the items are different or one of them is invalid. */
+    bool operator!=(wxTreeMultiItem const& item) const {return (this->GetItem() != item.GetItem());}
+
+        /** Returns the parent of the current wxTreeMultiItem. This means the wxTreeMultiNode is returned. It can
+            be useful to check or clear the checkbox at this level. */
+        wxTreeMultiItem GetParent() const{
+                wxCHECK(IsOk(), wxTreeMultiItem(0));
+                return wxTreeMultiItem(_item->GetParent());
+        };
 
     /** Validates if the wxTreeMultiItem is a valid instance to use in the wxTreeMultiCtrl. Returns TRUE when there
         is a member value is associated with it, or FALSE when not. This value can also be checked when this class is returned from a wxTreeMultiCtrl operation. For example:
@@ -288,32 +315,32 @@ public:
         Use wxTreeMultiCtrl::GetExcludedParent() to get the node that hides this one. */
     bool IsExcluded() {
         wxCHECK(_item, false);
-        return _item->IsExcluded();\r
-    }\r
-\r
-   /** Returns true if the item is selected.\r
-       Please note that currently only nodes can be selected.\r
-   */\r
-    bool IsSelected(void) const\r
-    {\r
-      wxCHECK(this->GetItem(),false);\r
-      return this->GetItem()->IsSelected();\r
-    }\r
-    /** Returns true if this node is visible. Please note that when this node is a child node of a collapsed\r
-        node, it is not visible. Also if this node is a child node of an excluded node, it is also not visible.\r
-        It does <b>NOT</b> return false when it's drawn somewhere outside of the visible area. */\r
+        return _item->IsExcluded();
+    }
+
+   /** Returns true if the item is selected.
+       Please note that currently only nodes can be selected.
+   */
+    bool IsSelected(void) const
+    {
+      wxCHECK(this->GetItem(),false);
+      return this->GetItem()->IsSelected();
+    }
+    /** Returns true if this node is visible. Please note that when this node is a child node of a collapsed
+        node, it is not visible. Also if this node is a child node of an excluded node, it is also not visible.
+        It does <b>NOT</b> return false when it's drawn somewhere outside of the visible area. */
     bool IsVisible() {
         wxCHECK(_item, false);
         return _item->IsVisible();
     }
-\r
-};\r
-\r
-WX_DECLARE_OBJARRAY(wxTreeMultiItem,wxArrayTreeMultiItem);\r
-\r
-/** \class wxTreeMultiWindowInfo\r
-    \ingroup classes\r
-    \brief This class contains information for every Window node to be added.\r
+
+};
+
+WX_DECLARE_OBJARRAY(wxTreeMultiItem,wxArrayTreeMultiItem);
+
+/** \class wxTreeMultiWindowInfo
+    \ingroup classes
+    \brief This class contains information for every Window node to be added.
 
     This class can be used to modify the behaviour of the Window node to be added, and can be reused to pass along
     upon every wxTreeMultiCtrl::AppendWindow call. For example:
@@ -362,25 +389,25 @@ private:
 #if(CHECKBOXVIEW)
     /** Checkstate for checkboxed property sheets */
     bool _checkState;
-#endif\r
-\r
-public:\r
-#if(CHECKBOXVIEW)\r
-    wxTreeMultiWindowInfo(int flags, int frontSpacing, int topSpacing, bool checkState = false)\r
-        : _flags(flags)\r
-        , _frontSpacing(frontSpacing)\r
-        , _frontSpacingOrg(frontSpacing)\r
-        , _topSpacing(topSpacing)\r
-        , _checkState(checkState)\r
-#else\r
-    wxTreeMultiWindowInfo(int flags, int frontSpacing, int topSpacing)\r
-        : _flags(flags)\r
-        , _frontSpacing(frontSpacing)\r
-        , _frontSpacingOrg(frontSpacing)\r
-        , _topSpacing(topSpacing)\r
-#endif\r
-    {\r
-        // constructor\r
+#endif
+
+public:
+#if(CHECKBOXVIEW)
+    wxTreeMultiWindowInfo(int flags, int frontSpacing, int topSpacing, bool checkState = false)
+        : _flags(flags)
+        , _frontSpacing(frontSpacing)
+        , _frontSpacingOrg(frontSpacing)
+        , _topSpacing(topSpacing)
+        , _checkState(checkState)
+#else
+    wxTreeMultiWindowInfo(int flags, int frontSpacing, int topSpacing)
+        : _flags(flags)
+        , _frontSpacing(frontSpacing)
+        , _frontSpacingOrg(frontSpacing)
+        , _topSpacing(topSpacing)
+#endif
+    {
+        // constructor
     }
     /** Adds indent to original front spacing and increments it with that value (quick extra indent).
         The original value of FrontSpacing (see SetFrontSpacing() gets indented by multiplying
@@ -574,22 +601,22 @@ private:
     bool _checkboxView;
 
     /** Height and weight for checkbox */
-    int _checkHeight, _checkWidth;\r
-#endif\r
-\r
-    /** brush for highlighting nodes */\r
-     wxBrush* m_HilightBrush;\r
-\r
-    /** This captionFont is made equal to the font of the wxScrolledWindow. As extra the bold face\r
-        is set on it when this is wanted by the user (see flags) */\r
-    wxFont _captionFont;\r
-\r
-   /** list of selected items */\r
-    wxArrayTreeMultiItem m_SelectedItems;\r
-\r
-    /** Does the actual collapsing / expanding. So that Expand and Collapse aren't using the same code twice */\r
-    void DoFold(TreeMultiItemBase *item, bool expand, bool recursive);\r
-\r
+    int _checkHeight, _checkWidth;
+#endif
+
+    /** brush for highlighting nodes */
+     wxBrush* m_HilightBrush;
+
+    /** This captionFont is made equal to the font of the wxScrolledWindow. As extra the bold face
+        is set on it when this is wanted by the user (see flags) */
+    wxFont _captionFont;
+
+   /** list of selected items */
+    wxArrayTreeMultiItem m_SelectedItems;
+
+    /** Does the actual collapsing / expanding. So that Expand and Collapse aren't using the same code twice */
+    void DoFold(TreeMultiItemBase *item, bool expand, bool recursive);
+
     /** Redraws and recalculates the nodes from the current node. It will also clear all 'dirty' flags when
         they are recalculated */
     void RedrawFromNode(TreeMultiItemNode *n);
@@ -632,31 +659,31 @@ private:
 
     /** Recalculates totally needed virtual size of the wxTreeMultiCtrl. It will scan for
         the largest window, with the biggest size, and report that back */
-    void RecalculateVirtualSize();\r
-\r
-    /** Adjusts scrollbars in window, usually done after virtual size (x,y) is recalculated */\r
-    using wxScrolledWindow::AdjustScrollbars;\r
-    virtual void AdjustScrollbars(int x, int y);\r
-\r
-    /** Recalculates and accumulates largest x and y */\r
+    void RecalculateVirtualSize();
+
+    /** Adjusts scrollbars in window, usually done after virtual size (x,y) is recalculated */
+    using wxScrolledWindow::AdjustScrollbars;
+    virtual void AdjustScrollbars(int x, int y);
+
+    /** Recalculates and accumulates largest x and y */
     void RecalculateVirtualSizeFromNode(const TreeMultiItemNode *node, int &x, int &y);
-\r
-    /** Scans for TreeMultiItemBase node that contains x,y and in area returns a hittest constant to\r
-        indicate what matched */\r
-    TreeMultiItemBase *FindNodeByPoint(TreeMultiItemBase *b, wxPoint const& pt, int &area);\r
-\r
-    /** Scans for TreeMultiItemWindow that holds the wxWindow pointer. Does not scan in panels or does\r
-        a deep search. Reason, this function is used to advance to next TreeMultiItemWindow for focus\r
+
+    /** Scans for TreeMultiItemBase node that contains x,y and in area returns a hittest constant to
+        indicate what matched */
+    TreeMultiItemBase *FindNodeByPoint(TreeMultiItemBase *b, wxPoint const& pt, int &area);
+
+    /** Scans for TreeMultiItemWindow that holds the wxWindow pointer. Does not scan in panels or does
+        a deep search. Reason, this function is used to advance to next TreeMultiItemWindow for focus
         on this wxScrolledWindow. If a sub window is found, it will skip other windows on that same level */
     wxTreeMultiItem FindWindowNode(wxWindow *wnd, TreeMultiItemNode *n = 0);
 
     /** Finds next visible window item in chain. If not found use FindFirstVisibleItem to start from the
-        beginning */\r
-    TreeMultiItemWindow *FindNextVisibleWindowItem(TreeMultiItemBase *b, int index = -1);\r
-\r
-    /** Adjust the centering of the bitmap icons (collapse / expand) when the caption font changes. They need to\r
-        be centered in the middle of the font, so a bit of deltaY adjustment is needed */\r
-    void AdjustIconsDeltaY();\r
+        beginning */
+    TreeMultiItemWindow *FindNextVisibleWindowItem(TreeMultiItemBase *b, int index = -1);
+
+    /** Adjust the centering of the bitmap icons (collapse / expand) when the caption font changes. They need to
+        be centered in the middle of the font, so a bit of deltaY adjustment is needed */
+    void AdjustIconsDeltaY();
 
        /** Calculate the spanning of the individual nodes */
        void CalculateNodeSpanning(TreeMultiItemBase *b);
@@ -669,47 +696,47 @@ private:
         will get tristate if the checked items are scattered (some are some aren't). If all nodes in this
         node are checked, the parent node gets checked all the way up to the last one that matches
         criteria. If all are cleared, parent node gets cleared */
-    void ScanTristateCheckstates(TreeMultiItemBase *b);\r
-#endif\r
-\r
-   /** \name Private add and delete methods\r
-       @{\r
-   */\r
-\r
-   /** Inserts a node into the parent's node at the specified position.\r
-       As this is a private method error checking is limited. Therefore, it has to be guaranteed that this method\r
-       is only called with a valid parent node pointer.\r
-       The position is zero based. In case the position is equal or larger than the current number of\r
-       parent's elements the new node is appended.\r
-       The newly inserted node is being returned.\r
-   */\r
-    wxTreeMultiItem InsertNode(TreeMultiItemNode* ParentPtr, size_t Position, wxString const& Caption, wxString const& Name);\r
-\r
-   /** Inserts a window into the parent's node at the specified position.\r
-       As this is a private method error checking is limited. Therefore, it has to be guaranteed that this method\r
-       is only called with a valid parent node and window pointer.\r
-       The position is zero based. In case the position is equal or larger than the current number of\r
-       parent's elements the new node is appended.\r
-       The newly inserted window is being returned.\r
-   */\r
-    wxTreeMultiItem InsertWindow(TreeMultiItemNode* ParentPtr, size_t Position, wxWindow* WindowPtr, wxString const& Name,\r
-                                 wxTreeMultiWindowInfo const& Info, int Flags);\r
-\r
-   /** @}\r
-   */\r
-private:\r
-    void Init();\r
-\r
+    void ScanTristateCheckstates(TreeMultiItemBase *b);
+#endif
+
+   /** \name Private add and delete methods
+       @{
+   */
+
+   /** Inserts a node into the parent's node at the specified position.
+       As this is a private method error checking is limited. Therefore, it has to be guaranteed that this method
+       is only called with a valid parent node pointer.
+       The position is zero based. In case the position is equal or larger than the current number of
+       parent's elements the new node is appended.
+       The newly inserted node is being returned.
+   */
+    wxTreeMultiItem InsertNode(TreeMultiItemNode* ParentPtr, size_t Position, wxString const& Caption, wxString const& Name);
+
+   /** Inserts a window into the parent's node at the specified position.
+       As this is a private method error checking is limited. Therefore, it has to be guaranteed that this method
+       is only called with a valid parent node and window pointer.
+       The position is zero based. In case the position is equal or larger than the current number of
+       parent's elements the new node is appended.
+       The newly inserted window is being returned.
+   */
+    wxTreeMultiItem InsertWindow(TreeMultiItemNode* ParentPtr, size_t Position, wxWindow* WindowPtr, wxString const& Name,
+                                 wxTreeMultiWindowInfo const& Info, int Flags);
+
+   /** @}
+   */
+private:
+    void Init();
+
     // handlers
     //---------
 
-    //virtual void OnDraw(wxDC& dc);\r
-    void OnPaint(wxPaintEvent &event);\r
-    void OnMouseClick     (wxMouseEvent& event);\r
-    void OnRightMouseClick(wxMouseEvent& Event);\r
-    void OnKey(wxKeyEvent &event);\r
-        void OnSize(wxSizeEvent &event);\r
-\r
+    //virtual void OnDraw(wxDC& dc);
+    void OnPaint(wxPaintEvent &event);
+    void OnMouseClick     (wxMouseEvent& event);
+    void OnRightMouseClick(wxMouseEvent& Event);
+    void OnKey(wxKeyEvent &event);
+        void OnSize(wxSizeEvent &event);
+
        /** Recalculates the spanning controls */
        void RecalculateSpanSizes();
 
@@ -765,66 +792,66 @@ public:
     */
 
     /** Adds a root node to the wxTreeMultiItem. There can be many root nodes. Use this wxTreeMultiNode pointer to add
-        more subnodes to it. */\r
-    wxTreeMultiItem AddRoot(const wxString &caption, const wxString &name = wxEmptyString);\r
-\r
-    /** Adds a window to the tree control. Use this wxTreeMultiItem method to add a window class to the\r
-        current wxTreeMultiItem. The wxTreeMultiItem must point to a Node class. If this is not the case\r
-        an empty wxTreeMultiItem is returned. The mask is used to override the mask settings of the\r
-        wxTreeMultiWindowInfo class. This can be handy to set or clear extra flags only needed for certain\r
-        situations */\r
-    wxTreeMultiItem AppendWindow(const wxTreeMultiItem &ParentItem, wxWindow *window = NULL, const wxString &name = wxEmptyString,\r
-                                 wxTreeMultiWindowInfo const& info = wxTreeMultiWindowInfoDefault, int flags = 0);\r
-\r
-   /** Adds a window to the tree control. Use this method to add a window class at the specified position\r
-       of the parent's wxTreeMultiItem. In case the position is smaller than the current number of children all elements\r
-       are shifted upwards, otherwise the new window is appended to the parent's wxTreeMultiItem.\r
-       The parent wxTreeMultiItem must point to a Node class. If this is not the case an\r
-       empty wxTreeMultiItem is returned.\r
-   */\r
-    wxTreeMultiItem InsertWindow(wxTreeMultiItem const& ParentItem, size_t Position, wxWindow *window = NULL, wxString const& Name = wxEmptyString,\r
-                                 wxTreeMultiWindowInfo const& info = wxTreeMultiWindowInfoDefault, int flags = 0);\r
-\r
-   /** Adds a window to the tree control. Use this method to add a window class as the first element\r
-       of the parent's wxTreeMultiItem. The parent wxTreeMultiItem must point to a Node class. If this is not the case an\r
-       empty wxTreeMultiItem is returned.\r
-   */\r
-    wxTreeMultiItem PrependWindow(wxTreeMultiItem const& ParentItem, wxWindow *window = NULL, const wxString &name = wxEmptyString,\r
-                                  wxTreeMultiWindowInfo const& info = wxTreeMultiWindowInfoDefault, int flags = 0);\r
-\r
-    /** Adds a node to the tree control. Use this wxTreeMultiItem method to add a recursive subnode class as the last element\r
-        of the parent's wxTreeMultiItem. The parent wxTreeMultiItem must point to a Node class. If this is not the case\r
-        an empty wxTreeMultiItem is returned. A node can contain multiple nodes or window classes */\r
-    wxTreeMultiItem AppendNode(wxTreeMultiItem const& ParentItem, const wxString &caption = wxEmptyString,\r
-                               const wxString &name = wxEmptyString);\r
-\r
-   /** Adds a node to the tree control. Use this method to add a recursive subnode class at the specified position\r
-       of the parent's wxTreeMultiItem. In case the position is smaller than the current number of nodes all elements\r
-       are shifted upwards, otherwise the new node is appended to the parent's wxTreeMultiItem.\r
-       The parent wxTreeMultiItem must point to a Node class. If this is not the case an\r
-       empty wxTreeMultiItem is returned. A node can contain multiple nodes or window classes.\r
-   */\r
-    wxTreeMultiItem InsertNode(wxTreeMultiItem const& ParentItem, size_t Position, wxString const& caption, wxString const& name);\r
-\r
-   /** Adds a node to the tree control. Use this method to add a recursive subnode class as the first element\r
-       of the parent's wxTreeMultiItem. The parent wxTreeMultiItem must point to a Node class. If this is not the case an\r
-       empty wxTreeMultiItem is returned. A node can contain multiple nodes or window classes.\r
-   */\r
-    wxTreeMultiItem PrependNode(wxTreeMultiItem const& ParentItem, wxString const& caption = wxEmptyString,\r
-                                wxString const& name = wxEmptyString);\r
-\r
-    /** Delete item from the tree control. Whenever it is present, delete it. If not, return false. After\r
-        deletion the wxTreeMultiItem is 0, thus IsOk will return false */\r
-    bool Delete(wxTreeMultiItem &item);\r
-\r
-    /** Deletes all the items from the wxTreeMultiCtrl. */\r
-    void DeleteAllItems(void)\r
-    {\r
-      this->_root.Clear();\r
-      this->m_SelectedItems.Clear();\r
-      Refresh();\r
-    };\r
-\r
+        more subnodes to it. */
+    wxTreeMultiItem AddRoot(const wxString &caption, const wxString &name = wxEmptyString);
+
+    /** Adds a window to the tree control. Use this wxTreeMultiItem method to add a window class to the
+        current wxTreeMultiItem. The wxTreeMultiItem must point to a Node class. If this is not the case
+        an empty wxTreeMultiItem is returned. The mask is used to override the mask settings of the
+        wxTreeMultiWindowInfo class. This can be handy to set or clear extra flags only needed for certain
+        situations */
+    wxTreeMultiItem AppendWindow(const wxTreeMultiItem &ParentItem, wxWindow *window = NULL, const wxString &name = wxEmptyString,
+                                 wxTreeMultiWindowInfo const& info = wxTreeMultiWindowInfoDefault, int flags = 0);
+
+   /** Adds a window to the tree control. Use this method to add a window class at the specified position
+       of the parent's wxTreeMultiItem. In case the position is smaller than the current number of children all elements
+       are shifted upwards, otherwise the new window is appended to the parent's wxTreeMultiItem.
+       The parent wxTreeMultiItem must point to a Node class. If this is not the case an
+       empty wxTreeMultiItem is returned.
+   */
+    wxTreeMultiItem InsertWindow(wxTreeMultiItem const& ParentItem, size_t Position, wxWindow *window = NULL, wxString const& Name = wxEmptyString,
+                                 wxTreeMultiWindowInfo const& info = wxTreeMultiWindowInfoDefault, int flags = 0);
+
+   /** Adds a window to the tree control. Use this method to add a window class as the first element
+       of the parent's wxTreeMultiItem. The parent wxTreeMultiItem must point to a Node class. If this is not the case an
+       empty wxTreeMultiItem is returned.
+   */
+    wxTreeMultiItem PrependWindow(wxTreeMultiItem const& ParentItem, wxWindow *window = NULL, const wxString &name = wxEmptyString,
+                                  wxTreeMultiWindowInfo const& info = wxTreeMultiWindowInfoDefault, int flags = 0);
+
+    /** Adds a node to the tree control. Use this wxTreeMultiItem method to add a recursive subnode class as the last element
+        of the parent's wxTreeMultiItem. The parent wxTreeMultiItem must point to a Node class. If this is not the case
+        an empty wxTreeMultiItem is returned. A node can contain multiple nodes or window classes */
+    wxTreeMultiItem AppendNode(wxTreeMultiItem const& ParentItem, const wxString &caption = wxEmptyString,
+                               const wxString &name = wxEmptyString);
+
+   /** Adds a node to the tree control. Use this method to add a recursive subnode class at the specified position
+       of the parent's wxTreeMultiItem. In case the position is smaller than the current number of nodes all elements
+       are shifted upwards, otherwise the new node is appended to the parent's wxTreeMultiItem.
+       The parent wxTreeMultiItem must point to a Node class. If this is not the case an
+       empty wxTreeMultiItem is returned. A node can contain multiple nodes or window classes.
+   */
+    wxTreeMultiItem InsertNode(wxTreeMultiItem const& ParentItem, size_t Position, wxString const& caption, wxString const& name);
+
+   /** Adds a node to the tree control. Use this method to add a recursive subnode class as the first element
+       of the parent's wxTreeMultiItem. The parent wxTreeMultiItem must point to a Node class. If this is not the case an
+       empty wxTreeMultiItem is returned. A node can contain multiple nodes or window classes.
+   */
+    wxTreeMultiItem PrependNode(wxTreeMultiItem const& ParentItem, wxString const& caption = wxEmptyString,
+                                wxString const& name = wxEmptyString);
+
+    /** Delete item from the tree control. Whenever it is present, delete it. If not, return false. After
+        deletion the wxTreeMultiItem is 0, thus IsOk will return false */
+    bool Delete(wxTreeMultiItem &item);
+
+    /** Deletes all the items from the wxTreeMultiCtrl. */
+    void DeleteAllItems(void)
+    {
+      this->_root.Clear();
+      this->m_SelectedItems.Clear();
+      Refresh();
+    };
+
     /** Deletes all children of the current node. The wxTreeMultiItem needs to be of type Node to
         do this. Call GetParentNode to get the parent wxTreeMultiItem which is always a node. */
     void DeleteChildren(const wxTreeMultiItem &item);
@@ -863,61 +890,61 @@ public:
             Collapse(item, false);
     };
 
-    /** @}\r
-    */\r
-\r
-    /** @name Selection manipulation\r
-         These methods allow you to select, unselect or test wxTreeMultiItems on selection.\r
-         Currently only items of type Node can be manipulated.\r
-        @{\r
-    */\r
-\r
-   /** Returns the number of selected items. */\r
-    size_t GetSelectedItemCount(void) const {return this->m_SelectedItems.GetCount();}\r
-\r
-   /** Returns the first selected item.\r
-       If there is no selected item an invalid tree multi item is returned.\r
-   */\r
-    wxTreeMultiItem GetFirstSelectedItem(void) const;\r
-\r
-   /** Returns the last selected item.\r
-       If there is no selected item an invalid tree multi item is returned.\r
-   */\r
-    wxTreeMultiItem GetLastSelectedItem(void) const;\r
-\r
-   /** Returns a selected item with the specified index.\r
-       If there is no selected item with the passed index an invalide tree multi item is returned.\r
-   */\r
-    wxTreeMultiItem GetSelectedItem(size_t Index) const;\r
-\r
-   /** Returns the index of the selected item.\r
-       In case the item is not selected "GetSelectedItemCount()" - which is an invalid index - is returned.\r
-   */\r
-    size_t GetSelectedItemIndex(wxTreeMultiItem const& Item) const;\r
-\r
-   /** Selects the specified item AND in case\r
-        - UnselectOthers is set all other selected items are going to be unselected;\r
-        - ExpandSelection is set all items between the last selected item and the passed item\r
-          are selected, too (in case there this is the first selection all items between the first root\r
-          and the passed item are selected).\r
-       If the passed item is already selected the other parameters are ignored.\r
-       Please not that currently only nodes can be selected, therefore, if any other item is passed nothing will happen.\r
-   */\r
-    void SelectItem(wxTreeMultiItem const& Item, bool UnselectOthers=true, bool ExpandSelection=false);\r
-\r
-   /** Unselect all selected items. */\r
-    void UnselectAll(void);\r
-\r
-   /** Unselect specified item */\r
-    void Unselect(wxTreeMultiItem const& Item);\r
-\r
-    /** @}\r
-    */\r
-\r
-\r
-    /** \name Visibility manipulation\r
-        These methods allow you to manipulate a certain wxTreeMultiItem to temporarily exclude or to include\r
-        the node from drawing. Whenever it is excluded, all operations can still be performed, however\r
+    /** @}
+    */
+
+    /** @name Selection manipulation
+         These methods allow you to select, unselect or test wxTreeMultiItems on selection.
+         Currently only items of type Node can be manipulated.
+        @{
+    */
+
+   /** Returns the number of selected items. */
+    size_t GetSelectedItemCount(void) const {return this->m_SelectedItems.GetCount();}
+
+   /** Returns the first selected item.
+       If there is no selected item an invalid tree multi item is returned.
+   */
+    wxTreeMultiItem GetFirstSelectedItem(void) const;
+
+   /** Returns the last selected item.
+       If there is no selected item an invalid tree multi item is returned.
+   */
+    wxTreeMultiItem GetLastSelectedItem(void) const;
+
+   /** Returns a selected item with the specified index.
+       If there is no selected item with the passed index an invalide tree multi item is returned.
+   */
+    wxTreeMultiItem GetSelectedItem(size_t Index) const;
+
+   /** Returns the index of the selected item.
+       In case the item is not selected "GetSelectedItemCount()" - which is an invalid index - is returned.
+   */
+    size_t GetSelectedItemIndex(wxTreeMultiItem const& Item) const;
+
+   /** Selects the specified item AND in case
+        - UnselectOthers is set all other selected items are going to be unselected;
+        - ExpandSelection is set all items between the last selected item and the passed item
+          are selected, too (in case there this is the first selection all items between the first root
+          and the passed item are selected).
+       If the passed item is already selected the other parameters are ignored.
+       Please not that currently only nodes can be selected, therefore, if any other item is passed nothing will happen.
+   */
+    void SelectItem(wxTreeMultiItem const& Item, bool UnselectOthers=true, bool ExpandSelection=false);
+
+   /** Unselect all selected items. */
+    void UnselectAll(void);
+
+   /** Unselect specified item */
+    void Unselect(wxTreeMultiItem const& Item);
+
+    /** @}
+    */
+
+
+    /** \name Visibility manipulation
+        These methods allow you to manipulate a certain wxTreeMultiItem to temporarily exclude or to include
+        the node from drawing. Whenever it is excluded, all operations can still be performed, however
         the node may not be visible.
         @{
     */
@@ -943,13 +970,13 @@ public:
         \li wxTMC_HITTEST_GUTTER If the front part of the item is clicked (where the node is)
         \li wxTMC_HITTEST_WINDOW If located in the window area
         \li wxTMC_HITTEST_CAPTION If located on the caption of the MultiTreeItemNode
-\r
-        Returned is the item which is located under the mouse, or none (IsOk = false) if\r
-        no item under the mouse */\r
-    wxTreeMultiItem HitTest(wxPoint const& pt, int &flags);\r
-\r
-    /** @name Find methods\r
-         These methods are used for finding a node in the wxTreeMultiCtrl.\r
+
+        Returned is the item which is located under the mouse, or none (IsOk = false) if
+        no item under the mouse */
+    wxTreeMultiItem HitTest(wxPoint const& pt, int &flags);
+
+    /** @name Find methods
+         These methods are used for finding a node in the wxTreeMultiCtrl.
         @{
     */
 
@@ -1065,13 +1092,13 @@ public:
 
 #if(CHECKBOXVIEW)
     /** Gets the checkbox state of the wxTreeMultiItem pointed out by "item". If the item does not have a checkbox
-        associated (or the item is not ok), it will return -1. If the checkbox is checked it will return 1,\r
-        unchecked is 0, and tri-state (usually only for caption nodes) it will return 2. <b>This needs USE_CHECKBOXVIEW\r
-        set to YES, or CHECKBOXVIEW=1 during compile</b>*/\r
-    int GetCheckboxState(const wxTreeMultiItem &item, bool WXUNUSED(recursive)) {\r
-        wxCHECK(item.IsOk(), -1);\r
-\r
-        // return the checkbox state\r
+        associated (or the item is not ok), it will return -1. If the checkbox is checked it will return 1,
+        unchecked is 0, and tri-state (usually only for caption nodes) it will return 2. <b>This needs USE_CHECKBOXVIEW
+        set to YES, or CHECKBOXVIEW=1 during compile</b>*/
+    int GetCheckboxState(const wxTreeMultiItem &item, bool WXUNUSED(recursive)) {
+        wxCHECK(item.IsOk(), -1);
+
+        // return the checkbox state
         TreeMultiItemBase *b = item.GetItem();
         if(b->GetCheckbox())
             return b->GetCheckboxState();
@@ -1135,26 +1162,26 @@ public:
 #endif
 
     /** @}
-    */\r
-\r
-    /** @name Iteration methods\r
-        Allows the user to iterate through a wxTreeMultiCtrl node, and get all the children or siblings.\r
-        To start an iteration from the lowest level the functions GetFirstRoot and GetLastRoot are provided.\r
-        @{\r
-    */\r
-\r
-   /** Returns the first root. */\r
-    wxTreeMultiItem GetFirstRoot(void) const {return wxTreeMultiItem(this->_root.First());}\r
-\r
-   /** Returns the last root. */\r
-    wxTreeMultiItem GetLastRoot(void) const {return wxTreeMultiItem(this->_root.Last());}\r
-\r
-   /** Returns the items parent. */\r
-    wxTreeMultiItem GetParent(wxTreeMultiItem const& item) const;\r
-\r
-    /** Returns the first child of this node. The type of wxTreeMultiItem needs to be of Node. Whenever not succesful,\r
-        the item returned is not ok (IsOk = false). Upon success, a valid child is returned. The cookie variable doesn't\r
-        need to be initialized */\r
+    */
+
+    /** @name Iteration methods
+        Allows the user to iterate through a wxTreeMultiCtrl node, and get all the children or siblings.
+        To start an iteration from the lowest level the functions GetFirstRoot and GetLastRoot are provided.
+        @{
+    */
+
+   /** Returns the first root. */
+    wxTreeMultiItem GetFirstRoot(void) const {return wxTreeMultiItem(this->_root.First());}
+
+   /** Returns the last root. */
+    wxTreeMultiItem GetLastRoot(void) const {return wxTreeMultiItem(this->_root.Last());}
+
+   /** Returns the items parent. */
+    wxTreeMultiItem GetParent(wxTreeMultiItem const& item) const;
+
+    /** Returns the first child of this node. The type of wxTreeMultiItem needs to be of Node. Whenever not succesful,
+        the item returned is not ok (IsOk = false). Upon success, a valid child is returned. The cookie variable doesn't
+        need to be initialized */
     wxTreeMultiItem GetFirstChild(const wxTreeMultiItem &item, int &cookie) const;
 
     /** Returns the next child in the iteration on the level of 'item'. Make sure you called GetFirstChild first
@@ -1162,33 +1189,33 @@ public:
     wxTreeMultiItem GetNextChild(const wxTreeMultiItem &item, int &cookie) const;
 
     /** Returns the last child of this node. The type of 'item' needs to be of Node. Whenever not succesful,
-        the item returned is not ok (IsOk = false). Upon success, a valid last child is returned. */\r
-    wxTreeMultiItem GetLastChild(const wxTreeMultiItem &item) const;\r
-\r
-   /** Returns the next sibling of the passed item. */\r
-    wxTreeMultiItem GetNextSibling(wxTreeMultiItem const& item) const;\r
-\r
-   /** Returns the previous sibling of the passed item. */\r
-    wxTreeMultiItem GetPrevSibling(wxTreeMultiItem const& item) const;\r
-\r
-   /** Returns the next item. "Next" is defined by the following order:\r
-        - in case the current item has a child it is the first child of the current item;\r
-        - in case the current item has a next sibling as the next sibling;\r
-        - as the parent's (or one of its ancestor's) next sibling.\r
-   */\r
-    wxTreeMultiItem GetNext(wxTreeMultiItem const& item) const;\r
-\r
-   /** Returns the previous item. "Previous" is defined by the following order:\r
-        - in case the current item has a child it is the last child of the current item;\r
-        - in case the current item has a previous sibling it is the previous sibling;\r
-        - as the parent's (or one of its ancestor's) previous sibling.\r
-   */\r
-    wxTreeMultiItem GetPrevious(wxTreeMultiItem const& item) const;\r
-\r
-\r
-    /** @}\r
-    */\r
-\r
+        the item returned is not ok (IsOk = false). Upon success, a valid last child is returned. */
+    wxTreeMultiItem GetLastChild(const wxTreeMultiItem &item) const;
+
+   /** Returns the next sibling of the passed item. */
+    wxTreeMultiItem GetNextSibling(wxTreeMultiItem const& item) const;
+
+   /** Returns the previous sibling of the passed item. */
+    wxTreeMultiItem GetPrevSibling(wxTreeMultiItem const& item) const;
+
+   /** Returns the next item. "Next" is defined by the following order:
+        - in case the current item has a child it is the first child of the current item;
+        - in case the current item has a next sibling as the next sibling;
+        - as the parent's (or one of its ancestor's) next sibling.
+   */
+    wxTreeMultiItem GetNext(wxTreeMultiItem const& item) const;
+
+   /** Returns the previous item. "Previous" is defined by the following order:
+        - in case the current item has a child it is the last child of the current item;
+        - in case the current item has a previous sibling it is the previous sibling;
+        - as the parent's (or one of its ancestor's) previous sibling.
+   */
+    wxTreeMultiItem GetPrevious(wxTreeMultiItem const& item) const;
+
+
+    /** @}
+    */
+
     /** @name Get and set methods
         These methods allow you to set or get certain properties of the wxTreeMultiCtrl.
         @{
@@ -1206,13 +1233,13 @@ public:
         beginning. */
     void SetCaptionFont(const wxFont &font);
 
-    /** @}\r
-    */\r
-\r
-  void OnDraw(wxDC& dc);\r
-\r
-private:\r
-    DECLARE_EVENT_TABLE()\r
-};\r
+    /** @}
+    */
+
+  void OnDraw(wxDC& dc);
+
+private:
+    DECLARE_EVENT_TABLE()
+};
 
 #endif