Class: Gtk::TreeViewColumn
- Inherits:
-
Object
- Object
- Gtk::TreeViewColumn
- Defined in:
- (unknown)
Instance Method Summary collapse
-
#add_attribute(cell_renderer, attribute, column) ⇒ nil
Adds an attribute mapping to the list in tree_column.
-
#alignment ⇒ Gtk::gfloat
Alignment.
- #alignment=(alignment) ⇒ Gtk::gfloat
-
#button ⇒ Gtk::Widget
Returns the button used in the treeview column header.
-
#cell_area ⇒ Gtk::CellArea
The Gtk::CellArea used to layout cell renderers for this column.
-
#cell_area=(cell_area) ⇒ Gtk::CellArea
The Gtk::CellArea used to layout cell renderers for this column.
-
#cell_get_position(cell_renderer, x_offset, width) ⇒ TrueClass
Obtains the horizontal position and size of a cell in a column.
-
#cell_get_size(cell_area, x_offset, y_offset, width, height) ⇒ nil
Obtains the width and height needed to render the column.
-
#cell_is_visible ⇒ TrueClass
Returns true if any of the cells packed into the tree_column are visible.
-
#cell_set_cell_data(tree_model, iter, is_expander, is_expanded) ⇒ nil
Sets the cell renderer based on the tree_model and iter.
-
#clear ⇒ nil
Unsets all the mappings on all renderers on the tree_column.
-
#clear_attributes(cell_renderer) ⇒ nil
Clears all existing attributes previously set with gtk_tree_view_column_set_attributes().
-
#clickable ⇒ TrueClass
Returns true if the user can click on the header for the column.
- #clickable=(clickable) ⇒ TrueClass
-
#clickable? ⇒ TrueClass
Clickable.
-
#clicked ⇒ nil
Emits the “clicked” signal on the column.
-
#expand ⇒ TrueClass
Returns true if the column expands to fill available space.
- #expand=(expand) ⇒ TrueClass
-
#expand? ⇒ TrueClass
Expand.
-
#fixed_width ⇒ Integer
Fixed-width.
- #fixed_width=(fixed_width) ⇒ Integer
-
#focus_cell(cell) ⇒ nil
Sets the current keyboard focus to be at cell, if the column contains 2 or more editable and activatable cells.
-
#max_width ⇒ Integer
Max-width.
- #max_width=(max_width) ⇒ Integer
-
#min_width ⇒ Integer
Min-width.
- #min_width=(min_width) ⇒ Integer
-
#new ⇒ Gtk::TreeViewColumn
Creates a new Gtk::TreeViewColumn.
-
#new_with_area(area) ⇒ Gtk::TreeViewColumn
Creates a new Gtk::TreeViewColumn using area to render its cells.
-
#new_with_attributes(title, cell, array) ⇒ Gtk::TreeViewColumn
Creates a new Gtk::TreeViewColumn with a number of default values.
-
#pack_end(cell, expand) ⇒ nil
Adds the cell to end of the column.
-
#pack_start(cell, expand) ⇒ nil
Packs the cell into the beginning of the column.
-
#queue_resize ⇒ nil
Flags the column, and the cell renderers added to this column, to have their sizes renegotiated.
-
#reorderable ⇒ TrueClass
Returns true if the tree_column can be reordered by the user.
- #reorderable=(reorderable) ⇒ TrueClass
-
#reorderable? ⇒ TrueClass
Reorderable.
-
#resizable ⇒ TrueClass
Returns true if the tree_column can be resized by the end user.
- #resizable=(resizable) ⇒ TrueClass
-
#resizable? ⇒ TrueClass
Resizable.
-
#set_attributes(cell_renderer, array) ⇒ nil
Sets the attributes in the list as the attributes of tree_column.
-
#set_cell_data_func(cell_renderer, func, func_data, destroy) ⇒ nil
Sets the Gtk::TreeCellDataFunc to use for the column.
-
#sizing ⇒ Gtk::TreeViewColumnSizing
Sizing.
- #sizing=(sizing) ⇒ Gtk::TreeViewColumnSizing
-
#sort_column_id ⇒ Integer
Logical sort column ID this column sorts on when selected for sorting.
-
#sort_column_id=(sort_column_id) ⇒ Integer
Logical sort column ID this column sorts on when selected for sorting.
-
#sort_indicator ⇒ TrueClass
Gets the value set by gtk_tree_view_column_set_sort_indicator().
- #sort_indicator=(sort_indicator) ⇒ TrueClass
-
#sort_indicator? ⇒ TrueClass
Sort-indicator.
-
#sort_order ⇒ Gtk::SortType
Sort-order.
- #sort_order=(sort_order) ⇒ Gtk::SortType
-
#spacing ⇒ Integer
Spacing.
- #spacing=(spacing) ⇒ Integer
-
#title ⇒ String
Title.
- #title=(title) ⇒ String
-
#tree_view ⇒ Gtk::Widget
Returns the Gtk::TreeView wherein tree_column has been inserted.
-
#visible ⇒ TrueClass
Returns true if tree_column is visible.
- #visible=(visible) ⇒ TrueClass
-
#visible? ⇒ TrueClass
Visible.
-
#widget ⇒ Gtk::Widget
Widget.
- #widget=(widget) ⇒ Gtk::Widget
-
#width ⇒ Integer
Width.
- #width=(width) ⇒ Integer
-
#x_offset ⇒ Integer
X-offset.
- #x_offset=(x_offset) ⇒ Integer
Instance Method Details
#add_attribute(cell_renderer, attribute, column) ⇒ nil
Adds an attribute mapping to the list in tree_column. The column is the column of the model to get a value from, and the attribute is the parameter on cell_renderer to be set from the value. So for example if column 2 of the model contains strings, you could have the “text” attribute of a Gtk::CellRendererText get its values from column 2.
#alignment ⇒ Gtk::gfloat
Returns alignment.
#alignment=(alignment) ⇒ Gtk::gfloat
#button ⇒ Gtk::Widget
Returns the button used in the treeview column header
#cell_area ⇒ Gtk::CellArea
The Gtk::CellArea used to layout cell renderers for this column.
If no area is specified when creating the tree view column with gtk_tree_view_column_new_with_area() a horizontally oriented Gtk::CellAreaBox will be used.
#cell_area=(cell_area) ⇒ Gtk::CellArea
The Gtk::CellArea used to layout cell renderers for this column.
If no area is specified when creating the tree view column with gtk_tree_view_column_new_with_area() a horizontally oriented Gtk::CellAreaBox will be used.
#cell_get_position(cell_renderer, x_offset, width) ⇒ TrueClass
Obtains the horizontal position and size of a cell in a column. If the cell is not found in the column, start_pos and width are not changed and false is returned.
#cell_get_size(cell_area, x_offset, y_offset, width, height) ⇒ nil
Obtains the width and height needed to render the column. This is used primarily by the Gtk::TreeView.
#cell_is_visible ⇒ TrueClass
Returns true if any of the cells packed into the tree_column are visible. For this to be meaningful, you must first initialize the cells with gtk_tree_view_column_cell_set_cell_data()
#cell_set_cell_data(tree_model, iter, is_expander, is_expanded) ⇒ nil
Sets the cell renderer based on the tree_model and iter. That is, for every attribute mapping in tree_column, it will get a value from the set column on the iter, and use that value to set the attribute on the cell renderer. This is used primarily by the Gtk::TreeView.
#clear ⇒ nil
Unsets all the mappings on all renderers on the tree_column.
#clear_attributes(cell_renderer) ⇒ nil
Clears all existing attributes previously set with gtk_tree_view_column_set_attributes().
#clickable ⇒ TrueClass
Returns true if the user can click on the header for the column.
#clickable=(clickable) ⇒ TrueClass
#clickable? ⇒ TrueClass
Returns clickable.
#clicked ⇒ nil
Emits the “clicked” signal on the column. This function will only work if tree_column is clickable.
#expand ⇒ TrueClass
Returns true if the column expands to fill available space.
#expand=(expand) ⇒ TrueClass
#expand? ⇒ TrueClass
Returns expand.
#fixed_width ⇒ Integer
Returns fixed-width.
#fixed_width=(fixed_width) ⇒ Integer
#focus_cell(cell) ⇒ nil
Sets the current keyboard focus to be at cell, if the column contains 2 or more editable and activatable cells.
#max_width ⇒ Integer
Returns max-width.
#max_width=(max_width) ⇒ Integer
#min_width ⇒ Integer
Returns min-width.
#min_width=(min_width) ⇒ Integer
#new ⇒ Gtk::TreeViewColumn
Creates a new Gtk::TreeViewColumn.
#new_with_area(area) ⇒ Gtk::TreeViewColumn
Creates a new Gtk::TreeViewColumn using area to render its cells.
#new_with_attributes(title, cell, array) ⇒ Gtk::TreeViewColumn
Creates a new Gtk::TreeViewColumn with a number of default values. This is equivalent to calling gtk_tree_view_column_set_title(), gtk_tree_view_column_pack_start(), and gtk_tree_view_column_set_attributes() on the newly created Gtk::TreeViewColumn.
Here’s a simple example:
enum { TEXT_COLUMN, COLOR_COLUMN, N_COLUMNS };
// ...
{
GtkTreeViewColumn *column;
GtkCellRenderer *renderer = gtk_cell_renderer_text_new ();
column = gtk_tree_view_column_new_with_attributes ("Title",
renderer,
"text", TEXT_COLUMN,
"foreground", COLOR_COLUMN,
NULL);
}
#pack_end(cell, expand) ⇒ nil
Adds the cell to end of the column. If expand is false, then the cell is allocated no more space than it needs. Any unused space is divided evenly between cells for which expand is true.
#pack_start(cell, expand) ⇒ nil
Packs the cell into the beginning of the column. If expand is false, then the cell is allocated no more space than it needs. Any unused space is divided evenly between cells for which expand is true.
#queue_resize ⇒ nil
Flags the column, and the cell renderers added to this column, to have their sizes renegotiated.
#reorderable ⇒ TrueClass
Returns true if the tree_column can be reordered by the user.
#reorderable=(reorderable) ⇒ TrueClass
#reorderable? ⇒ TrueClass
Returns reorderable.
#resizable ⇒ TrueClass
Returns true if the tree_column can be resized by the end user.
#resizable=(resizable) ⇒ TrueClass
#resizable? ⇒ TrueClass
Returns resizable.
#set_attributes(cell_renderer, array) ⇒ nil
Sets the attributes in the list as the attributes of tree_column. The attributes should be in attribute/column order, as in gtk_tree_view_column_add_attribute(). All existing attributes are removed, and replaced with the new attributes.
#set_cell_data_func(cell_renderer, func, func_data, destroy) ⇒ nil
Sets the Gtk::TreeCellDataFunc to use for the column. This function is used instead of the standard attributes mapping for setting the column value, and should set the value of tree_column’s cell renderer as appropriate. func may be nil to remove an older one.
#sizing ⇒ Gtk::TreeViewColumnSizing
Returns sizing.
#sizing=(sizing) ⇒ Gtk::TreeViewColumnSizing
#sort_column_id ⇒ Integer
Logical sort column ID this column sorts on when selected for sorting. Setting the sort column ID makes the column header clickable. Set to -1 to make the column unsortable.
#sort_column_id=(sort_column_id) ⇒ Integer
Logical sort column ID this column sorts on when selected for sorting. Setting the sort column ID makes the column header clickable. Set to -1 to make the column unsortable.
#sort_indicator ⇒ TrueClass
Gets the value set by gtk_tree_view_column_set_sort_indicator().
#sort_indicator=(sort_indicator) ⇒ TrueClass
#sort_indicator? ⇒ TrueClass
Returns sort-indicator.
#sort_order ⇒ Gtk::SortType
Returns sort-order.
#sort_order=(sort_order) ⇒ Gtk::SortType
#spacing ⇒ Integer
Returns spacing.
#spacing=(spacing) ⇒ Integer
#title ⇒ String
Returns title.
#title=(title) ⇒ String
#tree_view ⇒ Gtk::Widget
Returns the Gtk::TreeView wherein tree_column has been inserted. If column is currently not inserted in any tree view, nil is returned.
#visible ⇒ TrueClass
Returns true if tree_column is visible. the tree will show the column.
#visible=(visible) ⇒ TrueClass
#visible? ⇒ TrueClass
Returns visible.
#widget ⇒ Gtk::Widget
Returns widget.
#widget=(widget) ⇒ Gtk::Widget
#width ⇒ Integer
Returns width.
#width=(width) ⇒ Integer
#x_offset ⇒ Integer
Returns x-offset.