Class: RunnerManager

Inherits:
TkFloatTitledFrame show all
Defined in:
lib/a-core.rb

Defined Under Namespace

Classes: RunnerMangerItem

Constant Summary

Constants included from TkResizable

TkResizable::MIN_HEIGHT, TkResizable::MIN_WIDTH

Instance Attribute Summary

Attributes inherited from TkBaseTitledFrame

#frame, #top

Instance Method Summary collapse

Methods inherited from TkFloatTitledFrame

#head_buttons, #hide, #hide_if_visible, #on_close=, #show, #show_grabbed, #title

Methods included from TkResizable

#resizing_do_move_obj, #resizing_do_press, #start_resizing, #stop_resizing

Methods included from TkMovable

#moving_do_move_obj, #moving_do_press, #start_moving, #stop_moving

Methods inherited from TkBaseTitledFrame

#add_fixed_button, #add_fixed_menu_button, #add_fixed_panel, #add_fixed_sep, #create_frame, #head_buttons, #menu_button, #visible?

Constructor Details

#initialize(_parent) ⇒ RunnerManager

Returns a new instance of RunnerManager.



1725
1726
1727
1728
1729
1730
# File 'lib/a-core.rb', line 1725

def initialize(_parent)
  super(_parent)
  title("Runners manager")
  @items = Hash.new
  place('x'=>100,'y'=>100,'height'=> 220,'width'=> 300)
end

Instance Method Details

#clear_itemsObject



1732
1733
1734
1735
# File 'lib/a-core.rb', line 1732

def clear_items
  @items.each_value{|i| i.destroy }
  @items.clear
end

#load_itemsObject



1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
# File 'lib/a-core.rb', line 1737

def load_items
  clear_items
  runs=Arcadia.pers_group('runners', true)
  runs.each{|name, hash_string|
    item_hash = eval hash_string
    item_hash[:name]=name
    if item_hash[:runner] && Arcadia.runner(item_hash[:runner])
      item_hash = Hash.new.update(Arcadia.runner(item_hash[:runner])).update(item_hash)
    end
    @items[name]=RunnerMangerItem.new(self.frame, item_hash)
  }
end