<?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>wxWidgets team.</holder></copyright>
  <legalnotice>Licensed under the wxWindows Free Documentation Licence, Version 3
  </legalnotice>
  <title>wxBookCtrlEvent</title>
</header>
<module>wxBookCtrlEvent</module>
<modulesummary>Functions for wxBookCtrlEvent class</modulesummary>
<description><p>This class represents the events generated by book controls (<seeerl marker="wxNotebook"><c>wxNotebook</c></seeerl>, <seeerl marker="wxListbook"><c>wxListbook</c></seeerl>, <seeerl marker="wxChoicebook"><c>wxChoicebook</c></seeerl>, <seeerl marker="wxTreebook"><c>wxTreebook</c></seeerl>, <seeerl marker="wxAuiNotebook"><c>wxAuiNotebook</c></seeerl>).
      </p><p>The PAGE_CHANGING events are sent before the current page is changed. It allows the program to examine the current page (which can be retrieved with <seemfa marker="#getOldSelection/1"><c>getOldSelection/1</c></seemfa>) and to veto the page change by calling <seemfa marker="wxNotifyEvent#veto/1"><c>wxNotifyEvent:veto/1</c></seemfa> if, for example, the current values in the controls of the old page are invalid.
      </p><p>The PAGE_CHANGED events are sent after the page has been changed and the program cannot veto it any more, it just informs it about the page change.
      </p><p>To summarize, if the program is interested in validating the page values before allowing the user to change it, it should process the PAGE_CHANGING event, otherwise PAGE_CHANGED is probably enough. In any case, it is probably unnecessary to process both events at once.
      </p><p>See: <seeerl marker="wxNotebook"><c>wxNotebook</c></seeerl>, <seeerl marker="wxListbook"><c>wxListbook</c></seeerl>, <seeerl marker="wxChoicebook"><c>wxChoicebook</c></seeerl>, <seeerl marker="wxTreebook"><c>wxTreebook</c></seeerl>, <seeerl marker="wxToolbook"><c>wxToolbook</c></seeerl>, <seeerl marker="wxAuiNotebook"><c>wxAuiNotebook</c></seeerl>
      </p>
  <p>This class is derived (and can use functions) from: 
    <seeerl marker="wxNotifyEvent"><c>wxNotifyEvent</c></seeerl> <seeerl marker="wxCommandEvent"><c>wxCommandEvent</c></seeerl> <seeerl marker="wxEvent"><c>wxEvent</c></seeerl></p>
  
  <p>wxWidgets docs: <url href="https://docs.wxwidgets.org/3.1/classwx_book_ctrl_event.html">wxBookCtrlEvent</url></p>
  </description>
<datatypes>
    <datatype><name name="wxBookCtrlEvent"/></datatype>
    <datatype><name name="wxBookCtrl"/></datatype>
    <datatype><name name="wxBookCtrlEventType"/></datatype></datatypes>

<funcs>
  <func>
    <name name="getOldSelection" arity="1" clause_i="1" since=""/>
    <fsummary>Returns the page that was selected before the change, <c>wxNOT_FOUND</c> if none was selected. </fsummary>
    <desc><p>Returns the page that was selected before the change, <c>wxNOT_FOUND</c> if none was selected. 
      </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: under Windows, <seemfa marker="#getSelection/1"><c>getSelection/1</c></seemfa> will return the same value as <seemfa marker="#getOldSelection/1"><c>getOldSelection/1</c></seemfa> when called from the <c>EVT_BOOKCTRL_PAGE_CHANGING</c> handler and not the page which is going to be selected. 
      </p></desc>
  </func>
  
  <func>
    <name name="setOldSelection" arity="2" clause_i="1" since=""/>
    <fsummary>Sets the id of the page selected before the change. </fsummary>
    <desc><p>Sets the id of the page selected before the change. 
      </p></desc>
  </func>
  
  <func>
    <name name="setSelection" arity="2" clause_i="1" since=""/>
    <fsummary>Sets the selection member variable. </fsummary>
    <desc><p>Sets the selection member variable. 
      </p></desc>
  </func>
  </funcs>
</erlref>
