<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">

<!-- THIS FILE IS GENERATED DO NOT EDIT -->


<erlref>
<header>
  <copyright>
    <year>2020</year><year>2021</year>
    <holder>wxWidgets team.</holder></copyright>
  <legalnotice>Licensed under the wxWindows Free Documentation Licence, Version 3
  </legalnotice>
  <title>wxTreebook</title>
</header>
<module>wxTreebook</module>
<modulesummary>Functions for wxTreebook class</modulesummary>
<description><p>This class is an extension of the <seeerl marker="wxNotebook"><c>wxNotebook</c></seeerl> class that allows a tree structured set of pages to be shown in a control. A classic example is a netscape preferences dialog that shows a tree of preference sections on the left and select section page on the right.
      </p><p>To use the class simply create it and populate with pages using <seemfa marker="#insertPage/5"><c>insertPage/5</c></seemfa>, <seemfa marker="#insertSubPage/5"><c>insertSubPage/5</c></seemfa>, <seemfa marker="#addPage/4"><c>addPage/4</c></seemfa>, <c>AddSubPage()</c> (not implemented in wx).
      </p><p>If your tree is no more than 1 level in depth then you could simply use <seemfa marker="#addPage/4"><c>addPage/4</c></seemfa> and <c>AddSubPage()</c> (not implemented in wx) to sequentially populate your tree by adding at every step a page or a subpage to the end of the tree.
      </p><p>See: ?wxBookCtrl, <seeerl marker="wxBookCtrlEvent"><c>wxBookCtrlEvent</c></seeerl>, <seeerl marker="wxNotebook"><c>wxNotebook</c></seeerl>, <seeerl marker="wxTreeCtrl"><c>wxTreeCtrl</c></seeerl>, <seeerl marker="wxImageList"><c>wxImageList</c></seeerl>, <url href="https://docs.wxwidgets.org/3.1/overview_bookctrl.html#overview_bookctrl">Overview bookctrl</url>, <url href="https://docs.wxwidgets.org/3.1/page_samples.html#page_samples_notebook">Examples</url>
      </p>
  <p>This class is derived (and can use functions) from: 
    <seeerl marker="wxBookCtrlBase"><c>wxBookCtrlBase</c></seeerl> <seeerl marker="wxControl"><c>wxControl</c></seeerl> <seeerl marker="wxWindow"><c>wxWindow</c></seeerl> <seeerl marker="wxEvtHandler"><c>wxEvtHandler</c></seeerl></p>
  
  <p>wxWidgets docs: <url href="https://docs.wxwidgets.org/3.1/classwx_treebook.html">wxTreebook</url></p>
  </description><section><title>Events</title><p>Event types emitted from this class: <seeerl marker="wxBookCtrlEvent"><c>treebook_page_changed</c></seeerl>, <seeerl marker="wxBookCtrlEvent"><c>treebook_page_changing</c></seeerl></p></section>
<datatypes><datatype><name name="wxTreebook"/></datatype></datatypes>

<funcs>
  <func>
    <name name="new" arity="0" clause_i="1" since=""/>
    <fsummary>Default constructor. </fsummary>
    <desc><p>Default constructor. 
      </p></desc>
  </func>
  
  <func>
    <name name="new" arity="2" clause_i="1" since=""/>
    <fsummary>See: <c>new/3</c></fsummary>
  </func>
  
  <func>
    <name name="new" arity="3" clause_i="1" since=""/>
    <fsummary>Creates an empty <c>wxTreebook</c>. </fsummary>
    <desc><p>Creates an empty <seeerl marker="wxTreebook"><c>wxTreebook</c></seeerl>. 
      </p></desc>
  </func>
  
  <func>
    <name name="destroy" arity="1" clause_i="1" since=""/>
    <fsummary>Destroys the <c>wxTreebook</c> object. </fsummary>
    <desc><p>Destroys the <seeerl marker="wxTreebook"><c>wxTreebook</c></seeerl> object. 
      </p><p>Also deletes all the pages owned by the control (inserted previously into it). 
      </p></desc>
  </func>
  
  <func>
    <name name="addPage" arity="3" clause_i="1" since=""/>
    <fsummary>See: <c>addPage/4</c></fsummary>
  </func>
  
  <func>
    <name name="addPage" arity="4" clause_i="1" since=""/>
    <fsummary>Adds a new page. </fsummary>
    <desc><p>Adds a new page. 
      </p><p>The page is placed at the topmost level after all other pages. NULL could be specified for page to create an empty page. 
      </p></desc>
  </func>
  
  <func>
    <name name="advanceSelection" arity="1" clause_i="1" since=""/>
    <fsummary>See: <c>advanceSelection/2</c></fsummary>
  </func>
  
  <func>
    <name name="advanceSelection" arity="2" clause_i="1" since=""/>
    <fsummary>Cycles through the tabs. </fsummary>
    <desc><p>Cycles through the tabs. 
      </p><p>The call to this function generates the page changing events. 
      </p></desc>
  </func>
  
  <func>
    <name name="assignImageList" arity="2" clause_i="1" since=""/>
    <fsummary>Sets the image list for the page control and takes ownership of the list. </fsummary>
    <desc><p>Sets the image list for the page control and takes ownership of the list. 
      </p><p>See: <seeerl marker="wxImageList"><c>wxImageList</c></seeerl>, <seemfa marker="#setImageList/2"><c>setImageList/2</c></seemfa>
      </p></desc>
  </func>
  
  <func>
    <name name="create" arity="3" clause_i="1" since=""/>
    <fsummary>See: <c>create/4</c></fsummary>
  </func>
  
  <func>
    <name name="create" arity="4" clause_i="1" since=""/>
    <fsummary>Creates a treebook control. </fsummary>
    <desc><p>Creates a treebook control. 
      </p><p>See <seemfa marker="#new/3"><c>new/3</c></seemfa> for the description of the parameters. 
      </p></desc>
  </func>
  
  <func>
    <name name="deleteAllPages" arity="1" clause_i="1" since=""/>
    <fsummary>Deletes all pages. </fsummary>
    <desc><p>Deletes all pages. 
      </p></desc>
  </func>
  
  <func>
    <name name="getCurrentPage" arity="1" clause_i="1" since=""/>
    <fsummary>Returns the currently selected page or NULL. </fsummary>
    <desc><p>Returns the currently selected page or NULL. 
      </p></desc>
  </func>
  
  <func>
    <name name="getImageList" arity="1" clause_i="1" since=""/>
    <fsummary>Returns the associated image list, may be NULL. </fsummary>
    <desc><p>Returns the associated image list, may be NULL. 
      </p><p>See: <seeerl marker="wxImageList"><c>wxImageList</c></seeerl>, <seemfa marker="#setImageList/2"><c>setImageList/2</c></seemfa>
      </p></desc>
  </func>
  
  <func>
    <name name="getPage" arity="2" clause_i="1" since=""/>
    <fsummary>Returns the window at the given page position. </fsummary>
    <desc><p>Returns the window at the given page position. 
      </p></desc>
  </func>
  
  <func>
    <name name="getPageCount" arity="1" clause_i="1" since=""/>
    <fsummary>Returns the number of pages in the control. </fsummary>
    <desc><p>Returns the number of pages in the control. 
      </p></desc>
  </func>
  
  <func>
    <name name="getPageImage" arity="2" clause_i="1" since=""/>
    <fsummary>Returns the image index for the given page. </fsummary>
    <desc><p>Returns the image index for the given page. 
      </p></desc>
  </func>
  
  <func>
    <name name="getPageText" arity="2" clause_i="1" since=""/>
    <fsummary>Returns the string for the given page. </fsummary>
    <desc><p>Returns the string for the given page. 
      </p></desc>
  </func>
  
  <func>
    <name name="getSelection" arity="1" clause_i="1" since=""/>
    <fsummary>Returns the currently selected page, or <c>wxNOT_FOUND</c> if none was selected. </fsummary>
    <desc><p>Returns the currently selected page, or <c>wxNOT_FOUND</c> if none was selected. 
      </p><p>Note: This method may return either the previously or newly selected page when called from the EVT_TREEBOOK_PAGE_CHANGED() handler depending on the platform and so <seemfa marker="wxBookCtrlEvent#getSelection/1"><c>wxBookCtrlEvent:getSelection/1</c></seemfa> should be used instead in this case. 
      </p></desc>
  </func>
  
  <func>
    <name name="expandNode" arity="2" clause_i="1" since=""/>
    <fsummary>See: <c>expandNode/3</c></fsummary>
  </func>
  
  <func>
    <name name="expandNode" arity="3" clause_i="1" since=""/>
    <fsummary>Expands (collapses) the <c>pageId</c> node. </fsummary>
    <desc><p>Expands (collapses) the <c>pageId</c> node. 
      </p><p>Returns the previous state. May generate page changing events (if selected page is under the collapsed branch, then its parent is autoselected). 
      </p></desc>
  </func>
  
  <func>
    <name name="isNodeExpanded" arity="2" clause_i="1" since=""/>
    <fsummary>Returns true if the page represented by <c>pageId</c> is expanded. </fsummary>
    <desc><p>Returns true if the page represented by <c>pageId</c> is expanded. 
      </p></desc>
  </func>
  
  <func>
    <name name="hitTest" arity="2" clause_i="1" since=""/>
    <fsummary>Returns the index of the tab at the specified position or <c>wxNOT_FOUND</c> if none. </fsummary>
    <desc><p>Returns the index of the tab at the specified position or <c>wxNOT_FOUND</c> if none. 
      </p><p>If <c>flags</c> parameter is non-NULL, the position of the point inside the tab is returned as well.
      </p><p>Return: Returns the zero-based tab index or <c>wxNOT_FOUND</c> if there is no tab at the specified position. 
      </p></desc>
  </func>
  
  <func>
    <name name="insertPage" arity="4" clause_i="1" since=""/>
    <fsummary>See: <c>insertPage/5</c></fsummary>
  </func>
  
  <func>
    <name name="insertPage" arity="5" clause_i="1" since=""/>
    <fsummary>Inserts a new page just before the page indicated by <c>pagePos</c>. </fsummary>
    <desc><p>Inserts a new page just before the page indicated by <c>pagePos</c>. 
      </p><p>The new page is placed before <c>pagePos</c> page and on the same level. NULL could be specified for page to create an empty page. 
      </p></desc>
  </func>
  
  <func>
    <name name="insertSubPage" arity="4" clause_i="1" since=""/>
    <fsummary>See: <c>insertSubPage/5</c></fsummary>
  </func>
  
  <func>
    <name name="insertSubPage" arity="5" clause_i="1" since=""/>
    <fsummary>Inserts a sub page under the specified page. </fsummary>
    <desc><p>Inserts a sub page under the specified page. 
      </p><p>NULL could be specified for page to create an empty page. 
      </p></desc>
  </func>
  
  <func>
    <name name="setImageList" arity="2" clause_i="1" since=""/>
    <fsummary>Sets the image list to use. </fsummary>
    <desc><p>Sets the image list to use. 
      </p><p>It does not take ownership of the image list, you must delete it yourself.
      </p><p>See: <seeerl marker="wxImageList"><c>wxImageList</c></seeerl>, <seemfa marker="#assignImageList/2"><c>assignImageList/2</c></seemfa>
      </p></desc>
  </func>
  
  <func>
    <name name="setPageSize" arity="2" clause_i="1" since=""/>
    <fsummary>Sets the width and height of the pages. </fsummary>
    <desc><p>Sets the width and height of the pages. 
      </p><p>Note: This method is currently not implemented for wxGTK. 
      </p></desc>
  </func>
  
  <func>
    <name name="setPageImage" arity="3" clause_i="1" since=""/>
    <fsummary>Sets the image index for the given page. </fsummary>
    <desc><p>Sets the image index for the given page. 
      </p><p><c>image</c> is an index into the image list which was set with <seemfa marker="#setImageList/2"><c>setImageList/2</c></seemfa>. 
      </p></desc>
  </func>
  
  <func>
    <name name="setPageText" arity="3" clause_i="1" since=""/>
    <fsummary>Sets the text for the given page. </fsummary>
    <desc><p>Sets the text for the given page. 
      </p></desc>
  </func>
  
  <func>
    <name name="setSelection" arity="2" clause_i="1" since=""/>
    <fsummary>Sets the selection to the given page, returning the previous selection. </fsummary>
    <desc><p>Sets the selection to the given page, returning the previous selection. 
      </p><p>Notice that the call to this function generates the page changing events, use the <seemfa marker="#changeSelection/2"><c>changeSelection/2</c></seemfa> function if you don't want these events to be generated.
      </p><p>See: <seemfa marker="wxBookCtrlBase#getSelection/1"><c>wxBookCtrlBase:getSelection/1</c></seemfa>
      </p></desc>
  </func>
  
  <func>
    <name name="changeSelection" arity="2" clause_i="1" since=""/>
    <fsummary>Changes the selection to the given page, returning the previous selection. </fsummary>
    <desc><p>Changes the selection to the given page, returning the previous selection. 
      </p><p>This function behaves as <seemfa marker="#setSelection/2"><c>setSelection/2</c></seemfa> but does <c>not</c> generate the page changing events.
      </p><p>See overview_events_prog for more information. 
      </p></desc>
  </func>
  </funcs>
</erlref>
