+ // Notice that page pointer may be NULL in which case the next non NULL
+ // page (usually the first child page of a node) is shown when this page is
+ // selected
+
+ // Inserts a new page just before the page indicated by page.
+ // The new page is placed on the same level as page.
+ virtual bool InsertPage(size_t pos,
+ wxWindow *page,
+ const wxString& text,
+ bool select = false,
+ int imageId = wxNOT_FOUND);
+
+ // Inserts a new sub-page to the end of children of the page at given pos.
+ virtual bool InsertSubPage(size_t pos,
+ wxWindow *page,
+ const wxString& text,
+ bool select = false,
+ int imageId = wxNOT_FOUND);
+
+ // Adds a new page at top level after all other pages.
+ virtual bool AddPage(wxWindow *page,
+ const wxString& text,
+ bool select = false,
+ int imageId = wxNOT_FOUND);
+
+ // Adds a new child-page to the last top-level page inserted.
+ // Useful when constructing 1 level tree structure.
+ virtual bool AddSubPage(wxWindow *page,
+ const wxString& text,
+ bool select = false,
+ int imageId = wxNOT_FOUND);
+
+ // Deletes the page and ALL its children. Could trigger page selection
+ // change in a case when selected page is removed. In that case its parent
+ // is selected (or the next page if no parent).
+ virtual bool DeletePage(size_t pos);
+
+
+ // Tree operations
+ // ---------------
+
+ // Gets the page node state -- node is expanded or collapsed
+ virtual bool IsNodeExpanded(size_t pos) const;
+
+ // Expands or collapses the page node. Returns the previous state.
+ // May generate page changing events (if selected page
+ // is under the collapsed branch, then parent is autoselected).
+ virtual bool ExpandNode(size_t pos, bool expand = true);
+
+ // shortcut for ExpandNode(pos, false)
+ bool CollapseNode(size_t pos);
+
+ // get the parent page or wxNOT_FOUND if this is a top level page
+ int GetPageParent(size_t pos) const;
+
+ // the tree control we use for showing the pages index tree
+ wxPyTreeCtrl* GetTreeCtrl() const;
+
+ %property(TreeCtrl, GetTreeCtrl, doc="See `GetTreeCtrl`");