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.



1693
1694
1695
1696
1697
1698
# File 'lib/a-core.rb', line 1693

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



1700
1701
1702
1703
# File 'lib/a-core.rb', line 1700

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

#load_itemsObject



1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
# File 'lib/a-core.rb', line 1705

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