<?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>
    <holder>Ericsson AB. All Rights Reserved.</holder></copyright>
  <legalnotice>
      Licensed under the Apache License, Version 2.0 (the "License");
      you may not use this file except in compliance with the License.
      You may obtain a copy of the License at

          http://www.apache.org/licenses/LICENSE-2.0

      Unless required by applicable law or agreed to in writing, software
      distributed under the License is distributed on an "AS IS" BASIS,
      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      See the License for the specific language governing permissions and
      limitations under the License.

  </legalnotice>
  <title>wxChoicebook</title>
</header>
<module>wxChoicebook</module>
<modulesummary>Functions for wxChoicebook class</modulesummary>
<description><p><seeerl marker="wxChoicebook"><c>wxChoicebook</c></seeerl> is a class similar to <seeerl marker="wxNotebook"><c>wxNotebook</c></seeerl>, but uses a <seeerl marker="wxChoice"><c>wxChoice</c></seeerl> control to show the labels instead of the tabs.
      </p><p>For usage documentation of this class, please refer to the base abstract class wxBookCtrl. You can also use the page_samples_notebook to see <seeerl marker="wxChoicebook"><c>wxChoicebook</c></seeerl> in action.
      </p><p><seeerl marker="wxChoicebook"><c>wxChoicebook</c></seeerl> allows the use of wxBookCtrlBase::GetControlSizer(), allowing a program to add other controls next to the choice control. This is particularly useful when screen space is restricted, as it often is when <seeerl marker="wxChoicebook"><c>wxChoicebook</c></seeerl> is being employed.
      </p><p>Styles</p><p>This class supports the following styles:
      </p><p>See: <url href="https://docs.wxwidgets.org/3.1/overview_bookctrl.html#overview_bookctrl">Overview bookctrl</url>, <seeerl marker="wxNotebook"><c>wxNotebook</c></seeerl>, <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_choicebook.html">wxChoicebook</url></p>
  </description><section><title>Events</title><p>Event types emitted from this class: <seeerl marker="wxBookCtrlEvent"><c>choicebook_page_changed</c></seeerl>, <seeerl marker="wxBookCtrlEvent"><c>choicebook_page_changing</c></seeerl></p></section>
<datatypes><datatype><name name="wxChoicebook"/></datatype></datatypes>

<funcs>
  <func>
    <name name="new" arity="0" clause_i="1" since=""/>
    <fsummary>Constructs a choicebook control. </fsummary>
    <desc><p>Constructs a choicebook control. 
      </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/>
    <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 must have the book control itself as the parent and must not have been added to this control previously.
      </p><p>The call to this function will generate the page changing and page changed events if <c>select</c> is true, but not when inserting the very first page (as there is no previous page selection to switch from in this case and so it wouldn't make sense to e.g. veto such event).
      </p><p>Return: true if successful, false otherwise.
      </p><p>Remark: Do not delete the page, it will be deleted by the book control.
      </p><p>See: <seemfa marker="#insertPage/5"><c>insertPage/5</c></seemfa>
      </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>Create the choicebook control that has already been constructed with the default constructor. </fsummary>
    <desc><p>Create the choicebook control that has already been constructed with the default constructor. 
      </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 that this method may return either the previously or newly selected page when called from the <c>EVT_BOOKCTRL_PAGE_CHANGED</c> 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="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 at the specified position. </fsummary>
    <desc><p>Inserts a new page at the specified position. 
      </p><p>Return: true if successful, false otherwise.
      </p><p>Remark: Do not delete the page, it will be deleted by the book control.
      </p><p>See: <seemfa marker="#addPage/4"><c>addPage/4</c></seemfa>
      </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="#getSelection/1"><c>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>
  
  <func>
    <name name="destroy" arity="1" clause_i="1" since=""/>
    <fsummary>Destructor</fsummary>
    <desc><p>Destroys the object.</p></desc>
  </func>
  </funcs>
</erlref>
