286
287
288
289
290
291
292
293
294
295
|
# File 'lib/terminal_layout.rb', line 286
def render_object_for(cbox, content:nil, style:{})
case cbox.display
when :block
BlockRenderObject.new(cbox, parent: self, content: content, style: {width:@box.width}.merge(style), renderer:@renderer)
when :inline
InlineRenderObject.new(cbox, parent: self, content: content, style: style, renderer:@renderer)
when :float
FloatRenderObject.new(cbox, parent: self, content: content, style: {x: @current_x, y: @current_y, float: cbox.float}.merge(style), renderer:@renderer)
end
end
|