nobody at rubyforge.org
2007-Jun-22 19:39 UTC
[Wxruby-development] [1059] trunk/wxruby2/doc/textile/toolbar.txtl: Update ToolBar documentation to reflect recent changes in API
<!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>[1059] trunk/wxruby2/doc/textile/toolbar.txtl: Update ToolBar documentation to reflect recent changes in API</title> </head> <body> <div id="msg"> <dl> <dt>Revision</dt> <dd>1059</dd> <dt>Author</dt> <dd>brokentoy</dd> <dt>Date</dt> <dd>2007-06-22 15:39:31 -0400 (Fri, 22 Jun 2007)</dd> </dl> <h3>Log Message</h3> <pre>Update ToolBar documentation to reflect recent changes in API</pre> <h3>Modified Paths</h3> <ul> <li><a href="#trunkwxruby2doctextiletoolbartxtl">trunk/wxruby2/doc/textile/toolbar.txtl</a></li> </ul> </div> <div id="patch"> <h3>Diff</h3> <a id="trunkwxruby2doctextiletoolbartxtl"></a> <div class="modfile"><h4>Modified: trunk/wxruby2/doc/textile/toolbar.txtl (1058 => 1059)</h4> <pre class="diff"><span> <span class="info">--- trunk/wxruby2/doc/textile/toolbar.txtl        2007-06-22 19:26:16 UTC (rev 1058) +++ trunk/wxruby2/doc/textile/toolbar.txtl        2007-06-22 19:39:31 UTC (rev 1059) </span><span class="lines">@@ -8,10 +8,6 @@ </span><span class="cx"> * *ToolBarGTK* The GTK toolbar. </span><span class="cx"> </span><span class="cx"> </span><del>-Note that the base class *ToolBarBase* defines -automatic scrolling management functionality which is similar -to "ScrolledWindow":scrolledwindow.html, so please refer to this class also. - </del><span class="cx"> h2. Derived from </span><span class="cx"> </span><span class="cx"> ToolBarBase </span><span class="lines">@@ -28,7 +24,7 @@ </span><span class="cx"> </span><span class="cx"> You may also create a toolbar that is managed by the frame, by </span><span class="cx"> calling "Frame#create_tool_bar":frame.html#Frame_createtoolbar. Under Pocket PC, </span><del>-you should _always_ use this function for creating the toolbar </del><ins>+you should always use this function for creating the toolbar </ins><span class="cx"> to be managed by the frame, so that Widgets can use a combined </span><span class="cx"> menubar and toolbar. Where you manage your own toolbars, create a ToolBar </span><span class="cx"> as usual. </span><span class="lines">@@ -73,6 +69,9 @@ </span><span class="cx"> |@TB_NOALIGN@|Specifies no alignment with the parent window (Windows only, not very useful).| </span><span class="cx"> |@TB_HORZ_LAYOUT@|Shows the text and the icons alongside, not vertically stacked (Windows and GTK2 only). This style must be used with TB_TEXT.| </span><span class="cx"> |@TB_HORZ_TEXT@|Combination of TB_HORZ_LAYOUT and TB_TEXT.| </span><ins>+|@TB_NO_TOOLTIPS@|Don''t show the short help tooltips for the tools when the mouse hovers over them.| +|@TB_BOTTOM@|Align the toolbar at the bottom of parent window.| +|@TB_RIGHT@|Align the toolbar at the right side of parent window.| </ins><span class="cx"> </span><span class="cx"> </span><span class="cx"> See also "window styles overview":windowstyles.html. Note that the Win32 </span><span class="lines">@@ -114,12 +113,14 @@ </span><span class="cx"> * "ToolBar#add_tool":#ToolBar_addtool </span><span class="cx"> * "ToolBar#add_check_tool":#ToolBar_addchecktool </span><span class="cx"> * "ToolBar#add_radio_tool":#ToolBar_addradiotool </span><ins>+* "ToolBar#clear_tools":#ToolBar_cleartools </ins><span class="cx"> * "ToolBar#delete_tool":#ToolBar_deletetool </span><span class="cx"> * "ToolBar#delete_tool_by_pos":#ToolBar_deletetoolbypos </span><span class="cx"> * "ToolBar#enable_tool":#ToolBar_enabletool </span><span class="cx"> * "ToolBar#find_by_id":#ToolBar_findbyid </span><span class="cx"> * "ToolBar#find_control":#ToolBar_findcontrol </span><span class="cx"> * "ToolBar#find_tool_for_position":#ToolBar_findtoolforposition </span><ins>+* "ToolBar#get_tools_count":#ToolBar_gettoolscount </ins><span class="cx"> * "ToolBar#get_tool_size":#ToolBar_gettoolsize </span><span class="cx"> * "ToolBar#get_tool_bitmap_size":#ToolBar_gettoolbitmapsize </span><span class="cx"> * "ToolBar#get_margins":#ToolBar_getmargins </span><span class="lines">@@ -143,9 +144,11 @@ </span><span class="cx"> * "ToolBar#set_margins":#ToolBar_setmargins </span><span class="cx"> * "ToolBar#set_tool_bitmap_size":#ToolBar_settoolbitmapsize </span><span class="cx"> * "ToolBar#set_tool_client_data":#ToolBar_settoolclientdata </span><ins>+* "ToolBar#set_tool_disabled_bitmap":#ToolBar_settooldisabledbitmap </ins><span class="cx"> * "ToolBar#set_tool_long_help":#ToolBar_settoollonghelp </span><span class="cx"> * "ToolBar#set_tool_packing":#ToolBar_settoolpacking </span><span class="cx"> * "ToolBar#set_tool_short_help":#ToolBar_settoolshorthelp </span><ins>+* "ToolBar#set_tool_normal_bitmap":#ToolBar_settoolnormalbitmap </ins><span class="cx"> * "ToolBar#set_tool_separation":#ToolBar_settoolseparation </span><span class="cx"> * "ToolBar#toggle_tool":#ToolBar_toggletool </span><span class="cx"> </span><span class="lines">@@ -208,27 +211,28 @@ </span><span class="cx"> </span><span class="cx"> h3(#ToolBar_addtool). ToolBar#add_tool </span><span class="cx"> </span><del>- "ToolBarToolBase":toolbartoolbase.html *add_tool*(%(arg-type)Integer% toolId, - %(arg-type)String% label, - %(arg-type)Bitmap% bitmap1, - %(arg-type)String% shortHelpString = "", - %(arg-type)ItemKind% kind = ITEM_NORMAL) </del><ins>+ Integer *add_tool*(%(arg-type)Integer% toolId, + %(arg-type)String% label, + %(arg-type)Bitmap% bitmap1, + %(arg-type)String% shortHelpString = "", + %(arg-type)ItemKind% kind = ITEM_NORMAL) </ins><span class="cx"> </span><del>- "ToolBarToolBase":toolbartoolbase.html *add_tool*(%(arg-type)Integer% toolId, - %(arg-type)String% label, - %(arg-type)Bitmap% bitmap1, - %(arg-type)Bitmap% bitmap2 = NullBitmap, - %(arg-type)ItemKind% kind = ITEM_NORMAL, - %(arg-type)String% shortHelpString = "", - %(arg-type)String% longHelpString = "", - %(arg-type)Object% clientData = nil) </del><ins>+ Integer *add_tool*(%(arg-type)Integer% toolId, + %(arg-type)String% label, + %(arg-type)Bitmap% bitmap1, + %(arg-type)Bitmap% bitmap2 = NullBitmap, + %(arg-type)ItemKind% kind = ITEM_NORMAL, + %(arg-type)String% shortHelpString = "", + %(arg-type)String% longHelpString = "", + %(arg-type)Object% clientData = nil) </ins><span class="cx"> </span><del>- "ToolBarToolBase":toolbartoolbase.html *add_tool*(%(arg-type)ToolBarToolBase% tool) </del><span class="cx"> </span><del>-Adds a tool to the toolbar. The first (short and most commonly used) version </del><ins>+Adds a tool to the toolbar, and return the integer position of the newly +added tool. + +The first (short and most commonly used) version </ins><span class="cx"> has fewer parameters than the full version at the price of not being able to </span><del>-specify some of the more rarely used button features. The last version allows -you to add an existing tool. </del><ins>+specify some of the more rarely used button features. </ins><span class="cx"> </span><span class="cx"> h4. Parameters </span><span class="cx"> </span><span class="lines">@@ -248,7 +252,6 @@ </span><span class="cx"> parent frame when the mouse pointer is inside the tool </span><span class="cx"> * _clientData_ An optional pointer to client data which can be </span><span class="cx"> retrieved later using "ToolBar#get_tool_client_data":toolbar.html#ToolBar_gettoolclientdata. </span><del>-* _tool_ The tool to be added. </del><span class="cx"> </span><span class="cx"> h4. Remarks </span><span class="cx"> </span><span class="lines">@@ -265,8 +268,8 @@ </span><span class="cx"> %(arg-type)String% label, </span><span class="cx"> %(arg-type)Bitmap% bitmap1, </span><span class="cx"> %(arg-type)Bitmap% bitmap2, </span><del>- %(arg-type)String% shortHelpString = "", - %(arg-type)String% longHelpString = "", </del><ins>+ %(arg-type)String% shortHelp = "", + %(arg-type)String% longHelp = "", </ins><span class="cx"> %(arg-type)Object% clientData = nil) </span><span class="cx"> </span><span class="cx"> Adds a new check (or toggle) tool to the toolbar. The parameters are the same </span><span class="lines">@@ -276,6 +279,7 @@ </span><span class="cx"> </span><span class="cx"> "ToolBar#add_tool":toolbar.html#ToolBar_addtool </span><span class="cx"> </span><ins>+ </ins><span class="cx"> h3(#ToolBar_addradiotool). ToolBar#add_radio_tool </span><span class="cx"> </span><span class="cx"> "ToolBarToolBase":toolbartoolbase.html *add_radio_tool*(%(arg-type)Integer% toolId, </span><span class="lines">@@ -299,6 +303,12 @@ </span><span class="cx"> </span><span class="cx"> "ToolBar#add_tool":toolbar.html#ToolBar_addtool </span><span class="cx"> </span><ins>+h3(#ToolBar_cleartools). ToolBar#clear_tools + + *clear_tools*() + +Deletes all the tools in the toolbar. + </ins><span class="cx"> h3(#ToolBar_deletetool). ToolBar#delete_tool </span><span class="cx"> </span><span class="cx"> Boolean *delete_tool*(%(arg-type)Integer% toolId) </span><span class="lines">@@ -347,38 +357,24 @@ </span><span class="cx"> </span><span class="cx"> h3(#ToolBar_findbyid). ToolBar#find_by_id </span><span class="cx"> </span><del>- "ToolBarToolBase":toolbartoolbase.html *find_by_id*(%(arg-type)Integer% id) </del><ins>+ Integer *find_by_id*(%(arg-type)Integer% id) </ins><span class="cx"> </span><del>-Returns a pointer to the tool identified by _id_ or -NULL if no corresponding tool is found. </del><ins>+Returns the position of the tool identified by _id_ or nil if no +corresponding tool is found. </ins><span class="cx"> </span><span class="cx"> h3(#ToolBar_findcontrol). ToolBar#find_control </span><span class="cx"> </span><span class="cx"> "Control":control.html *find_control*(%(arg-type)Integer% id) </span><span class="cx"> </span><del>-Returns a pointer to the control identified by _id_ or -NULL if no corresponding control is found. </del><ins>+Returns a pointer to the Wx::Control identified by _id_ or nil if no +corresponding control is found. </ins><span class="cx"> </span><del>-h3(#ToolBar_findtoolforposition). ToolBar#find_tool_for_position </del><ins>+h3(#ToolBar_gettoolscount). ToolBar#get_tools_count </ins><span class="cx"> </span><del>- "ToolBarToolBase":toolbartoolbase.html *find_tool_for_position*(%(arg-type)float% x, - %(arg-type)float% y) </del><ins>+ Integer *get_tools_count*() </ins><span class="cx"> </span><del>-Finds a tool for the given mouse position. </del><ins>+Returns the number of tools in the toolbar. </ins><span class="cx"> </span><del>-h4. Parameters - -* _x_ X position. -* _y_ Y position. - -h4. Return value - -A pointer to a tool if a tool is found, or NULL otherwise. - -h4. Remarks - -Used internally, and should not need to be used by the programmer. - </del><span class="cx"> h3(#ToolBar_gettoolsize). ToolBar#get_tool_size </span><span class="cx"> </span><span class="cx"> "Size":size.html *get_tool_size*() </span><span class="lines">@@ -548,20 +544,18 @@ </span><span class="cx"> </span><span class="cx"> h3(#ToolBar_inserttool). ToolBar#insert_tool </span><span class="cx"> </span><del>- "ToolBarToolBase":toolbartoolbase.html *insert_tool*(%(arg-type)size_t% pos, - %(arg-type)Integer% toolId, - %(arg-type)Bitmap% bitmap1, - %(arg-type)Bitmap% bitmap2 = NullBitmap, - %(arg-type)Boolean% isToggle = false, - %(arg-type)Object% clientData = nil, - %(arg-type)String% shortHelpString = "", - %(arg-type)String% longHelpString = "") </del><ins>+ Integer *insert_tool*(%(arg-type)size_t% pos, + %(arg-type)Integer% toolId, +                                                 %(arg-type)String% label, + %(arg-type)Bitmap% bitmap1, + %(arg-type)Bitmap% bitmap2 = NullBitmap, +                                                 %(arg-type)Integer% type = Wx::ITEM_NORMAL, + %(arg-type)String% shortHelp = "", + %(arg-type)String% longHelp = "", + %(arg-type)Object% clientData = nil) </ins><span class="cx"> </span><del>- "ToolBarToolBase":toolbartoolbase.html *insert_tool*(%(arg-type)size_t% pos, - %(arg-type)ToolBarToolBase% tool) - </del><span class="cx"> Inserts the tool with the specified attributes into the toolbar at the given </span><del>-position. </del><ins>+position. Returns the position of the newly inserted tool. </ins><span class="cx"> </span><span class="cx"> You must call "Realize":toolbarrealize.html for the change to take place. </span><span class="cx"> </span><span class="lines">@@ -721,6 +715,16 @@ </span><span class="cx"> </span><span class="cx"> Sets the client data associated with the tool. </span><span class="cx"> </span><ins>+h3(#ToolBar_settooldisabledbitmap). ToolBar#set_tool_disabled_bitmap + + *set_tool_disabled_bitmap*(%(arg-type)Integer% id, %(arg-type)Bitmap% bitmap) + +Sets the bitmap to be used by the tool with the given ID when the tool +is in a disabled state. This can only be used on Button tools, not +controls. NOTE: The native toolbar classes on the main platforms all +synthesize the disabled bitmap from the normal bitmap, so this function +will have no effect on those platforms. + </ins><span class="cx"> h3(#ToolBar_settoollonghelp). ToolBar#set_tool_long_help </span><span class="cx"> </span><span class="cx"> *set_tool_long_help*(%(arg-type)Integer% toolId, %(arg-type)String% helpString) </span><span class="lines">@@ -736,6 +740,14 @@ </span><span class="cx"> </span><span class="cx"> You might use the long help for displaying the tool purpose on the status line. </span><span class="cx"> </span><ins>+h3(#ToolBar_settoolnormalbitmap). ToolBar#set_tool_normal_bitmap + + *set_tool_normal_bitmap*(%(arg-type)Integer% id, %(arg-type)Bitmap% bitmap) + +Sets the bitmap to be used by the tool with the given ID. This can only +be used on Button tools, not controls. + + </ins><span class="cx"> h4. See also </span><span class="cx"> </span><span class="cx"> "ToolBar#get_tool_long_help":toolbar.html#ToolBar_gettoollonghelp, "ToolBar#set_tool_short_help":toolbar.html#ToolBar_settoolshorthelp, </span></span></pre> </div> </div> </body> </html>
Maybe Matching Threads
- Wx::ToolBar#insert_tool
- [1055] trunk/wxruby2/swig/classes/ToolBar.i: Chnage methods returning ToolBarToolBase to return position of new tool;
- [1056] trunk/wxruby2/swig/classes/include/wxToolBar.h: Add missing param to InsertTool long version; uncomment some methods now
- [1057] trunk/wxruby2/swig/classes/include/wxToolBar.h: Add new methods from the 2.8 API
- Problems with ToolBar Sintaxis