Ardour  9.0-pre0-582-g084a23a80d
Gtk::TreeViewColumn Class Reference

#include <treeviewcolumn.h>

Inheritance diagram for Gtk::TreeViewColumn:
[legend]

Public Types

typedef TreeViewColumn Column
 
typedef sigc::slot< void, CellRenderer *, const Gtk::TreeModel::iterator & > SlotCellData
 

Public Member Functions

virtual ~TreeViewColumn ()
 
GtkTreeViewColumngobj ()
 Provides access to the underlying C GtkObject. More...
 
const GtkTreeViewColumngobj () const
 Provides access to the underlying C GtkObject. More...
 
 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)
 
void pack_start (CellRenderer &cell, bool expand=true)
 
void pack_end (CellRenderer &cell, bool expand=true)
 
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 ()
 
CellRendererget_first_cell ()
 
const CellRendererget_first_cell () const
 
CellRendererget_first_cell_renderer ()
 
const CellRendererget_first_cell_renderer () const
 
Glib::ListHandle< CellRenderer * > get_cell_renderers ()
 
Glib::ListHandle< const CellRenderer * > get_cell_renderers () const
 
void add_attribute (CellRenderer &cell_renderer, const Glib::ustring &attribute, int column)
 
void add_attribute (const Glib::PropertyProxy_Base &property, const TreeModelColumnBase &column)
 
void add_attribute (Gtk::CellRenderer &cell, const Glib::ustring &property_name, 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)
 
void set_spacing (int spacing)
 
int get_spacing () const
 
void set_visible (bool visible=true)
 
bool get_visible () const
 
void set_resizable (bool resizable=true)
 
bool get_resizable () const
 
void set_sizing (TreeViewColumnSizing type)
 
TreeViewColumnSizing get_sizing ()
 
int get_width () const
 
int get_fixed_width () const
 
void set_fixed_width (int fixed_width)
 
void set_min_width (int min_width)
 
int get_min_width () const
 
void set_max_width (int max_width)
 
int get_max_width () const
 
void clicked ()
 
void set_title (const Glib::ustring &title)
 
Glib::ustring get_title () const
 
void set_expand (bool expand=true)
 
bool get_expand () const
 
void set_clickable (bool clickable=true)
 
bool get_clickable () const
 
void set_widget (Gtk::Widget &widget)
 
Widgetget_widget ()
 
const Widgetget_widget () const
 
void set_alignment (float xalign)
 
void set_alignment (AlignmentEnum xalign)
 
float get_alignment () const
 
void set_reorderable (bool reorderable=true)
 
bool get_reorderable () const
 
void set_sort_column (const TreeModelColumnBase &sort_column_id)
 
void set_sort_column (int sort_column_id)
 
void set_sort_column_id (const TreeModelColumnBase &sort_column_id)
 
void set_sort_column_id (int sort_column_id)
 
int get_sort_column_id () const
 
void set_sort_indicator (bool setting)
 
bool get_sort_indicator () const
 
void set_sort_order (SortType order)
 
SortType get_sort_order () const
 
void cell_set_cell_data (const Glib::RefPtr< TreeModel > &tree_model, const TreeModel::iterator &iter, bool is_expander, bool is_expanded)
 
void cell_get_size (Gdk::Rectangle &cell_area, int &x_offset, int &y_offset, int &width, int &height) const
 
void cell_get_size (const Gdk::Rectangle &cell_area, int &x_offset, int &y_offset, int &width, int &height) const
 
bool cell_is_visible () const
 
void focus_cell (CellRenderer &cell)
 
bool get_cell_position (const CellRenderer &cell_renderer, int &start_pos, int &width) const
 
void queue_resize ()
 
TreeViewget_tree_view ()
 
const TreeViewget_tree_view () const
 
Glib::SignalProxy0< void > signal_clicked ()
 
Glib::PropertyProxy< bool > property_visible ()
 
Glib::PropertyProxy_ReadOnly< bool > property_visible () const
 
Glib::PropertyProxy< bool > property_resizable ()
 
Glib::PropertyProxy_ReadOnly< bool > property_resizable () const
 
Glib::PropertyProxy_ReadOnly< int > property_width () const
 
Glib::PropertyProxy< int > property_spacing ()
 
Glib::PropertyProxy_ReadOnly< int > property_spacing () const
 
Glib::PropertyProxy< TreeViewColumnSizingproperty_sizing ()
 
Glib::PropertyProxy_ReadOnly< TreeViewColumnSizingproperty_sizing () const
 
Glib::PropertyProxy< int > property_fixed_width ()
 
Glib::PropertyProxy_ReadOnly< int > property_fixed_width () const
 
Glib::PropertyProxy< int > property_min_width ()
 
Glib::PropertyProxy_ReadOnly< int > property_min_width () const
 
Glib::PropertyProxy< int > property_max_width ()
 
Glib::PropertyProxy_ReadOnly< int > property_max_width () const
 
Glib::PropertyProxy< Glib::ustring > property_title ()
 
Glib::PropertyProxy_ReadOnly< Glib::ustring > property_title () const
 
Glib::PropertyProxy< bool > property_expand ()
 
Glib::PropertyProxy_ReadOnly< bool > property_expand () const
 
Glib::PropertyProxy< bool > property_clickable ()
 
Glib::PropertyProxy_ReadOnly< bool > property_clickable () const
 
Glib::PropertyProxy< Widget * > property_widget ()
 
Glib::PropertyProxy_ReadOnly< Widget * > property_widget () const
 
Glib::PropertyProxy< float > property_alignment ()
 
Glib::PropertyProxy_ReadOnly< float > property_alignment () const
 
Glib::PropertyProxy< bool > property_reorderable ()
 
Glib::PropertyProxy_ReadOnly< bool > property_reorderable () const
 
Glib::PropertyProxy< bool > property_sort_indicator ()
 
Glib::PropertyProxy_ReadOnly< bool > property_sort_indicator () const
 
Glib::PropertyProxy< SortTypeproperty_sort_order ()
 
Glib::PropertyProxy_ReadOnly< SortTypeproperty_sort_order () const
 
Glib::PropertyProxy< int > property_sort_column_id ()
 
Glib::PropertyProxy_ReadOnly< int > property_sort_column_id () const
 
- Public Member Functions inherited from Gtk::Object
virtual ~Object ()
 
GtkObjectgobj ()
 Provides access to the underlying C GtkObject. More...
 
const GtkObjectgobj () const
 Provides access to the underlying C GtkObject. More...
 
Glib::PropertyProxy< void * > property_user_data ()
 
Glib::PropertyProxy_ReadOnly< void * > property_user_data () const
 

Protected Member Functions

virtual void on_clicked ()
 This is a default handler for the signal signal_clicked(). More...
 

Related Functions

(Note that these are not member functions.)

Gtk::TreeViewColumnwrap (GtkTreeViewColumn *object, bool take_copy=false)
 

Detailed Description

Typedefed as Gtk::TreeView::Column. This is a visible column in a Gtk::TreeView widget. It determines the geometry, type.

Definition at line 103 of file treeviewcolumn.h.

Member Typedef Documentation

◆ Column

Definition at line 161 of file treeviewcolumn.h.

◆ SlotCellData

For instance, void on_cell_data(Gtk::CellRenderer* cell, const Gtk::TreeModel::iterator& iter);

This function is used instead of the standard attributes mapping for setting the column value, and should set the value of the column's cell renderer as appropriate.

Definition at line 310 of file treeviewcolumn.h.

Constructor & Destructor Documentation

◆ ~TreeViewColumn()

virtual Gtk::TreeViewColumn::~TreeViewColumn ( )
virtual

◆ TreeViewColumn() [1/4]

Gtk::TreeViewColumn::TreeViewColumn ( )

◆ TreeViewColumn() [2/4]

Gtk::TreeViewColumn::TreeViewColumn ( const Glib::ustring &  title)
explicit

◆ TreeViewColumn() [3/4]

Gtk::TreeViewColumn::TreeViewColumn ( const Glib::ustring &  title,
CellRenderer cell 
)

◆ TreeViewColumn() [4/4]

template<class T_ModelColumnType >
Gtk::TreeViewColumn::TreeViewColumn ( const Glib::ustring &  title,
const TreeModelColumn< T_ModelColumnType > &  column 
)

Create a default view column for the given model column type.

Member Function Documentation

◆ add_attribute() [1/3]

void Gtk::TreeViewColumn::add_attribute ( CellRenderer cell_renderer,
const Glib::ustring &  attribute,
int  column 
)

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.

Parameters
cell_rendererThe Gtk::CellRenderer to set attributes on.
attributeAn attribute on the renderer.
columnThe column position on the model to get the attribute from.

◆ add_attribute() [2/3]

void Gtk::TreeViewColumn::add_attribute ( const Glib::PropertyProxy_Base &  property,
const TreeModelColumnBase column 
)

◆ add_attribute() [3/3]

void Gtk::TreeViewColumn::add_attribute ( Gtk::CellRenderer cell,
const Glib::ustring &  property_name,
const TreeModelColumnBase column 
)

◆ cell_get_size() [1/2]

void Gtk::TreeViewColumn::cell_get_size ( const 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. This is used primarily by the Gtk::TreeView.

Parameters
cell_areaThe area a cell in the column will be allocated.
x_offsetLocation to return x offset of a cell relative to cell_area.
y_offsetLocation to return y offset of a cell relative to cell_area.
widthLocation to return width needed to render a cell.
heightLocation to return height needed to render a cell.

◆ cell_get_size() [2/2]

void Gtk::TreeViewColumn::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. This is used primarily by the Gtk::TreeView.

Parameters
cell_areaThe area a cell in the column will be allocated.
x_offsetLocation to return x offset of a cell relative to cell_area.
y_offsetLocation to return y offset of a cell relative to cell_area.
widthLocation to return width needed to render a cell.
heightLocation to return height needed to render a cell.

◆ cell_is_visible()

bool Gtk::TreeViewColumn::cell_is_visible ( ) const

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 cell_set_cell_data()

Returns
true, if any of the cells packed into the tree_column are currently visible.

◆ cell_set_cell_data()

void Gtk::TreeViewColumn::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. 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.

Parameters
tree_modelThe Gtk::TreeModel to to get the cell renderers attributes from.
iterThe Gtk::TreeIter to to get the cell renderer's attributes from.
is_expandertrue, if the row has children.
is_expandedtrue, if the row has visible children.

◆ clear()

void Gtk::TreeViewColumn::clear ( )

Unsets all the mappings on all renderers on the tree_column.

◆ clear_attributes()

void Gtk::TreeViewColumn::clear_attributes ( CellRenderer cell_renderer)

Clears all existing attributes previously set with set_attributes().

Parameters
cell_rendererA Gtk::CellRenderer to clear the attribute mapping on.

◆ clicked()

void Gtk::TreeViewColumn::clicked ( )

Emits the "clicked" signal on the column. This function will only work if tree_column is clickable.

◆ focus_cell()

void Gtk::TreeViewColumn::focus_cell ( CellRenderer cell)

Sets the current keyboard focus to be at cell, if the column contains 2 or more editable and activatable cells.

Parameters
cellA Gtk::CellRenderer.

◆ get_alignment()

float Gtk::TreeViewColumn::get_alignment ( ) const

Returns the current x alignment of tree_column. This value can range between 0.0 and 1.0.

Returns
The current alignent of tree_column.

◆ get_cell_position()

bool Gtk::TreeViewColumn::get_cell_position ( const CellRenderer cell_renderer,
int &  start_pos,
int &  width 
) const

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.

Parameters
cell_rendererA Gtk::CellRenderer.
start_posReturn location for the horizontal position of cell within tree_column.
widthReturn location for the width of cell.
Returns
true if cell belongs to tree_column.

◆ get_cell_renderers() [1/2]

Glib::ListHandle<CellRenderer*> Gtk::TreeViewColumn::get_cell_renderers ( )

Returns a list of all the cell renderers in the column, in no particular order.

Returns
A list of Gtk::CellRenderers.

◆ get_cell_renderers() [2/2]

Glib::ListHandle<const CellRenderer*> Gtk::TreeViewColumn::get_cell_renderers ( ) const

Returns a list of all the cell renderers in the column, in no particular order.

Returns
A list of Gtk::CellRenderers.

◆ get_clickable()

bool Gtk::TreeViewColumn::get_clickable ( ) const

Returns true if the user can click on the header for the column.

Returns
true if user can click the column header.

◆ get_expand()

bool Gtk::TreeViewColumn::get_expand ( ) const

Return true if the column expands to take any available space.

Returns
true, if the column expands.

◆ get_first_cell() [1/2]

CellRenderer* Gtk::TreeViewColumn::get_first_cell ( )

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.

◆ get_first_cell() [2/2]

const CellRenderer* Gtk::TreeViewColumn::get_first_cell ( ) const

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.

◆ get_first_cell_renderer() [1/2]

CellRenderer* Gtk::TreeViewColumn::get_first_cell_renderer ( )

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.

◆ get_first_cell_renderer() [2/2]

const CellRenderer* Gtk::TreeViewColumn::get_first_cell_renderer ( ) const

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.

◆ get_fixed_width()

int Gtk::TreeViewColumn::get_fixed_width ( ) const

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 fixed width of the column.

◆ get_max_width()

int Gtk::TreeViewColumn::get_max_width ( ) const

Returns the maximum width in pixels of the tree_column, or -1 if no maximum width is set.

Returns
The maximum width of the tree_column.

◆ get_min_width()

int Gtk::TreeViewColumn::get_min_width ( ) const

Returns the minimum width in pixels of the tree_column, or -1 if no minimum width is set.

Returns
The minimum width of the tree_column.

◆ get_reorderable()

bool Gtk::TreeViewColumn::get_reorderable ( ) const

Returns true if the tree_column can be reordered by the user.

Returns
true if the tree_column can be reordered by the user.

◆ get_resizable()

bool Gtk::TreeViewColumn::get_resizable ( ) const

Returns true if the tree_column can be resized by the end user.

Returns
true, if the tree_column can be resized.

◆ get_sizing()

TreeViewColumnSizing Gtk::TreeViewColumn::get_sizing ( )

Returns the current type of tree_column.

Returns
The type of tree_column.

◆ get_sort_column_id()

int Gtk::TreeViewColumn::get_sort_column_id ( ) const

Gets the logical sort_column_id that the model sorts on when this column is selected for sorting. See set_sort_column_id().

Returns
The current sort_column_id for this column, or -1 if this column can't be used for sorting.

◆ get_sort_indicator()

bool Gtk::TreeViewColumn::get_sort_indicator ( ) const

Gets the value set by set_sort_indicator().

Returns
Whether the sort indicator arrow is displayed.

◆ get_sort_order()

SortType Gtk::TreeViewColumn::get_sort_order ( ) const

Gets the value set by set_sort_order().

Returns
The sort order the sort indicator is indicating.

◆ get_spacing()

int Gtk::TreeViewColumn::get_spacing ( ) const

Returns the spacing of tree_column.

Returns
The spacing of tree_column.

◆ get_title()

Glib::ustring Gtk::TreeViewColumn::get_title ( ) const

Returns the title of the widget.

Returns
The title of the column. This string should not be modified or freed.

◆ get_tree_view() [1/2]

TreeView* Gtk::TreeViewColumn::get_tree_view ( )

Returns the Gtk::TreeView wherein tree_column has been inserted. If column is currently not inserted in any tree view, 0 is returned.

Returns
The tree view wherein column has been inserted if any, 0 otherwise.

◆ get_tree_view() [2/2]

const TreeView* Gtk::TreeViewColumn::get_tree_view ( ) const

Returns the Gtk::TreeView wherein tree_column has been inserted. If column is currently not inserted in any tree view, 0 is returned.

Returns
The tree view wherein column has been inserted if any, 0 otherwise.

◆ get_visible()

bool Gtk::TreeViewColumn::get_visible ( ) const

Returns true if tree_column is visible.

Returns
Whether the column is visible or not. If it is visible, then the tree will show the column.

◆ get_widget() [1/2]

Widget* Gtk::TreeViewColumn::get_widget ( )

Returns the Gtk::Widget in the button on the column header. If a custom widget has not been set then 0 is returned.

Returns
The Gtk::Widget in the column header, or 0.

◆ get_widget() [2/2]

const Widget* Gtk::TreeViewColumn::get_widget ( ) const

Returns the Gtk::Widget in the button on the column header. If a custom widget has not been set then 0 is returned.

Returns
The Gtk::Widget in the column header, or 0.

◆ get_width()

int Gtk::TreeViewColumn::get_width ( ) const

Returns the current size of tree_column in pixels.

Returns
The current width of tree_column.

◆ gobj() [1/2]

GtkTreeViewColumn* Gtk::TreeViewColumn::gobj ( )
inline

Provides access to the underlying C GtkObject.

Definition at line 140 of file treeviewcolumn.h.

◆ gobj() [2/2]

const GtkTreeViewColumn* Gtk::TreeViewColumn::gobj ( ) const
inline

Provides access to the underlying C GtkObject.

Definition at line 143 of file treeviewcolumn.h.

◆ on_clicked()

virtual void Gtk::TreeViewColumn::on_clicked ( )
protectedvirtual

This is a default handler for the signal signal_clicked().

◆ pack_end() [1/2]

void Gtk::TreeViewColumn::pack_end ( CellRenderer cell,
bool  expand = true 
)

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.

Parameters
cellThe Gtk::CellRenderer.
expandtrue if cell is to be given extra space allocated to tree_column.

◆ pack_end() [2/2]

template<class T_ModelColumnType >
void Gtk::TreeViewColumn::pack_end ( const TreeModelColumn< T_ModelColumnType > &  column,
bool  expand = true 
)

Creates an appropriate CellRenderer for the column, and packs that cell at the 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.

You can use get_first_cell() or get_cell_renderers() to access the generated CellRenderer.

Parameters
columnThe model column that will be rendered by the view cell.
expandtrue if the cell is to be given extra space allocated to the view column.

◆ pack_start() [1/2]

void Gtk::TreeViewColumn::pack_start ( CellRenderer cell,
bool  expand = true 
)

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.

Parameters
cellThe Gtk::CellRenderer.
expandtrue if cell is to be given extra space allocated to tree_column.

◆ pack_start() [2/2]

template<class T_ModelColumnType >
void Gtk::TreeViewColumn::pack_start ( const TreeModelColumn< T_ModelColumnType > &  column,
bool  expand = true 
)

Creates an appropriate CellRenderer for the column, and packs that 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.

You can use get_first_cell() or get_cell_renderers() to access the generated CellRenderer.

Parameters
columnThe model column that will be rendered by the view cell.
expandtrue if the cell is to be given extra space allocated to the view column.

◆ property_alignment() [1/2]

Glib::PropertyProxy< float > Gtk::TreeViewColumn::property_alignment ( )

X Alignment of the column header text or widget.

Returns
A PropertyProxy that allows you to get or set the value of the property, or receive notification when the value of the property changes.

◆ property_alignment() [2/2]

Glib::PropertyProxy_ReadOnly< float > Gtk::TreeViewColumn::property_alignment ( ) const

X Alignment of the column header text or widget.

Returns
A PropertyProxy_ReadOnly that allows you to get the value of the property, or receive notification when the value of the property changes.

◆ property_clickable() [1/2]

Glib::PropertyProxy< bool > Gtk::TreeViewColumn::property_clickable ( )

Whether the header can be clicked.

Returns
A PropertyProxy that allows you to get or set the value of the property, or receive notification when the value of the property changes.

◆ property_clickable() [2/2]

Glib::PropertyProxy_ReadOnly< bool > Gtk::TreeViewColumn::property_clickable ( ) const

Whether the header can be clicked.

Returns
A PropertyProxy_ReadOnly that allows you to get the value of the property, or receive notification when the value of the property changes.

◆ property_expand() [1/2]

Glib::PropertyProxy< bool > Gtk::TreeViewColumn::property_expand ( )

Column gets share of extra width allocated to the widget.

Returns
A PropertyProxy that allows you to get or set the value of the property, or receive notification when the value of the property changes.

◆ property_expand() [2/2]

Glib::PropertyProxy_ReadOnly< bool > Gtk::TreeViewColumn::property_expand ( ) const

Column gets share of extra width allocated to the widget.

Returns
A PropertyProxy_ReadOnly that allows you to get the value of the property, or receive notification when the value of the property changes.

◆ property_fixed_width() [1/2]

Glib::PropertyProxy< int > Gtk::TreeViewColumn::property_fixed_width ( )

Current fixed width of the column.

Returns
A PropertyProxy that allows you to get or set the value of the property, or receive notification when the value of the property changes.

◆ property_fixed_width() [2/2]

Glib::PropertyProxy_ReadOnly< int > Gtk::TreeViewColumn::property_fixed_width ( ) const

Current fixed width of the column.

Returns
A PropertyProxy_ReadOnly that allows you to get the value of the property, or receive notification when the value of the property changes.

◆ property_max_width() [1/2]

Glib::PropertyProxy< int > Gtk::TreeViewColumn::property_max_width ( )

Maximum allowed width of the column.

Returns
A PropertyProxy that allows you to get or set the value of the property, or receive notification when the value of the property changes.

◆ property_max_width() [2/2]

Glib::PropertyProxy_ReadOnly< int > Gtk::TreeViewColumn::property_max_width ( ) const

Maximum allowed width of the column.

Returns
A PropertyProxy_ReadOnly that allows you to get the value of the property, or receive notification when the value of the property changes.

◆ property_min_width() [1/2]

Glib::PropertyProxy< int > Gtk::TreeViewColumn::property_min_width ( )

Minimum allowed width of the column.

Returns
A PropertyProxy that allows you to get or set the value of the property, or receive notification when the value of the property changes.

◆ property_min_width() [2/2]

Glib::PropertyProxy_ReadOnly< int > Gtk::TreeViewColumn::property_min_width ( ) const

Minimum allowed width of the column.

Returns
A PropertyProxy_ReadOnly that allows you to get the value of the property, or receive notification when the value of the property changes.

◆ property_reorderable() [1/2]

Glib::PropertyProxy< bool > Gtk::TreeViewColumn::property_reorderable ( )

Whether the column can be reordered around the headers.

Returns
A PropertyProxy that allows you to get or set the value of the property, or receive notification when the value of the property changes.

◆ property_reorderable() [2/2]

Glib::PropertyProxy_ReadOnly< bool > Gtk::TreeViewColumn::property_reorderable ( ) const

Whether the column can be reordered around the headers.

Returns
A PropertyProxy_ReadOnly that allows you to get the value of the property, or receive notification when the value of the property changes.

◆ property_resizable() [1/2]

Glib::PropertyProxy< bool > Gtk::TreeViewColumn::property_resizable ( )

Column is user-resizable.

Returns
A PropertyProxy that allows you to get or set the value of the property, or receive notification when the value of the property changes.

◆ property_resizable() [2/2]

Glib::PropertyProxy_ReadOnly< bool > Gtk::TreeViewColumn::property_resizable ( ) const

Column is user-resizable.

Returns
A PropertyProxy_ReadOnly that allows you to get the value of the property, or receive notification when the value of the property changes.

◆ property_sizing() [1/2]

Glib::PropertyProxy< TreeViewColumnSizing > Gtk::TreeViewColumn::property_sizing ( )

Resize mode of the column.

Returns
A PropertyProxy that allows you to get or set the value of the property, or receive notification when the value of the property changes.

◆ property_sizing() [2/2]

Glib::PropertyProxy_ReadOnly< TreeViewColumnSizing > Gtk::TreeViewColumn::property_sizing ( ) const

Resize mode of the column.

Returns
A PropertyProxy_ReadOnly that allows you to get the value of the property, or receive notification when the value of the property changes.

◆ property_sort_column_id() [1/2]

Glib::PropertyProxy< int > Gtk::TreeViewColumn::property_sort_column_id ( )

Logical sort column ID this column sorts on when selected for sorting.

Returns
A PropertyProxy that allows you to get or set the value of the property, or receive notification when the value of the property changes.

◆ property_sort_column_id() [2/2]

Glib::PropertyProxy_ReadOnly< int > Gtk::TreeViewColumn::property_sort_column_id ( ) const

Logical sort column ID this column sorts on when selected for sorting.

Returns
A PropertyProxy_ReadOnly that allows you to get the value of the property, or receive notification when the value of the property changes.

◆ property_sort_indicator() [1/2]

Glib::PropertyProxy< bool > Gtk::TreeViewColumn::property_sort_indicator ( )

Whether to show a sort indicator.

Returns
A PropertyProxy that allows you to get or set the value of the property, or receive notification when the value of the property changes.

◆ property_sort_indicator() [2/2]

Glib::PropertyProxy_ReadOnly< bool > Gtk::TreeViewColumn::property_sort_indicator ( ) const

Whether to show a sort indicator.

Returns
A PropertyProxy_ReadOnly that allows you to get the value of the property, or receive notification when the value of the property changes.

◆ property_sort_order() [1/2]

Glib::PropertyProxy< SortType > Gtk::TreeViewColumn::property_sort_order ( )

Sort direction the sort indicator should indicate.

Returns
A PropertyProxy that allows you to get or set the value of the property, or receive notification when the value of the property changes.

◆ property_sort_order() [2/2]

Glib::PropertyProxy_ReadOnly< SortType > Gtk::TreeViewColumn::property_sort_order ( ) const

Sort direction the sort indicator should indicate.

Returns
A PropertyProxy_ReadOnly that allows you to get the value of the property, or receive notification when the value of the property changes.

◆ property_spacing() [1/2]

Glib::PropertyProxy< int > Gtk::TreeViewColumn::property_spacing ( )

Space which is inserted between cells.

Returns
A PropertyProxy that allows you to get or set the value of the property, or receive notification when the value of the property changes.

◆ property_spacing() [2/2]

Glib::PropertyProxy_ReadOnly< int > Gtk::TreeViewColumn::property_spacing ( ) const

Space which is inserted between cells.

Returns
A PropertyProxy_ReadOnly that allows you to get the value of the property, or receive notification when the value of the property changes.

◆ property_title() [1/2]

Glib::PropertyProxy< Glib::ustring > Gtk::TreeViewColumn::property_title ( )

Title to appear in column header.

Returns
A PropertyProxy that allows you to get or set the value of the property, or receive notification when the value of the property changes.

◆ property_title() [2/2]

Glib::PropertyProxy_ReadOnly< Glib::ustring > Gtk::TreeViewColumn::property_title ( ) const

Title to appear in column header.

Returns
A PropertyProxy_ReadOnly that allows you to get the value of the property, or receive notification when the value of the property changes.

◆ property_visible() [1/2]

Glib::PropertyProxy< bool > Gtk::TreeViewColumn::property_visible ( )

Whether to display the column.

Returns
A PropertyProxy that allows you to get or set the value of the property, or receive notification when the value of the property changes.

◆ property_visible() [2/2]

Glib::PropertyProxy_ReadOnly< bool > Gtk::TreeViewColumn::property_visible ( ) const

Whether to display the column.

Returns
A PropertyProxy_ReadOnly that allows you to get the value of the property, or receive notification when the value of the property changes.

◆ property_widget() [1/2]

Glib::PropertyProxy< Widget* > Gtk::TreeViewColumn::property_widget ( )

Widget to put in column header button instead of column title.

Returns
A PropertyProxy that allows you to get or set the value of the property, or receive notification when the value of the property changes.

◆ property_widget() [2/2]

Glib::PropertyProxy_ReadOnly< Widget* > Gtk::TreeViewColumn::property_widget ( ) const

Widget to put in column header button instead of column title.

Returns
A PropertyProxy_ReadOnly that allows you to get the value of the property, or receive notification when the value of the property changes.

◆ property_width()

Glib::PropertyProxy_ReadOnly< int > Gtk::TreeViewColumn::property_width ( ) const

Current width of the column.

Returns
A PropertyProxy_ReadOnly that allows you to get the value of the property, or receive notification when the value of the property changes.

◆ queue_resize()

void Gtk::TreeViewColumn::queue_resize ( )

Flags the column, and the cell renderers added to this column, to have their sizes renegotiated.

◆ set_alignment() [1/2]

void Gtk::TreeViewColumn::set_alignment ( AlignmentEnum  xalign)

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.

Parameters
xalignThe alignment, which is between [0.0 and 1.0] inclusive.

◆ set_alignment() [2/2]

void Gtk::TreeViewColumn::set_alignment ( float  xalign)

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.

Parameters
xalignThe alignment, which is between [0.0 and 1.0] inclusive.

◆ set_cell_data_func()

void Gtk::TreeViewColumn::set_cell_data_func ( CellRenderer cell_renderer,
const SlotCellData slot 
)

Sets the slot callback to use for the column. This callback function is used instead of the standard attributes mapping for setting the column value, and should set the value of the column's cell renderer as appropriate.

See also unset_cell_data_func().

Parameters
cell_rendererA Gtk::CellRenderer
slotThe callback slot to use. Create this with sigc::mem_fun(), or sigc::ptr_fun().

◆ set_clickable()

void Gtk::TreeViewColumn::set_clickable ( bool  clickable = true)

Sets the header to be active if active is true. When the header is active, then it can take keyboard focus, and can be clicked.

Parameters
clickabletrue if the header is active.

◆ set_expand()

void Gtk::TreeViewColumn::set_expand ( bool  expand = true)

Sets the column to take available extra space. This space is shared equally amongst all columns that have the expand set to true. If no column has this option set, then the last column gets all extra space. By default, every column is created with this false.

Parameters
expandtrue if the column should take available extra space, false if not.

◆ set_fixed_width()

void Gtk::TreeViewColumn::set_fixed_width ( int  fixed_width)

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.

Parameters
fixed_widthThe size to set tree_column to. Must be greater than 0.

◆ set_max_width()

void Gtk::TreeViewColumn::set_max_width ( int  max_width)

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.

Parameters
max_widthThe maximum width of the column in pixels, or -1.

◆ set_min_width()

void Gtk::TreeViewColumn::set_min_width ( int  min_width)

Sets the minimum width of the tree_column. If min_width is -1, then the minimum width is unset.

Parameters
min_widthThe minimum width of the column in pixels, or -1.

◆ set_renderer()

void Gtk::TreeViewColumn::set_renderer ( Gtk::CellRenderer renderer,
const TreeModelColumnBase column 
)

Associate a view CellRenderer with a model column, so that the CellRenderer renders the data in the model column.

Parameters
rendererThe view cell renderer which will render the model column.
columnThe model column to be renderered by this view.

◆ set_reorderable()

void Gtk::TreeViewColumn::set_reorderable ( bool  reorderable = true)

If reorderable is true, then the column can be reordered by the end user dragging the header.

Parameters
reorderabletrue, if the column can be reordered.

◆ set_resizable()

void Gtk::TreeViewColumn::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. If resizable is true and sizing mode of the column is Gtk::TREE_VIEW_COLUMN_AUTOSIZE, then the sizing mode is changed to Gtk::TREE_VIEW_COLUMN_GROW_ONLY.

Parameters
resizabletrue, if the column can be resized.

◆ set_sizing()

void Gtk::TreeViewColumn::set_sizing ( TreeViewColumnSizing  type)

Sets the growth behavior of tree_column to type.

Parameters
typeThe Gtk::TreeViewColumnSizing.

◆ set_sort_column() [1/2]

void Gtk::TreeViewColumn::set_sort_column ( const TreeModelColumnBase sort_column_id)

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.

Parameters
sort_column_idThe sort_column_id of the model to sort on.

◆ set_sort_column() [2/2]

void Gtk::TreeViewColumn::set_sort_column ( int  sort_column_id)

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.

Parameters
sort_column_idThe sort_column_id of the model to sort on.

◆ set_sort_column_id() [1/2]

void Gtk::TreeViewColumn::set_sort_column_id ( const TreeModelColumnBase sort_column_id)

◆ set_sort_column_id() [2/2]

void Gtk::TreeViewColumn::set_sort_column_id ( int  sort_column_id)

◆ set_sort_indicator()

void Gtk::TreeViewColumn::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. Call set_sort_order() to change the direction of the arrow.

Parameters
settingtrue to display an indicator that the column is sorted.

◆ set_sort_order()

void Gtk::TreeViewColumn::set_sort_order ( SortType  order)

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().

Parameters
orderSort order that the sort indicator should indicate.

◆ set_spacing()

void Gtk::TreeViewColumn::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.

Parameters
spacingDistance between cell renderers in pixels.

◆ set_title()

void Gtk::TreeViewColumn::set_title ( const Glib::ustring &  title)

Sets the title of the tree_column. If a custom widget has been set, then this value is ignored.

Parameters
titleThe title of the tree_column.

◆ set_visible()

void Gtk::TreeViewColumn::set_visible ( bool  visible = true)

Sets the visibility of tree_column.

Parameters
visibletrue if the tree_column is visible.

◆ set_widget()

void Gtk::TreeViewColumn::set_widget ( Gtk::Widget widget)

Sets the widget in the header to be widget. If widget is 0, then the header button is set with a Gtk::Label set to the title of tree_column.

Parameters
widgetA child Gtk::Widget, or 0.

◆ signal_clicked()

Glib::SignalProxy0< void > Gtk::TreeViewColumn::signal_clicked ( )
Slot Prototype:
void on_my_clicked()

◆ unset_cell_data_func()

void Gtk::TreeViewColumn::unset_cell_data_func ( CellRenderer cell_renderer)

Removes a previously set callback slot. See set_cell_data_func().

Friends And Related Function Documentation

◆ wrap()

Gtk::TreeViewColumn * wrap ( GtkTreeViewColumn object,
bool  take_copy = false 
)
related

A Glib::wrap() method for this object.

Parameters
objectThe C instance.
take_copyFalse if the result should take ownership of the C instance. True if it should take a new copy or ref.
Returns
A C++ instance that wraps this C instance.

The documentation for this class was generated from the following file: