nobody at rubyforge.org
2007-May-31 21:14 UTC
[Wxruby-development] [1040] trunk/wxruby2/swig/Events.i: Add List and Splitter constants, also EVT_SIZING and EVT_MOVING
<!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>[1040] trunk/wxruby2/swig/Events.i: Add List and Splitter constants, also EVT_SIZING and EVT_MOVING</title> </head> <body> <div id="msg"> <dl> <dt>Revision</dt> <dd>1040</dd> <dt>Author</dt> <dd>brokentoy</dd> <dt>Date</dt> <dd>2007-05-31 17:14:53 -0400 (Thu, 31 May 2007)</dd> </dl> <h3>Log Message</h3> <pre>Add List and Splitter constants, also EVT_SIZING and EVT_MOVING</pre> <h3>Modified Paths</h3> <ul> <li><a href="#trunkwxruby2swigEventsi">trunk/wxruby2/swig/Events.i</a></li> </ul> </div> <div id="patch"> <h3>Diff</h3> <a id="trunkwxruby2swigEventsi"></a> <div class="modfile"><h4>Modified: trunk/wxruby2/swig/Events.i (1039 => 1040)</h4> <pre class="diff"><span> <span class="info">--- trunk/wxruby2/swig/Events.i        2007-05-31 20:37:30 UTC (rev 1039) +++ trunk/wxruby2/swig/Events.i        2007-05-31 21:14:53 UTC (rev 1040) </span><span class="lines">@@ -1,10 +1,30 @@ </span><del>-# Copyright 2004-2005 by Kevin Smith -# released under the MIT-style wxruby2 license </del><ins>+// Copyright 2004-2007 by Kevin Smith +// released under the MIT-style wxruby2 license </ins><span class="cx"> %include "common.i" </span><span class="cx"> </span><del>-%module(directors="1") wxEvents; </del><ins>+%module wxEvents; </ins><span class="cx"> </span><ins>+// This module defines all the EVT_ constants that uniquely identify +// each type of GUI event that WxWidgets can generate. +// +// SWIG''s output of this file is post-processed by swig/fixevents.rb in +// order to define a set of evt_xxx methods that all classes inheriting +// from EvtHandler should hae, in order to define event handlers in +// Ruby. +// +// To wrap a type of wx event that is missing: +// 1) Create a .i file to wrap the Event class +// 2) Add the appropriate EVT constants to this file +// 3) Add the mappings from these constants to the appropriate Ruby +// event class in lib/wx/classes/evthandler.rb +// 4) If this isn''t working, check that the event type is correclty defined +// in swig/classes/include/events.rb as this file is used by fixevents.rb +// to generate the event handler methods. + + + </ins><span class="cx"> %{ </span><ins>+ </ins><span class="cx"> //NO_CLASS - This tells fixmodule not to expect a class </span><span class="cx"> </span><span class="cx"> #include <wx/calctrl.h> </span><span class="lines">@@ -29,6 +49,7 @@ </span><span class="cx"> #ifdef WXSCINTILLA </span><span class="cx"> # include <wx/wxscintilla.h> </span><span class="cx"> #endif </span><ins>+ </ins><span class="cx"> %} </span><span class="cx"> </span><span class="cx"> </span><span class="lines">@@ -107,7 +128,10 @@ </span><span class="cx"> %constant const int wxEVT_SCROLLWIN_THUMBTRACK;// 326) </span><span class="cx"> %constant const int wxEVT_SCROLLWIN_THUMBRELEASE;// 327) </span><span class="cx"> %constant const int wxEVT_SIZE;// 400) </span><ins>+%constant const int wxEVT_SIZING; // Not exposed? </ins><span class="cx"> %constant const int wxEVT_MOVE;// 401) </span><ins>+%constant const int wxEVT_MOVING; // Not exposed? + </ins><span class="cx"> %constant const int wxEVT_CLOSE_WINDOW;// 402) </span><span class="cx"> %constant const int wxEVT_END_SESSION;// 403) </span><span class="cx"> %constant const int wxEVT_QUERY_END_SESSION;// 404) </span><span class="lines">@@ -184,6 +208,27 @@ </span><span class="cx"> %constant const int wxEVT_HELP;// 1050) </span><span class="cx"> %constant const int wxEVT_DETAILED_HELP;// 1051) </span><span class="cx"> </span><ins>+%constant const int wxEVT_COMMAND_LIST_BEGIN_DRAG; +%constant const int wxEVT_COMMAND_LIST_BEGIN_RDRAG; +%constant const int wxEVT_COMMAND_LIST_BEGIN_LABEL_EDIT; +%constant const int wxEVT_COMMAND_LIST_END_LABEL_EDIT; +%constant const int wxEVT_COMMAND_LIST_DELETE_ITEM; +%constant const int wxEVT_COMMAND_LIST_DELETE_ALL_ITEMS; +%constant const int wxEVT_COMMAND_LIST_KEY_DOWN; +%constant const int wxEVT_COMMAND_LIST_INSERT_ITEM; +%constant const int wxEVT_COMMAND_LIST_COL_CLICK; +%constant const int wxEVT_COMMAND_LIST_COL_RIGHT_CLICK; +%constant const int wxEVT_COMMAND_LIST_COL_BEGIN_DRAG; +%constant const int wxEVT_COMMAND_LIST_COL_DRAGGING; +%constant const int wxEVT_COMMAND_LIST_COL_END_DRAG; +%constant const int wxEVT_COMMAND_LIST_ITEM_SELECTED; +%constant const int wxEVT_COMMAND_LIST_ITEM_DESELECTED; +%constant const int wxEVT_COMMAND_LIST_ITEM_RIGHT_CLICK; +%constant const int wxEVT_COMMAND_LIST_ITEM_MIDDLE_CLICK; +%constant const int wxEVT_COMMAND_LIST_ITEM_ACTIVATED; +%constant const int wxEVT_COMMAND_LIST_ITEM_FOCUSED; +%constant const int wxEVT_COMMAND_LIST_CACHE_HINT; + </ins><span class="cx"> %constant const int wxEVT_COMMAND_TREE_BEGIN_DRAG; </span><span class="cx"> %constant const int wxEVT_COMMAND_TREE_BEGIN_RDRAG; </span><span class="cx"> %constant const int wxEVT_COMMAND_TREE_END_DRAG; </span><span class="lines">@@ -245,6 +290,10 @@ </span><span class="cx"> %constant const int wxEVT_WIZARD_FINISHED; //903) </span><span class="cx"> </span><span class="cx"> %constant const int wxEVT_SASH_DRAGGED; </span><ins>+%constant const int wxEVT_COMMAND_SPLITTER_SASH_POS_CHANGED; // 850 +%constant const int wxEVT_COMMAND_SPLITTER_SASH_POS_CHANGING; // 851 +%constant const int wxEVT_COMMAND_SPLITTER_DOUBLECLICKED; // 852 +%constant const int wxEVT_COMMAND_SPLITTER_UNSPLIT; // 853 </ins><span class="cx"> </span><span class="cx"> %constant const int wxEVT_AUI_PANE_BUTTON; </span><span class="cx"> %constant const int wxEVT_AUI_PANE_CLOSE; </span><span class="lines">@@ -283,7 +332,6 @@ </span><span class="cx"> rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); </span><span class="cx"> </span><span class="cx"> int id = NUM2INT(argv[0]); </span><del>- //printf("evt_with_id(%d) %s\n", id, rb_block_given_p() ? "with block" : ""); </del><span class="cx"> </span><span class="cx"> internal_connect(self, id, id, eventType); </span><span class="cx"> return Qnil; </span></span></pre> </div> </div> </body> </html>
Apparently Analagous Threads
- [1066] trunk/wxruby2/swig: Move EVT constants in swig/classes/Event.i; add a few missing ones
- [1067] trunk/wxruby2: Set up event handlers in Ruby rather than by post-processing SWIG output
- [1042] trunk/wxruby2: Overhaul of the event handling WxType->RubyClass mapping to make it
- [1036] trunk/wxruby2: Merge RubyEventTypes into Events.i, add missing EVT_ constants for
- [1038] trunk/wxruby2/swig/Events.i: Add missing EVT_COMMAND_TREE constants