nobody at rubyforge.org
2007-May-31 18:35 UTC
[Wxruby-development] [1036] trunk/wxruby2: Merge RubyEventTypes into Events.i, add missing EVT_ constants for
<!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>[1036] trunk/wxruby2: Merge RubyEventTypes into Events.i, add missing EVT_ constants for</title> </head> <body> <div id="msg"> <dl> <dt>Revision</dt> <dd>1036</dd> <dt>Author</dt> <dd>brokentoy</dd> <dt>Date</dt> <dd>2007-05-31 14:35:32 -0400 (Thu, 31 May 2007)</dd> </dl> <h3>Log Message</h3> <pre>Merge RubyEventTypes into Events.i, add missing EVT_ constants for Wizard, Sash, Scroll, Grid, *Book</pre> <h3>Modified Paths</h3> <ul> <li><a href="#trunkwxruby2rakerakewxrb">trunk/wxruby2/rake/rakewx.rb</a></li> <li><a href="#trunkwxruby2swigEventsi">trunk/wxruby2/swig/Events.i</a></li> <li><a href="#trunkwxruby2swigclassesEvtHandleri">trunk/wxruby2/swig/classes/EvtHandler.i</a></li> <li><a href="#trunkwxruby2swigwxi">trunk/wxruby2/swig/wx.i</a></li> </ul> </div> <div id="patch"> <h3>Diff</h3> <a id="trunkwxruby2rakerakewxrb"></a> <div class="modfile"><h4>Modified: trunk/wxruby2/rake/rakewx.rb (1035 => 1036)</h4> <pre class="diff"><span> <span class="info">--- trunk/wxruby2/rake/rakewx.rb        2007-05-29 22:30:26 UTC (rev 1035) +++ trunk/wxruby2/rake/rakewx.rb        2007-05-31 18:35:32 UTC (rev 1036) </span><span class="lines">@@ -114,10 +114,7 @@ </span><span class="cx"> end </span><span class="cx"> </span><span class="cx"> def all_obj_bases </span><del>- extra_classes = - ["wx", "RubyConstants", "RubyStockObjects", - "RubyEventTypes", "Functions", "Mac", -                        "Events", ] </del><ins>+ extra_classes = %w|wx RubyConstants RubyStockObjects Functions Mac Events| </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">@@ -193,7 +190,6 @@ </span><span class="cx"> needs_init_list << "Functions" </span><span class="cx"> needs_init_list << "Mac" </span><span class="cx"> needs_init_list << "RubyConstants" </span><del>- needs_init_list << "RubyEventTypes" </del><span class="cx"> File.open(cpp_file, "a") do | out | </span><span class="cx"> out.puts </span><span class="cx"> out.puts(''extern "C" void InitializeOtherModules()'') </span><span class="lines">@@ -297,7 +293,6 @@ </span><span class="cx"> end </span><span class="cx"> create_swig_helper_task("RubyConstants") </span><span class="cx"> create_swig_helper_task("RubyStockObjects") </span><del>- create_swig_helper_task("RubyEventTypes") </del><span class="cx"> create_swig_helper_task("Functions") </span><span class="cx"> create_swig_helper_task("Mac") </span><span class="cx"> create_swig_event_task("Events") </span></span></pre></div> <a id="trunkwxruby2swigEventsi"></a> <div class="modfile"><h4>Modified: trunk/wxruby2/swig/Events.i (1035 => 1036)</h4> <pre class="diff"><span> <span class="info">--- trunk/wxruby2/swig/Events.i        2007-05-29 22:30:26 UTC (rev 1035) +++ trunk/wxruby2/swig/Events.i        2007-05-31 18:35:32 UTC (rev 1036) </span><span class="lines">@@ -32,6 +32,214 @@ </span><span class="cx"> %} </span><span class="cx"> </span><span class="cx"> </span><ins>+%constant const int wxEVT_NULL;// 0) +%constant const int wxEVT_COMMAND_BUTTON_CLICKED;// 1) +%constant const int wxEVT_COMMAND_CHECKBOX_CLICKED;// 2) +%constant const int wxEVT_COMMAND_CHOICE_SELECTED;// 3) +%constant const int wxEVT_COMMAND_LISTBOX_SELECTED;// 4) +%constant const int wxEVT_COMMAND_LISTBOX_DOUBLECLICKED;// 5) +%constant const int wxEVT_COMMAND_CHECKLISTBOX_TOGGLED;// 6) +%constant const int wxEVT_COMMAND_TEXT_UPDATED;// 7) +%constant const int wxEVT_COMMAND_TEXT_ENTER;// 8) +%constant const int wxEVT_COMMAND_TEXT_URL;// 13) +%constant const int wxEVT_COMMAND_TEXT_MAXLEN;// 14) +%constant const int wxEVT_COMMAND_MENU_SELECTED;// 9) +%constant const int wxEVT_COMMAND_SLIDER_UPDATED;// 10) +%constant const int wxEVT_COMMAND_RADIOBOX_SELECTED;// 11) +%constant const int wxEVT_COMMAND_RADIOBUTTON_SELECTED;// 12) +%constant const int wxEVT_COMMAND_SCROLLBAR_UPDATED;// 13) +%constant const int wxEVT_COMMAND_VLBOX_SELECTED;// 14) +%constant const int wxEVT_COMMAND_COMBOBOX_SELECTED;// 15) +%constant const int wxEVT_COMMAND_TOOL_RCLICKED;// 16) +%constant const int wxEVT_COMMAND_TOOL_ENTER;// 17) +%constant const int wxEVT_COMMAND_SPINCTRL_UPDATED;// 18) +%constant const int wxEVT_SOCKET;// 50) +%constant const int wxEVT_TIMER ;// 80) +%constant const int wxEVT_LEFT_DOWN;// 100) +%constant const int wxEVT_LEFT_UP;// 101) +%constant const int wxEVT_MIDDLE_DOWN;// 102) +%constant const int wxEVT_MIDDLE_UP;// 103) +%constant const int wxEVT_RIGHT_DOWN;// 104) +%constant const int wxEVT_RIGHT_UP;// 105) +%constant const int wxEVT_MOTION;// 106) +%constant const int wxEVT_ENTER_WINDOW;// 107) +%constant const int wxEVT_LEAVE_WINDOW;// 108) +%constant const int wxEVT_LEFT_DCLICK;// 109) +%constant const int wxEVT_MIDDLE_DCLICK;// 110) +%constant const int wxEVT_RIGHT_DCLICK;// 111) +%constant const int wxEVT_SET_FOCUS;// 112) +%constant const int wxEVT_KILL_FOCUS;// 113) +%constant const int wxEVT_CHILD_FOCUS;// 114) +%constant const int wxEVT_MOUSEWHEEL;// 115) +%constant const int wxEVT_NC_LEFT_DOWN;// 200) +%constant const int wxEVT_NC_LEFT_UP;// 201) +%constant const int wxEVT_NC_MIDDLE_DOWN;// 202) +%constant const int wxEVT_NC_MIDDLE_UP;// 203) +%constant const int wxEVT_NC_RIGHT_DOWN;// 204) +%constant const int wxEVT_NC_RIGHT_UP;// 205) +%constant const int wxEVT_NC_MOTION;// 206) +%constant const int wxEVT_NC_ENTER_WINDOW;// 207) +%constant const int wxEVT_NC_LEAVE_WINDOW;// 208) +%constant const int wxEVT_NC_LEFT_DCLICK;// 209) +%constant const int wxEVT_NC_MIDDLE_DCLICK;// 210) +%constant const int wxEVT_NC_RIGHT_DCLICK;// 211) +%constant const int wxEVT_CHAR;// 212) +%constant const int wxEVT_CHAR_HOOK;// 213) +%constant const int wxEVT_NAVIGATION_KEY;// 214) +%constant const int wxEVT_KEY_DOWN;// 215) +%constant const int wxEVT_KEY_UP;// 216) +%constant const int wxEVT_SET_CURSOR;// 230) +%constant const int wxEVT_SCROLL_TOP;// 300) +%constant const int wxEVT_SCROLL_BOTTOM;// 301) +%constant const int wxEVT_SCROLL_LINEUP;// 302) +%constant const int wxEVT_SCROLL_LINEDOWN;// 303) +%constant const int wxEVT_SCROLL_PAGEUP;// 304) +%constant const int wxEVT_SCROLL_PAGEDOWN;// 305) +%constant const int wxEVT_SCROLL_THUMBTRACK;// 306) +%constant const int wxEVT_SCROLL_THUMBRELEASE;// 307) +%constant const int wxEVT_SCROLL_ENDSCROLL;// 308) +%constant const int wxEVT_SCROLLWIN_TOP;// 320) +%constant const int wxEVT_SCROLLWIN_BOTTOM;// 321) +%constant const int wxEVT_SCROLLWIN_LINEUP;// 322) +%constant const int wxEVT_SCROLLWIN_LINEDOWN;// 323) +%constant const int wxEVT_SCROLLWIN_PAGEUP;// 324) +%constant const int wxEVT_SCROLLWIN_PAGEDOWN;// 325) +%constant const int wxEVT_SCROLLWIN_THUMBTRACK;// 326) +%constant const int wxEVT_SCROLLWIN_THUMBRELEASE;// 327) +%constant const int wxEVT_SIZE;// 400) +%constant const int wxEVT_MOVE;// 401) +%constant const int wxEVT_CLOSE_WINDOW;// 402) +%constant const int wxEVT_END_SESSION;// 403) +%constant const int wxEVT_QUERY_END_SESSION;// 404) +%constant const int wxEVT_ACTIVATE_APP;// 405) +#ifdef wxHAS_POWER_EVENTS // currently Win32 only +%constant const int wxEVT_POWER_SUSPENDING;// 406) +%constant const int wxEVT_POWER_SUSPENDED;// 407) +#endif +%constant const int wxEVT_ACTIVATE;// 409) +%constant const int wxEVT_CREATE;// 410) +%constant const int wxEVT_DESTROY;// 411) +%constant const int wxEVT_SHOW;// 412) +%constant const int wxEVT_ICONIZE;// 413) +%constant const int wxEVT_MAXIMIZE;// 414) +%constant const int wxEVT_MOUSE_CAPTURE_CHANGED;// 415) +%constant const int wxEVT_PAINT;// 416) +%constant const int wxEVT_ERASE_BACKGROUND;// 417) +%constant const int wxEVT_NC_PAINT;// 418) +%constant const int wxEVT_PAINT_ICON;// 419) +%constant const int wxEVT_MENU_OPEN;// 420) +%constant const int wxEVT_MENU_CLOSE;// 421) +%constant const int wxEVT_MENU_HIGHLIGHT;// 422) +// %constant const int wxEVT_POPUP_MENU_INIT;// 423) -- free slot +%constant const int wxEVT_CONTEXT_MENU;// 424) +%constant const int wxEVT_SYS_COLOUR_CHANGED;// 425) +%constant const int wxEVT_DISPLAY_CHANGED;// 426) +%constant const int wxEVT_SETTING_CHANGED;// 427) +%constant const int wxEVT_QUERY_NEW_PALETTE;// 428) +%constant const int wxEVT_PALETTE_CHANGED;// 429) +%constant const int wxEVT_JOY_BUTTON_DOWN;// 430) +%constant const int wxEVT_JOY_BUTTON_UP;// 431) +%constant const int wxEVT_JOY_MOVE;// 432) +%constant const int wxEVT_JOY_ZMOVE;// 433) +%constant const int wxEVT_DROP_FILES;// 434) +%constant const int wxEVT_DRAW_ITEM;// 435) +%constant const int wxEVT_MEASURE_ITEM;// 436) +%constant const int wxEVT_COMPARE_ITEM;// 437) +%constant const int wxEVT_INIT_DIALOG;// 438) +%constant const int wxEVT_IDLE;// 439) +%constant const int wxEVT_UPDATE_UI;// 440) +%constant const int wxEVT_COMMAND_LEFT_CLICK;// 500) +%constant const int wxEVT_COMMAND_LEFT_DCLICK;// 501) +%constant const int wxEVT_COMMAND_RIGHT_CLICK;// 502) +%constant const int wxEVT_COMMAND_RIGHT_DCLICK;// 503) +%constant const int wxEVT_COMMAND_SET_FOCUS;// 504) +%constant const int wxEVT_COMMAND_KILL_FOCUS;// 505) +%constant const int wxEVT_COMMAND_ENTER;// 506) +%constant const int wxEVT_COMMAND_FIND;// 510) +%constant const int wxEVT_COMMAND_FIND_NEXT;// 511) +%constant const int wxEVT_COMMAND_FIND_REPLACE;// 512) +%constant const int wxEVT_COMMAND_FIND_REPLACE_ALL;// 513) +%constant const int wxEVT_COMMAND_FIND_CLOSE;// 514) + + +%constant const int wxEVT_SCROLL_TOP; //300) +%constant const int wxEVT_SCROLL_BOTTOM; //301) +%constant const int wxEVT_SCROLL_LINEUP; //302) +%constant const int wxEVT_SCROLL_LINEDOWN; //303) +%constant const int wxEVT_SCROLL_PAGEUP; //304) +%constant const int wxEVT_SCROLL_PAGEDOWN; //305) +%constant const int wxEVT_SCROLL_THUMBTRACK; //306) +%constant const int wxEVT_SCROLL_THUMBRELEASE; //307) +%constant const int wxEVT_SCROLL_CHANGED; //308) + +%constant const int wxEVT_SCROLLWIN_TOP; //320) +%constant const int wxEVT_SCROLLWIN_BOTTOM; //321) +%constant const int wxEVT_SCROLLWIN_LINEUP; //322) +%constant const int wxEVT_SCROLLWIN_LINEDOWN; //323) +%constant const int wxEVT_SCROLLWIN_PAGEUP; //324) +%constant const int wxEVT_SCROLLWIN_PAGEDOWN; //325) +%constant const int wxEVT_SCROLLWIN_THUMBTRACK; //326) +%constant const int wxEVT_SCROLLWIN_THUMBRELEASE; //327) + +%constant const int wxEVT_HELP;// 1050) +%constant const int wxEVT_DETAILED_HELP;// 1051) + +%constant const int wxEVT_GRID_CELL_LEFT_CLICK; //1580) +%constant const int wxEVT_GRID_CELL_RIGHT_CLICK; //1581) +%constant const int wxEVT_GRID_CELL_LEFT_DCLICK; //1582) +%constant const int wxEVT_GRID_CELL_RIGHT_DCLICK; //1583) +%constant const int wxEVT_GRID_LABEL_LEFT_CLICK; //1584) +%constant const int wxEVT_GRID_LABEL_RIGHT_CLICK; //1585) +%constant const int wxEVT_GRID_LABEL_LEFT_DCLICK; //1586) +%constant const int wxEVT_GRID_LABEL_RIGHT_DCLICK; //1587) +%constant const int wxEVT_GRID_ROW_SIZE; //1588) +%constant const int wxEVT_GRID_COL_SIZE; //1589) +%constant const int wxEVT_GRID_RANGE_SELECT; //1590) +%constant const int wxEVT_GRID_CELL_CHANGE; //1591) +%constant const int wxEVT_GRID_SELECT_CELL; //1592) +%constant const int wxEVT_GRID_EDITOR_SHOWN; //1593) +%constant const int wxEVT_GRID_EDITOR_HIDDEN; //1594) +%constant const int wxEVT_GRID_EDITOR_CREATED; //1595) +%constant const int wxEVT_GRID_CELL_BEGIN_DRAG; //1596) + +%constant const int wxEVT_CALENDAR_SEL_CHANGED;//, 950) +%constant const int wxEVT_CALENDAR_DAY_CHANGED;//, 951) +%constant const int wxEVT_CALENDAR_MONTH_CHANGED;//, 952) +%constant const int wxEVT_CALENDAR_YEAR_CHANGED;//, 953) +%constant const int wxEVT_CALENDAR_DOUBLECLICKED;//, 954) +%constant const int wxEVT_CALENDAR_WEEKDAY_CLICKED;//, 955) + +%constant const int wxEVT_COMMAND_CHOICEBOOK_PAGE_CHANGING; +%constant const int wxEVT_COMMAND_CHOICEBOOK_PAGE_CHANGED; +%constant const int wxEVT_COMMAND_LISTBOOK_PAGE_CHANGING; +%constant const int wxEVT_COMMAND_LISTBOOK_PAGE_CHANGED; +%constant const int wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGING; +%constant const int wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED; + +%constant const int wxEVT_WIZARD_PAGE_CHANGED; //900) +%constant const int wxEVT_WIZARD_PAGE_CHANGING; //901) +%constant const int wxEVT_WIZARD_CANCEL; //902) +%constant const int wxEVT_WIZARD_HELP; //903) +%constant const int wxEVT_WIZARD_FINISHED; //903) + +%constant const int wxEVT_SASH_DRAGGED; + +%constant const int wxEVT_AUI_PANE_BUTTON; +%constant const int wxEVT_AUI_PANE_CLOSE; +%constant const int wxEVT_AUI_PANE_MAXIMIZE; +%constant const int wxEVT_AUI_PANE_RESTORE; +%constant const int wxEVT_AUI_RENDER; +%constant const int wxEVT_AUI_FIND_MANAGER; + +%constant const int wxEVT_COMMAND_AUINOTEBOOK_PAGE_CLOSE; +%constant const int wxEVT_COMMAND_AUINOTEBOOK_PAGE_CHANGED; +%constant const int wxEVT_COMMAND_AUINOTEBOOK_PAGE_CHANGING; +%constant const int wxEVT_COMMAND_AUINOTEBOOK_BUTTON; +%constant const int wxEVT_COMMAND_AUINOTEBOOK_BEGIN_DRAG; +%constant const int wxEVT_COMMAND_AUINOTEBOOK_END_DRAG; +%constant const int wxEVT_COMMAND_AUINOTEBOOK_DRAG_MOTION; +%constant const int wxEVT_COMMAND_AUINOTEBOOK_ALLOW_DND; + </ins><span class="cx"> ############################################################################# </span><span class="cx"> #### NOTE: Before adding anything below this line, consider whether it really </span><span class="cx"> #### belongs in swig/classes/include/events.rb instead!!! </span></span></pre></div> <a id="trunkwxruby2swigclassesEvtHandleri"></a> <div class="modfile"><h4>Modified: trunk/wxruby2/swig/classes/EvtHandler.i (1035 => 1036)</h4> <pre class="diff"><span> <span class="info">--- trunk/wxruby2/swig/classes/EvtHandler.i        2007-05-29 22:30:26 UTC (rev 1035) +++ trunk/wxruby2/swig/classes/EvtHandler.i        2007-05-31 18:35:32 UTC (rev 1036) </span><span class="lines">@@ -534,13 +534,6 @@ </span><span class="cx"> </span><span class="cx"> %} </span><span class="cx"> </span><del>-%init %{ -extern void Init_wxRubyEventTypes(); - -Init_wxRubyEventTypes(); -%} - - </del><span class="cx"> // The EvtHandler instance event methods (evt_xxx) are not defined </span><span class="cx"> // here. Instead, they are defined by Events.cpp, generated from </span><span class="cx"> // swig/Event.i and modified by swig/fixevents.rb </span></span></pre></div> <a id="trunkwxruby2swigwxi"></a> <div class="modfile"><h4>Modified: trunk/wxruby2/swig/wx.i (1035 => 1036)</h4> <pre class="diff"><span> <span class="info">--- trunk/wxruby2/swig/wx.i        2007-05-29 22:30:26 UTC (rev 1035) +++ trunk/wxruby2/swig/wx.i        2007-05-31 18:35:32 UTC (rev 1036) </span><span class="lines">@@ -13,8 +13,6 @@ </span><span class="cx"> #include <wx/filesys.h> </span><span class="cx"> #include <wx/fs_zip.h> </span><span class="cx"> </span><del>-extern "C" void Init_wxRubyEventTypes(); - </del><span class="cx"> // Code to be run when the ruby object is swept by GC - this only </span><span class="cx"> // unlinks the C++ object from the ruby VALUE but doesn''t delete </span><span class="cx"> // it because it is still needed and will be managed by WxWidgets. </span><span class="lines">@@ -61,9 +59,6 @@ </span><span class="cx"> InitializeOtherModules(); </span><span class="cx"> wxInitAllImageHandlers(); </span><span class="cx"> </span><del>-        // Load the event type constants -        Init_wxRubyEventTypes(); - </del><span class="cx">         // This is needed so HtmlHelp can load docs from a zip file </span><span class="cx">         wxFileSystem::AddHandler(new wxArchiveFSHandler); </span><span class="cx"> %} </span></span></pre> </div> </div> </body> </html>
Apparently Analagous Threads
- [1067] trunk/wxruby2: Set up event handlers in Ruby rather than by post-processing SWIG output
- [1037] trunk/wxruby2/swig/RubyEventTypes.i: RubyEventTypes is no longer needed - moved to Events.i
- [804] trunk/wxruby2/swig: Initialise stock colours (eg Wx::RED), pens and brushes when wxruby2 is
- [814] trunk/wxruby2/swig/classes: Added ScrollEvent class plus event processing and handler methods
- [1024] trunk/wxruby2/swig: Memory mgmt: defs and implementation of new memory management; strip