<?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>wxMenuBar</title>
</header>
<module>wxMenuBar</module>
<modulesummary>Functions for wxMenuBar class</modulesummary>
<description><p>A menu bar is a series of menus accessible from the top of a frame.
      </p><p>Remark: To respond to a menu selection, provide a handler for EVT_MENU, in the frame that contains the menu bar.
      </p><p> If you have a toolbar which uses the same identifiers as your EVT_MENU entries, events from the toolbar will also be processed by your EVT_MENU event handlers.
      </p><p>Tip: under Windows, if you discover that menu shortcuts (for example, Alt-F to show the file menu) are not working, check any EVT_CHAR events you are handling in child windows. If you are not calling event.Skip() for events that you don't process in these event handlers, menu shortcuts may cease to work.
      </p><p>See: <seeerl marker="wxMenu"><c>wxMenu</c></seeerl>, <url href="https://docs.wxwidgets.org/3.1/overview_events.html#overview_events">Overview events</url>
      </p>
  <p>This class is derived (and can use functions) from: 
    <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_menu_bar.html">wxMenuBar</url></p>
  </description>
<datatypes><datatype><name name="wxMenuBar"/></datatype></datatypes>

<funcs>
  <func>
    <name name="new" arity="0" clause_i="1" since=""/>
    <fsummary>Construct an empty menu bar. </fsummary>
    <desc><p>Construct an empty menu bar. 
      </p></desc>
  </func>
  
  <func>
    <name name="new" arity="1" clause_i="1" since=""/>
    <fsummary/>
    <desc/>
  </func>
  
  <func>
    <name name="destroy" arity="1" clause_i="1" since=""/>
    <fsummary>Destructor, destroying the menu bar and removing it from the parent frame (if any). </fsummary>
    <desc><p>Destructor, destroying the menu bar and removing it from the parent frame (if any). 
      </p></desc>
  </func>
  
  <func>
    <name name="append" arity="3" clause_i="1" since=""/>
    <fsummary>Adds the item to the end of the menu bar. </fsummary>
    <desc><p>Adds the item to the end of the menu bar. 
      </p><p>Return: true on success, false if an error occurred.
      </p><p>See: <seemfa marker="#insert/4"><c>insert/4</c></seemfa>
      </p></desc>
  </func>
  
  <func>
    <name name="check" arity="3" clause_i="1" since=""/>
    <fsummary>Checks or unchecks a menu item. </fsummary>
    <desc><p>Checks or unchecks a menu item. 
      </p><p>Remark: Only use this when the menu bar has been associated with a frame; otherwise, use the <seeerl marker="wxMenu"><c>wxMenu</c></seeerl> equivalent call. 
      </p></desc>
  </func>
  
  <func>
    <name name="enable" arity="3" clause_i="1" since=""/>
    <fsummary>Enables or disables (greys out) a menu item. </fsummary>
    <desc><p>Enables or disables (greys out) a menu item. 
      </p><p>Remark: Only use this when the menu bar has been associated with a frame; otherwise, use the <seeerl marker="wxMenu"><c>wxMenu</c></seeerl> equivalent call. 
      </p></desc>
  </func>
  
  <func>
    <name name="enableTop" arity="3" clause_i="1" since=""/>
    <fsummary>Enables or disables a whole menu. </fsummary>
    <desc><p>Enables or disables a whole menu. 
      </p><p>Remark: Only use this when the menu bar has been associated with a frame. 
      </p></desc>
  </func>
  
  <func>
    <name name="findMenu" arity="2" clause_i="1" since=""/>
    <fsummary>Returns the index of the menu with the given <c>title</c> or <c>wxNOT_FOUND</c> if no such menu exists in this menubar. </fsummary>
    <desc><p>Returns the index of the menu with the given <c>title</c> or <c>wxNOT_FOUND</c> if no such menu exists in this menubar. 
      </p><p>The <c>title</c> parameter may specify either the menu title (with accelerator characters, i.e. <c>"&amp;File"</c>) or just the menu label (<c>"File"</c>) indifferently. 
      </p></desc>
  </func>
  
  <func>
    <name name="findMenuItem" arity="3" clause_i="1" since=""/>
    <fsummary>Finds the menu item id for a menu name/menu item string pair. </fsummary>
    <desc><p>Finds the menu item id for a menu name/menu item string pair. 
      </p><p>Return: The menu item identifier, or wxNOT_FOUND if none was found.
      </p><p>Remark: Any special menu codes are stripped out of source and target strings before matching. 
      </p></desc>
  </func>
  
  <func>
    <name name="findItem" arity="2" clause_i="1" since=""/>
    <fsummary>Finds the menu item object associated with the given menu item identifier. </fsummary>
    <desc><p>Finds the menu item object associated with the given menu item identifier. 
      </p><p>Return: The found menu item object, or NULL if one was not found. 
      </p></desc>
  </func>
  
  <func>
    <name name="getHelpString" arity="2" clause_i="1" since=""/>
    <fsummary>Gets the help string associated with the menu item identifier. </fsummary>
    <desc><p>Gets the help string associated with the menu item identifier. 
      </p><p>Return: The help string, or the empty string if there was no help string or the menu item was not found.
      </p><p>See: <seemfa marker="#setHelpString/3"><c>setHelpString/3</c></seemfa>
      </p></desc>
  </func>
  
  <func>
    <name name="getLabel" arity="2" clause_i="1" since=""/>
    <fsummary>Gets the label associated with a menu item. </fsummary>
    <desc><p>Gets the label associated with a menu item. 
      </p><p>Return: The menu item label, or the empty string if the item was not found.
      </p><p>Remark: Use only after the menubar has been associated with a frame. 
      </p></desc>
  </func>
  
  <func>
    <name name="getLabelTop" arity="2" clause_i="1" since=""/>
    <fsummary>See: <c>getMenuLabel/2</c></fsummary>
    <desc><p>See: <seemfa marker="#getMenuLabel/2"><c>getMenuLabel/2</c></seemfa>.</p>
    </desc>
  </func>
  
  <func>
    <name name="getMenuLabel" arity="2" clause_i="1" since=""/>
    <fsummary>Returns the label of a top-level menu. </fsummary>
    <desc><p>Returns the label of a top-level menu. 
      </p><p>Note that the returned string includes the accelerator characters that have been specified in the menu title string during its construction.
      </p><p>Return: The menu label, or the empty string if the menu was not found.
      </p><p>Remark: Use only after the menubar has been associated with a frame.
      </p><p>See: <seemfa marker="#getMenuLabelText/2"><c>getMenuLabelText/2</c></seemfa>, <seemfa marker="#setMenuLabel/3"><c>setMenuLabel/3</c></seemfa>
      </p></desc>
  </func>
  
  <func>
    <name name="getMenuLabelText" arity="2" clause_i="1" since=""/>
    <fsummary>Returns the label of a top-level menu. </fsummary>
    <desc><p>Returns the label of a top-level menu. 
      </p><p>Note that the returned string does not include any accelerator characters that may have been specified in the menu title string during its construction.
      </p><p>Return: The menu label, or the empty string if the menu was not found.
      </p><p>Remark: Use only after the menubar has been associated with a frame.
      </p><p>See: <seemfa marker="#getMenuLabel/2"><c>getMenuLabel/2</c></seemfa>, <seemfa marker="#setMenuLabel/3"><c>setMenuLabel/3</c></seemfa>
      </p></desc>
  </func>
  
  <func>
    <name name="getMenu" arity="2" clause_i="1" since=""/>
    <fsummary>Returns the menu at <c>menuIndex</c> (zero-based). </fsummary>
    <desc><p>Returns the menu at <c>menuIndex</c> (zero-based). 
      </p></desc>
  </func>
  
  <func>
    <name name="getMenuCount" arity="1" clause_i="1" since=""/>
    <fsummary>Returns the number of menus in this menubar. </fsummary>
    <desc><p>Returns the number of menus in this menubar. 
      </p></desc>
  </func>
  
  <func>
    <name name="insert" arity="4" clause_i="1" since=""/>
    <fsummary>Inserts the menu at the given position into the menu bar. </fsummary>
    <desc><p>Inserts the menu at the given position into the menu bar. 
      </p><p>Inserting menu at position 0 will insert it in the very beginning of it, inserting at position <seemfa marker="#getMenuCount/1"><c>getMenuCount/1</c></seemfa> is the same as calling <seemfa marker="#append/3"><c>append/3</c></seemfa>.
      </p><p>Return: true on success, false if an error occurred.
      </p><p>See: <seemfa marker="#append/3"><c>append/3</c></seemfa>
      </p></desc>
  </func>
  
  <func>
    <name name="isChecked" arity="2" clause_i="1" since=""/>
    <fsummary>Determines whether an item is checked. </fsummary>
    <desc><p>Determines whether an item is checked. 
      </p><p>Return: true if the item was found and is checked, false otherwise. 
      </p></desc>
  </func>
  
  <func>
    <name name="setAutoWindowMenu" arity="1" clause_i="1" since=""/>
    <fsummary/>
    <desc/>
  </func>
  
  <func>
    <name name="getAutoWindowMenu" arity="0" clause_i="1" since=""/>
    <fsummary/>
    <desc/>
  </func>
  
  <func>
    <name name="oSXGetAppleMenu" arity="1" clause_i="1" since=""/>
    <fsummary>Returns the Apple menu. </fsummary>
    <desc><p>Returns the Apple menu. 
      </p><p>This is the leftmost menu with application's name as its title. You shouldn't remove any items from it, but it is safe to insert extra menu items or submenus into it.
      </p><p>Only for:wxosx</p><p>Since: 3.0.1 
      </p></desc>
  </func>
  
  <func>
    <name name="isEnabled" arity="2" clause_i="1" since=""/>
    <fsummary>Determines whether an item is enabled. </fsummary>
    <desc><p>Determines whether an item is enabled. 
      </p><p>Return: true if the item was found and is enabled, false otherwise. 
      </p></desc>
  </func>
  
  <func>
    <name name="remove" arity="2" clause_i="1" since=""/>
    <fsummary>Removes the menu from the menu bar and returns the menu object - the caller is responsible for deleting it. </fsummary>
    <desc><p>Removes the menu from the menu bar and returns the menu object - the caller is responsible for deleting it. 
      </p><p>This function may be used together with <seemfa marker="#insert/4"><c>insert/4</c></seemfa> to change the menubar dynamically.
      </p><p>See: <seemfa marker="#replace/4"><c>replace/4</c></seemfa>
      </p></desc>
  </func>
  
  <func>
    <name name="replace" arity="4" clause_i="1" since=""/>
    <fsummary>Replaces the menu at the given position with another one. </fsummary>
    <desc><p>Replaces the menu at the given position with another one. 
      </p><p>Return: The menu which was previously at position pos. The caller is responsible for deleting it.
      </p><p>See: <seemfa marker="#insert/4"><c>insert/4</c></seemfa>, <seemfa marker="#remove/2"><c>remove/2</c></seemfa>
      </p></desc>
  </func>
  
  <func>
    <name name="setHelpString" arity="3" clause_i="1" since=""/>
    <fsummary>Sets the help string associated with a menu item. </fsummary>
    <desc><p>Sets the help string associated with a menu item. 
      </p><p>See: <seemfa marker="#getHelpString/2"><c>getHelpString/2</c></seemfa>
      </p></desc>
  </func>
  
  <func>
    <name name="setLabel" arity="3" clause_i="1" since=""/>
    <fsummary>Sets the label of a menu item. </fsummary>
    <desc><p>Sets the label of a menu item. 
      </p><p>Remark: Use only after the menubar has been associated with a frame.
      </p><p>See: <seemfa marker="#getLabel/2"><c>getLabel/2</c></seemfa>
      </p></desc>
  </func>
  
  <func>
    <name name="setLabelTop" arity="3" clause_i="1" since=""/>
    <fsummary>See: <c>setMenuLabel/3</c></fsummary>
    <desc><p>See: <seemfa marker="#setMenuLabel/3"><c>setMenuLabel/3</c></seemfa>.</p>
    </desc>
  </func>
  
  <func>
    <name name="setMenuLabel" arity="3" clause_i="1" since=""/>
    <fsummary>Sets the label of a top-level menu. </fsummary>
    <desc><p>Sets the label of a top-level menu. 
      </p><p>Remark: Use only after the menubar has been associated with a frame. 
      </p></desc>
  </func>
  </funcs>
</erlref>
