Class: RubyCurses::TableColumn
- Inherits:
-
Object
- Object
- RubyCurses::TableColumn
- Includes:
- EventHandler
- Defined in:
- lib/rbcurse/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.
Methods included from EventHandler
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
1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 |
# File 'lib/rbcurse/rtable.rb', line 1238 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? end |
Instance Attribute Details
#cell_editor ⇒ Object
Returns the value of attribute cell_editor.
1232 1233 1234 |
# File 'lib/rbcurse/rtable.rb', line 1232 def cell_editor @cell_editor end |
#cell_renderer ⇒ Object
Returns the value of attribute cell_renderer.
1217 1218 1219 |
# File 'lib/rbcurse/rtable.rb', line 1217 def cell_renderer @cell_renderer end |
#column_offset ⇒ Object
added column_offset on 2009-01-12 19:01
1231 1232 1233 |
# File 'lib/rbcurse/rtable.rb', line 1231 def column_offset @column_offset end |
#header_renderer ⇒ Object
user may override or set for this column, else headers default will be used
1220 1221 1222 |
# File 'lib/rbcurse/rtable.rb', line 1220 def header_renderer @header_renderer end |
#identifier ⇒ Object (readonly)
Returns the value of attribute identifier.
1215 1216 1217 |
# File 'lib/rbcurse/rtable.rb', line 1215 def identifier @identifier end |
#is_resizable ⇒ Object
Returns the value of attribute is_resizable.
1216 1217 1218 |
# File 'lib/rbcurse/rtable.rb', line 1216 def is_resizable @is_resizable end |
#max_width ⇒ Object
Returns the value of attribute max_width.
1216 1217 1218 |
# File 'lib/rbcurse/rtable.rb', line 1216 def max_width @max_width end |
#min_width ⇒ Object
Returns the value of attribute min_width.
1216 1217 1218 |
# File 'lib/rbcurse/rtable.rb', line 1216 def min_width @min_width end |
#model_index ⇒ Object
index inside TableModel
1218 1219 1220 |
# File 'lib/rbcurse/rtable.rb', line 1218 def model_index @model_index end |
Instance Method Details
#fire_property_change(text, oldval, newval) ⇒ Object
1249 1250 1251 1252 1253 |
# File 'lib/rbcurse/rtable.rb', line 1249 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 |