class Canis::Tab
Attributes
col_offset[RW]
config[R]
index[RW]
items[R]
parent_component[RW]
row_offset[RW]
text[RW]
Public Class Methods
new(text, parent_component, aconfig={})
click to toggle source
# File lib/canis/core/widgets/rtabbedpane.rb, line 549 def initialize text, parent_component, aconfig={}, &block @text = text @items = [] @config = aconfig @parent_component = parent_component @row_offset ||= 2 @col_offset ||= 2 @config.each_pair { |k,v| variable_set(k,v) } instance_eval &block if block_given? end
Public Instance Methods
item(widget)
click to toggle source
# File lib/canis/core/widgets/rtabbedpane.rb, line 559 def item widget widget.form = @parent_component.form widget.override_graphic @parent_component.form.window # these will fail if TP put inside some other container. NOTE widget.row ||= 0 widget.col ||= 0 # If we knew it was only widget we could expand it if widget.kind_of?(Canis::Container) #|| widget.respond_to?(:width) widget.width ||= @parent_component.width-3 end # Darn ! this was setting Label to fully height if widget.kind_of?(Canis::Container) #|| widget.respond_to?(:height) widget.height ||= @parent_component.height-3 end # i don't know button_offset as yet widget.row += @row_offset + @parent_component.row + 1 widget.col += @col_offset + @parent_component.col @items << widget end