.TH wxEvtHandler 3erl "wx 0.99.2" "" "Erlang Module Definition" .SH NAME wxEvtHandler \- The Event handler. .SH DESCRIPTION .LP The Event handler\&. .LP 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 \fB#wx{\fR\&} where EventRecord is a record that depends on the \fBevent type\fR\&\&. The records are defined in: wx/include/wx\&.hrl\&. .LP 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())\&. .LP Beware that the callback will be in executed in new process each time\&. .LP The orginal documentation\&. .SH "DATA TYPES" .RS 2 .TP 2 .B \fIevent() = wxAuiManager() | wxAuiNotebook() | wxCalendar() | wxChildFocus() | wxClose() | wxColourPicker() | wxCommand() | wxContextMenu() | wxDate() | wxDisplayChanged() | wxErase() | wxFileDirPicker() | wxFocus() | wxFontPicker() | wxGrid() | wxHelp() | wxHtmlLink() | wxIconize() | wxIdle() | wxJoystick() | wxKey() | wxList() | wxMaximize() | wxMenu() | wxMouse() | wxMouseCaptureChanged() | wxMove() | wxNavigationKey() | wxNcPaint() | wxNotebook() | wxPaint() | wxPaletteChanged() | wxQueryNewPalette() | wxSash() | wxScroll() | wxScrollWin() | wxSetCursor() | wxShow() | wxSize() | wxSpin() | wxSplitter() | wxStyledText() | wxSysColourChanged() | wxTaskBarIcon() | wxTree() | wxUpdateUI() | wxWindowCreate() | wxWindowDestroy()\fR\&: .TP 2 .B \fIwx() = #wx{id=undefined | integer(), obj=undefined | wx_object() (see module wx), userData=undefined | term(), event=undefined | event()}\fR\&: .TP 2 .B \fIwxAuiManager() = #wxAuiManager{type=undefined | wxAuiManagerEventType(), manager=undefined | wxAuiManager() (see module wxAuiManager), pane=undefined | wxAuiPaneInfo() (see module wxAuiPaneInfo), button=undefined | integer(), veto_flag=undefined | boolean(), canveto_flag=undefined | boolean(), dc=undefined | wxDC() (see module wxDC)}\fR\&: .TP 2 .B \fIwxAuiManagerEventType() = aui_pane_button | aui_pane_close | aui_pane_maximize | aui_pane_restore | aui_render | aui_find_manager\fR\&: .TP 2 .B \fIwxAuiNotebook() = #wxAuiNotebook{type=undefined | wxAuiNotebookEventType(), old_selection=undefined | integer(), selection=undefined | integer(), drag_source=undefined | wxAuiNotebook() (see module wxAuiNotebook)}\fR\&: .TP 2 .B \fIwxAuiNotebookEventType() = command_auinotebook_page_close | command_auinotebook_page_changed | command_auinotebook_page_changing | command_auinotebook_button | command_auinotebook_begin_drag | command_auinotebook_end_drag | command_auinotebook_drag_motion | command_auinotebook_allow_dnd | command_auinotebook_tab_middle_down | command_auinotebook_tab_middle_up | command_auinotebook_tab_right_down | command_auinotebook_tab_right_up | command_auinotebook_page_closed | command_auinotebook_drag_done | command_auinotebook_bg_dclick\fR\&: .TP 2 .B \fIwxCalendar() = #wxCalendar{type=undefined | wxCalendarEventType()}\fR\&: .TP 2 .B \fIwxCalendarEventType() = calendar_sel_changed | calendar_day_changed | calendar_month_changed | calendar_year_changed | calendar_doubleclicked | calendar_weekday_clicked\fR\&: .TP 2 .B \fIwxChildFocus() = #wxChildFocus{type=undefined | wxChildFocusEventType()}\fR\&: .TP 2 .B \fIwxChildFocusEventType() = child_focus\fR\&: .TP 2 .B \fIwxClose() = #wxClose{type=undefined | wxCloseEventType()}\fR\&: .TP 2 .B \fIwxCloseEventType() = close_window | end_session | query_end_session\fR\&: .TP 2 .B \fIwxColourPicker() = #wxColourPicker{type=undefined | wxColourPickerEventType(), colour=undefined | wx_colour() (see module wx)}\fR\&: .TP 2 .B \fIwxColourPickerEventType() = command_colourpicker_changed\fR\&: .TP 2 .B \fIwxCommand() = #wxCommand{type=undefined | wxCommandEventType(), cmdString=undefined | chardata() (see module unicode), commandInt=undefined | integer(), extraLong=undefined | integer()}\fR\&: .TP 2 .B \fIwxCommandEventType() = command_button_clicked | command_checkbox_clicked | command_choice_selected | command_listbox_selected | command_listbox_doubleclicked | command_text_updated | command_text_enter | command_menu_selected | command_slider_updated | command_radiobox_selected | command_radiobutton_selected | command_scrollbar_updated | command_vlbox_selected | command_combobox_selected | command_tool_rclicked | command_tool_enter | command_checklistbox_toggled | command_togglebutton_clicked | command_left_click | command_left_dclick | command_right_click | command_set_focus | command_kill_focus | command_enter\fR\&: .TP 2 .B \fIwxContextMenu() = #wxContextMenu{type=undefined | wxContextMenuEventType()}\fR\&: .TP 2 .B \fIwxContextMenuEventType() = context_menu\fR\&: .TP 2 .B \fIwxDate() = #wxDate{type=undefined | wxDateEventType(), date=undefined | wx_datetime() (see module wx)}\fR\&: .TP 2 .B \fIwxDateEventType() = date_changed\fR\&: .TP 2 .B \fIwxDisplayChanged() = #wxDisplayChanged{type=undefined | wxDisplayChangedEventType()}\fR\&: .TP 2 .B \fIwxDisplayChangedEventType() = display_changed\fR\&: .TP 2 .B \fIwxErase() = #wxErase{type=undefined | wxEraseEventType(), dc=undefined | wxDC() (see module wxDC)}\fR\&: .TP 2 .B \fIwxEraseEventType() = erase_background\fR\&: .TP 2 .B \fIwxEventType() = wxAuiManagerEventType() | wxAuiNotebookEventType() | wxCalendarEventType() | wxChildFocusEventType() | wxCloseEventType() | wxColourPickerEventType() | wxCommandEventType() | wxContextMenuEventType() | wxDateEventType() | wxDisplayChangedEventType() | wxEraseEventType() | wxFileDirPickerEventType() | wxFocusEventType() | wxFontPickerEventType() | wxGridEventType() | wxHelpEventType() | wxHtmlLinkEventType() | wxIconizeEventType() | wxIdleEventType() | wxJoystickEventType() | wxKeyEventType() | wxListEventType() | wxMaximizeEventType() | wxMenuEventType() | wxMouseCaptureChangedEventType() | wxMouseEventType() | wxMoveEventType() | wxNavigationKeyEventType() | wxNcPaintEventType() | wxNotebookEventType() | wxPaintEventType() | wxPaletteChangedEventType() | wxQueryNewPaletteEventType() | wxSashEventType() | wxScrollEventType() | wxScrollWinEventType() | wxSetCursorEventType() | wxShowEventType() | wxSizeEventType() | wxSpinEventType() | wxSplitterEventType() | wxStyledTextEventType() | wxSysColourChangedEventType() | wxTaskBarIconEventType() | wxTreeEventType() | wxUpdateUIEventType() | wxWindowCreateEventType() | wxWindowDestroyEventType()\fR\&: .TP 2 .B \fIwxEvtHandler() = wx_object() (see module wx)\fR\&: .TP 2 .B \fIwxFileDirPicker() = #wxFileDirPicker{type=undefined | wxFileDirPickerEventType(), path=undefined | chardata() (see module unicode)}\fR\&: .TP 2 .B \fIwxFileDirPickerEventType() = command_filepicker_changed | command_dirpicker_changed\fR\&: .TP 2 .B \fIwxFocus() = #wxFocus{type=undefined | wxFocusEventType()}\fR\&: .TP 2 .B \fIwxFocusEventType() = set_focus | kill_focus\fR\&: .TP 2 .B \fIwxFontPicker() = #wxFontPicker{type=undefined | wxFontPickerEventType(), font=undefined | wxFont() (see module wxFont)}\fR\&: .TP 2 .B \fIwxFontPickerEventType() = command_fontpicker_changed\fR\&: .TP 2 .B \fIwxGrid() = #wxGrid{type=undefined | wxGridEventType(), row=undefined | integer(), col=undefined | integer(), x=undefined | integer(), y=undefined | integer(), selecting=undefined | boolean(), control=undefined | boolean(), meta=undefined | boolean(), shift=undefined | boolean(), alt=undefined | boolean()}\fR\&: .TP 2 .B \fIwxGridEventType() = grid_cell_left_click | grid_cell_right_click | grid_cell_left_dclick | grid_cell_right_dclick | grid_label_left_click | grid_label_right_click | grid_label_left_dclick | grid_label_right_dclick | grid_row_size | grid_col_size | grid_range_select | grid_cell_change | grid_select_cell | grid_editor_shown | grid_editor_hidden | grid_editor_created | grid_cell_begin_drag\fR\&: .TP 2 .B \fIwxHelp() = #wxHelp{type=undefined | wxHelpEventType()}\fR\&: .TP 2 .B \fIwxHelpEventType() = help | detailed_help\fR\&: .TP 2 .B \fIwxHtmlLink() = #wxHtmlLink{type=undefined | wxHtmlLinkEventType(), linkInfo=undefined | wx_wxHtmlLinkInfo() (see module wx)}\fR\&: .TP 2 .B \fIwxHtmlLinkEventType() = command_html_link_clicked\fR\&: .TP 2 .B \fIwxIconize() = #wxIconize{type=undefined | wxIconizeEventType()}\fR\&: .TP 2 .B \fIwxIconizeEventType() = iconize\fR\&: .TP 2 .B \fIwxIdle() = #wxIdle{type=undefined | wxIdleEventType()}\fR\&: .TP 2 .B \fIwxIdleEventType() = idle\fR\&: .TP 2 .B \fIwxJoystick() = #wxJoystick{type=undefined | wxJoystickEventType()}\fR\&: .TP 2 .B \fIwxJoystickEventType() = joy_button_down | joy_button_up | joy_move | joy_zmove\fR\&: .TP 2 .B \fIwxKey() = #wxKey{type=undefined | wxKeyEventType(), x=undefined | integer(), y=undefined | integer(), keyCode=undefined | integer(), controlDown=undefined | boolean(), shiftDown=undefined | boolean(), altDown=undefined | boolean(), metaDown=undefined | boolean(), scanCode=undefined | boolean(), uniChar=undefined | integer(), rawCode=undefined | integer(), rawFlags=undefined | integer()}\fR\&: .TP 2 .B \fIwxKeyEventType() = char | char_hook | key_down | key_up\fR\&: .TP 2 .B \fIwxList() = #wxList{type=undefined | wxListEventType(), code=undefined | integer(), oldItemIndex=undefined | integer(), itemIndex=undefined | integer(), col=undefined | integer(), pointDrag=undefined | {X::integer(), Y::integer()}}\fR\&: .TP 2 .B \fIwxListEventType() = command_list_begin_drag | command_list_begin_rdrag | command_list_begin_label_edit | command_list_end_label_edit | command_list_delete_item | command_list_delete_all_items | command_list_key_down | command_list_insert_item | command_list_col_click | command_list_col_right_click | command_list_col_begin_drag | command_list_col_dragging | command_list_col_end_drag | command_list_item_selected | command_list_item_deselected | command_list_item_right_click | command_list_item_middle_click | command_list_item_activated | command_list_item_focused | command_list_cache_hint\fR\&: .TP 2 .B \fIwxMaximize() = #wxMaximize{type=undefined | wxMaximizeEventType()}\fR\&: .TP 2 .B \fIwxMaximizeEventType() = maximize\fR\&: .TP 2 .B \fIwxMenu() = #wxMenu{type=undefined | wxMenuEventType()}\fR\&: .TP 2 .B \fIwxMenuEventType() = menu_open | menu_close | menu_highlight\fR\&: .TP 2 .B \fIwxMouse() = #wxMouse{type=undefined | wxMouseEventType(), x=undefined | integer(), y=undefined | integer(), leftDown=undefined | boolean(), middleDown=undefined | boolean(), rightDown=undefined | boolean(), controlDown=undefined | boolean(), shiftDown=undefined | boolean(), altDown=undefined | boolean(), metaDown=undefined | boolean(), wheelRotation=undefined | integer(), wheelDelta=undefined | integer(), linesPerAction=undefined | integer()}\fR\&: .TP 2 .B \fIwxMouseCaptureChanged() = #wxMouseCaptureChanged{type=undefined | wxMouseCaptureChangedEventType()}\fR\&: .TP 2 .B \fIwxMouseCaptureChangedEventType() = mouse_capture_changed\fR\&: .TP 2 .B \fIwxMouseEventType() = left_down | left_up | middle_down | middle_up | right_down | right_up | motion | enter_window | leave_window | left_dclick | middle_dclick | right_dclick | mousewheel | nc_left_down | nc_left_up | nc_middle_down | nc_middle_up | nc_right_down | nc_right_up | nc_motion | nc_enter_window | nc_leave_window | nc_left_dclick | nc_middle_dclick | nc_right_dclick\fR\&: .TP 2 .B \fIwxMove() = #wxMove{type=undefined | wxMoveEventType()}\fR\&: .TP 2 .B \fIwxMoveEventType() = move\fR\&: .TP 2 .B \fIwxNavigationKey() = #wxNavigationKey{type=undefined | wxNavigationKeyEventType(), flags=undefined | integer(), focus=undefined | wxWindow() (see module wxWindow)}\fR\&: .TP 2 .B \fIwxNavigationKeyEventType() = navigation_key\fR\&: .TP 2 .B \fIwxNcPaint() = #wxNcPaint{type=undefined | wxNcPaintEventType()}\fR\&: .TP 2 .B \fIwxNcPaintEventType() = nc_paint\fR\&: .TP 2 .B \fIwxNotebook() = #wxNotebook{type=undefined | wxNotebookEventType()}\fR\&: .TP 2 .B \fIwxNotebookEventType() = command_notebook_page_changed | command_notebook_page_changing\fR\&: .TP 2 .B \fIwxPaint() = #wxPaint{type=undefined | wxPaintEventType()}\fR\&: .TP 2 .B \fIwxPaintEventType() = paint | paint_icon\fR\&: .TP 2 .B \fIwxPaletteChanged() = #wxPaletteChanged{type=undefined | wxPaletteChangedEventType()}\fR\&: .TP 2 .B \fIwxPaletteChangedEventType() = palette_changed\fR\&: .TP 2 .B \fIwxQueryNewPalette() = #wxQueryNewPalette{type=undefined | wxQueryNewPaletteEventType()}\fR\&: .TP 2 .B \fIwxQueryNewPaletteEventType() = query_new_palette\fR\&: .TP 2 .B \fIwxSash() = #wxSash{type=undefined | wxSashEventType(), edge=undefined | wx_enum() (see module wx), dragRect=undefined | {X::integer(), Y::integer(), W::integer(), H::integer()}, dragStatus=undefined | wx_enum() (see module wx)}\fR\&: .TP 2 .B \fIwxSashEventType() = sash_dragged\fR\&: .TP 2 .B \fIwxScroll() = #wxScroll{type=undefined | wxScrollEventType(), commandInt=undefined | integer(), extraLong=undefined | integer()}\fR\&: .TP 2 .B \fIwxScrollEventType() = scroll_top | scroll_bottom | scroll_lineup | scroll_linedown | scroll_pageup | scroll_pagedown | scroll_thumbtrack | scroll_thumbrelease | scroll_changed\fR\&: .TP 2 .B \fIwxScrollWin() = #wxScrollWin{type=undefined | wxScrollWinEventType()}\fR\&: .TP 2 .B \fIwxScrollWinEventType() = scrollwin_top | scrollwin_bottom | scrollwin_lineup | scrollwin_linedown | scrollwin_pageup | scrollwin_pagedown | scrollwin_thumbtrack | scrollwin_thumbrelease\fR\&: .TP 2 .B \fIwxSetCursor() = #wxSetCursor{type=undefined | wxSetCursorEventType()}\fR\&: .TP 2 .B \fIwxSetCursorEventType() = set_cursor\fR\&: .TP 2 .B \fIwxShow() = #wxShow{type=undefined | wxShowEventType()}\fR\&: .TP 2 .B \fIwxShowEventType() = show\fR\&: .TP 2 .B \fIwxSize() = #wxSize{type=undefined | wxSizeEventType(), size=undefined | {W::integer(), H::integer()}, rect=undefined | {X::integer(), Y::integer(), W::integer(), H::integer()}}\fR\&: .TP 2 .B \fIwxSizeEventType() = size\fR\&: .TP 2 .B \fIwxSpin() = #wxSpin{type=undefined | wxSpinEventType(), commandInt=undefined | integer()}\fR\&: .TP 2 .B \fIwxSpinEventType() = command_spinctrl_updated | spin_up | spin_down | spin\fR\&: .TP 2 .B \fIwxSplitter() = #wxSplitter{type=undefined | wxSplitterEventType()}\fR\&: .TP 2 .B \fIwxSplitterEventType() = command_splitter_sash_pos_changed | command_splitter_sash_pos_changing | command_splitter_doubleclicked | command_splitter_unsplit\fR\&: .TP 2 .B \fIwxStyledText() = #wxStyledText{type=undefined | wxStyledTextEventType(), position=undefined | integer(), key=undefined | integer(), modifiers=undefined | integer(), modificationType=undefined | integer(), text=undefined | chardata() (see module unicode), length=undefined | integer(), linesAdded=undefined | integer(), line=undefined | integer(), foldLevelNow=undefined | integer(), foldLevelPrev=undefined | integer(), margin=undefined | integer(), message=undefined | integer(), wParam=undefined | integer(), lParam=undefined | integer(), listType=undefined | integer(), x=undefined | integer(), y=undefined | integer(), dragText=undefined | chardata() (see module unicode), dragAllowMove=undefined | boolean(), dragResult=undefined | wx_enum() (see module wx)}\fR\&: .TP 2 .B \fIwxStyledTextEventType() = stc_change | stc_styleneeded | stc_charadded | stc_savepointreached | stc_savepointleft | stc_romodifyattempt | stc_key | stc_doubleclick | stc_updateui | stc_modified | stc_macrorecord | stc_marginclick | stc_needshown | stc_painted | stc_userlistselection | stc_uridropped | stc_dwellstart | stc_dwellend | stc_start_drag | stc_drag_over | stc_do_drop | stc_zoom | stc_hotspot_click | stc_hotspot_dclick | stc_calltip_click | stc_autocomp_selection\fR\&: .TP 2 .B \fIwxSysColourChanged() = #wxSysColourChanged{type=undefined | wxSysColourChangedEventType()}\fR\&: .TP 2 .B \fIwxSysColourChangedEventType() = sys_colour_changed\fR\&: .TP 2 .B \fIwxTaskBarIcon() = #wxTaskBarIcon{type=undefined | wxTaskBarIconEventType()}\fR\&: .TP 2 .B \fIwxTaskBarIconEventType() = taskbar_move | taskbar_left_down | taskbar_left_up | taskbar_right_down | taskbar_right_up | taskbar_left_dclick | taskbar_right_dclick\fR\&: .TP 2 .B \fIwxTree() = #wxTree{type=undefined | wxTreeEventType(), item=undefined | integer(), itemOld=undefined | integer(), pointDrag=undefined | {X::integer(), Y::integer()}}\fR\&: .TP 2 .B \fIwxTreeEventType() = command_tree_begin_drag | command_tree_begin_rdrag | command_tree_begin_label_edit | command_tree_end_label_edit | command_tree_delete_item | command_tree_get_info | command_tree_set_info | command_tree_item_expanded | command_tree_item_expanding | command_tree_item_collapsed | command_tree_item_collapsing | command_tree_sel_changed | command_tree_sel_changing | command_tree_key_down | command_tree_item_activated | command_tree_item_right_click | command_tree_item_middle_click | command_tree_end_drag | command_tree_state_image_click | command_tree_item_gettooltip | command_tree_item_menu\fR\&: .TP 2 .B \fIwxUpdateUI() = #wxUpdateUI{type=undefined | wxUpdateUIEventType()}\fR\&: .TP 2 .B \fIwxUpdateUIEventType() = update_ui\fR\&: .TP 2 .B \fIwxWindowCreate() = #wxWindowCreate{type=undefined | wxWindowCreateEventType()}\fR\&: .TP 2 .B \fIwxWindowCreateEventType() = create\fR\&: .TP 2 .B \fIwxWindowDestroy() = #wxWindowDestroy{type=undefined | wxWindowDestroyEventType()}\fR\&: .TP 2 .B \fIwxWindowDestroyEventType() = destroy\fR\&: .RE .SH EXPORTS .LP .B connect(This::wxEvtHandler(), EventType::wxEventType()) -> ok .br .RS .LP Equivalent to \fBconnect(This, EventType, [])\fR\& .RE .LP .B connect(This::wxEvtHandler(), EventType::wxEventType(), Option::[Option]) -> ok .br .RS .LP Types: .RS 3 Option = {id, integer()} | {lastId, integer()} | {skip, boolean()} | {callback, function()} | {userData, term()} .br .RE .RE .RS .LP 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\&. .LP 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: []\&. .RE .LP .B disconnect(This::wxEvtHandler()) -> boolean() .br .RS .LP Equivalent to \fBdisconnect(This, null, [])\fR\& Can also have an optional callback Fun() as an additional last argument\&. .RE .LP .B disconnect(This::wxEvtHandler(), EventType::wxEventType()) -> boolean() .br .RS .LP Equivalent to \fBdisconnect(This, EventType, [])\fR\& .RE .LP .B disconnect(This::wxEvtHandler(), EventType::wxEventType(), Option::[Option]) -> boolean() .br .RS .LP Types: .RS 3 Option = {id, integer()} | {lastId, integer()} | {callback, function()} .br .RE .RE .RS .LP 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\&. .RE .SH AUTHORS .LP .I <>