search for: get_root_item

Displaying 7 results from an estimated 7 matches for "get_root_item".

2007 Mar 29
0
[928] branches/wxruby2/wxwidgets_282/samples/treectrl/treectrl.rb: Fixed on_insert_item, call to insert_item had arguments in wrong order/missing.
...,7 @@ </span><span class="cx"> </span><span class="cx"> def on_insert_item(event) </span><span class="cx"> image = Wx::get_app.show_images() ? TreeCtrlIcon_File : -1 </span><del>- @treectrl.insert_item(@treectrl.get_root_item(), image, "2nd item") </del><ins>+ @treectrl.insert_item(@treectrl.get_root_item(), -1, "2nd item", image) </ins><span class="cx"> end </span><span class="cx"> </span><span class="cx"> def on_a...
2006 Aug 18
10
TreeCtrl update
...l on Windows and wxScrolledWindow on everything else so I #if defined the .i and .h file accordingly. I also added a .i and .h file for the class wxTreeItemId. The TreeCtrl files were changed so much that I am just uploading the whole files instead of the diffs. traverse_tree(tree_ctrl,tree_ctrl.get_root_item) do |node_id,cookie| puts "Name: #{tree_ctrl.get_item_text(node_id)}\t\tCookie: #{cookie}" end def traverse_tree(tree_ctrl,root_node,cookie=0,&block) if cookie == 0 ret = tree_ctrl.get_first_child(root_node) else ret = tree_ctrl.get_next_child(root_node,cookie) end...
2007 Apr 13
0
[956] branches/wxruby2/wxwidgets_282: Additions to TreeCtrl API 2.6->2.8
...uot;:#TreeCtrl_getprevsibling </span><span class="cx"> * "TreeCtrl#get_prev_visible":#TreeCtrl_getprevvisible </span><ins>+* "TreeCtrl#get_quick_best_size":#TreeCtrl_getquickbestsize </ins><span class="cx"> * "TreeCtrl#get_root_item":#TreeCtrl_getrootitem </span><span class="cx"> * "TreeCtrl#get_item_selected_image":#TreeCtrl_getitemselectedimage </span><span class="cx"> * "TreeCtrl#get_selection":#TreeCtrl_getselection </span><span class="lines...
2006 Dec 21
0
[793] trunk/wxsugar/lib/wx_sugar/wx_classes/treectrl.rb: Moved traverse method in wxSugar
...d block. This + # TreeItemId can be used as an argument to many other methods within + # TreeCtrl (for example, get_item_text). + # + # If +start_item+ is not specified, this method will recurse over + # every item within the tree, starting with the root item. + def traverse(start_item = self.get_root_item, &block) + block.call(start_item) + if has_children(start_item) + child, cookie = get_first_child(start_item) + while child.is_ok + traverse(child, &block) + child = get_next_sibling(child) + end + end + end +end </ins></span></pre> &...
2007 Apr 02
0
[940] trunk/wxsugar/lib/wx_sugar/wx_classes/treectrl.rb: Align #traverse usage with #each in enumerable_controls.rb
...optionally receive two additional + # parameters, +text+ and +data+. If these are specified, they will be + # filled with the text label for the item and any ruby item data + # associated with the item, respectively. </ins><span class="cx"> def traverse(start_item = self.get_root_item, &block) </span><del>- block.call(start_item) </del><ins>+ case block.arity + when 1 + block.call(start_item) + when 2 + block.call(start_item, + get_item_text(start_item)) + when 3 + block.call(start_item, +...
2006 Dec 26
0
[806] trunk/wxruby2/samples/treectrl: Restored demonstration of use of icons and fonts within TreeCtrl
...lt;span class="cx"> # add some items to the tree </span><span class="cx"> add_test_items_to_tree(5, 2) </span><span class="lines">@@ -134,54 +134,28 @@ </span><span class="cx"> return get_item_parent(item) == get_root_item() && !get_prev_sibling(item) </span><span class="cx"> end </span><span class="cx"> </span><del>- # TEMPORARILY DISABLED - def set_item_image(*args) - end </del><ins>+ def create_image_list + @imageSize = 16 </i...
2006 Dec 01
0
[766] trunk/wxruby2: Added item_data aliases for client_data functions, update doc & tests;
...><span class="cx"> f = CtrlContainerFrame.new(Wx::TreeCtrl) </span><del>- root = f.control.add_root(''foo'') </del><ins>+ tree = f.control + root = tree.add_root(''foo'') + assert_nil(tree.get_item_data( tree.get_root_item)) </ins><span class="cx"> </span><del>- id = f.control.append_item(root, ''a hash'', -1, -1, { :a => 7 }) - assert_equal({:a => 7 }, - f.control.get_item_data(id) ) </del><ins>+ id = tree.append_item(roo...