1wxCommandEvent(3)          Erlang Module Definition          wxCommandEvent(3)
2
3
4

NAME

6       wxCommandEvent - Functions for wxCommandEvent class
7

DESCRIPTION

9       This event class contains information about command events, which orig‐
10       inate from a variety of simple controls.
11
12       Note that wxCommandEvents and wxCommandEvent-derived event  classes  by
13       default  and unlike other wxEvent-derived classes propagate upward from
14       the source window (the window which emits the event) up  to  the  first
15       parent which processes the event. Be sure to read overview_events_prop‐
16       agation.
17
18       More complex controls, such as wxTreeCtrl, have separate command  event
19       classes.
20
21       This class is derived (and can use functions) from: wxEvent
22
23       wxWidgets docs: wxCommandEvent
24

EVENTS

26       Use  wxEvtHandler:connect/3  with  wxCommandEventType  to  subscribe to
27       events of this type.
28

DATA TYPES

30       wxCommandEvent() = wx:wx_object()
31
32       wxCommand() =
33           #wxCommand{type = wxCommandEvent:wxCommandEventType(),
34                      cmdString = unicode:chardata(),
35                      commandInt = integer(),
36                      extraLong = integer()}
37
38       wxCommandEventType() =
39           command_button_clicked | command_checkbox_clicked |
40           command_choice_selected | command_listbox_selected |
41           command_listbox_doubleclicked | command_text_updated |
42           command_text_enter | text_maxlen | command_menu_selected |
43           command_slider_updated | command_radiobox_selected |
44           command_radiobutton_selected | command_scrollbar_updated |
45           command_vlbox_selected | command_combobox_selected |
46           combobox_dropdown | combobox_closeup | command_tool_rclicked |
47           command_tool_enter | tool_dropdown |
48           command_checklistbox_toggled | command_togglebutton_clicked |
49           command_left_click | command_left_dclick |
50           command_right_click | command_set_focus | command_kill_focus |
51           command_enter | notification_message_click |
52           notification_message_dismissed | notification_message_action
53

EXPORTS

55       getClientData(This) -> term()
56
57              Types:
58
59                 This = wxCommandEvent()
60
61              Returns client object pointer for a listbox or choice  selection
62              event (not valid for a deselection).
63
64       getExtraLong(This) -> integer()
65
66              Types:
67
68                 This = wxCommandEvent()
69
70              Returns extra information dependent on the event objects type.
71
72              If the event comes from a listbox selection, it is a boolean de‐
73              termining whether the event was a selection (true) or a deselec‐
74              tion (false). A listbox deselection only occurs for multiple-se‐
75              lection boxes, and in this case the index and string values  are
76              indeterminate  and  the listbox must be examined by the applica‐
77              tion.
78
79       getInt(This) -> integer()
80
81              Types:
82
83                 This = wxCommandEvent()
84
85              Returns the  integer  identifier  corresponding  to  a  listbox,
86              choice or radiobox selection (only if the event was a selection,
87              not a deselection), or a boolean value representing the value of
88              a checkbox.
89
90              For  a  menu  item,  this  method  returns -1 if the item is not
91              checkable or a boolean value (true or false) for checkable items
92              indicating the new state of the item.
93
94       getSelection(This) -> integer()
95
96              Types:
97
98                 This = wxCommandEvent()
99
100              Returns  item index for a listbox or choice selection event (not
101              valid for a deselection).
102
103       getString(This) -> unicode:charlist()
104
105              Types:
106
107                 This = wxCommandEvent()
108
109              Returns item string for a listbox or choice selection event.
110
111              If one or several items have been deselected, returns the  index
112              of  the  first deselected item. If some items have been selected
113              and others deselected at the same time, it will return the index
114              of the first selected item.
115
116       isChecked(This) -> boolean()
117
118              Types:
119
120                 This = wxCommandEvent()
121
122              This  method  can be used with checkbox and menu events: for the
123              checkboxes, the method returns true for a  selection  event  and
124              false for a deselection one.
125
126              For the menu events, this method indicates if the menu item just
127              has become checked or unchecked (and thus only makes  sense  for
128              checkable menu items).
129
130              Notice  that this method cannot be used with wxCheckListBox cur‐
131              rently.
132
133       isSelection(This) -> boolean()
134
135              Types:
136
137                 This = wxCommandEvent()
138
139              For a listbox or similar event, returns true if it is  a  selec‐
140              tion, false if it is a deselection.
141
142              If  some  items  have been selected and others deselected at the
143              same time, it will return true.
144
145       setInt(This, IntCommand) -> ok
146
147              Types:
148
149                 This = wxCommandEvent()
150                 IntCommand = integer()
151
152              Sets the m_commandInt member.
153
154       setString(This, String) -> ok
155
156              Types:
157
158                 This = wxCommandEvent()
159                 String = unicode:chardata()
160
161              Sets the m_commandString member.
162
163
164
165wxWidgets team.                    wx 2.3.1                  wxCommandEvent(3)
Impressum