<?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>wxMenuEvent</title>
</header>
<module>wxMenuEvent</module>
<modulesummary>Functions for wxMenuEvent class</modulesummary>
<description><p>This class is used for a variety of menu-related events. Note that these do not include menu command events, which are handled using <seeerl marker="wxCommandEvent"><c>wxCommandEvent</c></seeerl> objects.
      </p><p>Events of this class are generated by both menus that are part of a <seeerl marker="wxMenuBar"><c>wxMenuBar</c></seeerl>, attached to <seeerl marker="wxFrame"><c>wxFrame</c></seeerl>, and popup menus shown by <seemfa marker="wxWindow#popupMenu/4"><c>wxWindow:popupMenu/4</c></seemfa>. They are sent to the following objects until one of them handles the event: <c>-# The menu object itself, as returned by GetMenu(), if any. -# The wxMenuBar to which this menu is attached, if any. -# The window associated with the menu, e.g. the one calling PopupMenu() for the popup menus. -# The top level parent of that window if it's different from the window itself. </c>
      </p><p>This is similar to command events generated by the menu items, but, unlike them, <seeerl marker="wxMenuEvent"><c>wxMenuEvent</c></seeerl> are only sent to the window itself and its top level parent but not any intermediate windows in the hierarchy.
      </p><p>The default handler for <c>wxEVT_MENU_HIGHLIGHT</c> in <seeerl marker="wxFrame"><c>wxFrame</c></seeerl> displays help text in the status bar, see <seemfa marker="wxFrame#setStatusBarPane/2"><c>wxFrame:setStatusBarPane/2</c></seemfa>.
      </p><p>See: <seeerl marker="wxCommandEvent"><c>wxCommandEvent</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="wxEvent"><c>wxEvent</c></seeerl></p>
  
  <p>wxWidgets docs: <url href="https://docs.wxwidgets.org/3.1/classwx_menu_event.html">wxMenuEvent</url></p>
  </description><section><title>Events</title><p>Use <seemfa marker="wxEvtHandler#connect/3"><c>wxEvtHandler:connect/3</c></seemfa> with <seetype marker="#wxMenuEventType"><c>wxMenuEventType</c></seetype> to subscribe to events of this type.</p></section>
<datatypes>
    <datatype><name name="wxMenuEvent"/></datatype>
    <datatype><name name="wxMenu"/></datatype>
    <datatype><name name="wxMenuEventType"/></datatype></datatypes>

<funcs>
  <func>
    <name name="getMenu" arity="1" clause_i="1" since=""/>
    <fsummary>Returns the menu which is being opened or closed, or the menu containing the highlighted item. </fsummary>
    <desc><p>Returns the menu which is being opened or closed, or the menu containing the highlighted item. 
      </p><p>Note that the returned value can be NULL if the menu being opened doesn't have a corresponding <seeerl marker="wxMenu"><c>wxMenu</c></seeerl>, e.g. this happens when opening the system menu in wxMSW port.
      </p><p>Remark: Since 3.1.3 this function can be used with <c>OPEN</c>, <c>CLOSE</c> and <c>HIGHLIGHT</c> events. Before 3.1.3, this method can only be used with the <c>OPEN</c> and <c>CLOSE</c> events. 
      </p></desc>
  </func>
  
  <func>
    <name name="getMenuId" arity="1" clause_i="1" since=""/>
    <fsummary>Returns the menu identifier associated with the event. </fsummary>
    <desc><p>Returns the menu identifier associated with the event. 
      </p><p>This method should be only used with the <c>HIGHLIGHT</c> events. 
      </p></desc>
  </func>
  
  <func>
    <name name="isPopup" arity="1" clause_i="1" since=""/>
    <fsummary>Returns true if the menu which is being opened or closed is a popup menu, false if it is a normal one. </fsummary>
    <desc><p>Returns true if the menu which is being opened or closed is a popup menu, false if it is a normal one. 
      </p><p>This method should only be used with the <c>OPEN</c> and <c>CLOSE</c> events. 
      </p></desc>
  </func>
  </funcs>
</erlref>
