<?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>wxCommandEvent</title>
</header>
<module>wxCommandEvent</module>
<modulesummary>Functions for wxCommandEvent class</modulesummary>
<description><p>This event class contains information about command events, which originate from a variety of simple controls.
      </p><p>Note that wxCommandEvents and wxCommandEvent-derived event classes by default and unlike other wxEvent-derived classes propagate upward from the source window (the window which emits the event) up to the first parent which processes the event. Be sure to read overview_events_propagation.
      </p><p>More complex controls, such as <seeerl marker="wxTreeCtrl"><c>wxTreeCtrl</c></seeerl>, have separate command event classes.
      </p>
  <p>This class is derived (and can use functions) from: 
    <seeerl marker="wxEvent"><c>wxEvent</c></seeerl></p>
  
  <p>wxWidgets docs: <url href="https://docs.wxwidgets.org/3.1/classwx_command_event.html">wxCommandEvent</url></p>
  </description><section><title>Events</title><p>Use <seemfa marker="wxEvtHandler#connect/3"><c>wxEvtHandler:connect/3</c></seemfa> with <seetype marker="#wxCommandEventType"><c>wxCommandEventType</c></seetype> to subscribe to events of this type.</p></section>
<datatypes>
    <datatype><name name="wxCommandEvent"/></datatype>
    <datatype><name name="wxCommand"/></datatype>
    <datatype><name name="wxCommandEventType"/></datatype></datatypes>

<funcs>
  <func>
    <name name="getClientData" arity="1" clause_i="1" since=""/>
    <fsummary>Returns client object pointer for a listbox or choice selection event (not valid for a deselection). </fsummary>
    <desc><p>Returns client object pointer for a listbox or choice selection event (not valid for a deselection). 
      </p></desc>
  </func>
  
  <func>
    <name name="getExtraLong" arity="1" clause_i="1" since=""/>
    <fsummary>Returns extra information dependent on the event objects type. </fsummary>
    <desc><p>Returns extra information dependent on the event objects type. 
      </p><p>If the event comes from a listbox selection, it is a boolean determining whether the event was a selection (true) or a deselection (false). A listbox deselection only occurs for multiple-selection boxes, and in this case the index and string values are indeterminate and the listbox must be examined by the application. 
      </p></desc>
  </func>
  
  <func>
    <name name="getInt" arity="1" clause_i="1" since=""/>
    <fsummary>Returns the integer identifier corresponding to a listbox, choice or radiobox selection (only if the event was a selection, not a deselection), or a boolean value representing the value of a checkbox. </fsummary>
    <desc><p>Returns the integer identifier corresponding to a listbox, choice or radiobox selection (only if the event was a selection, not a deselection), or a boolean value representing the value of a checkbox. 
      </p><p>For a menu item, this method returns -1 if the item is not checkable or a boolean value (true or false) for checkable items indicating the new state of the item. 
      </p></desc>
  </func>
  
  <func>
    <name name="getSelection" arity="1" clause_i="1" since=""/>
    <fsummary>Returns item index for a listbox or choice selection event (not valid for a deselection). </fsummary>
    <desc><p>Returns item index for a listbox or choice selection event (not valid for a deselection). 
      </p></desc>
  </func>
  
  <func>
    <name name="getString" arity="1" clause_i="1" since=""/>
    <fsummary>Returns item string for a listbox or choice selection event. </fsummary>
    <desc><p>Returns item string for a listbox or choice selection event. 
      </p><p>If one or several items have been deselected, returns the index of the first deselected item. If some items have been selected and others deselected at the same time, it will return the index of the first selected item. 
      </p></desc>
  </func>
  
  <func>
    <name name="isChecked" arity="1" clause_i="1" since=""/>
    <fsummary>This method can be used with checkbox and menu events: for the checkboxes, the method returns true for a selection event and false for a deselection one. </fsummary>
    <desc><p>This method can be used with checkbox and menu events: for the checkboxes, the method returns true for a selection event and false for a deselection one. 
      </p><p>For the menu events, this method indicates if the menu item just has become checked or unchecked (and thus only makes sense for checkable menu items).
      </p><p>Notice that this method cannot be used with <seeerl marker="wxCheckListBox"><c>wxCheckListBox</c></seeerl> currently. 
      </p></desc>
  </func>
  
  <func>
    <name name="isSelection" arity="1" clause_i="1" since=""/>
    <fsummary>For a listbox or similar event, returns true if it is a selection, false if it is a deselection. </fsummary>
    <desc><p>For a listbox or similar event, returns true if it is a selection, false if it is a deselection. 
      </p><p>If some items have been selected and others deselected at the same time, it will return true. 
      </p></desc>
  </func>
  
  <func>
    <name name="setInt" arity="2" clause_i="1" since=""/>
    <fsummary>Sets the <c>m_commandInt</c> member. </fsummary>
    <desc><p>Sets the <c>m_commandInt</c> member. 
      </p></desc>
  </func>
  
  <func>
    <name name="setString" arity="2" clause_i="1" since=""/>
    <fsummary>Sets the <c>m_commandString</c> member. </fsummary>
    <desc><p>Sets the <c>m_commandString</c> member. 
      </p></desc>
  </func>
  </funcs>
</erlref>
