.TH wxMenuEvent 3erl "wx 2.4.1" "wxWidgets team." "Erlang Module Definition" .SH NAME wxMenuEvent \- Functions for wxMenuEvent class .SH DESCRIPTION .LP This class is used for a variety of menu-related events\&. Note that these do not include menu command events, which are handled using \fIwxCommandEvent\fR\& objects\&. .LP Events of this class are generated by both menus that are part of a \fIwxMenuBar\fR\&, attached to \fIwxFrame\fR\&, and popup menus shown by \fIwxWindow:popupMenu/4\fR\&\&. They are sent to the following objects until one of them handles the event: \fI-# 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\&. \fR\& .LP This is similar to command events generated by the menu items, but, unlike them, \fIwxMenuEvent\fR\& are only sent to the window itself and its top level parent but not any intermediate windows in the hierarchy\&. .LP The default handler for \fIwxEVT_MENU_HIGHLIGHT\fR\& in \fIwxFrame\fR\& displays help text in the status bar, see \fIwxFrame:setStatusBarPane/2\fR\&\&. .LP See: \fIwxCommandEvent\fR\&, Overview events .LP This class is derived (and can use functions) from: \fIwxEvent\fR\& .LP wxWidgets docs: wxMenuEvent .SH "EVENTS" .LP Use \fIwxEvtHandler:connect/3\fR\& with \fIwxMenuEventType\fR\& to subscribe to events of this type\&. .SH DATA TYPES .nf \fBwxMenuEvent()\fR\& = wx:wx_object() .br .fi .nf \fBwxMenu()\fR\& = .br #wxMenu{type = wxMenuEvent:wxMenuEventType(), .br menuId = integer(), .br menu = wxMenu:wxMenu()} .br .fi .nf \fBwxMenuEventType()\fR\& = menu_open | menu_close | menu_highlight .br .fi .SH EXPORTS .LP .nf .B getMenu(This) -> wxMenu:wxMenu() .br .fi .br .RS .LP Types: .RS 3 This = wxMenuEvent() .br .RE .RE .RS .LP Returns the menu which is being opened or closed, or the menu containing the highlighted item\&. .LP Note that the returned value can be NULL if the menu being opened doesn\&'t have a corresponding \fIwxMenu\fR\&, e\&.g\&. this happens when opening the system menu in wxMSW port\&. .LP Remark: Since 3\&.1\&.3 this function can be used with \fIOPEN\fR\&, \fICLOSE\fR\& and \fIHIGHLIGHT\fR\& events\&. Before 3\&.1\&.3, this method can only be used with the \fIOPEN\fR\& and \fICLOSE\fR\& events\&. .RE .LP .nf .B getMenuId(This) -> integer() .br .fi .br .RS .LP Types: .RS 3 This = wxMenuEvent() .br .RE .RE .RS .LP Returns the menu identifier associated with the event\&. .LP This method should be only used with the \fIHIGHLIGHT\fR\& events\&. .RE .LP .nf .B isPopup(This) -> boolean() .br .fi .br .RS .LP Types: .RS 3 This = wxMenuEvent() .br .RE .RE .RS .LP Returns true if the menu which is being opened or closed is a popup menu, false if it is a normal one\&. .LP This method should only be used with the \fIOPEN\fR\& and \fICLOSE\fR\& events\&. .RE