OSDN Git Service

fix editor
[pettanr/pettanr.git] / lib / editor / panel_dock / bay / scenario.rb
1 module Editor
2   module EditorModule
3     module DockModule
4       class ScenarioBay < BoardBay
5         def initialize parent, index, name
6           super
7           
8           self.elements.each_with_index do |element, i| 
9             tab = ScenarioBoard.new(self, i, element.item_name, element)
10             add_tab tab, ScenarioBoardLabel.new(tab, element.item_name), 
11               ScenarioBoardBody.new(tab)
12           end
13         end
14         
15         def elements
16           self.root_item.scenario_elements
17         end
18         
19         def class_name
20           "tsort-box"
21         end
22         
23       end
24       
25       module TabModule
26         class ScenarioBayLabel < BayLabel
27         end
28         
29         class ScenarioBayBody < BayBody
30           def template_file_name
31             'scenario'
32           end
33           
34         end
35         
36       end
37     end
38   end
39 end