1wxMenuEvent(3) Erlang Module Definition wxMenuEvent(3)
2
3
4
6 wxMenuEvent - Functions for wxMenuEvent class
7
9 This class is used for a variety of menu-related events. Note that
10 these do not include menu command events, which are handled using wx‐
11 CommandEvent objects.
12
13 Events of this class are generated by both menus that are part of a wx‐
14 MenuBar, attached to wxFrame, and popup menus shown by wxWindow:popup‐
15 Menu/4. They are sent to the following objects until one of them han‐
16 dles the event: -# The menu object itself, as returned by GetMenu(), if
17 any. -# The wxMenuBar to which this menu is attached, if any. -# The
18 window associated with the menu, e.g. the one calling PopupMenu() for
19 the popup menus. -# The top level parent of that window if it's differ‐
20 ent from the window itself.
21
22 This is similar to command events generated by the menu items, but, un‐
23 like them, wxMenuEvent are only sent to the window itself and its top
24 level parent but not any intermediate windows in the hierarchy.
25
26 The default handler for wxEVT_MENU_HIGHLIGHT in wxFrame displays help
27 text in the status bar, see wxFrame:setStatusBarPane/2.
28
29 See: wxCommandEvent, Overview events
30
31 This class is derived (and can use functions) from: wxEvent
32
33 wxWidgets docs: wxMenuEvent
34
36 Use wxEvtHandler:connect/3 with wxMenuEventType to subscribe to events
37 of this type.
38
40 wxMenuEvent() = wx:wx_object()
41
42 wxMenu() =
43 #wxMenu{type = wxMenuEvent:wxMenuEventType(),
44 menuId = integer(),
45 menu = wxMenu:wxMenu()}
46
47 wxMenuEventType() = menu_open | menu_close | menu_highlight
48
50 getMenu(This) -> wxMenu:wxMenu()
51
52 Types:
53
54 This = wxMenuEvent()
55
56 Returns the menu which is being opened or closed, or the menu
57 containing the highlighted item.
58
59 Note that the returned value can be NULL if the menu being
60 opened doesn't have a corresponding wxMenu, e.g. this happens
61 when opening the system menu in wxMSW port.
62
63 Remark: Since 3.1.3 this function can be used with OPEN, CLOSE
64 and HIGHLIGHT events. Before 3.1.3, this method can only be used
65 with the OPEN and CLOSE events.
66
67 getMenuId(This) -> integer()
68
69 Types:
70
71 This = wxMenuEvent()
72
73 Returns the menu identifier associated with the event.
74
75 This method should be only used with the HIGHLIGHT events.
76
77 isPopup(This) -> boolean()
78
79 Types:
80
81 This = wxMenuEvent()
82
83 Returns true if the menu which is being opened or closed is a
84 popup menu, false if it is a normal one.
85
86 This method should only be used with the OPEN and CLOSE events.
87
88
89
90wxWidgets team. wx 2.1.4 wxMenuEvent(3)