nobody at rubyforge.org
2006-Nov-21 22:25 UTC
[Wxruby-development] [746] trunk/wxruby2/doc/textile/listbox.txtl: Correct ruby method signature for methods that accept an array of strings
<!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>[746] trunk/wxruby2/doc/textile/listbox.txtl: Correct ruby method signature for methods that accept an array of strings</title> </head> <body> <div id="msg"> <dl> <dt>Revision</dt> <dd>746</dd> <dt>Author</dt> <dd>brokentoy</dd> <dt>Date</dt> <dd>2006-11-21 17:25:49 -0500 (Tue, 21 Nov 2006)</dd> </dl> <h3>Log Message</h3> <pre>Correct ruby method signature for methods that accept an array of strings</pre> <h3>Modified Paths</h3> <ul> <li><a href="#trunkwxruby2doctextilelistboxtxtl">trunk/wxruby2/doc/textile/listbox.txtl</a></li> </ul> </div> <div id="patch"> <h3>Diff</h3> <a id="trunkwxruby2doctextilelistboxtxtl"></a> <div class="modfile"><h4>Modified: trunk/wxruby2/doc/textile/listbox.txtl (745 => 746)</h4> <pre class="diff"><span> <span class="info">--- trunk/wxruby2/doc/textile/listbox.txtl        2006-11-21 22:14:26 UTC (rev 745) +++ trunk/wxruby2/doc/textile/listbox.txtl        2006-11-21 22:25:49 UTC (rev 746) </span><span class="lines">@@ -5,13 +5,14 @@ </span><span class="cx"> marked in reverse video. A listbox can be single selection (if an item </span><span class="cx"> is selected, the previous selection is removed) or multiple selection </span><span class="cx"> (clicking an item toggles the item on or off independently of other </span><del>-selections). </del><ins>+selections). This is controlled by changing the style passed to the +constructor. </ins><span class="cx"> </span><span class="cx"> List box elements are numbered from zero. Their number is limited in </span><del>-some platforms (e.g. ca. 2000 on GTK). </del><ins>+some platforms - for example, around 2000 on GTK. </ins><span class="cx"> </span><del>-A listbox callback gets an event EVT_COMMAND_LISTBOX_SELECT for single clicks, and -EVT_COMMAND_LISTBOX_DOUBLE_CLICKED for double clicks. </del><ins>+A listbox callback gets an event EVT_COMMAND_LISTBOX_SELECT for single +clicks, and EVT_COMMAND_LISTBOX_DOUBLE_CLICKED for double clicks. </ins><span class="cx"> </span><span class="cx"> h2. Derived from </span><span class="cx"> </span><span class="lines">@@ -45,8 +46,6 @@ </span><span class="cx"> </span><span class="cx"> h2. Event handling </span><span class="cx"> </span><del>- - </del><span class="cx"> |*evt_listbox(id) { | event | ... }*|Process a EVT_COMMAND_LISTBOX_SELECTED event,when an item on the list is selected.| </span><span class="cx"> |*evt_listbox_dclick(id) { | event | ... }*|Process a EVT_COMMAND_LISTBOX_DOUBLECLICKED event,when the listbox is double-clicked.| </span><span class="cx"> </span><span class="lines">@@ -76,18 +75,12 @@ </span><span class="cx"> </span><span class="cx"> *ListBox.new*(%(arg-type)Window% parent, %(arg-type)Integer% id, </span><span class="cx"> %(arg-type)Point% pos = DEFAULT_POSITION, </span><del>- %(arg-type)Size% size = DEFAULT_SIZE, %(arg-type)Integer% n, - %(arg-type)String% choices[] = nil, %(arg-type)Integer% style = 0, </del><ins>+ %(arg-type)Size% size = DEFAULT_SIZE, + %(arg-type)Array% choices = nil, +                         %(arg-type)Integer% style = 0, </ins><span class="cx"> %(arg-type)Validator% validator = DEFAULT_VALIDATOR, </span><span class="cx"> %(arg-type)String% name = "listBox") </span><span class="cx"> </span><del>- *ListBox.new*(%(arg-type)Window% parent, %(arg-type)Integer% id, %(arg-type)Point% pos, - %(arg-type)Size% size, - %(arg-type)ArrayString% choices, - %(arg-type)Integer% style = 0, - %(arg-type)Validator% validator = DEFAULT_VALIDATOR, - %(arg-type)String% name = "listBox") - </del><span class="cx"> Constructor, creating and showing a list box. </span><span class="cx"> </span><span class="cx"> h4. Parameters </span><span class="lines">@@ -97,7 +90,6 @@ </span><span class="cx"> * _pos_ Window position. </span><span class="cx"> * _size_ Window size. If the default size (-1, -1) is specified then the window is sized </span><span class="cx"> appropriately. </span><del>-* _n_ Number of strings with which to initialise the control. </del><span class="cx"> * _choices_ An array of strings with which to initialise the control. </span><span class="cx"> * _style_ Window style. See "ListBox":listbox.html. </span><span class="cx"> * _validator_ Window validator. </span><span class="lines">@@ -107,14 +99,6 @@ </span><span class="cx"> </span><span class="cx"> "ListBox#create":listbox.html#ListBox_create, "Validator":validator.html </span><span class="cx"> </span><del>- - - - - *destructor*() - -Destructor, destroying the list box. - </del><span class="cx"> h3(#ListBox_create). ListBox#create </span><span class="cx"> </span><span class="cx"> Boolean *create*(%(arg-type)Window% parent, %(arg-type)Integer% id, </span><span class="lines">@@ -124,13 +108,6 @@ </span><span class="cx"> %(arg-type)Validator% validator = DEFAULT_VALIDATOR, </span><span class="cx"> %(arg-type)String% name = "listBox") </span><span class="cx"> </span><del>- Boolean *create*(%(arg-type)Window% parent, %(arg-type)Integer% id, %(arg-type)Point% pos, - %(arg-type)Size% size, - %(arg-type)ArrayString% choices, - %(arg-type)Integer% style = 0, - %(arg-type)Validator% validator = DEFAULT_VALIDATOR, - %(arg-type)String% name = "listBox") - </del><span class="cx"> Creates the listbox for two-step construction. See "ListBox.new":listbox.html#ListBox_new for further details. </span><span class="cx"> </span><span class="cx"> h3(#ListBox_deselect). ListBox#deselect </span><span class="lines">@@ -208,23 +185,15 @@ </span><span class="cx"> </span><span class="cx"> h3(#ListBox_set). ListBox#set </span><span class="cx"> </span><del>- *set*(%(arg-type)Integer% n, %(arg-type)String% choices, %(arg-type)% *clientData = @NULL@) </del><ins>+ *set*(%(arg-type)Array% choices, %(arg-type)% *clientData = @NULL@) </ins><span class="cx"> </span><del>- *set*(%(arg-type)ArrayString% choices, %(arg-type)% *clientData = @NULL@) - </del><span class="cx"> Clears the list box and adds the given strings to it. </span><span class="cx"> </span><span class="cx"> h4. Parameters </span><span class="cx"> </span><del>-* _n_ The number of strings to set. </del><span class="cx"> * _choices_ An array of strings to set. </span><del>-* _clientData_ Options array of client data pointers </del><ins>+* _clientData_ Optional array of client data pointers - not currently supported </ins><span class="cx"> </span><del>-h4. Remarks - -You may free the array from the calling program after this function has been -called. - </del><span class="cx"> h3(#ListBox_setfirstitem). ListBox#set_first_item </span><span class="cx"> </span><span class="cx"> *set_first_item*(%(arg-type)Integer% n) </span></span></pre> </div> </div> </body> </html>
Seemingly Similar Threads
- [966] branches/wxruby2/wxwidgets_282/doc/textile/listbox.txtl: Fix methods which don''t need a ''n'' item for arrays in Ruby
- [745] trunk/wxruby2/doc/textile/choice.txtl: Correct ruby method signature for constructor, bit more explanatory text
- [768] trunk/wxruby2/doc/textile/checklistbox.txtl: Corrected constructor method signature
- [965] branches/wxruby2/wxwidgets_282/doc/textile: Misc.
- [935] branches/wxruby2/wxwidgets_282/doc/textile/listbox.txtl: Correct method signature of Listbox#get_selections method