wxEvtHandler(3)



wxEvtHandler(3erl)         Erlang Module Definition         wxEvtHandler(3erl)

NAME
       wxEvtHandler - The Event handler.

DESCRIPTION
       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 executed in new process each time.

        The orginal documentation.

DATA TYPES
         event() = wxActivate() | wxAuiManager() | wxAuiNotebook() |  wxCalen-
         dar()   |  wxChildFocus()  |  wxClipboardText()  |  wxClose()  |  wx-
         ColourPicker() | wxCommand() | wxContextMenu() |  wxDate()  |  wxDis-
         playChanged() | wxDropFiles() | wxErase() | wxFileDirPicker() | wxFo-
         cus() | wxFontPicker() | wxGrid() | wxHelp() |  wxHtmlLink()  |  wxI-
         conize()  |  wxIdle()  |  wxInitDialog()  |  wxJoystick() | wxKey() |
         wxList()  |  wxMaximize()  |  wxMenu()  |  wxMouse()  |   wxMouseCap-
         tureChanged() | wxMouseCaptureLost() | wxMove() | wxNavigationKey() |
         wxNotebook() | wxPaint() | wxPaletteChanged() | wxQueryNewPalette() |
         wxSash()  |  wxScroll()  | wxScrollWin() | wxSetCursor() | wxShow() |
         wxSize() | wxSpin() | wxSplitter() |  wxStyledText()  |  wxSysColour-
         Changed()  | wxTaskBarIcon() | wxTree() | wxUpdateUI() | wxWindowCre-
         ate() | wxWindowDestroy():

         wx()   =   #wx{id=integer(),   obj=wx:wx_object(),   userData=term(),
         event=event()}:

         wxActivate()  =  #wxActivate{type=wxActivateEventType(), active=bool-
         ean()}:

         wxActivateEventType() = activate | activate_app | hibernate:

         wxAuiManager()  =  #wxAuiManager{type=wxAuiManagerEventType(),   man-
         ager=wxAuiManager:wxAuiManager(), pane=wxAuiPaneInfo:wxAuiPaneInfo(),
         button=integer(),    veto_flag=boolean(),     canveto_flag=boolean(),
         dc=wxDC:wxDC()}:

         wxAuiManagerEventType()   =   aui_pane_button   |   aui_pane_close  |
         aui_pane_maximize | aui_pane_restore | aui_pane_activated |  aui_ren-
         der | aui_find_manager:

         wxAuiNotebook()    =    #wxAuiNotebook{type=wxAuiNotebookEventType(),
         old_selection=integer(), selection=integer(),  drag_source=wxAuiNote-
         book:wxAuiNotebook()}:

         wxAuiNotebookEventType()   =  command_auinotebook_page_close  |  com-
         mand_auinotebook_page_changed |  command_auinotebook_page_changing  |
         command_auinotebook_button  |  command_auinotebook_begin_drag  | com-
         mand_auinotebook_end_drag |  command_auinotebook_drag_motion  |  com-
         mand_auinotebook_allow_dnd  |  command_auinotebook_tab_middle_down  |
         command_auinotebook_tab_middle_up         |          command_auinote-
         book_tab_right_down   |   command_auinotebook_tab_right_up   |   com-
         mand_auinotebook_page_closed | command_auinotebook_drag_done  |  com-
         mand_auinotebook_bg_dclick:

         wxCalendar()         =        #wxCalendar{type=wxCalendarEventType(),
         wday=wx:wx_enum(), date=wx:wx_datetime()}:

         wxCalendarEventType() = calendar_sel_changed | calendar_day_changed |
         calendar_month_changed   |   calendar_year_changed   |  calendar_dou-
         bleclicked | calendar_weekday_clicked:

         wxChildFocus() = #wxChildFocus{type=wxChildFocusEventType()}:

         wxChildFocusEventType() = child_focus:

         wxClipboardText()    =    #wxClipboardText{type=wxClipboardTextEvent-
         Type()}:

         wxClipboardTextEventType()  =  command_text_copy | command_text_cut |
         command_text_paste:

         wxClose() = #wxClose{type=wxCloseEventType()}:

         wxCloseEventType() = close_window | end_session | query_end_session:

         wxColourPicker()  =   #wxColourPicker{type=wxColourPickerEventType(),
         colour=wx:wx_colour()}:

         wxColourPickerEventType() = command_colourpicker_changed:

         wxCommand()  =  #wxCommand{type=wxCommandEventType(),  cmdString=uni-
         code:chardata(), commandInt=integer(), extraLong=integer()}:

         wxCommandEventType()  =   command_button_clicked   |   command_check-
         box_clicked  |  command_choice_selected  | command_listbox_selected |
         command_listbox_doubleclicked   |   command_text_updated    |    com-
         mand_text_enter  |  command_menu_selected  | command_slider_updated |
         command_radiobox_selected  |  command_radiobutton_selected   |   com-
         mand_scrollbar_updated   |   command_vlbox_selected   |  command_com-
         bobox_selected | command_tool_rclicked |  command_tool_enter  |  com-
         mand_checklistbox_toggled   |   command_togglebutton_clicked  |  com-
         mand_left_click | command_left_dclick |  command_right_click  |  com-
         mand_set_focus | command_kill_focus | command_enter:

         wxContextMenu()    =    #wxContextMenu{type=wxContextMenuEventType(),
         pos={X::integer(), Y::integer()}}:

         wxContextMenuEventType() = context_menu:

         wxDate() = #wxDate{type=wxDateEventType(), date=wx:wx_datetime()}:

         wxDateEventType() = date_changed:

         wxDisplayChanged()  =   #wxDisplayChanged{type=wxDisplayChangedEvent-
         Type()}:

         wxDisplayChangedEventType() = display_changed:

         wxDropFiles() = #wxDropFiles{type=wxDropFilesEventType(), noFiles=in-
         teger(),   pos={X::integer(),   Y::integer()},   files=[unicode:char-
         data()]}:

         wxDropFilesEventType() = drop_files:

         wxErase() = #wxErase{type=wxEraseEventType(), dc=wxDC:wxDC()}:

         wxEraseEventType() = erase_background:

         wxEventType() = wxActivateEventType() | wxAuiManagerEventType() | wx-
         AuiNotebookEventType() | wxCalendarEventType()  |  wxChildFocusEvent-
         Type()   |  wxClipboardTextEventType()  |  wxCloseEventType()  |  wx-
         ColourPickerEventType() | wxCommandEventType() |  wxContextMenuEvent-
         Type()  |  wxDateEventType()  | wxDisplayChangedEventType() | wxDrop-
         FilesEventType() | wxEraseEventType() | wxFileDirPickerEventType()  |
         wxFocusEventType()  |  wxFontPickerEventType()  | wxGridEventType() |
         wxHelpEventType() | wxHtmlLinkEventType()  |  wxIconizeEventType()  |
         wxIdleEventType() | wxInitDialogEventType() | wxJoystickEventType() |
         wxKeyEventType() | wxListEventType() |  wxMaximizeEventType()  |  wx-
         MenuEventType()   |  wxMouseCaptureChangedEventType()  |  wxMouseCap-
         tureLostEventType() | wxMouseEventType() | wxMoveEventType() | wxNav-
         igationKeyEventType()  | wxNotebookEventType() | wxPaintEventType() |
         wxPaletteChangedEventType() |  wxQueryNewPaletteEventType()  |  wxSa-
         shEventType()   |   wxScrollEventType()  |  wxScrollWinEventType()  |
         wxSetCursorEventType()  |  wxShowEventType()  |  wxSizeEventType()  |
         wxSpinEventType() | wxSplitterEventType() | wxStyledTextEventType() |
         wxSysColourChangedEventType()  |   wxTaskBarIconEventType()   |   wx-
         TreeEventType() | wxUpdateUIEventType() | wxWindowCreateEventType() |
         wxWindowDestroyEventType():

         wxEvtHandler() = wx:wx_object():

         wxFileDirPicker() = #wxFileDirPicker{type=wxFileDirPickerEventType(),
         path=unicode:chardata()}:

         wxFileDirPickerEventType()   =   command_filepicker_changed   |  com-
         mand_dirpicker_changed:

         wxFocus()  =  #wxFocus{type=wxFocusEventType(),   win=wxWindow:wxWin-
         dow()}:

         wxFocusEventType() = set_focus | kill_focus:

         wxFontPicker() = #wxFontPicker{type=wxFontPickerEventType(), font=wx-
         Font:wxFont()}:

         wxFontPickerEventType() = command_fontpicker_changed:

         wxGrid() = #wxGrid{type=wxGridEventType(),  row=integer(),  col=inte-
         ger(),  x=integer(),  y=integer(), selecting=boolean(), control=bool-
         ean(), meta=boolean(), shift=boolean(), alt=boolean()}:

         wxGridEventType() = grid_cell_left_click  |  grid_cell_right_click  |
         grid_cell_left_dclick    |    grid_cell_right_dclick    |    grid_la-
         bel_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_edi-
         tor_shown  | grid_editor_hidden | grid_editor_created | grid_cell_be-
         gin_drag:

         wxHelp() = #wxHelp{type=wxHelpEventType()}:

         wxHelpEventType() = help | detailed_help:

         wxHtmlLink()    =    #wxHtmlLink{type=wxHtmlLinkEventType(),    link-
         Info=wx:wx_wxHtmlLinkInfo()}:

         wxHtmlLinkEventType() = command_html_link_clicked:

         wxIconize()  =  #wxIconize{type=wxIconizeEventType(),  iconized=bool-
         ean()}:

         wxIconizeEventType() = iconize:

         wxIdle() = #wxIdle{type=wxIdleEventType()}:

         wxIdleEventType() = idle:

         wxInitDialog() = #wxInitDialog{type=wxInitDialogEventType()}:

         wxInitDialogEventType() = init_dialog:

         wxJoystick() = #wxJoystick{type=wxJoystickEventType(),  pos={X::inte-
         ger(),  Y::integer()},  zPosition=integer(),  buttonChange=integer(),
         buttonState=integer(), joyStick=integer()}:

         wxJoystickEventType() = joy_button_down | joy_button_up | joy_move  |
         joy_zmove:

         wxKey()  =  #wxKey{type=wxKeyEventType(),  x=integer(),  y=integer(),
         keyCode=integer(), controlDown=boolean(),  shiftDown=boolean(),  alt-
         Down=boolean(), metaDown=boolean(), scanCode=boolean(), uniChar=inte-
         ger(), rawCode=integer(), rawFlags=integer()}:

         wxKeyEventType() = char | char_hook | key_down | key_up:

         wxList() =  #wxList{type=wxListEventType(),  code=integer(),  oldIte-
         mIndex=integer(),    itemIndex=integer(),    col=integer(),    point-
         Drag={X::integer(), Y::integer()}}:

         wxListEventType()  =   command_list_begin_drag   |   command_list_be-
         gin_rdrag   |  command_list_begin_label_edit  |  command_list_end_la-
         bel_edit | command_list_delete_item | command_list_delete_all_items |
         command_list_key_down     |     command_list_insert_item    |    com-
         mand_list_col_click    |    command_list_col_right_click    |    com-
         mand_list_col_begin_drag    |    command_list_col_dragging   |   com-
         mand_list_col_end_drag   |    command_list_item_selected    |    com-
         mand_list_item_deselected   |  command_list_item_right_click  |  com-
         mand_list_item_middle_click  |  command_list_item_activated  |   com-
         mand_list_item_focused | command_list_cache_hint:

         wxMaximize() = #wxMaximize{type=wxMaximizeEventType()}:

         wxMaximizeEventType() = maximize:

         wxMenu() = #wxMenu{type=wxMenuEventType(), menuId=integer(), menu=wx-
         Menu:wxMenu()}:

         wxMenuEventType() = menu_open | menu_close | menu_highlight:

         wxMouse() =  #wxMouse{type=wxMouseEventType(),  x=integer(),  y=inte-
         ger(), leftDown=boolean(), middleDown=boolean(), rightDown=boolean(),
         controlDown=boolean(), shiftDown=boolean(), altDown=boolean(), metaD-
         own=boolean(),  wheelRotation=integer(), wheelDelta=integer(), lines-
         PerAction=integer()}:

         wxMouseCaptureChanged()   =   #wxMouseCaptureChanged{type=wxMouseCap-
         tureChangedEventType()}:

         wxMouseCaptureChangedEventType() = mouse_capture_changed:

         wxMouseCaptureLost()      =      #wxMouseCaptureLost{type=wxMouseCap-
         tureLostEventType()}:

         wxMouseCaptureLostEventType() = mouse_capture_lost:

         wxMouseEventType() = left_down | left_up | middle_down | middle_up  |
         right_down  |  right_up  |  motion  |  enter_window  | leave_window |
         left_dclick | middle_dclick | right_dclick | mousewheel:

         wxMove() = #wxMove{type=wxMoveEventType(), pos={X::integer(),  Y::in-
         teger()},  rect={X::integer(),  Y::integer(),  W::integer(), H::inte-
         ger()}}:

         wxMoveEventType() = move:

         wxNavigationKey() = #wxNavigationKey{type=wxNavigationKeyEventType(),
         flags=integer(), focus=wxWindow:wxWindow()}:

         wxNavigationKeyEventType() = navigation_key:

         wxNotebook()   =  #wxNotebook{type=wxNotebookEventType(),  nSel=inte-
         ger(), nOldSel=integer()}:

         wxNotebookEventType() = command_notebook_page_changed | command_note-
         book_page_changing:

         wxPaint() = #wxPaint{type=wxPaintEventType()}:

         wxPaintEventType() = paint:

         wxPaletteChanged()   =  #wxPaletteChanged{type=wxPaletteChangedEvent-
         Type()}:

         wxPaletteChangedEventType() = palette_changed:

         wxQueryNewPalette() = #wxQueryNewPalette{type=wxQueryNewPaletteEvent-
         Type()}:

         wxQueryNewPaletteEventType() = query_new_palette:

         wxSash()  =  #wxSash{type=wxSashEventType(),  edge=wx:wx_enum(), dra-
         gRect={X::integer(),   Y::integer(),   W::integer(),   H::integer()},
         dragStatus=wx:wx_enum()}:

         wxSashEventType() = sash_dragged:

         wxScroll()   =  #wxScroll{type=wxScrollEventType(),  commandInt=inte-
         ger(), extraLong=integer()}:

         wxScrollEventType() = scroll_top | scroll_bottom  |  scroll_lineup  |
         scroll_linedown | scroll_pageup | scroll_pagedown | scroll_thumbtrack
         | scroll_thumbrelease | scroll_changed:

         wxScrollWin()   =   #wxScrollWin{type=wxScrollWinEventType(),    com-
         mandInt=integer(), extraLong=integer()}:

         wxScrollWinEventType()  =  scrollwin_top | scrollwin_bottom | scroll-
         win_lineup | scrollwin_linedown | scrollwin_pageup |  scrollwin_page-
         down | scrollwin_thumbtrack | scrollwin_thumbrelease:

         wxSetCursor()   =  #wxSetCursor{type=wxSetCursorEventType(),  x=inte-
         ger(), y=integer(), cursor=wxCursor:wxCursor()}:

         wxSetCursorEventType() = set_cursor:

         wxShow() = #wxShow{type=wxShowEventType(), show=boolean()}:

         wxShowEventType() = show:

         wxSize() = #wxSize{type=wxSizeEventType(), size={W::integer(), H::in-
         teger()},  rect={X::integer(),  Y::integer(),  W::integer(), H::inte-
         ger()}}:

         wxSizeEventType() = size:

         wxSpin() = #wxSpin{type=wxSpinEventType(), commandInt=integer()}:

         wxSpinEventType() = command_spinctrl_updated | spin_up | spin_down  |
         spin:

         wxSplitter() = #wxSplitter{type=wxSplitterEventType()}:

         wxSplitterEventType()   =  command_splitter_sash_pos_changed  |  com-
         mand_splitter_sash_pos_changing  |  command_splitter_doubleclicked  |
         command_splitter_unsplit:

         wxStyledText()  =  #wxStyledText{type=wxStyledTextEventType(),  posi-
         tion=integer(),  key=integer(),  modifiers=integer(),   modification-
         Type=integer(),   text=unicode:chardata(),   length=integer(),  line-
         sAdded=integer(), line=integer(), foldLevelNow=integer(),  foldLevel-
         Prev=integer(),   margin=integer(),  message=integer(),  wParam=inte-
         ger(),  lParam=integer(),  listType=integer(),  x=integer(),  y=inte-
         ger(),  dragText=unicode:chardata(), dragAllowMove=boolean(), dragRe-
         sult=wx:wx_enum()}:

         wxStyledTextEventType()   =   stc_change    |    stc_styleneeded    |
         stc_charadded | stc_savepointreached | stc_savepointleft | stc_romod-
         ifyattempt | 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:

         wxSysColourChanged()  = #wxSysColourChanged{type=wxSysColourChangedE-
         ventType()}:

         wxSysColourChangedEventType() = sys_colour_changed:

         wxTaskBarIcon() = #wxTaskBarIcon{type=wxTaskBarIconEventType()}:

         wxTaskBarIconEventType()  =  taskbar_move   |   taskbar_left_down   |
         taskbar_left_up    |    taskbar_right_down   |   taskbar_right_up   |
         taskbar_left_dclick | taskbar_right_dclick:

         wxTree()  =  #wxTree{type=wxTreeEventType(),   item=integer(),   ite-
         mOld=integer(), pointDrag={X::integer(), Y::integer()}}:

         wxTreeEventType()   =   command_tree_begin_drag   |  command_tree_be-
         gin_rdrag  |  command_tree_begin_label_edit  |   command_tree_end_la-
         bel_edit  |  command_tree_delete_item  | command_tree_get_info | com-
         mand_tree_set_info    |     command_tree_item_expanded     |     com-
         mand_tree_item_expanding   |   command_tree_item_collapsed   |   com-
         mand_tree_item_collapsing   |   command_tree_sel_changed    |    com-
         mand_tree_sel_changing     |     command_tree_key_down     |     com-
         mand_tree_item_activated  |  command_tree_item_right_click   |   com-
         mand_tree_item_middle_click    |    command_tree_end_drag    |   com-
         mand_tree_state_image_click  |  command_tree_item_gettooltip  |  com-
         mand_tree_item_menu:

         wxUpdateUI() = #wxUpdateUI{type=wxUpdateUIEventType()}:

         wxUpdateUIEventType() = update_ui:

         wxWindowCreate() = #wxWindowCreate{type=wxWindowCreateEventType()}:

         wxWindowCreateEventType() = create:

         wxWindowDestroy()    =    #wxWindowDestroy{type=wxWindowDestroyEvent-
         Type()}:

         wxWindowDestroyEventType() = destroy:

EXPORTS
       connect(This::wxEvtHandler(), EventType::wxEventType()) -> ok

              Equivalent to connect(This, EventType, [])

       connect(This::wxEvtHandler(),  EventType::wxEventType(),  Options::[Op-
       tion]) -> ok

              Types:

                 Option = {id, integer()} | {lastId, integer()} | {skip, bool-
                 ean()} |  callback  |  {callback,  function()}  |  {userData,
                 term()}

              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 iden-
              tifier 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 fur-
              ther 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. De-
              fault: [].

       disconnect(This::wxEvtHandler()) -> boolean()

              Equivalent to disconnect(This, null, []) Can also  have  an  op-
              tional callback Fun() as an additional last argument.

       disconnect(This::wxEvtHandler(), EventType::wxEventType()) -> boolean()

              Equivalent to disconnect(This, EventType, [])

       disconnect(This::wxEvtHandler(),  EventType::wxEventType(),  Opts::[Op-
       tion]) -> boolean()

              Types:

                 Option = {id, integer()} | {lastId, integer()}  |  {callback,
                 function()}

              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.

AUTHORS
       <>

                                   wx 1.9.1                 wxEvtHandler(3erl)

Man(1) output converted with man2html
list of all man pages