The Event handler.
To get events from wxwidgets objects you subscribe to them by calling connect/[2-3]. Events are sent as messages, if no callback was supplied These messages will be #wx{} where EventRecord is a record that depends on the event type. The records are defined in: wx/include/wx.hrl.
If a callback was supplied to connect, the callback will be invoked (in another process) to handle the event. The callback should be of arity 2. fun(EventRecord::wx(), EventObject::wxObject()).
Beware that the callback will be in exclusive mode so that a call inside the callback to a process using wx may cause a deadlock.
The orginal documentation.wx() = #wx{id = integer(), obj = wx:wxObject(), userData = term(), event = Rec}
Rec is a event record.
wxChildFocus() = #wxChildFocus{type = wxEventType()}
wxChildFocusEvent
wxClose() = #wxClose{type = wxEventType()}
wxCloseEvent
wxCommand() = #wxCommand{type = wxEventType(), cmdString = string(), commandInt = integer(), extraLong = integer()}
wxCommandEvent
wxContextMenu() = #wxContextMenu{type = wxEventType()}
wxContextMenuEvent
wxDisplayChanged() = #wxDisplayChanged{type = wxEventType()}
wxDisplayChangedEvent
wxErase() = #wxErase{type = wxEventType(), dc = wxDC:wxDC()}
wxEraseEvent
wxEventType() = char | char_hook | close_window | command_button_clicked | command_checkbox_clicked | command_choice_selected | command_combobox_selected | command_list_begin_drag | command_list_begin_label_edit | command_list_begin_rdrag | command_list_cache_hint | command_list_col_begin_drag | command_list_col_click | command_list_col_dragging | command_list_col_end_drag | command_list_col_right_click | command_list_delete_all_items | command_list_delete_item | command_list_end_label_edit | command_list_insert_item | command_list_item_activated | command_list_item_deselected | command_list_item_focused | command_list_item_middle_click | command_list_item_right_click | command_list_item_selected | command_list_key_down | command_listbox_doubleclicked | command_listbox_selected | command_menu_selected | command_notebook_page_changed | command_notebook_page_changing | command_radiobox_selected | command_radiobutton_selected | command_scrollbar_updated | command_slider_updated | command_text_enter | command_text_updated | command_togglebutton_clicked | command_vlbox_selected | context_menu | create | destroy | detailed_help | display_changed | end_session | enter_window | erase_background | grid_cell_begin_drag | grid_cell_change | grid_cell_left_click | grid_cell_left_dclick | grid_cell_right_click | grid_cell_right_dclick | grid_col_size | grid_editor_created | grid_editor_hidden | grid_editor_shown | grid_label_left_click | grid_label_left_dclick | grid_label_right_click | grid_label_right_dclick | grid_range_select | grid_row_size | grid_select_cell | help | iconize | idle | joy_button_down | joy_button_up | joy_move | joy_zmove | key_down | key_up | kill_focus | kill_focus | leave_window | left_dclick | left_down | left_up | maximize | menu_close | menu_highlight | menu_open | middle_dclick | middle_down | middle_up | motion | mouse_capture_changed | mousewheel | move | navigation_key | nc_enter_window | nc_leave_window | nc_left_dclick | nc_left_down | nc_left_up | nc_middle_dclick | nc_middle_down | nc_middle_up | nc_motion | nc_paint | nc_right_dclick | nc_right_down | nc_right_up | paint | paint_icon | palette_changed | query_end_session | query_new_palette | right_dclick | right_down | right_up | sash_dragged | scroll_bottom | scroll_changed | scroll_linedown | scroll_lineup | scroll_pagedown | scroll_pageup | scroll_thumbrelease | scroll_thumbtrack | scroll_top | scrollwin_bottom | scrollwin_linedown | scrollwin_lineup | scrollwin_pagedown | scrollwin_pageup | scrollwin_thumbrelease | scrollwin_thumbtrack | scrollwin_top | set_cursor | set_focus | set_focus | show | size | stc_autocomp_selection | stc_calltip_click | stc_change | stc_charadded | stc_do_drop | stc_doubleclick | stc_drag_over | stc_dwellend | stc_dwellstart | stc_hotspot_click | stc_hotspot_dclick | stc_key | stc_macrorecord | stc_marginclick | stc_modified | stc_needshown | stc_painted | stc_romodifyattempt | stc_savepointleft | stc_savepointreached | stc_start_drag | stc_styleneeded | stc_updateui | stc_uridropped | stc_userlistselection | stc_zoom | sys_colour_changed | update_ui
abstract datatype: wxEvtHandler()
An object reference
wxFocus() = #wxFocus{type = wxEventType()}
wxFocusEvent
wxGrid() = #wxGrid{type = wxEventType(), row = integer(), col = integer(), x = integer(), y = integer(), selecting = bool(), control = bool(), meta = bool(), shift = bool(), alt = bool()}
wxGridEvent
wxHelp() = #wxHelp{type = wxEventType()}
wxHelpEvent
wxIconize() = #wxIconize{type = wxEventType()}
wxIconizeEvent
wxIdle() = #wxIdle{type = wxEventType()}
wxIdleEvent
wxJoystick() = #wxJoystick{type = wxEventType()}
wxJoystickEvent
wxKey() = #wxKey{type = wxEventType(), x = integer(), y = integer(), keyCode = integer(), controlDown = bool(), shiftDown = bool(), altDown = bool(), metaDown = bool(), scanCode = bool(), uniChar = integer(), rawCode = integer(), rawFlags = integer()}
wxKeyEvent
wxList() = #wxList{type = wxEventType(), code = integer(), oldItemIndex = integer(), itemIndex = integer(), col = integer(), pointDrag = {X::integer(), Y::integer()}}
wxListEvent
wxMaximize() = #wxMaximize{type = wxEventType()}
wxMaximizeEvent
wxMenu() = #wxMenu{type = wxEventType()}
wxMenuEvent
wxMouse() = #wxMouse{type = wxEventType(), x = integer(), y = integer(), leftDown = bool(), middleDown = bool(), rightDown = bool(), controlDown = bool(), shiftDown = bool(), altDown = bool(), metaDown = bool(), wheelRotation = integer(), wheelDelta = integer(), linesPerAction = integer()}
wxMouseEvent
wxMouseCaptureChanged() = #wxMouseCaptureChanged{type = wxEventType()}
wxMouseCaptureChangedEvent
wxMove() = #wxMove{type = wxEventType()}
wxMoveEvent
wxNavigationKey() = #wxNavigationKey{type = wxEventType(), flags = integer(), focus = wxWindow:wxWindow()}
wxNavigationKeyEvent
wxNcPaint() = #wxNcPaint{type = wxEventType()}
wxNcPaintEvent
wxPaint() = #wxPaint{type = wxEventType()}
wxPaintEvent
wxPaletteChanged() = #wxPaletteChanged{type = wxEventType()}
wxPaletteChangedEvent
wxQueryNewPalette() = #wxQueryNewPalette{type = wxEventType()}
wxQueryNewPaletteEvent
wxSash() = #wxSash{type = wxEventType(), edge = WxSashEdgePosition, dragRect = {X::integer(), Y::integer(), W::integer(), H::integer()}, dragStatus = WxSashDragStatus}
wxSashEvent
wxScroll() = #wxScroll{type = wxEventType()}
wxScrollEvent
wxScrollWin() = #wxScrollWin{type = wxEventType()}
wxScrollWinEvent
wxSetCursor() = #wxSetCursor{type = wxEventType()}
wxSetCursorEvent
wxShow() = #wxShow{type = wxEventType()}
wxShowEvent
wxSize() = #wxSize{type = wxEventType(), size = {W::integer(), H::integer()}, rect = {X::integer(), Y::integer(), W::integer(), H::integer()}}
wxSizeEvent
wxStyledText() = #wxStyledText{type = wxEventType(), position = integer(), key = integer(), modifiers = integer(), modificationType = integer(), text = string(), length = integer(), linesAdded = integer(), line = integer(), foldLevelNow = integer(), foldLevelPrev = integer(), margin = integer(), message = integer(), wParam = integer(), lParam = integer(), listType = integer(), x = integer(), y = integer(), dragText = string(), dragAllowMove = bool(), dragResult = WxDragResult}
wxStyledTextEvent
wxSysColourChanged() = #wxSysColourChanged{type = wxEventType()}
wxSysColourChangedEvent
wxUpdateUI() = #wxUpdateUI{type = wxEventType()}
wxUpdateUIEvent
wxWindowCreate() = #wxWindowCreate{type = wxEventType()}
wxWindowCreateEvent
wxWindowDestroy() = #wxWindowDestroy{type = wxEventType()}
wxWindowDestroyEvent
| connect/2* | Equivalent to connect(This, EventType, []) |
| connect/3* | This function subscribes the to events of EventType, in the range id, lastId. |
| disconnect/1* | Equivalent to disconnect(This, null, []) Can also have an optional callback Fun() as an additional last argument. |
| disconnect/2* | Equivalent to disconnect(This, EventType, []) |
| disconnect/3* | See external documentation This function unsubscribes the process or callback fun from the event handler. |
| parse_opts/2* |
connect(This::wxEvtHandler(), EventType::wxEventType()) -> ok
Equivalent to connect(This, EventType, [])
connect(This::wxEvtHandler(), EventType::wxEventType(), Options::[Options]) -> ok
This function subscribes the to events of EventType, in the range id, lastId. The events will be received as messages if no callback is supplied.
Options: {id, integer()}, The identifier (or first of the identifier range) to be associated with this event handler. Default ?wxID_ANY {lastId, integer()}, The second part of the identifier range. If used 'id' must be set as the starting identifier range. Default ?wxID_ANY {skip, boolean()}, If skip is true further event_handlers will be called. This is not used if the 'callback' option is used. Default false. {callback, function()} Use a callback fun(EventRecord::wx(), EventObject::wxObject()) to process the event. Default not specfied i.e. a message will be delivered to the process calling this function. {userData, term()} An erlang term that will be sent with the event. Default: [].disconnect(This::wxEvtHandler()) -> true | false
Equivalent to disconnect(This, null, []) Can also have an optional callback Fun() as an additional last argument.
disconnect(This::wxEvtHandler(), EventType::wxEventType()) -> true | false
Equivalent to disconnect(This, EventType, [])
disconnect(This::wxEvtHandler(), EventType::wxEventType(), Opts) -> true | false
See external documentation This function unsubscribes the process or callback fun from the event handler. EventType may be the atom 'null' to match any eventtype. Notice that the options skip and userdata is not used to match the eventhandler.
parse_opts() -> term()
Generated by EDoc, May 26 2008, 12:35:37.