nobody at rubyforge.org
2007-Jun-25 17:45 UTC
[Wxruby-development] [1067] trunk/wxruby2: Set up event handlers in Ruby rather than by post-processing SWIG output
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head><meta http-equiv="content-type" content="text/html; charset=utf-8" /><style type="text/css"><!-- #msg dl { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; } #msg dt { float: left; width: 6em; font-weight: bold; } #msg dt:after { content:'':'';} #msg dl, #msg dt, #msg ul, #msg li, #header, #footer { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; } #msg dl a { font-weight: bold} #msg dl a:link { color:#fc3; } #msg dl a:active { color:#ff0; } #msg dl a:visited { color:#cc6; } h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; } #msg pre { overflow: auto; background: #ffc; border: 1px #fc0 solid; padding: 6px; } #msg ul, pre { overflow: auto; } #header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; } #patch { width: 100%; } #patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;} #patch .propset h4, #patch .binary h4 {margin:0;} #patch pre {padding:0;line-height:1.2em;margin:0;} #patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;} #patch .propset .diff, #patch .binary .diff {padding:10px 0;} #patch span {display:block;padding:0 10px;} #patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;} #patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;} #patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;} #patch .lines, .info {color:#888;background:#fff;} --></style> <title>[1067] trunk/wxruby2: Set up event handlers in Ruby rather than by post-processing SWIG output</title> </head> <body> <div id="msg"> <dl> <dt>Revision</dt> <dd>1067</dd> <dt>Author</dt> <dd>brokentoy</dd> <dt>Date</dt> <dd>2007-06-25 13:45:50 -0400 (Mon, 25 Jun 2007)</dd> </dl> <h3>Log Message</h3> <pre>Set up event handlers in Ruby rather than by post-processing SWIG output</pre> <h3>Modified Paths</h3> <ul> <li><a href="#trunkwxruby2libwxclassesevthandlerrb">trunk/wxruby2/lib/wx/classes/evthandler.rb</a></li> <li><a href="#trunkwxruby2rakerakewxrb">trunk/wxruby2/rake/rakewx.rb</a></li> </ul> <h3>Removed Paths</h3> <ul> <li><a href="#trunkwxruby2swigclassesincludeeventsrb">trunk/wxruby2/swig/classes/include/events.rb</a></li> <li><a href="#trunkwxruby2swigfixeventsrb">trunk/wxruby2/swig/fixevents.rb</a></li> </ul> </div> <div id="patch"> <h3>Diff</h3> <a id="trunkwxruby2libwxclassesevthandlerrb"></a> <div class="modfile"><h4>Modified: trunk/wxruby2/lib/wx/classes/evthandler.rb (1066 => 1067)</h4> <pre class="diff"><span> <span class="info">--- trunk/wxruby2/lib/wx/classes/evthandler.rb        2007-06-25 17:42:15 UTC (rev 1066) +++ trunk/wxruby2/lib/wx/classes/evthandler.rb        2007-06-25 17:45:50 UTC (rev 1067) </span><span class="lines">@@ -2,7 +2,10 @@ </span><span class="cx"> # EvtHandler. This includes all Wx::Window subclasses and Wx::App. </span><span class="cx"> </span><span class="cx"> class Wx::EvtHandler </span><del>- </del><ins>+ # Given a Wx EventType id (eg Wx::EVT_MENU), returns a WxRuby Event + # class which should be passed to event handler blocks. The actual + # EVT_XXX constants themselves are in the compiled library, defined in + # swig/classes/Event.i </ins><span class="cx"> def self.event_class_for_type(id) </span><span class="cx"> if evt_klass = EVENT_TYPE_MAPPING[id] </span><span class="cx"> return evt_klass </span><span class="lines">@@ -12,215 +15,753 @@ </span><span class="cx"> end </span><span class="cx"> end </span><span class="cx"> </span><del>- # This has maps integer EventType ids from the Wx API to Ruby - # classes. It''s called internally by the C++ code to wrap events in - # the correct Ruby class - see EvtHandler.i and App.i - EVENT_TYPE_MAPPING = { - Wx::EVT_CALENDAR_SEL_CHANGED => Wx::CalendarEvent, - Wx::EVT_CALENDAR_DAY_CHANGED => Wx::CalendarEvent, - Wx::EVT_CALENDAR_MONTH_CHANGED => Wx::CalendarEvent, - Wx::EVT_CALENDAR_YEAR_CHANGED => Wx::CalendarEvent, - Wx::EVT_CALENDAR_DOUBLECLICKED => Wx::CalendarEvent, - Wx::EVT_CALENDAR_WEEKDAY_CLICKED => Wx::CalendarEvent, - Wx::EVT_CLOSE_WINDOW => Wx::CloseEvent, - Wx::EVT_COMMAND_BUTTON_CLICKED => Wx::CommandEvent, - Wx::EVT_COMMAND_CHECKBOX_CLICKED => Wx::CommandEvent, - Wx::EVT_COMMAND_CHOICE_SELECTED => Wx::CommandEvent, - Wx::EVT_COMMAND_LISTBOX_SELECTED => Wx::CommandEvent, - Wx::EVT_COMMAND_LISTBOX_DOUBLECLICKED => Wx::CommandEvent, - Wx::EVT_COMMAND_CHECKLISTBOX_TOGGLED => Wx::CommandEvent, - Wx::EVT_COMMAND_TEXT_UPDATED => Wx::CommandEvent, - Wx::EVT_COMMAND_TEXT_ENTER => Wx::CommandEvent, - Wx::EVT_COMMAND_TEXT_MAXLEN => Wx::CommandEvent, - Wx::EVT_COMMAND_MENU_SELECTED => Wx::CommandEvent, - Wx::EVT_COMMAND_SLIDER_UPDATED => Wx::CommandEvent, - Wx::EVT_COMMAND_RADIOBOX_SELECTED => Wx::CommandEvent, - Wx::EVT_COMMAND_RADIOBUTTON_SELECTED => Wx::CommandEvent, - Wx::EVT_COMMAND_SCROLLBAR_UPDATED => Wx::CommandEvent, - Wx::EVT_COMMAND_VLBOX_SELECTED => Wx::CommandEvent, - Wx::EVT_COMMAND_COMBOBOX_SELECTED => Wx::CommandEvent, - Wx::EVT_COMMAND_TOOL_RCLICKED => Wx::CommandEvent, - Wx::EVT_COMMAND_TOOL_ENTER => Wx::CommandEvent, - Wx::EVT_COMMAND_SPINCTRL_UPDATED => Wx::CommandEvent, - Wx::EVT_COMMAND_COMBOBOX_SELECTED => Wx::CommandEvent, - Wx::EVT_COMMAND_TEXT_URL => Wx::TextUrlEvent, - Wx::EVT_IDLE => Wx::IdleEvent, - Wx::EVT_PAINT => Wx::PaintEvent, - Wx::EVT_ERASE_BACKGROUND => Wx::EraseEvent, - Wx::EVT_UPDATE_UI => Wx::UpdateUIEvent, - Wx::EVT_SIZE => Wx::SizeEvent, - Wx::EVT_SIZING => Wx::SizeEvent, - Wx::EVT_MOVE => Wx::MoveEvent, - Wx::EVT_MOVING => Wx::MoveEvent, - Wx::EVT_TIMER => Wx::TimerEvent, - Wx::EVT_CHAR => Wx::KeyEvent, - Wx::EVT_CHAR_HOOK => Wx::KeyEvent, - Wx::EVT_KEY_DOWN => Wx::KeyEvent, - Wx::EVT_KEY_UP => Wx::KeyEvent, - Wx::EVT_COMMAND_FIND => Wx::FindDialogEvent, - Wx::EVT_COMMAND_FIND_NEXT => Wx::FindDialogEvent, - Wx::EVT_COMMAND_FIND_REPLACE => Wx::FindDialogEvent, - Wx::EVT_COMMAND_FIND_REPLACE_ALL => Wx::FindDialogEvent, - Wx::EVT_COMMAND_FIND_CLOSE => Wx::FindDialogEvent, - Wx::EVT_SET_FOCUS => Wx::FocusEvent, - Wx::EVT_KILL_FOCUS => Wx::FocusEvent, - Wx::EVT_LEFT_DOWN => Wx::MouseEvent, - Wx::EVT_LEFT_UP => Wx::MouseEvent, - Wx::EVT_LEFT_DCLICK => Wx::MouseEvent, - Wx::EVT_MIDDLE_DOWN => Wx::MouseEvent, - Wx::EVT_MIDDLE_UP => Wx::MouseEvent, - Wx::EVT_MIDDLE_DCLICK => Wx::MouseEvent, - Wx::EVT_RIGHT_DOWN => Wx::MouseEvent, - Wx::EVT_RIGHT_UP => Wx::MouseEvent, - Wx::EVT_RIGHT_DCLICK => Wx::MouseEvent, - Wx::EVT_MOTION => Wx::MouseEvent, - Wx::EVT_ENTER_WINDOW => Wx::MouseEvent, - Wx::EVT_LEAVE_WINDOW => Wx::MouseEvent, - Wx::EVT_MOUSEWHEEL => Wx::MouseEvent, - Wx::EVT_SCROLL_THUMBTRACK => Wx::ScrollEvent, - Wx::EVT_SCROLL_LINEUP => Wx::ScrollEvent, - Wx::EVT_SCROLL_LINEDOWN => Wx::ScrollEvent, - Wx::EVT_COMMAND_CHOICEBOOK_PAGE_CHANGED => Wx::ChoicebookEvent, - Wx::EVT_COMMAND_CHOICEBOOK_PAGE_CHANGING => Wx::ChoicebookEvent, - Wx::EVT_COMMAND_NOTEBOOK_PAGE_CHANGED => Wx::NotebookEvent, - Wx::EVT_COMMAND_NOTEBOOK_PAGE_CHANGING => Wx::NotebookEvent, - Wx::EVT_COMMAND_LISTBOOK_PAGE_CHANGED => Wx::ListbookEvent, - Wx::EVT_COMMAND_LISTBOOK_PAGE_CHANGING => Wx::ListbookEvent, - Wx::EVT_GRID_CELL_LEFT_CLICK => Wx::GridEvent, - Wx::EVT_GRID_CELL_RIGHT_CLICK => Wx::GridEvent, - Wx::EVT_GRID_CELL_LEFT_DCLICK => Wx::GridEvent, - Wx::EVT_GRID_CELL_RIGHT_DCLICK => Wx::GridEvent, - Wx::EVT_GRID_LABEL_LEFT_CLICK => Wx::GridEvent, - Wx::EVT_GRID_LABEL_RIGHT_CLICK => Wx::GridEvent, - Wx::EVT_GRID_LABEL_LEFT_DCLICK => Wx::GridEvent, - Wx::EVT_GRID_LABEL_RIGHT_DCLICK => Wx::GridEvent, - Wx::EVT_GRID_CELL_CHANGE => Wx::GridEvent, - Wx::EVT_GRID_SELECT_CELL => Wx::GridEvent, - Wx::EVT_GRID_EDITOR_HIDDEN => Wx::GridEvent, - Wx::EVT_GRID_EDITOR_SHOWN => Wx::GridEvent, - Wx::EVT_GRID_RANGE_SELECT => Wx::GridRangeSelectEvent, - Wx::EVT_GRID_COL_SIZE => Wx::GridSizeEvent, - Wx::EVT_GRID_ROW_SIZE => Wx::GridSizeEvent, - Wx::EVT_GRID_EDITOR_CREATED => Wx::GridEditorCreatedEvent, - Wx::EVT_WIZARD_PAGE_CHANGED => Wx::WizardEvent, - Wx::EVT_WIZARD_PAGE_CHANGING => Wx::WizardEvent, - Wx::EVT_WIZARD_CANCEL => Wx::WizardEvent, - Wx::EVT_WIZARD_HELP => Wx::WizardEvent, - Wx::EVT_WIZARD_FINISHED => Wx::WizardEvent, - Wx::EVT_COMMAND_LIST_BEGIN_DRAG => Wx::ListEvent, - Wx::EVT_COMMAND_LIST_BEGIN_RDRAG => Wx::ListEvent, - Wx::EVT_COMMAND_LIST_BEGIN_LABEL_EDIT => Wx::ListEvent, - Wx::EVT_COMMAND_LIST_END_LABEL_EDIT => Wx::ListEvent, - Wx::EVT_COMMAND_LIST_DELETE_ITEM => Wx::ListEvent, - Wx::EVT_COMMAND_LIST_DELETE_ALL_ITEMS => Wx::ListEvent, - Wx::EVT_COMMAND_LIST_KEY_DOWN => Wx::ListEvent, - Wx::EVT_COMMAND_LIST_INSERT_ITEM => Wx::ListEvent, - Wx::EVT_COMMAND_LIST_COL_CLICK => Wx::ListEvent, - Wx::EVT_COMMAND_LIST_COL_RIGHT_CLICK => Wx::ListEvent, - Wx::EVT_COMMAND_LIST_COL_BEGIN_DRAG => Wx::ListEvent, - Wx::EVT_COMMAND_LIST_COL_DRAGGING => Wx::ListEvent, - Wx::EVT_COMMAND_LIST_COL_END_DRAG => Wx::ListEvent, - Wx::EVT_COMMAND_LIST_ITEM_SELECTED => Wx::ListEvent, - Wx::EVT_COMMAND_LIST_ITEM_DESELECTED => Wx::ListEvent, - Wx::EVT_COMMAND_LIST_ITEM_RIGHT_CLICK => Wx::ListEvent, - Wx::EVT_COMMAND_LIST_ITEM_MIDDLE_CLICK => Wx::ListEvent, - Wx::EVT_COMMAND_LIST_ITEM_ACTIVATED => Wx::ListEvent, - Wx::EVT_COMMAND_LIST_ITEM_FOCUSED => Wx::ListEvent, - Wx::EVT_COMMAND_LIST_CACHE_HINT => Wx::ListEvent, - Wx::EVT_COMMAND_TREE_BEGIN_DRAG => Wx::TreeEvent, - Wx::EVT_COMMAND_TREE_BEGIN_RDRAG => Wx::TreeEvent, - Wx::EVT_COMMAND_TREE_END_DRAG => Wx::TreeEvent, - Wx::EVT_COMMAND_TREE_BEGIN_LABEL_EDIT => Wx::TreeEvent, - Wx::EVT_COMMAND_TREE_END_LABEL_EDIT => Wx::TreeEvent, - Wx::EVT_COMMAND_TREE_GET_INFO => Wx::TreeEvent, - Wx::EVT_COMMAND_TREE_SET_INFO => Wx::TreeEvent, - Wx::EVT_COMMAND_TREE_ITEM_EXPANDED => Wx::TreeEvent, - Wx::EVT_COMMAND_TREE_ITEM_EXPANDING => Wx::TreeEvent, - Wx::EVT_COMMAND_TREE_ITEM_COLLAPSED => Wx::TreeEvent, - Wx::EVT_COMMAND_TREE_ITEM_COLLAPSING => Wx::TreeEvent, - Wx::EVT_COMMAND_TREE_SEL_CHANGED => Wx::TreeEvent, - Wx::EVT_COMMAND_TREE_SEL_CHANGING => Wx::TreeEvent, - Wx::EVT_COMMAND_TREE_KEY_DOWN => Wx::TreeEvent, - Wx::EVT_COMMAND_TREE_DELETE_ITEM => Wx::TreeEvent, - Wx::EVT_COMMAND_TREE_ITEM_ACTIVATED => Wx::TreeEvent, - Wx::EVT_COMMAND_TREE_ITEM_MENU => Wx::TreeEvent, - Wx::EVT_COMMAND_TREE_ITEM_RIGHT_CLICK => Wx::TreeEvent, - Wx::EVT_COMMAND_TREE_ITEM_MIDDLE_CLICK => Wx::TreeEvent, - Wx::EVT_COMMAND_TREE_STATE_IMAGE_CLICK => Wx::TreeEvent, - Wx::EVT_COMMAND_TREE_ITEM_GETTOOLTIP => Wx::TreeEvent, - Wx::EVT_SASH_DRAGGED => Wx::SashEvent, - Wx::EVT_COMMAND_SPLITTER_SASH_POS_CHANGED => Wx::SplitterEvent, - Wx::EVT_COMMAND_SPLITTER_SASH_POS_CHANGING => Wx::SplitterEvent, - Wx::EVT_COMMAND_SPLITTER_DOUBLECLICKED => Wx::SplitterEvent, - Wx::EVT_COMMAND_SPLITTER_UNSPLIT => Wx::SplitterEvent, - Wx::EVT_SCROLL_TOP => Wx::ScrollEvent, - Wx::EVT_SCROLL_BOTTOM => Wx::ScrollEvent, - Wx::EVT_SCROLL_LINEUP => Wx::ScrollEvent, - Wx::EVT_SCROLL_LINEDOWN => Wx::ScrollEvent, - Wx::EVT_SCROLL_PAGEUP => Wx::ScrollEvent, - Wx::EVT_SCROLL_PAGEDOWN => Wx::ScrollEvent, - Wx::EVT_SCROLL_THUMBTRACK => Wx::ScrollEvent, - Wx::EVT_SCROLL_THUMBRELEASE => Wx::ScrollEvent, - Wx::EVT_SCROLL_CHANGED => Wx::ScrollEvent, - Wx::EVT_SCROLLWIN_TOP => Wx::ScrollWinEvent, - Wx::EVT_SCROLLWIN_BOTTOM => Wx::ScrollWinEvent, - Wx::EVT_SCROLLWIN_LINEUP => Wx::ScrollWinEvent, - Wx::EVT_SCROLLWIN_LINEDOWN => Wx::ScrollWinEvent, - Wx::EVT_SCROLLWIN_PAGEUP => Wx::ScrollWinEvent, - Wx::EVT_SCROLLWIN_PAGEDOWN => Wx::ScrollWinEvent, - Wx::EVT_SCROLLWIN_THUMBTRACK => Wx::ScrollWinEvent, - Wx::EVT_SCROLLWIN_THUMBRELEASE => Wx::ScrollWinEvent, - Wx::EVT_ACTIVATE => Wx::ActivateEvent, - Wx::EVT_ACTIVATE_APP => Wx::ActivateEvent, - Wx::EVT_CREATE => Wx::WindowCreateEvent, - Wx::EVT_DESTROY => Wx::WindowDestroyEvent, - Wx::EVT_MENU_OPEN => Wx::MenuEvent, - Wx::EVT_MENU_CLOSE => Wx::MenuEvent, - Wx::EVT_MENU_HIGHLIGHT => Wx::MenuEvent, - Wx::EVT_CONTEXT_MENU => Wx::ContextMenuEvent, - Wx::EVT_AUI_PANE_BUTTON => Wx::AuiManagerEvent, - Wx::EVT_AUI_PANE_CLOSE => Wx::AuiManagerEvent, - Wx::EVT_AUI_PANE_MAXIMIZE => Wx::AuiManagerEvent, - Wx::EVT_AUI_PANE_RESTORE => Wx::AuiManagerEvent, - Wx::EVT_AUI_RENDER => Wx::AuiManagerEvent, - Wx::EVT_AUI_FIND_MANAGER => Wx::AuiManagerEvent, - Wx::EVT_COMMAND_AUINOTEBOOK_PAGE_CLOSE => Wx::AuiNotebookEvent, - Wx::EVT_COMMAND_AUINOTEBOOK_PAGE_CHANGED => Wx::AuiNotebookEvent, - Wx::EVT_COMMAND_AUINOTEBOOK_PAGE_CHANGING => Wx::AuiNotebookEvent, - Wx::EVT_COMMAND_AUINOTEBOOK_BUTTON => Wx::AuiNotebookEvent, - Wx::EVT_COMMAND_AUINOTEBOOK_BEGIN_DRAG => Wx::AuiNotebookEvent, - Wx::EVT_COMMAND_AUINOTEBOOK_END_DRAG => Wx::AuiNotebookEvent, - Wx::EVT_COMMAND_AUINOTEBOOK_DRAG_MOTION => Wx::AuiNotebookEvent, - Wx::EVT_COMMAND_AUINOTEBOOK_ALLOW_DND => Wx::AuiNotebookEvent, - } </del><ins>+ # EventType is an internal class that''s used to set up event handlers + # and mappings. + # * ''name'' is the name of the event handler method in ruby + # * ''arity'' is the number of id arguments that method should accept + # * ''const'' is the Wx EventType constant that identifies the event + # * ''evt_class'' is the WxRuby event class which is passed to the event + # handler block + # + # NB: Some event types currently pass a Wx::Event into the event + # handler block; when the appropriate classes are added to wxRuby, the + # binding can be updated here. + EventType = Struct.new(:name, :arity, :const, :evt_class) + EVENT_TYPE_MAPPING = {} </ins><span class="cx"> </span><del>- if defined?(Wx::Scintilla) - EVENT_TYPE_MAPPING.merge( - Wx::EVT_SCI_CHANGE => Wx::ScintillaEvent, - Wx::EVT_SCI_STYLENEEDED => Wx::ScintillaEvent, - Wx::EVT_SCI_CHARADDED => Wx::ScintillaEvent, - Wx::EVT_SCI_SAVEPOINTREACHED => Wx::ScintillaEvent, - Wx::EVT_SCI_SAVEPOINTLEFT => Wx::ScintillaEvent, - Wx::EVT_SCI_ROMODIFYATTEMPT => Wx::ScintillaEvent, - Wx::EVT_SCI_KEY => Wx::ScintillaEvent, - Wx::EVT_SCI_DOUBLECLICK => Wx::ScintillaEvent, - Wx::EVT_SCI_UPDATEUI => Wx::ScintillaEvent, - Wx::EVT_SCI_MODIFIED => Wx::ScintillaEvent, - Wx::EVT_SCI_MACRORECORD => Wx::ScintillaEvent, - Wx::EVT_SCI_MARGINCLICK => Wx::ScintillaEvent, - Wx::EVT_SCI_NEEDSHOWN => Wx::ScintillaEvent, - Wx::EVT_SCI_PAINTED => Wx::ScintillaEvent, - Wx::EVT_SCI_USERLISTSELECTION => Wx::ScintillaEvent, - Wx::EVT_SCI_URIDROPPED => Wx::ScintillaEvent, - Wx::EVT_SCI_DWELLSTART => Wx::ScintillaEvent, - Wx::EVT_SCI_DWELLEND => Wx::ScintillaEvent, - Wx::EVT_SCI_START_DRAG => Wx::ScintillaEvent, - Wx::EVT_SCI_DRAG_OVER => Wx::ScintillaEvent, - Wx::EVT_SCI_DO_DROP => Wx::ScintillaEvent, - Wx::EVT_SCI_ZOOM => Wx::ScintillaEvent, - Wx::EVT_SCI_HOTSPOT_CLICK => Wx::ScintillaEvent, - Wx::EVT_SCI_HOTSPOT_DCLICK => Wx::ScintillaEvent, - Wx::EVT_SCI_CALLTIP_CLICK => Wx::ScintillaEvent ) </del><ins>+ EVENT_DEFINITIONS = [ + EventType[''evt_activate'', 0, + Wx::EVT_ACTIVATE, + Wx::ActivateEvent], + EventType[''evt_activate_app'', 0, + Wx::EVT_ACTIVATE_APP, + Wx::ActivateEvent], + EventType[''evt_auinotebook_allow_dnd'', 1, + Wx::EVT_COMMAND_AUINOTEBOOK_ALLOW_DND, + Wx::AuiNotebookEvent], + EventType[''evt_auinotebook_begin_drag'', 1, + Wx::EVT_COMMAND_AUINOTEBOOK_BEGIN_DRAG, + Wx::AuiNotebookEvent], + EventType[''evt_auinotebook_button'', 1, + Wx::EVT_COMMAND_AUINOTEBOOK_BUTTON, + Wx::AuiNotebookEvent], + EventType[''evt_auinotebook_drag_motion'', 1, + Wx::EVT_COMMAND_AUINOTEBOOK_DRAG_MOTION, + Wx::AuiNotebookEvent], + EventType[''evt_auinotebook_end_drag'', 1, + Wx::EVT_COMMAND_AUINOTEBOOK_END_DRAG, + Wx::AuiNotebookEvent], + EventType[''evt_auinotebook_page_changed'', 1, + Wx::EVT_COMMAND_AUINOTEBOOK_PAGE_CHANGED, + Wx::AuiNotebookEvent], + EventType[''evt_auinotebook_page_changing'', 1, + Wx::EVT_COMMAND_AUINOTEBOOK_PAGE_CHANGING, + Wx::AuiNotebookEvent], + EventType[''evt_auinotebook_page_close'', 1, + Wx::EVT_COMMAND_AUINOTEBOOK_PAGE_CLOSE, + Wx::AuiNotebookEvent], + EventType[''evt_aui_find_manager'', 0, + Wx::EVT_AUI_FIND_MANAGER, + Wx::AuiManagerEvent], + EventType[''evt_aui_pane_button'', 0, + Wx::EVT_AUI_PANE_BUTTON, + Wx::AuiManagerEvent], + EventType[''evt_aui_pane_close'', 0, + Wx::EVT_AUI_PANE_CLOSE, + Wx::AuiManagerEvent], + EventType[''evt_aui_pane_maximize'', 0, + Wx::EVT_AUI_PANE_MAXIMIZE, + Wx::AuiManagerEvent], + EventType[''evt_aui_pane_restore'', 0, + Wx::EVT_AUI_PANE_RESTORE, + Wx::AuiManagerEvent], + EventType[''evt_aui_render'', 0, + Wx::EVT_AUI_RENDER, + Wx::AuiManagerEvent], + EventType[''evt_button'', 1, + Wx::EVT_COMMAND_BUTTON_CLICKED, + Wx::CommandEvent], + EventType[''evt_calculate_layout'', 0, + Wx::EVT_CALCULATE_LAYOUT, + Wx::Event], + EventType[''evt_calendar'', 1, + Wx::EVT_CALENDAR_DOUBLECLICKED, + Wx::CalendarEvent], + EventType[''evt_calendar_day'', 1, + Wx::EVT_CALENDAR_DAY_CHANGED, + Wx::CalendarEvent], + EventType[''evt_calendar_month'', 1, + Wx::EVT_CALENDAR_MONTH_CHANGED, + Wx::CalendarEvent], + EventType[''evt_calendar_sel_changed'', 1, + Wx::EVT_CALENDAR_SEL_CHANGED, + Wx::CalendarEvent], + EventType[''evt_calendar_weekday_clicked'', 1, + Wx::EVT_CALENDAR_WEEKDAY_CLICKED, + Wx::CalendarEvent], + EventType[''evt_calendar_year'', 1, + Wx::EVT_CALENDAR_YEAR_CHANGED, + Wx::CalendarEvent], + EventType[''evt_char'', 0, + Wx::EVT_CHAR, + Wx::KeyEvent], + EventType[''evt_checkbox'', 1, + Wx::EVT_COMMAND_CHECKBOX_CLICKED, + Wx::CommandEvent], + EventType[''evt_checklistbox'', 1, + Wx::EVT_COMMAND_CHECKLISTBOX_TOGGLED, + Wx::CommandEvent], + EventType[''evt_choice'', 1, + Wx::EVT_COMMAND_CHOICE_SELECTED, + Wx::CommandEvent], + EventType[''evt_choicebook_page_changed'', 1, + Wx::EVT_COMMAND_CHOICEBOOK_PAGE_CHANGED, + Wx::ChoicebookEvent], + EventType[''evt_choicebook_page_changing'', 1, + Wx::EVT_COMMAND_CHOICEBOOK_PAGE_CHANGING, + Wx::ChoicebookEvent], + EventType[''evt_close'', 0, + Wx::EVT_CLOSE_WINDOW, + Wx::CloseEvent], + EventType[''evt_combobox'', 1, + Wx::EVT_COMMAND_COMBOBOX_SELECTED, + Wx::CommandEvent], + EventType[''evt_command'', 0, + Wx::EVT_NULL, + Wx::Event], + EventType[''evt_command_enter'', 1, + Wx::EVT_COMMAND_ENTER, + Wx::Event], + EventType[''evt_command_kill_focus'', 1, + Wx::EVT_COMMAND_KILL_FOCUS, + Wx::Event], + EventType[''evt_command_left_click'', 1, + Wx::EVT_COMMAND_LEFT_CLICK, + Wx::Event], + EventType[''evt_command_left_dclick'', 1, + Wx::EVT_COMMAND_LEFT_DCLICK, + Wx::Event], + EventType[''evt_command_range'', 2, + Wx::EVT_NULL, + Wx::Event], + EventType[''evt_command_right_click'', 1, + Wx::EVT_COMMAND_RIGHT_CLICK, + Wx::Event], + EventType[''evt_command_set_focus'', 1, + Wx::EVT_COMMAND_SET_FOCUS, + Wx::Event], + EventType[''evt_context_menu'', 0, + Wx::EVT_CONTEXT_MENU, + Wx::ContextMenuEvent], + EventType[''evt_drop_files'', 0, + Wx::EVT_DROP_FILES, + Wx::Event], + EventType[''evt_end_process'', 1, + Wx::EVT_END_PROCESS, + Wx::Event], + EventType[''evt_end_session'', 0, + Wx::EVT_END_SESSION, + Wx::Event], + EventType[''evt_enter_window'', 0, + Wx::EVT_ENTER_WINDOW, + Wx::MouseEvent], + EventType[''evt_erase_background'', 0, + Wx::EVT_ERASE_BACKGROUND, + Wx::EraseEvent], + EventType[''evt_find'', 1, + Wx::EVT_COMMAND_FIND, + Wx::FindDialogEvent], + EventType[''evt_find_close'', 1, + Wx::EVT_COMMAND_FIND_CLOSE, + Wx::FindDialogEvent], + EventType[''evt_find_next'', 1, + Wx::EVT_COMMAND_FIND_NEXT, + Wx::FindDialogEvent], + EventType[''evt_find_replace'', 1, + Wx::EVT_COMMAND_FIND_REPLACE, + Wx::FindDialogEvent], + EventType[''evt_find_replace_all'', 1, + Wx::EVT_COMMAND_FIND_REPLACE_ALL, + Wx::FindDialogEvent], + EventType[''evt_grid_cell_change'', 0, + Wx::EVT_GRID_CELL_CHANGE, + Wx::GridEvent], + EventType[''evt_grid_cell_left_click'', 0, + Wx::EVT_GRID_CELL_LEFT_CLICK, + Wx::GridEvent], + EventType[''evt_grid_cell_left_dclick'', 0, + Wx::EVT_GRID_CELL_LEFT_DCLICK, + Wx::GridEvent], + EventType[''evt_grid_cell_right_click'', 0, + Wx::EVT_GRID_CELL_RIGHT_CLICK, + Wx::GridEvent], + EventType[''evt_grid_cell_right_dclick'', 0, + Wx::EVT_GRID_CELL_RIGHT_DCLICK, + Wx::GridEvent], + EventType[''evt_grid_cmd_cell_change'', 1, + Wx::EVT_GRID_CELL_CHANGE, + Wx::GridEvent], + EventType[''evt_grid_cmd_cell_left_click'', 1, + Wx::EVT_GRID_CELL_LEFT_CLICK, + Wx::GridEvent], + EventType[''evt_grid_cmd_cell_left_dclick'', 1, + Wx::EVT_GRID_CELL_LEFT_DCLICK, + Wx::GridEvent], + EventType[''evt_grid_cmd_cell_right_click'', 1, + Wx::EVT_GRID_CELL_RIGHT_CLICK, + Wx::GridEvent], + EventType[''evt_grid_cmd_cell_right_dclick'', 1, + Wx::EVT_GRID_CELL_RIGHT_DCLICK, + Wx::GridEvent], + EventType[''evt_grid_cmd_col_size'', 1, + Wx::EVT_GRID_COL_SIZE, + Wx::GridSizeEvent], + EventType[''evt_grid_cmd_editor_created'', 1, + Wx::EVT_GRID_EDITOR_CREATED, + Wx::GridEditorCreatedEvent], + EventType[''evt_grid_cmd_editor_hidden'', 1, + Wx::EVT_GRID_EDITOR_HIDDEN, + Wx::GridEvent], + EventType[''evt_grid_cmd_editor_shown'', 1, + Wx::EVT_GRID_EDITOR_SHOWN, + Wx::GridEvent], + EventType[''evt_grid_cmd_label_left_click'', 1, + Wx::EVT_GRID_LABEL_LEFT_CLICK, + Wx::GridEvent], + EventType[''evt_grid_cmd_label_left_dclick'', 1, + Wx::EVT_GRID_LABEL_LEFT_DCLICK, + Wx::GridEvent], + EventType[''evt_grid_cmd_label_right_click'', 1, + Wx::EVT_GRID_LABEL_RIGHT_CLICK, + Wx::GridEvent], + EventType[''evt_grid_cmd_label_right_dclick'', 1, + Wx::EVT_GRID_LABEL_RIGHT_DCLICK, + Wx::GridEvent], + EventType[''evt_grid_cmd_range_select'', 1, + Wx::EVT_GRID_RANGE_SELECT, + Wx::GridRangeSelectEvent], + EventType[''evt_grid_cmd_row_size'', 1, + Wx::EVT_GRID_ROW_SIZE, + Wx::GridSizeEvent], + EventType[''evt_grid_cmd_select_cell'', 1, + Wx::EVT_GRID_SELECT_CELL, + Wx::GridEvent], + EventType[''evt_grid_col_size'', 0, + Wx::EVT_GRID_COL_SIZE, + Wx::GridSizeEvent], + EventType[''evt_grid_editor_created'', 0, + Wx::EVT_GRID_EDITOR_CREATED, + Wx::GridEditorCreatedEvent], + EventType[''evt_grid_editor_hidden'', 0, + Wx::EVT_GRID_EDITOR_HIDDEN, + Wx::GridEvent], + EventType[''evt_grid_editor_shown'', 0, + Wx::EVT_GRID_EDITOR_SHOWN, + Wx::GridEvent], + EventType[''evt_grid_label_left_click'', 0, + Wx::EVT_GRID_LABEL_LEFT_CLICK, + Wx::GridEvent], + EventType[''evt_grid_label_left_dclick'', 0, + Wx::EVT_GRID_LABEL_LEFT_DCLICK, + Wx::GridEvent], + EventType[''evt_grid_label_right_click'', 0, + Wx::EVT_GRID_LABEL_RIGHT_CLICK, + Wx::GridEvent], + EventType[''evt_grid_label_right_dclick'', 0, + Wx::EVT_GRID_LABEL_RIGHT_DCLICK, + Wx::GridEvent], + EventType[''evt_grid_range_select'', 0, + Wx::EVT_GRID_RANGE_SELECT, + Wx::GridRangeSelectEvent], + EventType[''evt_grid_row_size'', 0, + Wx::EVT_GRID_ROW_SIZE, + Wx::GridSizeEvent], + EventType[''evt_grid_select_cell'', 0, + Wx::EVT_GRID_SELECT_CELL, + Wx::GridEvent], + EventType[''evt_help'', 1, + Wx::EVT_HELP, + Wx::Event], + EventType[''evt_help_range'', 2, + Wx::EVT_HELP, + Wx::Event], + EventType[''evt_iconize'', 0, + Wx::EVT_ICONIZE, + Wx::Event], + EventType[''evt_idle'', 0, + Wx::EVT_IDLE, + Wx::IdleEvent], + EventType[''evt_init_dialog'', 0, + Wx::EVT_INIT_DIALOG, + Wx::Event], + EventType[''evt_joy_button_down'', 0, + Wx::EVT_JOY_BUTTON_DOWN, + Wx::Event], + EventType[''evt_joy_button_up'', 0, + Wx::EVT_JOY_BUTTON_UP, + Wx::Event], + EventType[''evt_joy_move'', 0, + Wx::EVT_JOY_MOVE, + Wx::Event], + EventType[''evt_joy_zmove'', 0, + Wx::EVT_JOY_ZMOVE, + Wx::Event], + EventType[''evt_key_down'', 0, + Wx::EVT_KEY_DOWN, + Wx::KeyEvent], + EventType[''evt_key_up'', 0, + Wx::EVT_KEY_UP, + Wx::KeyEvent], + EventType[''evt_kill_focus'', 0, + Wx::EVT_KILL_FOCUS, + Wx::FocusEvent], + EventType[''evt_leave_window'', 0, + Wx::EVT_LEAVE_WINDOW, + Wx::MouseEvent], + EventType[''evt_left_dclick'', 0, + Wx::EVT_LEFT_DCLICK, + Wx::MouseEvent], + EventType[''evt_left_down'', 0, + Wx::EVT_LEFT_DOWN, + Wx::MouseEvent], + EventType[''evt_left_up'', 0, + Wx::EVT_LEFT_UP, + Wx::MouseEvent], + EventType[''evt_listbook_page_changed'', 1, + Wx::EVT_COMMAND_LISTBOOK_PAGE_CHANGED, + Wx::ListbookEvent], + EventType[''evt_listbook_page_changing'', 1, + Wx::EVT_COMMAND_LISTBOOK_PAGE_CHANGING, + Wx::ListbookEvent], + EventType[''evt_listbox'', 1, + Wx::EVT_COMMAND_LISTBOX_SELECTED, + Wx::CommandEvent], + EventType[''evt_listbox_dclick'', 1, + Wx::EVT_COMMAND_LISTBOX_DOUBLECLICKED, + Wx::CommandEvent], + EventType[''evt_list_begin_drag'', 1, + Wx::EVT_COMMAND_LIST_BEGIN_DRAG, + Wx::ListEvent], + EventType[''evt_list_begin_label_edit'', 1, + Wx::EVT_COMMAND_LIST_BEGIN_LABEL_EDIT, + Wx::ListEvent], + EventType[''evt_list_begin_rdrag'', 1, + Wx::EVT_COMMAND_LIST_BEGIN_RDRAG, + Wx::ListEvent], + EventType[''evt_list_cache_hint'', 1, + Wx::EVT_COMMAND_LIST_CACHE_HINT, + Wx::ListEvent], + EventType[''evt_list_col_begin_drag'', 1, + Wx::EVT_COMMAND_LIST_COL_BEGIN_DRAG, + Wx::ListEvent], + EventType[''evt_list_col_click'', 1, + Wx::EVT_COMMAND_LIST_COL_CLICK, + Wx::ListEvent], + EventType[''evt_list_col_dragging'', 1, + Wx::EVT_COMMAND_LIST_COL_DRAGGING, + Wx::ListEvent], + EventType[''evt_list_col_end_drag'', 1, + Wx::EVT_COMMAND_LIST_COL_END_DRAG, + Wx::ListEvent], + EventType[''evt_list_col_right_click'', 1, + Wx::EVT_COMMAND_LIST_COL_RIGHT_CLICK, + Wx::ListEvent], + EventType[''evt_list_delete_all_items'', 1, + Wx::EVT_COMMAND_LIST_DELETE_ALL_ITEMS, + Wx::ListEvent], + EventType[''evt_list_delete_item'', 1, + Wx::EVT_COMMAND_LIST_DELETE_ITEM, + Wx::ListEvent], + EventType[''evt_list_end_label_edit'', 1, + Wx::EVT_COMMAND_LIST_END_LABEL_EDIT, + Wx::ListEvent], + EventType[''evt_list_insert_item'', 1, + Wx::EVT_COMMAND_LIST_INSERT_ITEM, + Wx::ListEvent], + EventType[''evt_list_item_activated'', 1, + Wx::EVT_COMMAND_LIST_ITEM_ACTIVATED, + Wx::ListEvent], + EventType[''evt_list_item_deselected'', 1, + Wx::EVT_COMMAND_LIST_ITEM_DESELECTED, + Wx::ListEvent], + EventType[''evt_list_item_focused'', 1, + Wx::EVT_COMMAND_LIST_ITEM_FOCUSED, + Wx::ListEvent], + EventType[''evt_list_item_middle_click'', 1, + Wx::EVT_COMMAND_LIST_ITEM_MIDDLE_CLICK, + Wx::ListEvent], + EventType[''evt_list_item_right_click'', 1, + Wx::EVT_COMMAND_LIST_ITEM_RIGHT_CLICK, + Wx::ListEvent], + EventType[''evt_list_item_selected'', 1, + Wx::EVT_COMMAND_LIST_ITEM_SELECTED, + Wx::ListEvent], + EventType[''evt_list_key_down'', 1, + Wx::EVT_COMMAND_LIST_KEY_DOWN, + Wx::ListEvent], + EventType[''evt_maximize'', 0, + Wx::EVT_MAXIMIZE, + Wx::Event], + EventType[''evt_menu'', 1, + Wx::EVT_COMMAND_MENU_SELECTED, + Wx::CommandEvent], + EventType[''evt_menu_close'', 0, + Wx::EVT_MENU_CLOSE, + Wx::MenuEvent], + EventType[''evt_menu_highlight'', 1, + Wx::EVT_MENU_HIGHLIGHT, + Wx::MenuEvent], + EventType[''evt_menu_highlight_all'', 0, + Wx::EVT_MENU_HIGHLIGHT, + Wx::MenuEvent], + EventType[''evt_menu_open'', 0, + Wx::EVT_MENU_OPEN, + Wx::MenuEvent], + EventType[''evt_menu_range'', 2, + Wx::EVT_COMMAND_MENU_SELECTED, + Wx::CommandEvent], + EventType[''evt_middle_dclick'', 0, + Wx::EVT_MIDDLE_DCLICK, + Wx::MouseEvent], + EventType[''evt_middle_down'', 0, + Wx::EVT_MIDDLE_DOWN, + Wx::MouseEvent], + EventType[''evt_middle_up'', 0, + Wx::EVT_MIDDLE_UP, + Wx::MouseEvent], + EventType[''evt_motion'', 0, + Wx::EVT_MOTION, + Wx::MouseEvent], + EventType[''evt_mousewheel'', 0, + Wx::EVT_MOUSEWHEEL, + Wx::MouseEvent], + EventType[''evt_mouse_capture_changed'', 0, + Wx::EVT_MOUSE_CAPTURE_CHANGED, + Wx::Event], + EventType[''evt_move'', 0, + Wx::EVT_MOVE, + Wx::MoveEvent], + EventType[''evt_notebook_page_changed'', 1, + Wx::EVT_COMMAND_NOTEBOOK_PAGE_CHANGED, + Wx::NotebookEvent], + EventType[''evt_notebook_page_changing'', 1, + Wx::EVT_COMMAND_NOTEBOOK_PAGE_CHANGING, + Wx::NotebookEvent], + EventType[''evt_paint'', 0, + Wx::EVT_PAINT, + Wx::PaintEvent], + EventType[''evt_query_end_session'', 0, + Wx::EVT_QUERY_END_SESSION, + Wx::Event], + EventType[''evt_query_layout_info'', 0, + Wx::EVT_QUERY_LAYOUT_INFO, + Wx::Event], + EventType[''evt_radiobox'', 1, + Wx::EVT_COMMAND_RADIOBOX_SELECTED, + Wx::CommandEvent], + EventType[''evt_radiobutton'', 1, + Wx::EVT_COMMAND_RADIOBUTTON_SELECTED, + Wx::CommandEvent], + EventType[''evt_right_dclick'', 0, + Wx::EVT_RIGHT_DCLICK, + Wx::MouseEvent], + EventType[''evt_right_down'', 0, + Wx::EVT_RIGHT_DOWN, + Wx::MouseEvent], + EventType[''evt_right_up'', 0, + Wx::EVT_RIGHT_UP, + Wx::MouseEvent], + EventType[''evt_sash_dragged'', 1, + Wx::EVT_SASH_DRAGGED, + Wx::SashEvent], + EventType[''evt_sash_dragged_range'', 2, + Wx::EVT_SASH_DRAGGED, + Wx::SashEvent], + EventType[''evt_scrollbar'', 1, + Wx::EVT_COMMAND_SCROLLBAR_UPDATED, + Wx::CommandEvent], + EventType[''evt_scrollwin_bottom'', 0, + Wx::EVT_SCROLLWIN_TOP, + Wx::ScrollWinEvent], + EventType[''evt_scrollwin_linedown'', 0, + Wx::EVT_SCROLLWIN_LINEDOWN, + Wx::ScrollWinEvent], + EventType[''evt_scrollwin_lineup'', 0, + Wx::EVT_SCROLLWIN_LINEUP, + Wx::ScrollWinEvent], + EventType[''evt_scrollwin_pagedown'', 0, + Wx::EVT_SCROLLWIN_PAGEDOWN, + Wx::ScrollWinEvent], + EventType[''evt_scrollwin_pageup'', 0, + Wx::EVT_SCROLLWIN_PAGEUP, + Wx::ScrollWinEvent], + EventType[''evt_scrollwin_thumbrelease'', 0, + Wx::EVT_SCROLLWIN_THUMBRELEASE, + Wx::ScrollWinEvent], + EventType[''evt_scrollwin_thumbtrack'', 0, + Wx::EVT_SCROLLWIN_THUMBTRACK, + Wx::ScrollWinEvent], + EventType[''evt_scrollwin_top'', 0, + Wx::EVT_SCROLLWIN_TOP, + Wx::ScrollWinEvent], + EventType[''evt_scroll_bottom'', 0, + Wx::EVT_SCROLL_BOTTOM, + Wx::ScrollEvent], + EventType[''evt_scroll_linedown'', 0, + Wx::EVT_SCROLL_LINEDOWN, + Wx::ScrollEvent], + EventType[''evt_scroll_lineup'', 0, + Wx::EVT_SCROLL_LINEUP, + Wx::ScrollEvent], + EventType[''evt_scroll_pagedown'', 0, + Wx::EVT_SCROLL_PAGEDOWN, + Wx::ScrollEvent], + EventType[''evt_scroll_pageup'', 0, + Wx::EVT_SCROLL_PAGEUP, + Wx::ScrollEvent], + EventType[''evt_scroll_thumbrelease'', 0, + Wx::EVT_SCROLL_THUMBRELEASE, + Wx::ScrollEvent], + EventType[''evt_scroll_thumbtrack'', 0, + Wx::EVT_SCROLL_THUMBTRACK, + Wx::ScrollEvent], + EventType[''evt_scroll_top'', 0, + Wx::EVT_SCROLL_TOP, + Wx::ScrollEvent], + EventType[''evt_set_focus'', 0, + Wx::EVT_SET_FOCUS, + Wx::FocusEvent], + EventType[''evt_size'', 0, + Wx::EVT_SIZE, + Wx::SizeEvent], + EventType[''evt_slider'', 1, + Wx::EVT_COMMAND_SLIDER_UPDATED, + Wx::CommandEvent], + EventType[''evt_socket'', 1, + Wx::EVT_SOCKET, + Wx::Event], + EventType[''evt_spin'', 1, + Wx::EVT_SCROLL_THUMBTRACK, + Wx::ScrollEvent], + EventType[''evt_spinctrl'', 1, + Wx::EVT_COMMAND_SPINCTRL_UPDATED, + Wx::CommandEvent], + EventType[''evt_spin_down'', 1, + Wx::EVT_SCROLL_LINEDOWN, + Wx::ScrollEvent], + EventType[''evt_spin_up'', 1, + Wx::EVT_SCROLL_LINEUP, + Wx::ScrollEvent], + EventType[''evt_splitter_dclick'', 1, + Wx::EVT_COMMAND_SPLITTER_DOUBLECLICKED, + Wx::SplitterEvent], + EventType[''evt_splitter_sash_pos_changed'', 1, + Wx::EVT_COMMAND_SPLITTER_SASH_POS_CHANGED, + Wx::SplitterEvent], + EventType[''evt_splitter_sash_pos_changing'', 1, + Wx::EVT_COMMAND_SPLITTER_SASH_POS_CHANGING, + Wx::SplitterEvent], + EventType[''evt_splitter_unsplit'', 1, + Wx::EVT_COMMAND_SPLITTER_UNSPLIT, + Wx::SplitterEvent], + EventType[''evt_sys_colour_changed'', 0, + Wx::EVT_SYS_COLOUR_CHANGED, + Wx::Event], + EventType[''evt_taskbar_left_dclick'', 0, + Wx::EVT_TASKBAR_LEFT_DCLICK, + Wx::Event], + EventType[''evt_taskbar_left_down'', 0, + Wx::EVT_TASKBAR_LEFT_DOWN, + Wx::Event], + EventType[''evt_taskbar_left_up'', 0, + Wx::EVT_TASKBAR_LEFT_UP, + Wx::Event], + EventType[''evt_taskbar_move'', 0, + Wx::EVT_TASKBAR_MOVE, + Wx::Event], + EventType[''evt_taskbar_right_dclick'', 0, + Wx::EVT_TASKBAR_RIGHT_DCLICK, + Wx::Event], + EventType[''evt_taskbar_right_down'', 0, + Wx::EVT_TASKBAR_RIGHT_DOWN, + Wx::Event], + EventType[''evt_taskbar_right_up'', 0, + Wx::EVT_TASKBAR_RIGHT_UP, + Wx::Event], + EventType[''evt_text'', 1, + Wx::EVT_COMMAND_TEXT_UPDATED, + Wx::CommandEvent], + EventType[''evt_text_enter'', 1, + Wx::EVT_COMMAND_TEXT_ENTER, + Wx::CommandEvent], + EventType[''evt_text_maxlen'', 1, + Wx::EVT_COMMAND_TEXT_MAXLEN, + Wx::CommandEvent], + EventType[''evt_text_url'', 1, + Wx::EVT_COMMAND_TEXT_URL, + Wx::TextUrlEvent], + EventType[''evt_timer'', 1, + Wx::EVT_TIMER, + Wx::TimerEvent], + EventType[''evt_togglebutton'', 1, + Wx::EVT_COMMAND_TOGGLEBUTTON_CLICKED, + Wx::Event], + EventType[''evt_tool'', 1, + Wx::EVT_COMMAND_TOOL_CLICKED, + Wx::CommandEvent], + EventType[''evt_tool_enter'', 1, + Wx::EVT_COMMAND_TOOL_ENTER, + Wx::CommandEvent], + EventType[''evt_tool_range'', 2, + Wx::EVT_COMMAND_TOOL_CLICKED, + Wx::CommandEvent], + EventType[''evt_tool_rclicked'', 1, + Wx::EVT_COMMAND_TOOL_RCLICKED, + Wx::CommandEvent], + EventType[''evt_tool_rclicked_range'', 2, + Wx::EVT_COMMAND_TOOL_RCLICKED, + Wx::CommandEvent], + EventType[''evt_tree_begin_drag'', 1, + Wx::EVT_COMMAND_TREE_BEGIN_DRAG, + Wx::TreeEvent], + EventType[''evt_tree_begin_label_edit'', 1, + Wx::EVT_COMMAND_TREE_BEGIN_LABEL_EDIT, + Wx::TreeEvent], + EventType[''evt_tree_begin_rdrag'', 1, + Wx::EVT_COMMAND_TREE_BEGIN_RDRAG, + Wx::TreeEvent], + EventType[''evt_tree_delete_item'', 1, + Wx::EVT_COMMAND_TREE_DELETE_ITEM, + Wx::TreeEvent], + EventType[''evt_tree_end_drag'', 1, + Wx::EVT_COMMAND_TREE_END_DRAG, + Wx::TreeEvent], + EventType[''evt_tree_end_label_edit'', 1, + Wx::EVT_COMMAND_TREE_END_LABEL_EDIT, + Wx::TreeEvent], + EventType[''evt_tree_get_info'', 1, + Wx::EVT_COMMAND_TREE_GET_INFO, + Wx::TreeEvent], + EventType[''evt_tree_item_activated'', 1, + Wx::EVT_COMMAND_TREE_ITEM_ACTIVATED, + Wx::TreeEvent], + EventType[''evt_tree_item_collapsed'', 1, + Wx::EVT_COMMAND_TREE_ITEM_COLLAPSED, + Wx::TreeEvent], + EventType[''evt_tree_item_collapsing'', 1, + Wx::EVT_COMMAND_TREE_ITEM_COLLAPSING, + Wx::TreeEvent], + EventType[''evt_tree_item_expanded'', 1, + Wx::EVT_COMMAND_TREE_ITEM_EXPANDED, + Wx::TreeEvent], + EventType[''evt_tree_item_expanding'', 1, + Wx::EVT_COMMAND_TREE_ITEM_EXPANDING, + Wx::TreeEvent], + EventType[''evt_tree_item_middle_click'', 1, + Wx::EVT_COMMAND_TREE_ITEM_MIDDLE_CLICK, + Wx::TreeEvent], + EventType[''evt_tree_item_right_click'', 1, + Wx::EVT_COMMAND_TREE_ITEM_RIGHT_CLICK, + Wx::TreeEvent], + EventType[''evt_tree_key_down'', 1, + Wx::EVT_COMMAND_TREE_KEY_DOWN, + Wx::TreeEvent], + EventType[''evt_tree_sel_changed'', 1, + Wx::EVT_COMMAND_TREE_SEL_CHANGED, + Wx::TreeEvent], + EventType[''evt_tree_sel_changing'', 1, + Wx::EVT_COMMAND_TREE_SEL_CHANGING, + Wx::TreeEvent], + EventType[''evt_tree_set_info'', 1, + Wx::EVT_COMMAND_TREE_SET_INFO, + Wx::TreeEvent], + EventType[''evt_update_ui'', 1, + Wx::EVT_UPDATE_UI, + Wx::UpdateUIEvent], + EventType[''evt_update_ui_range'', 2, + Wx::EVT_UPDATE_UI, + Wx::UpdateUIEvent], + EventType[''evt_window_create'', 0, + Wx::EVT_CREATE, + Wx::WindowCreateEvent], + EventType[''evt_window_destroy'', 0, + Wx::EVT_DESTROY, + Wx::WindowDestroyEvent], + EventType[''evt_wizard_cancel'', 1, + Wx::EVT_WIZARD_CANCEL, + Wx::WizardEvent], + EventType[''evt_wizard_finished'', 1, + Wx::EVT_WIZARD_FINISHED, + Wx::WizardEvent], + EventType[''evt_wizard_help'', 1, + Wx::EVT_WIZARD_HELP, + Wx::WizardEvent], + EventType[''evt_wizard_page_changed'', 1, + Wx::EVT_WIZARD_PAGE_CHANGED, + Wx::WizardEvent], + EventType[''evt_wizard_page_changing'', 1, + Wx::EVT_WIZARD_PAGE_CHANGING, + Wx::WizardEvent] + ] + + # Loop over the event definitions to set up two things: + # 1) A hash mapping Event Type ids to event classes, used when events + # are fired to quickly look up the right type to yield + # 2) EvtHandler instance methods like evt_xxx to conveniently set + # up event handlers + EVENT_DEFINITIONS.each do | ev_type | + EVENT_TYPE_MAPPING[ev_type.const] = ev_type.evt_class + case ev_type.arity + when 0 # events without an id + class_eval %Q{ + def #{ev_type.name}(&block) + connect(Wx::ID_ANY, Wx::ID_ANY, #{ev_type.const}, &block) + end + } + when 1 # events with an id + class_eval %Q{ + def #{ev_type.name}(id, &block) + connect(id, Wx::ID_ANY, #{ev_type.const}, &block) + end + } + when 2 # events with id range + class_eval %Q{ + def #{ev_type.name}(first_id, last_id, &block) + connect(first_id, last_id, #{ev_type.const}, &block) + end + } + end </ins><span class="cx"> end </span><ins>+ + +# TODO +# if defined?(Wx::Scintilla) +# EVENT_TYPE_MAPPING.merge( +# Wx::EVT_SCI_CHANGE => Wx::ScintillaEvent, +# Wx::EVT_SCI_STYLENEEDED => Wx::ScintillaEvent, +# Wx::EVT_SCI_CHARADDED => Wx::ScintillaEvent, +# Wx::EVT_SCI_SAVEPOINTREACHED => Wx::ScintillaEvent, +# Wx::EVT_SCI_SAVEPOINTLEFT => Wx::ScintillaEvent, +# Wx::EVT_SCI_ROMODIFYATTEMPT => Wx::ScintillaEvent, +# Wx::EVT_SCI_KEY => Wx::ScintillaEvent, +# Wx::EVT_SCI_DOUBLECLICK => Wx::ScintillaEvent, +# Wx::EVT_SCI_UPDATEUI => Wx::ScintillaEvent, +# Wx::EVT_SCI_MODIFIED => Wx::ScintillaEvent, +# Wx::EVT_SCI_MACRORECORD => Wx::ScintillaEvent, +# Wx::EVT_SCI_MARGINCLICK => Wx::ScintillaEvent, +# Wx::EVT_SCI_NEEDSHOWN => Wx::ScintillaEvent, +# Wx::EVT_SCI_PAINTED => Wx::ScintillaEvent, +# Wx::EVT_SCI_USERLISTSELECTION => Wx::ScintillaEvent, +# Wx::EVT_SCI_URIDROPPED => Wx::ScintillaEvent, +# Wx::EVT_SCI_DWELLSTART => Wx::ScintillaEvent, +# Wx::EVT_SCI_DWELLEND => Wx::ScintillaEvent, +# Wx::EVT_SCI_START_DRAG => Wx::ScintillaEvent, +# Wx::EVT_SCI_DRAG_OVER => Wx::ScintillaEvent, +# Wx::EVT_SCI_DO_DROP => Wx::ScintillaEvent, +# Wx::EVT_SCI_ZOOM => Wx::ScintillaEvent, +# Wx::EVT_SCI_HOTSPOT_CLICK => Wx::ScintillaEvent, +# Wx::EVT_SCI_HOTSPOT_DCLICK => Wx::ScintillaEvent, +# Wx::EVT_SCI_CALLTIP_CLICK => Wx::ScintillaEvent ) +# end </ins><span class="cx"> end </span><span class="cx"> </span></span></pre></div> <a id="trunkwxruby2rakerakewxrb"></a> <div class="modfile"><h4>Modified: trunk/wxruby2/rake/rakewx.rb (1066 => 1067)</h4> <pre class="diff"><span> <span class="info">--- trunk/wxruby2/rake/rakewx.rb        2007-06-25 17:42:15 UTC (rev 1066) +++ trunk/wxruby2/rake/rakewx.rb        2007-06-25 17:45:50 UTC (rev 1067) </span><span class="lines">@@ -114,7 +114,7 @@ </span><span class="cx"> end </span><span class="cx"> </span><span class="cx"> def all_obj_bases </span><del>- extra_classes = %w|wx RubyConstants RubyStockObjects Functions Mac Events| </del><ins>+ extra_classes = %w|wx RubyConstants RubyStockObjects Functions Mac| </ins><span class="cx"> return get_classes + get_optional_classes + extra_classes </span><span class="cx"> end </span><span class="cx"> </span><span class="lines">@@ -185,8 +185,6 @@ </span><span class="cx"> def add_initializers(cpp_file) </span><span class="cx"> needs_init_list = get_classes </span><span class="cx"> needs_init_list += get_optional_classes </span><del>- needs_init_list << "Events" - needs_init_list << "Events2" </del><span class="cx"> needs_init_list << "Functions" </span><span class="cx"> needs_init_list << "Mac" </span><span class="cx"> needs_init_list << "RubyConstants" </span><span class="lines">@@ -258,21 +256,6 @@ </span><span class="cx"> end </span><span class="cx"> end </span><span class="cx"> </span><del>-def create_swig_event_task(base_name) - cpp_file = cpp_file(base_name) - swig_file = special_swig_file(base_name) - events_src = File.join %w|swig classes include events.rb| - fixevents = File.join($swig_dir, "fixevents.rb") - - - file( cpp_file => [ swig_file, events_src, fixevents ] ) do | t | - do_swig(swig_file, cpp_file, $swig_options) - post_process(cpp_file, "fixmodule.rb") - post_process(cpp_file, "fixevents.rb") - end - return cpp_file -end - </del><span class="cx"> def create_swig_main_task(base_name) </span><span class="cx"> cpp_file = cpp_file(base_name) </span><span class="cx"> swig_file = special_swig_file(base_name) </span><span class="lines">@@ -295,7 +278,6 @@ </span><span class="cx"> create_swig_helper_task("RubyStockObjects") </span><span class="cx"> create_swig_helper_task("Functions") </span><span class="cx"> create_swig_helper_task("Mac") </span><del>- create_swig_event_task("Events") </del><span class="cx"> create_swig_main_task("wx") </span><span class="cx"> file(cpp_file("wx") => normal_cpp_files) </span><span class="cx"> end </span></span></pre></div> <a id="trunkwxruby2swigclassesincludeeventsrb"></a> <div class="delfile"><h4>Deleted: trunk/wxruby2/swig/classes/include/events.rb (1066 => 1067)</h4> <pre class="diff"><span> <span class="info">--- trunk/wxruby2/swig/classes/include/events.rb        2007-06-25 17:42:15 UTC (rev 1066) +++ trunk/wxruby2/swig/classes/include/events.rb        2007-06-25 17:45:50 UTC (rev 1067) </span><span class="lines">@@ -1,276 +0,0 @@ </span><del>-# This describes the event types known to wxRuby. It is used by -# swig/fixevents.rb to automatically generate a set of evt_xxx methods -# for binding events -# -# In each array: -# * the first item is the name of the method that will be created -# * the second item is the number of parameters the method expects -# * the third item is the mapping to an wx event type constant -# (see RubyEventTypes.i) - -$events = [ -["EVT_TREE_END_DRAG", 2, "wxEVT_COMMAND_TREE_END_DRAG"], -["EVT_COMMAND_LEFT_CLICK", 2, "wxEVT_COMMAND_LEFT_CLICK"], -["EVT_SASH_DRAGGED", 2, "wxEVT_SASH_DRAGGED"], -["EVT_MIDDLE_DCLICK", 1, "wxEVT_MIDDLE_DCLICK"], -["EVT_GRID_CELL_RIGHT_DCLICK", 1, "wxEVT_GRID_CELL_RIGHT_DCLICK"], -["EVT_GRID_CMD_CELL_RIGHT_DCLICK", 2, "wxEVT_GRID_CELL_RIGHT_DCLICK"], -["EVT_TREE_KEY_DOWN", 2, "wxEVT_COMMAND_TREE_KEY_DOWN"], -["EVT_LIST_INSERT_ITEM", 2, "wxEVT_COMMAND_LIST_INSERT_ITEM"], -["EVT_RIGHT_UP", 1, "wxEVT_RIGHT_UP"], -["EVT_TOOL_RCLICKED_RANGE", 3, "wxEVT_COMMAND_TOOL_RCLICKED"], -["EVT_DIALUP_CONNECTED", 1, "wxEVT_DIALUP_CONNECTED"], -["EVT_HELP_RANGE", 3, "wxEVT_HELP"], -["EVT_GRID_LABEL_RIGHT_DCLICK", 1, "wxEVT_GRID_LABEL_RIGHT_DCLICK"], -["EVT_GRID_CMD_LABEL_RIGHT_DCLICK", 2, "wxEVT_GRID_LABEL_RIGHT_DCLICK"], -["EVT_GRID_SELECT_CELL", 1, "wxEVT_GRID_SELECT_CELL"], -["EVT_GRID_CMD_SELECT_CELL", 2, "wxEVT_GRID_SELECT_CELL"], -["EVT_SPINCTRL", 2, "wxEVT_COMMAND_SPINCTRL_UPDATED"], -["EVT_SCROLLWIN_PAGEDOWN", 1, "wxEVT_SCROLLWIN_PAGEDOWN"], -["EVT_LIST_ITEM_MIDDLE_CLICK", 2, "wxEVT_COMMAND_LIST_ITEM_MIDDLE_CLICK"], -["EVT_CONTEXT_MENU", 1, "wxEVT_CONTEXT_MENU"], -["EVT_LIST_COL_RIGHT_CLICK", 2, "wxEVT_COMMAND_LIST_COL_RIGHT_CLICK"], -["EVT_JOY_ZMOVE", 1, "wxEVT_JOY_ZMOVE"], -["EVT_CHAR", 1, "wxEVT_CHAR"], -["EVT_GRID_CELL_LEFT_DCLICK", 1, "wxEVT_GRID_CELL_LEFT_DCLICK"], -["EVT_GRID_CMD_CELL_LEFT_DCLICK", 2, "wxEVT_GRID_CELL_LEFT_DCLICK"], -["EVT_TREE_GET_INFO", 2, "wxEVT_COMMAND_TREE_GET_INFO"], -["EVT_TASKBAR_RIGHT_UP", 1, "wxEVT_TASKBAR_RIGHT_UP"], -["EVT_LIST_ITEM_RIGHT_CLICK", 2, "wxEVT_COMMAND_LIST_ITEM_RIGHT_CLICK"], -["EVT_LIST_DELETE_ALL_ITEMS", 2, "wxEVT_COMMAND_LIST_DELETE_ALL_ITEMS"], -["EVT_SCROLLWIN_PAGEUP", 1, "wxEVT_SCROLLWIN_PAGEUP"], -["EVT_SCROLLWIN_LINEUP", 1, "wxEVT_SCROLLWIN_LINEUP"], -["EVT_LIST_BEGIN_RDRAG", 2, "wxEVT_COMMAND_LIST_BEGIN_RDRAG"], -["EVT_LEFT_DCLICK", 1, "wxEVT_LEFT_DCLICK"], -["EVT_FIND", 2, "wxEVT_COMMAND_FIND"], -["EVT_LIST_ITEM_FOCUSED", 2, "wxEVT_COMMAND_LIST_ITEM_FOCUSED"], -["EVT_SPIN", 2, "wxEVT_SCROLL_THUMBTRACK"], -#["EVT_LIST_GET_INFO", 2, "wxEVT_COMMAND_LIST_GET_INFO"], -["EVT_SIZE", 1, "wxEVT_SIZE"], -["EVT_RIGHT_DOWN", 1, "wxEVT_RIGHT_DOWN"], -["EVT_ENTER_WINDOW", 1, "wxEVT_ENTER_WINDOW"], -["EVT_ACTIVATE", 1, "wxEVT_ACTIVATE"], -["EVT_IDLE", 1, "wxEVT_IDLE"], -["EVT_GRID_CELL_RIGHT_CLICK", 1, "wxEVT_GRID_CELL_RIGHT_CLICK"], -["EVT_GRID_CMD_CELL_RIGHT_CLICK", 2, "wxEVT_GRID_CELL_RIGHT_CLICK"], -["EVT_GRID_LABEL_LEFT_CLICK", 1, "wxEVT_GRID_LABEL_LEFT_CLICK"], -["EVT_GRID_CMD_LABEL_LEFT_CLICK", 2, "wxEVT_GRID_LABEL_LEFT_CLICK"], -["EVT_TREE_ITEM_EXPANDED", 2, "wxEVT_COMMAND_TREE_ITEM_EXPANDED"], -["EVT_TAB_SEL_CHANGING", 2, "wxEVT_TAB_SEL_CHANGING"], -["EVT_TEXT", 2, "wxEVT_COMMAND_TEXT_UPDATED"], -["EVT_MOTION", 1, "wxEVT_MOTION"], -["EVT_TEXT_ENTER", 2, "wxEVT_COMMAND_TEXT_ENTER"], -["EVT_WIZARD_PAGE_CHANGED", 2, "wxEVT_WIZARD_PAGE_CHANGED"], -["EVT_TREE_ITEM_EXPANDING", 2, "wxEVT_COMMAND_TREE_ITEM_EXPANDING"], -["EVT_LIST_ITEM_ACTIVATED", 2, "wxEVT_COMMAND_LIST_ITEM_ACTIVATED"], -["EVT_LIST_COL_DRAGGING", 2, "wxEVT_COMMAND_LIST_COL_DRAGGING"], -["EVT_DIALUP_DISCONNECTED", 1, "wxEVT_DIALUP_DISCONNECTED"], -["EVT_LIST_COL_BEGIN_DRAG", 2, "wxEVT_COMMAND_LIST_COL_BEGIN_DRAG"], -["EVT_END_PROCESS", 2, "wxEVT_END_PROCESS"], -["EVT_CALENDAR_MONTH", 2, "wxEVT_CALENDAR_MONTH_CHANGED"], -["EVT_TREE_BEGIN_DRAG", 2, "wxEVT_COMMAND_TREE_BEGIN_DRAG"], -["EVT_GRID_RANGE_SELECT", 1, "wxEVT_GRID_RANGE_SELECT"], -["EVT_GRID_CMD_RANGE_SELECT", 2, "wxEVT_GRID_RANGE_SELECT"], -["EVT_LIST_END_LABEL_EDIT", 2, "wxEVT_COMMAND_LIST_END_LABEL_EDIT"], -["EVT_INIT_DIALOG", 1, "wxEVT_INIT_DIALOG"], -["EVT_CHOICEBOOK_PAGE_CHANGED", 2, "wxEVT_COMMAND_CHOICEBOOK_PAGE_CHANGED"], -["EVT_NOTEBOOK_PAGE_CHANGED", 2, "wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED"], -["EVT_LISTBOOK_PAGE_CHANGED", 2, "wxEVT_COMMAND_LISTBOOK_PAGE_CHANGED"], -["EVT_TASKBAR_LEFT_DCLICK", 1, "wxEVT_TASKBAR_LEFT_DCLICK"], -["EVT_LIST_BEGIN_LABEL_EDIT", 2, "wxEVT_COMMAND_LIST_BEGIN_LABEL_EDIT"], -["EVT_BUTTON", 2, "wxEVT_COMMAND_BUTTON_CLICKED"], -["EVT_CALENDAR_SEL_CHANGED", 2, "wxEVT_CALENDAR_SEL_CHANGED"], -["EVT_MENU", 2, "wxEVT_COMMAND_MENU_SELECTED"], -["EVT_MIDDLE_UP", 1, "wxEVT_MIDDLE_UP"], -["EVT_SPIN_DOWN", 2, "wxEVT_SCROLL_LINEDOWN"], -["EVT_LEFT_DOWN", 1, "wxEVT_LEFT_DOWN"], -["EVT_ICONIZE", 1, "wxEVT_ICONIZE"], -["EVT_TOOL_ENTER", 2, "wxEVT_COMMAND_TOOL_ENTER"], -["EVT_JOY_MOVE", 1, "wxEVT_JOY_MOVE"], -["EVT_MENU_OPEN", 1, "wxEVT_MENU_OPEN"], -["EVT_LIST_KEY_DOWN", 2, "wxEVT_COMMAND_LIST_KEY_DOWN"], -["EVT_WIZARD_FINISHED", 2, "wxEVT_WIZARD_FINISHED"], -["EVT_SCROLLWIN_LINEDOWN", 1, "wxEVT_SCROLLWIN_LINEDOWN"], -["EVT_SCROLLWIN_TOP", 1, "wxEVT_SCROLLWIN_TOP"], -["EVT_SET_FOCUS", 1, "wxEVT_SET_FOCUS"], -["EVT_CHECKBOX", 2, "wxEVT_COMMAND_CHECKBOX_CLICKED"], -["EVT_LEFT_UP", 1, "wxEVT_LEFT_UP"], -["EVT_PAINT", 1, "wxEVT_PAINT"], -["EVT_GRID_EDITOR_HIDDEN", 1, "wxEVT_GRID_EDITOR_HIDDEN"], -["EVT_GRID_CMD_EDITOR_HIDDEN", 2, "wxEVT_GRID_EDITOR_HIDDEN"], -["EVT_GRID_CELL_CHANGE", 1, "wxEVT_GRID_CELL_CHANGE"], -["EVT_GRID_CMD_CELL_CHANGE", 2, "wxEVT_GRID_CELL_CHANGE"], -["EVT_TREE_SET_INFO", 2, "wxEVT_COMMAND_TREE_SET_INFO"], -["EVT_TOGGLEBUTTON", 2, "wxEVT_COMMAND_TOGGLEBUTTON_CLICKED"], -["EVT_SPLITTER_SASH_POS_CHANGED", 2, "wxEVT_COMMAND_SPLITTER_SASH_POS_CHANGED"], -["EVT_MIDDLE_DOWN", 1, "wxEVT_MIDDLE_DOWN"], -["EVT_CALENDAR_DAY", 2, "wxEVT_CALENDAR_DAY_CHANGED"], -["EVT_TOOL_RANGE", 3, "wxEVT_COMMAND_TOOL_CLICKED"], -["EVT_LISTBOX", 2, "wxEVT_COMMAND_LISTBOX_SELECTED"], -["EVT_FIND_REPLACE", 2, "wxEVT_COMMAND_FIND_REPLACE"], -["EVT_END_SESSION", 1, "wxEVT_END_SESSION"], -["EVT_SPLITTER_UNSPLIT", 2, "wxEVT_COMMAND_SPLITTER_UNSPLIT"], -["EVT_MOVE", 1, "wxEVT_MOVE"], -["EVT_ERASE_BACKGROUND", 1, "wxEVT_ERASE_BACKGROUND"], -["EVT_FIND_REPLACE_ALL", 2, "wxEVT_COMMAND_FIND_REPLACE_ALL"], -["EVT_GRID_COL_SIZE", 1, "wxEVT_GRID_COL_SIZE"], -["EVT_GRID_CMD_COL_SIZE", 2, "wxEVT_GRID_COL_SIZE"], -["EVT_UPDATE_UI", 2, "wxEVT_UPDATE_UI"], -["EVT_TREE_ITEM_MIDDLE_CLICK", 2, "wxEVT_COMMAND_TREE_ITEM_MIDDLE_CLICK"], -["EVT_TREE_ITEM_COLLAPSING", 2, "wxEVT_COMMAND_TREE_ITEM_COLLAPSING"], -["EVT_MOUSEWHEEL", 1, "wxEVT_MOUSEWHEEL"], -["EVT_COMMAND_RANGE", 3, "wxEVT_NULL"], -["EVT_CHOICEBOOK_PAGE_CHANGING", 2, "wxEVT_COMMAND_CHOICEBOOK_PAGE_CHANGING"], -["EVT_NOTEBOOK_PAGE_CHANGING", 2, "wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGING"], -["EVT_LISTBOOK_PAGE_CHANGING", 2, "wxEVT_COMMAND_LISTBOOK_PAGE_CHANGING"], -["EVT_TEXT_URL", 2, "wxEVT_COMMAND_TEXT_URL"], -["EVT_SCROLLWIN_THUMBTRACK", 1, "wxEVT_SCROLLWIN_THUMBTRACK"], -["EVT_GRID_EDITOR_CREATED", 1, "wxEVT_GRID_EDITOR_CREATED"], -["EVT_GRID_CMD_EDITOR_CREATED", 2, "wxEVT_GRID_EDITOR_CREATED"], -["EVT_TREE_ITEM_ACTIVATED", 2, "wxEVT_COMMAND_TREE_ITEM_ACTIVATED"], -["EVT_TREE_END_LABEL_EDIT", 2, "wxEVT_COMMAND_TREE_END_LABEL_EDIT"], -["EVT_SPLITTER_DCLICK", 2, "wxEVT_COMMAND_SPLITTER_DOUBLECLICKED"], -["EVT_LIST_CACHE_HINT", 2, "wxEVT_COMMAND_LIST_CACHE_HINT"], -["EVT_CHECKLISTBOX", 2, "wxEVT_COMMAND_CHECKLISTBOX_TOGGLED"], -["EVT_SPIN_UP", 2, "wxEVT_SCROLL_LINEUP"], -["EVT_GRID_CELL_LEFT_CLICK", 1, "wxEVT_GRID_CELL_LEFT_CLICK"], -["EVT_GRID_CMD_CELL_LEFT_CLICK", 2, "wxEVT_GRID_CELL_LEFT_CLICK"], -["EVT_TASKBAR_LEFT_UP", 1, "wxEVT_TASKBAR_LEFT_UP"], -["EVT_SYS_COLOUR_CHANGED", 1, "wxEVT_SYS_COLOUR_CHANGED"], -["EVT_KEY_DOWN", 1, "wxEVT_KEY_DOWN"], -["EVT_COMMAND_SET_FOCUS", 2, "wxEVT_COMMAND_SET_FOCUS"], -["EVT_GRID_EDITOR_SHOWN", 1, "wxEVT_GRID_EDITOR_SHOWN"], -["EVT_GRID_CMD_EDITOR_SHOWN", 2, "wxEVT_GRID_EDITOR_SHOWN"], -["EVT_TASKBAR_LEFT_DOWN", 1, "wxEVT_TASKBAR_LEFT_DOWN"], -["EVT_SASH_DRAGGED_RANGE", 3, "wxEVT_SASH_DRAGGED"], -["EVT_GRID_ROW_SIZE", 1, "wxEVT_GRID_ROW_SIZE"], -["EVT_GRID_CMD_ROW_SIZE", 2, "wxEVT_GRID_ROW_SIZE"], -["EVT_MOUSE_CAPTURE_CHANGED", 1, "wxEVT_MOUSE_CAPTURE_CHANGED"], -["EVT_COMMAND", 1, "wxEVT_NULL"], -["EVT_CALENDAR_YEAR", 2, "wxEVT_CALENDAR_YEAR_CHANGED"], -["EVT_CALCULATE_LAYOUT", 1, "wxEVT_CALCULATE_LAYOUT"], -["EVT_LIST_BEGIN_DRAG", 2, "wxEVT_COMMAND_LIST_BEGIN_DRAG"], -["EVT_GRID_LABEL_LEFT_DCLICK", 1, "wxEVT_GRID_LABEL_LEFT_DCLICK"], -["EVT_GRID_CMD_LABEL_LEFT_DCLICK", 2, "wxEVT_GRID_LABEL_LEFT_DCLICK"], -["EVT_TREE_ITEM_RIGHT_CLICK", 2, "wxEVT_COMMAND_TREE_ITEM_RIGHT_CLICK"], -["EVT_TASKBAR_RIGHT_DCLICK", 1, "wxEVT_TASKBAR_RIGHT_DCLICK"], -["EVT_SCROLLWIN", 1, "0"], -["EVT_LEAVE_WINDOW", 1, "wxEVT_LEAVE_WINDOW"], -["EVT_COMMAND_LEFT_DCLICK", 2, "wxEVT_COMMAND_LEFT_DCLICK"], -#["EVT_LIST_SET_INFO", 2, "wxEVT_COMMAND_LIST_SET_INFO"], -["EVT_WIZARD_HELP", 2, "wxEVT_WIZARD_HELP"], -["EVT_TAB_SEL_CHANGED", 2, "wxEVT_TAB_SEL_CHANGED"], -["EVT_KEY_UP", 1, "wxEVT_KEY_UP"], -["EVT_COMMAND_RIGHT_CLICK", 2, "wxEVT_COMMAND_RIGHT_CLICK"], -["EVT_RIGHT_DCLICK", 1, "wxEVT_RIGHT_DCLICK"], -["EVT_GRID_LABEL_RIGHT_CLICK", 1, "wxEVT_GRID_LABEL_RIGHT_CLICK"], -["EVT_GRID_CMD_LABEL_RIGHT_CLICK", 2, "wxEVT_GRID_LABEL_RIGHT_CLICK"], -["EVT_MENU_RANGE", 3, "wxEVT_COMMAND_MENU_SELECTED"], -["EVT_JOY_BUTTON_DOWN", 1, "wxEVT_JOY_BUTTON_DOWN"], -["EVT_TREE_SEL_CHANGING", 2, "wxEVT_COMMAND_TREE_SEL_CHANGING"], -["EVT_FIND_CLOSE", 2, "wxEVT_COMMAND_FIND_CLOSE"], -["EVT_SPLITTER_SASH_POS_CHANGING", 2, "wxEVT_COMMAND_SPLITTER_SASH_POS_CHANGING"], -["EVT_SCROLLWIN_BOTTOM", 1, "wxEVT_SCROLLWIN_TOP"], -["EVT_DROP_FILES", 1, "wxEVT_DROP_FILES"], -["EVT_TREE_DELETE_ITEM", 2, "wxEVT_COMMAND_TREE_DELETE_ITEM"], -["EVT_TREE_BEGIN_LABEL_EDIT", 2, "wxEVT_COMMAND_TREE_BEGIN_LABEL_EDIT"], -["EVT_MENU_HIGHLIGHT", 2, "wxEVT_MENU_HIGHLIGHT"], -["EVT_LIST_ITEM_SELECTED", 2, "wxEVT_COMMAND_LIST_ITEM_SELECTED"], -["EVT_SLIDER", 2, "wxEVT_COMMAND_SLIDER_UPDATED"], -["EVT_COMMAND_ENTER", 2, "wxEVT_COMMAND_ENTER"], -["EVT_FIND_NEXT", 2, "wxEVT_COMMAND_FIND_NEXT"], -["EVT_RADIOBUTTON", 2, "wxEVT_COMMAND_RADIOBUTTON_SELECTED"], -["EVT_COMMAND_KILL_FOCUS", 2, "wxEVT_COMMAND_KILL_FOCUS"], -["EVT_QUERY_LAYOUT_INFO", 1, "wxEVT_QUERY_LAYOUT_INFO"], -["EVT_WIZARD_CANCEL", 2, "wxEVT_WIZARD_CANCEL"], -["EVT_TREE_SEL_CHANGED", 2, "wxEVT_COMMAND_TREE_SEL_CHANGED"], -["EVT_TREE_ITEM_COLLAPSED", 2, "wxEVT_COMMAND_TREE_ITEM_COLLAPSED"], -["EVT_SCROLLWIN_THUMBRELEASE", 1, "wxEVT_SCROLLWIN_THUMBRELEASE"], -["EVT_CALENDAR_WEEKDAY_CLICKED", 2, "wxEVT_CALENDAR_WEEKDAY_CLICKED"], -["EVT_WIZARD_PAGE_CHANGING", 2, "wxEVT_WIZARD_PAGE_CHANGING"], -["EVT_TASKBAR_RIGHT_DOWN", 1, "wxEVT_TASKBAR_RIGHT_DOWN"], -["EVT_TOOL_RCLICKED", 2, "wxEVT_COMMAND_TOOL_RCLICKED"], -["EVT_CLOSE", 1, "wxEVT_CLOSE_WINDOW"], -["EVT_MAXIMIZE", 1, "wxEVT_MAXIMIZE"], -["EVT_LIST_COL_END_DRAG", 2, "wxEVT_COMMAND_LIST_COL_END_DRAG"], -["EVT_RADIOBOX", 2, "wxEVT_COMMAND_RADIOBOX_SELECTED"], -["EVT_ACTIVATE_APP", 1, "wxEVT_ACTIVATE_APP"], -["EVT_TEXT_MAXLEN", 2, "wxEVT_COMMAND_TEXT_MAXLEN"], -["EVT_MENU_CLOSE", 1, "wxEVT_MENU_CLOSE"], -["EVT_QUERY_END_SESSION", 1, "wxEVT_QUERY_END_SESSION"], -["EVT_LIST_ITEM_DESELECTED", 2, "wxEVT_COMMAND_LIST_ITEM_DESELECTED"], -["EVT_TOOL", 2, "wxEVT_COMMAND_TOOL_CLICKED"], -["EVT_LIST_DELETE_ITEM", 2, "wxEVT_COMMAND_LIST_DELETE_ITEM"], -["EVT_MOUSE_EVENTS", 1, "0"], -["EVT_COMBOBOX", 2, "wxEVT_COMMAND_COMBOBOX_SELECTED"], -["EVT_LIST_COL_CLICK", 2, "wxEVT_COMMAND_LIST_COL_CLICK"], -["EVT_LISTBOX_DCLICK", 2, "wxEVT_COMMAND_LISTBOX_DOUBLECLICKED"], -["EVT_CHOICE", 2, "wxEVT_COMMAND_CHOICE_SELECTED"], -["EVT_TREE_BEGIN_RDRAG", 2, "wxEVT_COMMAND_TREE_BEGIN_RDRAG"], -["EVT_SOCKET", 2, "wxEVT_SOCKET"], -["EVT_CALENDAR", 2, "wxEVT_CALENDAR_DOUBLECLICKED"], -["EVT_SCROLLBAR", 2, "wxEVT_COMMAND_SCROLLBAR_UPDATED"], -["EVT_MENU_HIGHLIGHT_ALL", 1, "wxEVT_MENU_HIGHLIGHT"], -["EVT_UPDATE_UI_RANGE", 3, "wxEVT_UPDATE_UI"], -["EVT_HELP", 2, "wxEVT_HELP"], -["EVT_JOY_BUTTON_UP", 1, "wxEVT_JOY_BUTTON_UP"], -["EVT_TASKBAR_MOVE", 1, "wxEVT_TASKBAR_MOVE"], -["EVT_KILL_FOCUS", 1, "wxEVT_KILL_FOCUS"], -["EVT_TIMER", 2, "wxEVT_TIMER"], -["EVT_WINDOW_CREATE", 1, "wxEVT_CREATE"], -["EVT_WINDOW_DESTROY", 1, "wxEVT_DESTROY"], -["EVT_SCROLL", 1, "0"], -["EVT_SCROLL_TOP", 1, "wxEVT_SCROLL_TOP"], -["EVT_SCROLL_BOTTOM", 1, "wxEVT_SCROLL_BOTTOM"], -["EVT_SCROLL_LINEUP", 1, "wxEVT_SCROLL_LINEUP"], -["EVT_SCROLL_LINEDOWN", 1,"wxEVT_SCROLL_LINEDOWN"], -["EVT_SCROLL_PAGEUP", 1, "wxEVT_SCROLL_PAGEUP"], -["EVT_SCROLL_PAGEDOWN", 1, "wxEVT_SCROLL_PAGEDOWN"], -["EVT_SCROLL_THUMBTRACK", 1, "wxEVT_SCROLL_THUMBTRACK"], -["EVT_SCROLL_THUMBRELEASE", 1, "wxEVT_SCROLL_THUMBRELEASE"], -["EVT_AUI_PANE_BUTTON", 1, "wxEVT_AUI_PANE_BUTTON"], -["EVT_AUI_PANE_CLOSE", 1, "wxEVT_AUI_PANE_CLOSE"], -["EVT_AUI_PANE_MAXIMIZE", 1, "wxEVT_AUI_PANE_MAXIMIZE"], -["EVT_AUI_PANE_RESTORE", 1, "wxEVT_AUI_PANE_RESTORE"], -["EVT_AUI_RENDER", 1, "wxEVT_AUI_RENDER"], -["EVT_AUI_FIND_MANAGER", 1, "wxEVT_AUI_FIND_MANAGER"], -["EVT_AUINOTEBOOK_PAGE_CLOSE", 2, "wxEVT_COMMAND_AUINOTEBOOK_PAGE_CLOSE"], -["EVT_AUINOTEBOOK_PAGE_CHANGED", 2, "wxEVT_COMMAND_AUINOTEBOOK_PAGE_CHANGED"], -["EVT_AUINOTEBOOK_PAGE_CHANGING", 2, "wxEVT_COMMAND_AUINOTEBOOK_PAGE_CHANGING"], -["EVT_AUINOTEBOOK_BUTTON", 2, "wxEVT_COMMAND_AUINOTEBOOK_BUTTON"], -["EVT_AUINOTEBOOK_BEGIN_DRAG", 2, "wxEVT_COMMAND_AUINOTEBOOK_BEGIN_DRAG"], -["EVT_AUINOTEBOOK_END_DRAG", 2, "wxEVT_COMMAND_AUINOTEBOOK_END_DRAG"], -["EVT_AUINOTEBOOK_DRAG_MOTION", 2, "wxEVT_COMMAND_AUINOTEBOOK_DRAG_MOTION"], -["EVT_AUINOTEBOOK_ALLOW_DND", 2, "wxEVT_COMMAND_AUINOTEBOOK_ALLOW_DND"] -] - -if(ENV[''WXSCINTILLA'']) - sci_events = - [["EVT_SCI_CHANGE", 1, "wxEVT_SCI_CHANGE"], - ["EVT_SCI_STYLENEEDED", 1, "wxEVT_SCI_STYLENEEDED"], - ["EVT_SCI_CHARADDED", 1, "wxEVT_SCI_CHARADDED"], - ["EVT_SCI_SAVEPOINTREACHED", 1, "wxEVT_SCI_SAVEPOINTREACHED"], - ["EVT_SCI_SAVEPOINTLEFT", 1, "wxEVT_SCI_SAVEPOINTLEFT"], - ["EVT_SCI_ROMODIFYATTEMPT", 1, "wxEVT_SCI_ROMODIFYATTEMPT"], - ["EVT_SCI_KEY", 1, "wxEVT_SCI_KEY"], - ["EVT_SCI_DOUBLECLICK", 1, "wxEVT_SCI_DOUBLECLICK"], - ["EVT_SCI_UPDATEUI", 1, "wxEVT_SCI_UPDATEUI"], - ["EVT_SCI_MODIFIED", 1, "wxEVT_SCI_MODIFIED"], - ["EVT_SCI_MACRORECORD", 1, "wxEVT_SCI_MACRORECORD"], - ["EVT_SCI_MARGINCLICK", 1, "wxEVT_SCI_MARGINCLICK"], - ["EVT_SCI_NEEDSHOWN", 1, "wxEVT_SCI_NEEDSHOWN"], - ["EVT_SCI_PAINTED", 1, "wxEVT_SCI_PAINTED"], - ["EVT_SCI_USERLISTSELECTION", 1, "wxEVT_SCI_USERLISTSELECTION"], - ["EVT_SCI_URIDROPPED", 1, "wxEVT_SCI_URIDROPPED"], - ["EVT_SCI_DWELLSTART", 1, "wxEVT_SCI_DWELLSTART"], - ["EVT_SCI_DWELLEND", 1, "wxEVT_SCI_DWELLEND"], - ["EVT_SCI_START_DRAG", 1, "wxEVT_SCI_START_DRAG"], - ["EVT_SCI_DRAG_OVER", 1, "wxEVT_SCI_DRAG_OVER"], - ["EVT_SCI_DO_DROP", 1, "wxEVT_SCI_DO_DROP"], - ["EVT_SCI_ZOOM", 1, "wxEVT_SCI_ZOOM"], - ["EVT_SCI_HOTSPOT_CLICK", 1, "wxEVT_SCI_HOTSPOT_CLICK"], - ["EVT_SCI_HOTSPOT_DCLICK", 1, "wxEVT_SCI_HOTSPOT_DCLICK"], - ["EVT_SCI_CALLTIP_CLICK", 1, "wxEVT_SCI_CALLTIP_CLICK"], - ] - $events = $events + sci_events -end </del></span></pre></div> <a id="trunkwxruby2swigfixeventsrb"></a> <div class="delfile"><h4>Deleted: trunk/wxruby2/swig/fixevents.rb (1066 => 1067)</h4> <pre class="diff"><span> <span class="info">--- trunk/wxruby2/swig/fixevents.rb        2007-06-25 17:42:15 UTC (rev 1066) +++ trunk/wxruby2/swig/fixevents.rb        2007-06-25 17:45:50 UTC (rev 1067) </span><span class="lines">@@ -1,100 +0,0 @@ </span><del>-# Copyright 2004-2007 by Kevin Smith -# released under the MIT-style wxruby2 license - -# This script post-processes SWIG''s output of swig/Events.i to add in -# all the event handler methods (evt_xxx) to classes that inherit from -# EvtHandler. It reads ''swig/classes/include/events.rb'' which contains -# definitions for every event type, and adds the relevant methods to the -# EvtHandler class. - -# Load the $events global array of type definitions -require ''swig/classes/include/events'' - -# Little class to make accessing Event Type info a bit easier below -class WxEventType < Struct.new(:name, :type, :wx_const) - # Events in Wx but not exposed in WxRuby (b/c they cause problems) - EXCLUDED = [ /^EVT_TAB/, ''EVT_COMMAND'' ] - # These event types only work on Windows - WINDOWS_ONLY = [ /^EVT_DIALUP/ ] - - def initialize(*args) - super - @excluded = true if EXCLUDED.any? { | x | x === name } - @win_only = true if WINDOWS_ONLY.any? { | x | x === name } - end - - def excluded? - @excluded - end - - def windows_only? - @win_only - end -end - -# Convert the raw arrays into informative event type objects -$events.map! { | x | WxEventType[ *x ] } - -# Append this stuff to the default SWIG Events.i file -File.open(ARGV[0], "a") do | out | - # First we loop over the events creating short C++ functions to hook - # up events for each - $events.each do | evt | - next if evt.excluded? - - if evt.name =="EVT_MOUSE_EVENTS" - out.puts <<FUNC_DEF -static VALUE evt_mouse_events(int argc, VALUE *argv, VALUE self) -{ - evt_left_down(argc,argv,self); - evt_left_up(argc,argv,self); - evt_middle_down(argc,argv,self); - evt_middle_up(argc,argv,self); - evt_right_down(argc,argv,self); - evt_right_up(argc,argv,self); - evt_motion(argc,argv,self); - evt_left_dclick(argc,argv,self); - evt_middle_dclick(argc,argv,self); - evt_right_dclick(argc,argv,self); - evt_leave_window(argc,argv,self); - evt_enter_window(argc,argv,self); - return evt_mousewheel(argc,argv,self); -} -FUNC_DEF - next - end - - func = case evt.type - when 1 : "internal_evt_no_parameters" - when 2 : "internal_evt_with_id" - when 3 : "internal_evt_with_id_range" - end - - out.puts "#ifdef __WXMSW__" if evt.windows_only? - out.puts <<FUNC_DEF -static VALUE #{evt.name.downcase}(int argc, VALUE *argv, VALUE self) - { return #{func}(argc, argv, self, #{evt.wx_const}); } - -FUNC_DEF - out.puts "#endif //__WXMSW__" if evt.windows_only? - end - - # Then we loop over the events and register the ruby method for each - out.puts <<INIT_FUNC -extern "C" { -void Init_wxEvents2() -{ -INIT_FUNC - $events.each do | evt | - next if evt.excluded? - - out.puts "#ifdef __WXMSW__" if evt.windows_only? - out.puts <<REGISTER_FUNC -        rb_define_method(cWxEvtHandler.klass, \"#{evt.name.downcase}\", VALUEFUNC(#{evt.name.downcase}),-1); -REGISTER_FUNC - out.puts "#endif //__WXMSW__" if evt.windows_only? - end - - out.puts "}" - out.puts "}" -end </del></span></pre> </div> </div> </body> </html>
Possibly Parallel Threads
- [1042] trunk/wxruby2: Overhaul of the event handling WxType->RubyClass mapping to make it
- [ wxruby-Bugs-20211 ] Unresolved symbol due to linkage error
- Compiling problem on Ubuntu 9.10 64 bit
- [1091] trunk/wxruby2/lib/wx/classes/evthandler.rb: Add interim event type mappings for a few obscure oddities
- [1078] trunk/wxruby2: Map evt_spinctrl to SpinEvent instead of CommandEvent; add example to bigdemo