Class: Gtk::TreeViewColumn
- Inherits:
-
Object
- Object
- Gtk::TreeViewColumn
- Extended by:
- GLib::Deprecatable
- Defined in:
- lib/gtk3/deprecated.rb,
lib/gtk3/tree-view-column.rb
Instance Method Summary collapse
- #add_attribute(cell, key, value) ⇒ Object
- #add_attribute_raw ⇒ Object
-
#initialize(title = nil, cell = nil, attributes = {}) ⇒ TreeViewColumn
constructor
A new instance of TreeViewColumn.
- #initialize_raw ⇒ Object
Constructor Details
#initialize(title = nil, cell = nil, attributes = {}) ⇒ TreeViewColumn
Returns a new instance of TreeViewColumn.
20 21 22 23 24 25 26 27 |
# File 'lib/gtk3/tree-view-column.rb', line 20 def initialize(title=nil, cell=nil, attributes={}) initialize_raw set_title(title) if title pack_start(cell, true) if cell attributes.each_entry do |key, value| add_attribute(cell, key, value) end end |
Instance Method Details
#add_attribute(cell, key, value) ⇒ Object
30 31 32 33 |
# File 'lib/gtk3/tree-view-column.rb', line 30 def add_attribute(cell, key, value) key = key.to_s if key.is_a?(Symbol) add_attribute_raw(cell, key, value) end |
#add_attribute_raw ⇒ Object
29 |
# File 'lib/gtk3/tree-view-column.rb', line 29 alias_method :add_attribute_raw, :add_attribute |
#initialize_raw ⇒ Object
19 |
# File 'lib/gtk3/tree-view-column.rb', line 19 alias_method :initialize_raw, :initialize |