Class: RubyCurses::TableColumn
- Inherits:
-
Object
- Object
- RubyCurses::TableColumn
- Includes:
- EventHandler
- Defined in:
- lib/rbcurse/extras/widgets/rtable.rb
Overview
XXX Seems we are not using min_width and max_width. min should be used for when resizing,, max should not be used. we are using width which is updated as changed
Instance Attribute Summary collapse
-
#cell_editor ⇒ Object
Returns the value of attribute cell_editor.
-
#cell_renderer ⇒ Object
Returns the value of attribute cell_renderer.
-
#column_offset ⇒ Object
added column_offset on 2009-01-12 19:01.
-
#header_renderer ⇒ Object
user may override or set for this column, else headers default will be used.
-
#identifier ⇒ Object
readonly
Returns the value of attribute identifier.
-
#is_resizable ⇒ Object
Returns the value of attribute is_resizable.
-
#max_width ⇒ Object
Returns the value of attribute max_width.
-
#min_width ⇒ Object
Returns the value of attribute min_width.
-
#model_index ⇒ Object
index inside TableModel.
Instance Method Summary collapse
- #fire_property_change(text, oldval, newval) ⇒ Object
-
#initialize(model_index, identifier, header_value, width, config = {}, &block) ⇒ TableColumn
constructor
width is used as initial and preferred width.
Constructor Details
#initialize(model_index, identifier, header_value, width, config = {}, &block) ⇒ TableColumn
width is used as initial and preferred width. It has actual value at any time width must never be directly set, use preferred width later
1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 |
# File 'lib/rbcurse/extras/widgets/rtable.rb', line 1329 def initialize model_index, identifier, header_value, width, config={}, &block @width = width @preferred_width = width @min_width = 4 @max_width = 1000 @model_index = model_index @identifier = identifier @header_value = header_value @config={} instance_eval &block if block_given? @_events = [:PROPERTY_CHANGE] end |
Instance Attribute Details
#cell_editor ⇒ Object
Returns the value of attribute cell_editor.
1323 1324 1325 |
# File 'lib/rbcurse/extras/widgets/rtable.rb', line 1323 def cell_editor @cell_editor end |
#cell_renderer ⇒ Object
Returns the value of attribute cell_renderer.
1308 1309 1310 |
# File 'lib/rbcurse/extras/widgets/rtable.rb', line 1308 def cell_renderer @cell_renderer end |
#column_offset ⇒ Object
added column_offset on 2009-01-12 19:01
1322 1323 1324 |
# File 'lib/rbcurse/extras/widgets/rtable.rb', line 1322 def column_offset @column_offset end |
#header_renderer ⇒ Object
user may override or set for this column, else headers default will be used
1311 1312 1313 |
# File 'lib/rbcurse/extras/widgets/rtable.rb', line 1311 def header_renderer @header_renderer end |
#identifier ⇒ Object (readonly)
Returns the value of attribute identifier.
1306 1307 1308 |
# File 'lib/rbcurse/extras/widgets/rtable.rb', line 1306 def identifier @identifier end |
#is_resizable ⇒ Object
Returns the value of attribute is_resizable.
1307 1308 1309 |
# File 'lib/rbcurse/extras/widgets/rtable.rb', line 1307 def is_resizable @is_resizable end |
#max_width ⇒ Object
Returns the value of attribute max_width.
1307 1308 1309 |
# File 'lib/rbcurse/extras/widgets/rtable.rb', line 1307 def max_width @max_width end |
#min_width ⇒ Object
Returns the value of attribute min_width.
1307 1308 1309 |
# File 'lib/rbcurse/extras/widgets/rtable.rb', line 1307 def min_width @min_width end |
#model_index ⇒ Object
index inside TableModel
1309 1310 1311 |
# File 'lib/rbcurse/extras/widgets/rtable.rb', line 1309 def model_index @model_index end |
Instance Method Details
#fire_property_change(text, oldval, newval) ⇒ Object
1341 1342 1343 1344 1345 |
# File 'lib/rbcurse/extras/widgets/rtable.rb', line 1341 def fire_property_change(text, oldval, newval) #$log.debug "TC: def fire_property_change(#{text}, #{oldval}, #{newval})" # need to send changeevent FIXME XXX maybe dsl_prop should do this. fire_handler :PROPERTY_CHANGE, self end |