5 attr_accessor :editor, :bodies
8 @root_dock_body = DockBody.new(self, 0, )
9 @root_dock_body.label = DockLabel.new(@root_dock_body, 'panel')
10 @root_dock_body.bay = RootBay.new(@root_dock_body)
12 @element_dock_body = DockBody.new(self, 0, )
13 @element_dock_body.label = DockLabel.new(@element_dock_body, 'elements')
14 @element_dock_body.bay = ElementBay.new(@element_dock_body)
16 @torder_dock_body = DockBody.new(self, 0, )
17 @torder_dock_body.label = DockLabel.new(@torder_dock_body, 'torder')
18 @torder_dock_body.bay = TorderBay.new(@torder_dock_body)
20 @zorder_dock_body = DockBody.new(self, 0, )
21 @zorder_dock_body.label = DockLabel.new(@zorder_dock_body, 'zorder')
22 @zorder_dock_body.bay = ZorderBay.new(@zorder_dock_body)
24 @new_dock_body = DockBody.new(self, 0, )
25 @new_dock_body.label = DockLabel.new(@new_dock_body, 'new')
26 @new_dock_body.bay = NewBay.new(@new_dock_body)
29 @root_dock_body, @element_dock_body, @torder_dock_body, @zorder_dock_body, @new_dock_body
40 attr_accessor :dock, :index, :label, :bay
41 def initialize dock, index
55 attr_accessor :dock_body, :caption
56 def initialize dock_body, caption
57 @dock_body = dock_body
79 attr_accessor :dock_body, :template_name
80 def initialize dock_body
81 @dock_body = dock_body
82 @template_dir = 'templates/r/editor/'
83 @template_name = @template_dir
109 attr_accessor :bay, :board_index, :label, :bucket
110 def initialize bay, board_index, element
112 @board_index = board_index
131 def initialize board, caption
140 class SimpleBay < Bay
141 attr_accessor :bucket, :bucket_template_name
142 def initialize dock_body
144 @template_name = @template_dir + 'simple_bay'
146 @bucket_template_name = @template_dir + ''
152 attr_accessor :boards
153 def initialize dock_body
155 @template_name = @template_dir + 'board_bay'
167 class RootBay < SimpleBay
168 def initialize dock_body
170 form_manager = Pettanr::Application::manifest.form_managers[self.root_item.form_name]
172 @bucket = form_manager.open self.root_item, @dock_body.dock.editor.operators, mounted
173 @bucket_template_name = @template_dir + 'element_form'
177 class ElementBay < BoardBay
178 def initialize dock_body
180 @boards = self.root_item.panel_elements.map {|element|
181 board = ElementBoard.new self, index, element
182 board_label = BoardLabel.new board
183 bucket = form_manager.open self.root_item, @dock_body.dock.editor.operators, mounted
184 bucket_template_name = @template_dir + 'element_form'
185 board_bucket = bucket
186 board.label = board_label
187 board.bucket = board_bucket
194 class TorderBay < BoardBay
195 def initialize dock_body
197 @boards = self.root_item.panel_elements.map {|element|
198 board = TorderBoard.new self, index, element
199 board_label = BoardLabel.new board
200 bucket = form_manager.open self.root_item, @dock_body.dock.editor.operators, mounted
201 bucket_template_name = @template_dir + 'element_form'
202 board_bucket = bucket
203 board.label = board_label
204 board.bucket = board_bucket
211 class ZorderBay < BoardBay
212 def initialize dock_body
214 @boards = self.root_item.panel_elements.map {|element|
215 board = ZorderBoard.new self, index, element
216 board_label = BoardLabel.new board
217 bucket = form_manager.open self.root_item, @dock_body.dock.editor.operators, mounted
218 bucket_template_name = @template_dir + 'element_form'
219 board_bucket = bucket
220 board.label = board_label
221 board.bucket = board_bucket
228 class NewBay < BoardBay
229 def initialize dock_body
231 @boards = self.root_item.panel_elements.map {|element|
232 board = NewBoard.new self, index, element
233 board_label = BoardLabel.new board
234 bucket = form_manager.open self.root_item, @dock_body.dock.editor.operators, mounted
235 bucket_template_name = @template_dir + 'element_form'
236 board_bucket = bucket
237 board.label = board_label
238 board.bucket = board_bucket
245 class ElementBoard < Board
252 class TorderBoard < Board
259 class ZorderBoard < Board
266 class NewBoard < Board
270 def initialize editor
280 attr_accessor :root_item, :dock, :generator, :operators
281 def initialize root_item, operators
282 @root_item = root_item
283 @operators = operators
284 @dock = Dock.new self
285 @generator = Generator.new self
291 @docks.map {|element|
292 ElementTab.new self, element