nobody at rubyforge.org
2007-Jun-22 19:26 UTC
[Wxruby-development] [1058] trunk/wxruby2/swig: Move TB_ constants into ToolBar and add the new 2.8 ones.
<!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>[1058] trunk/wxruby2/swig: Move TB_ constants into ToolBar and add the new 2.8 ones.</title> </head> <body> <div id="msg"> <dl> <dt>Revision</dt> <dd>1058</dd> <dt>Author</dt> <dd>brokentoy</dd> <dt>Date</dt> <dd>2007-06-22 15:26:16 -0400 (Fri, 22 Jun 2007)</dd> </dl> <h3>Log Message</h3> <pre>Move TB_ constants into ToolBar and add the new 2.8 ones. Also documentation in ToolBar for typemaps</pre> <h3>Modified Paths</h3> <ul> <li><a href="#trunkwxruby2swigRubyConstantsi">trunk/wxruby2/swig/RubyConstants.i</a></li> <li><a href="#trunkwxruby2swigclassesToolBari">trunk/wxruby2/swig/classes/ToolBar.i</a></li> </ul> </div> <div id="patch"> <h3>Diff</h3> <a id="trunkwxruby2swigRubyConstantsi"></a> <div class="modfile"><h4>Modified: trunk/wxruby2/swig/RubyConstants.i (1057 => 1058)</h4> <pre class="diff"><span> <span class="info">--- trunk/wxruby2/swig/RubyConstants.i        2007-06-22 19:05:45 UTC (rev 1057) +++ trunk/wxruby2/swig/RubyConstants.i        2007-06-22 19:26:16 UTC (rev 1058) </span><span class="lines">@@ -1888,45 +1888,6 @@ </span><span class="cx"> #define wxSP_FULLSASH 0 </span><span class="cx"> </span><span class="cx"> //** ---------------------------------------------------------------------------- ** </span><del>-// Start constants from wx/toolbar.h -//** ---------------------------------------------------------------------------- ** - -// wxToolBar style flags -enum -{ - // lay out the toolbar horizontally - wxTB_HORIZONTAL = wxHORIZONTAL, // == 0x0004 - - // lay out the toolbar vertically - wxTB_VERTICAL = wxVERTICAL, // == 0x0008 - - // show 3D buttons (wxToolBarSimple only) - wxTB_3DBUTTONS = 0x0010, - - // "flat" buttons (Win32/GTK only) - wxTB_FLAT = 0x0020, - - // dockable toolbar (GTK only) - wxTB_DOCKABLE = 0x0040, - - // don''t show the icons (they''re shown by default) - wxTB_NOICONS = 0x0080, - - // show the text (not shown by default) - wxTB_TEXT = 0x0100, - - // don''t show the divider between toolbar and the window (Win32 only) - wxTB_NODIVIDER = 0x0200, - - // no automatic alignment (Win32 only, useless) - wxTB_NOALIGN = 0x0400, - - // show the text and the icons alongside, not vertically stacked (Win32/GTK) - wxTB_HORZ_LAYOUT = 0x0800, - wxTB_HORZ_TEXT = wxTB_HORZ_LAYOUT | wxTB_TEXT -}; - -//** ---------------------------------------------------------------------------- ** </del><span class="cx"> // Start constants from wx/textctrl.h </span><span class="cx"> //** ---------------------------------------------------------------------------- ** </span><span class="cx"> // wxTextCtrl style flags </span></span></pre></div> <a id="trunkwxruby2swigclassesToolBari"></a> <div class="modfile"><h4>Modified: trunk/wxruby2/swig/classes/ToolBar.i (1057 => 1058)</h4> <pre class="diff"><span> <span class="info">--- trunk/wxruby2/swig/classes/ToolBar.i        2007-06-22 19:05:45 UTC (rev 1057) +++ trunk/wxruby2/swig/classes/ToolBar.i        2007-06-22 19:26:16 UTC (rev 1058) </span><span class="lines">@@ -11,8 +11,33 @@ </span><span class="cx"> %} </span><span class="cx"> </span><span class="cx"> </span><del>-// </del><ins>+// wxToolBar style flags +enum +{ + wxTB_HORIZONTAL = wxHORIZONTAL, // == 0x0004 + wxTB_TOP = wxTB_HORIZONTAL, + wxTB_VERTICAL = wxVERTICAL, // == 0x0008 + wxTB_LEFT = wxTB_VERTICAL, + wxTB_3DBUTTONS = 0x0010, + wxTB_FLAT = 0x0020, + wxTB_DOCKABLE = 0x0040, + wxTB_NOICONS = 0x0080, + wxTB_TEXT = 0x0100, + wxTB_NODIVIDER = 0x0200, + wxTB_NOALIGN = 0x0400, + wxTB_HORZ_LAYOUT = 0x0800, + wxTB_HORZ_TEXT = wxTB_HORZ_LAYOUT | wxTB_TEXT, + wxTB_NO_TOOLTIPS = 0x1000, + wxTB_BOTTOM = 0x2000, + wxTB_RIGHT = 0x4000 +}; + +// Numerous adding methods in wxToolBar return an undocumented C++ +// wxToolBarToolBase class. Rather than port this class, these methods +// return the integer position of the new tool in wxRuby. Hence, all +// access to ToolBar changing methods is via Wx::ToolBar. </ins><span class="cx"> %typemap(out) wxToolBarToolBase* { </span><ins>+ // arg1 here is the typecase C++ self; $1 is the new ToolBarToolBase </ins><span class="cx"> int pos_of_tool = arg1->GetToolPos($1->GetId()); </span><span class="cx"> $result = INT2NUM(pos_of_tool); </span><span class="cx"> } </span></span></pre> </div> </div> </body> </html>
Possibly Parallel Threads
- [1056] trunk/wxruby2/swig/classes/include/wxToolBar.h: Add missing param to InsertTool long version; uncomment some methods now
- XRC Problem
- [1055] trunk/wxruby2/swig/classes/ToolBar.i: Chnage methods returning ToolBarToolBase to return position of new tool;
- [1057] trunk/wxruby2/swig/classes/include/wxToolBar.h: Add new methods from the 2.8 API
- Is wxRuby-SWIG version usable enough to package for download?