OSDN Git Service

fix editor
[pettanr/pettanr.git] / lib / editor / panel_dock / board / element.rb
1 module Editor
2   module EditorModule
3     module DockModule
4       class ElementBoard < Board
5         attr_accessor :element
6         
7         def initialize parent, index, name, element
8           super parent, index, name
9           @element = element
10         end
11         
12         def template_dir
13           @parent.template_dir + 'board/'
14         end
15         
16         def template_file_name
17           'element'
18         end
19         
20       end
21       
22       module TabModule
23         class ElementBoardLabel < BoardLabel
24           def template_file_name
25             'board_label'
26           end
27           
28           def face_template_name
29             self.element.path_name + '/element_face'
30           end
31           
32         end
33         
34         class ElementBoardBody < BoardBody
35           attr_accessor :bucket
36           
37           def initialize parent
38             super
39             @form = Locmare::Bucket.new self.element.item_name, self.element, self.mounted, false, @operators
40             @bucket = FormBucket.new self, @form
41           end
42           
43           def template_name
44             @bucket.template_name
45           end
46           
47           def template_options
48             @bucket.template_options
49           end
50           
51           def mounted
52             true
53           end
54           
55           def element
56             @parent.element
57           end
58           
59         end
60         
61       end
62     end
63   end
64 end