![]()
|
Gtk::TreeViewColumn Class ReferenceTypedefed as Gtk::TreeView::Column.
More...
|
Public Types | |
typedef TreeViewColumn | Column |
typedef SigC::Slot2< void, CellRenderer*, const Gtk::TreeModel::iterator& > | SlotCellData |
Public Methods | |
virtual | ~TreeViewColumn () |
GtkTreeViewColumn* | gobj () |
const GtkTreeViewColumn* | gobj () const |
TreeViewColumn () | |
TreeViewColumn (const Glib::ustring& title) | |
TreeViewColumn (const Glib::ustring& title, CellRenderer& cell) | |
template <class T_ModelColumnType> | TreeViewColumn (const Glib::ustring& title, const TreeModelColumn<T_ModelColumnType>& column) |
Create a default view column for the given model column type. | |
void | pack_start (CellRenderer& cell, bool expand=true) |
Packs the cell into the beginning of the column. | |
void | pack_end (CellRenderer& cell, bool expand=true) |
Adds the cell to end of the column. | |
template <class T_ModelColumnType> void | pack_start (const TreeModelColumn<T_ModelColumnType>& column, bool expand=true) |
template <class T_ModelColumnType> void | pack_end (const TreeModelColumn<T_ModelColumnType>& column, bool expand=true) |
void | clear () |
Unsets all the mappings on all renderers on the tree_column . | |
CellRenderer* | get_first_cell_renderer () |
Gets the CellRenderer for the column. | |
const CellRenderer* | get_first_cell_renderer () const |
Gets the CellRenderer for the column. | |
Glib::ListHandle<CellRenderer*> | get_cell_renderers () |
Returns a newly-allocated G::List of all the cell renderers in the column, in no particular order. | |
Glib::ListHandle<const CellRenderer*> | get_cell_renderers () const |
Returns a newly-allocated G::List of all the cell renderers in the column, in no particular order. | |
void | add_attribute (CellRenderer& cell_renderer, const Glib::ustring& attribute, int column) |
Adds an attribute mapping to the list in tree_column . | |
void | add_attribute (const Glib::PropertyProxy_Base& property, const TreeModelColumnBase& column) |
void | set_renderer (Gtk::CellRenderer& renderer, const TreeModelColumnBase& column) |
void | set_cell_data_func (CellRenderer& cell_renderer, const SlotCellData& slot) |
void | unset_cell_data_func (CellRenderer& cell_renderer) |
void | clear_attributes (CellRenderer& cell_renderer) |
Clears all existing attributes previously set with set_attributes(). | |
void | set_spacing (int spacing) |
Sets the spacing field of tree_column , which is the number of pixels to place between cell renderers packed into it. | |
int | get_spacing () const |
Returns the spacing of tree_column . | |
void | set_visible (bool visible=true) |
Sets the visibility of tree_column . | |
bool | get_visible () const |
Returns true if tree_column is visible. | |
void | set_resizable (bool resizable=true) |
If resizable is true , then the user can explicitly resize the column by grabbing the outer edge of the column button. | |
bool | get_resizable () const |
Returns #true if the tree_column can be resized by the end user. | |
void | set_sizing (TreeViewColumnSizing type) |
Sets the growth behavior of tree_column to type . | |
TreeViewColumnSizing | get_sizing () |
Returns the current type of tree_column . | |
int | get_width () const |
Returns the current size of tree_column in pixels. | |
int | get_fixed_width () const |
Gets the fixed width of the column. | |
void | set_fixed_width (int fixed_width) |
Sets the size of the column in pixels. | |
void | set_min_width (int min_width) |
Sets the minimum width of the tree_column . | |
int | get_min_width () const |
Returns the minimum width in pixels of the tree_column , or -1 if no minimum width is set. | |
void | set_max_width (int max_width) |
Sets the maximum width of the tree_column . | |
int | get_max_width () const |
Returns the maximum width in pixels of the tree_column , or -1 if no maximum width is set. | |
void | clicked () |
Emits the "clicked" signal on the column. | |
void | set_title (const Glib::ustring& title) |
Sets the title of the tree_column . | |
Glib::ustring | get_title () const |
Returns the title of the widget. | |
void | set_clickable (bool clickable=true) |
Sets the header to be active if active is true . | |
bool | get_clickable () const |
Returns true if the user can click on the header for the column. | |
void | set_widget (Gtk::Widget& widget) |
Sets the widget in the header to be widget . | |
Widget* | get_widget () |
Returns the Gtk::Widget in the button on the column header. | |
const Widget* | get_widget () const |
Returns the Gtk::Widget in the button on the column header. | |
void | set_alignment (float xalign) |
Sets the alignment of the title or custom widget inside the column header. | |
void | set_alignment (AlignmentEnum xalign) |
Sets the alignment of the title or custom widget inside the column header. | |
float | get_alignment () const |
Returns the current x alignment of tree_column . | |
void | set_reorderable (bool reorderable=true) |
If reorderable is #true , then the column can be reordered by the end user dragging the header. | |
bool | get_reorderable () const |
Returns #true if the tree_column can be reordered by the user. | |
void | set_sort_column_id (const TreeModelColumnBase& sort_column_id) |
Sets the logical sort_column_id that this column sorts on when this column is selected for sorting. | |
void | set_sort_column_id (int sort_column_id) |
Sets the logical sort_column_id that this column sorts on when this column is selected for sorting. | |
int | get_sort_column_id () const |
Gets the logical sort_column_id that the model sorts on when this column is selected for sorting. | |
void | set_sort_indicator (bool setting) |
Call this function with a setting of true to display an arrow in the header button indicating the column is sorted. | |
bool | get_sort_indicator () const |
Gets the value set by set_sort_indicator(). | |
void | set_sort_order (SortType order) |
Changes the appearance of the sort indicator. | |
SortType | get_sort_order () const |
Gets the value set by set_sort_order(). | |
void | cell_set_cell_data (const Glib::RefPtr<TreeModel>& tree_model, const TreeModel::iterator& iter, bool is_expander, bool is_expanded) |
Sets the cell renderer based on the tree_model and iter . | |
void | cell_get_size (Gdk::Rectangle& cell_area, int& x_offset, int& y_offset, int& width, int& height) const |
Obtains the width and height needed to render the column. | |
bool | cell_is_visible () const |
Returns #true if any of the cells packed into the tree_column are visible. | |
void | focus_cell (CellRenderer& cell) |
Sets the current keyboard focus to be at cell , if the column contains 2 or more editable and activatable cells. | |
Glib::SignalProxy0<void> | signal_clicked () |
Glib::PropertyProxy<bool> | property_visible () |
Glib::PropertyProxy_ReadOnly< int > | property_width () |
Glib::PropertyProxy<TreeViewColumnSizing> | property_sizing () |
Glib::PropertyProxy<int> | property_fixed_width () |
Glib::PropertyProxy<int> | property_min_width () |
Glib::PropertyProxy<int> | property_max_width () |
Glib::PropertyProxy<Glib::ustring> | property_title () |
Glib::PropertyProxy<bool> | property_clickable () |
Glib::PropertyProxy<Widget*> | property_widget () |
Glib::PropertyProxy<float> | property_alignment () |
Glib::PropertyProxy<bool> | property_reorderable () |
Glib::PropertyProxy<bool> | property_sort_indicator () |
Glib::PropertyProxy<SortType> | property_sort_order () |
Protected Methods | |
virtual void | on_clicked () |
Related Functions | |
(Note that these are not member functions.) | |
Gtk::TreeViewColumn* | wrap (GtkTreeViewColumn* object, bool take_copy=false) |
This is a visible column in a Gtk::TreeView widget. It determines the geometry, type.
|
|
|
|
|
|
|
|
|
|
|
|
|
Create a default view column for the given model column type.
|
|
|
|
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.
|
|
Obtains the width and height needed to render the column. This is used primarily by the Gtk::TreeView.
|
|
Returns # For this to be meaningful, you must first initialize the cells with cell_set_cell_data()
|
|
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.
|
|
Unsets all the mappings on all renderers on the tree_column .
|
|
Clears all existing attributes previously set with set_attributes().
|
|
Emits the "clicked" signal on the column. This function will only work if tree_column is clickable. |
|
Sets the current keyboard focus to be at cell , if the column contains 2 or more editable and activatable cells. Since: 2.2
|
|
Returns the current x alignment of tree_column . This value can range between 0.0 and 1.0.
|
|
Returns a newly-allocated G::List of all the cell renderers in the column, in no particular order. The list must be freed with Glib::list_free().
|
|
Returns a newly-allocated G::List of all the cell renderers in the column, in no particular order. The list must be freed with Glib::list_free().
|
|
Returns
|
|
Gets the CellRenderer for the column. You should dynamic_cast<> to the expected derived CellRenderer type. This assumes that the TreeViewColumn contains only one CellRenderer. |
|
Gets the CellRenderer for the column. You should dynamic_cast<> to the expected derived CellRenderer type. This assumes that the TreeViewColumn contains only one CellRenderer. |
|
Gets the fixed width of the column. This value is only meaning may not be the actual width of the column on the screen, just what is requested.
|
|
Returns the maximum width in pixels of the tree_column , or -1 if no maximum width is set.
|
|
Returns the minimum width in pixels of the tree_column , or -1 if no minimum width is set.
|
|
Returns #
|
|
Returns #
|
|
Returns the current type of tree_column .
|
|
Gets the logical sort_column_id that the model sorts on when this column is selected for sorting. See set_sort_column_id().
|
|
Gets the value set by set_sort_indicator().
|
|
Gets the value set by set_sort_order().
|
|
Returns the spacing of tree_column .
|
|
Returns the title of the widget.
|
|
Returns
|
|
Returns the Gtk::Widget in the button on the column header.
If a custom widget has not been set then
|
|
Returns the Gtk::Widget in the button on the column header.
If a custom widget has not been set then
|
|
Returns the current size of tree_column in pixels.
|
|
Reimplemented from Gtk::Object. |
|
Reimplemented from Gtk::Object. |
|
|
|
|
|
Adds the cell to end of the column.
If expand is
|
|
|
|
Packs the cell into the beginning of the column.
If expand is
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Sets the alignment of the title or custom widget inside the column header. The alignment determines its location inside the button -- 0.0 for left, 0.5 for center, 1.0 for right.
|
|
Sets the alignment of the title or custom widget inside the column header. The alignment determines its location inside the button -- 0.0 for left, 0.5 for center, 1.0 for right.
|
|
|
|
Sets the header to be active if active is When the header is active, then it can take keyboard focus, and can be clicked.
|
|
Sets the size of the column in pixels. This is meaningful only if the sizing type is Gtk::TREE_VIEW_COLUMN_FIXED. The size of the column is clamped to the min/max width for the column. Please note that the min/max width of the column doesn't actually affect the "fixed_width" property of the widget, just the actual size when displayed.
|
|
Sets the maximum width of the tree_column . If max_width is -1, then the maximum width is unset. Note, the column can actually be wider than max width if it's the last column in a view. In this case, the column expands to fill any extra space.
|
|
Sets the minimum width of the tree_column . If min_width is -1, then the minimum width is unset.
|
|
|
|
If reorderable is #
|
|
If resizable is
If resizable is
|
|
Sets the growth behavior of tree_column to type .
|
|
Sets the logical sort_column_id that this column sorts on when this column is selected for sorting. Doing so makes the column header clickable.
|
|
Sets the logical sort_column_id that this column sorts on when this column is selected for sorting. Doing so makes the column header clickable.
|
|
Call this function with a setting of Call set_sort_order() to change the direction of the arrow.
|
|
Changes the appearance of the sort indicator. This does not actually sort the model. Use set_sort_column_id() if you want automatic sorting support. This function is primarily for custom sorting behavior, and should be used in conjunction with gtk_tree_sortable_set_sort_column() to do that. For custom models, the mechanism will vary. The sort indicator changes direction to indicate normal sort or reverse sort. Note that you must have the sort indicator enabled to see anything when calling this function; see set_sort_indicator().
|
|
Sets the spacing field of tree_column , which is the number of pixels to place between cell renderers packed into it.
|
|
Sets the title of the tree_column . If a custom widget has been set, then this value is ignored.
|
|
Sets the visibility of tree_column .
|
|
Sets the widget in the header to be widget .
If widget is
|
|
|
|
|
|
|