gtkmm
4.8.0
|
The column added to Gtk::ColumnView. More...
#include <gtkmm/columnviewcolumn.h>
Inherits Glib::Object.
Public Member Functions | |
ColumnViewColumn (ColumnViewColumn && src) noexcept | |
ColumnViewColumn & | operator= (ColumnViewColumn && src) noexcept |
~ColumnViewColumn () noexcept override | |
GtkColumnViewColumn * | gobj () |
Provides access to the underlying C GObject. More... | |
const GtkColumnViewColumn * | gobj () const |
Provides access to the underlying C GObject. More... | |
GtkColumnViewColumn * | gobj_copy () |
Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs. More... | |
ColumnView * | get_column_view () |
Gets the column view that's currently displaying this column. More... | |
const ColumnView * | get_column_view () const |
Gets the column view that's currently displaying this column. More... | |
void | set_factory (const Glib::RefPtr< ListItemFactory > & factory) |
Sets the Gtk::ListItemFactory to use for populating list items for this column. More... | |
Glib::RefPtr< ListItemFactory > | get_factory () |
Gets the factory that's currently used to populate list items for this column. More... | |
Glib::RefPtr< const ListItemFactory > | get_factory () const |
Gets the factory that's currently used to populate list items for this column. More... | |
void | set_title (const Glib::ustring & title) |
Sets the title of this column. More... | |
Glib::ustring | get_title () const |
Returns the title set with set_title(). More... | |
void | set_sorter (const Glib::RefPtr< Sorter > & sorter) |
Associates a sorter with the column. More... | |
Glib::RefPtr< Sorter > | get_sorter () |
Returns the sorter that is associated with the column. More... | |
Glib::RefPtr< const Sorter > | get_sorter () const |
Returns the sorter that is associated with the column. More... | |
void | set_visible (bool visible=true) |
Sets whether this column should be visible in views. More... | |
bool | get_visible () const |
Returns whether this column is visible. More... | |
void | set_header_menu (const Glib::RefPtr< Gio::MenuModel > & model) |
Sets the menu model that is used to create the context menu for the column header. More... | |
Glib::RefPtr< Gio::MenuModel > | get_header_menu () |
Gets the menu model that is used to create the context menu for the column header. More... | |
Glib::RefPtr< const Gio::MenuModel > | get_header_menu () const |
Gets the menu model that is used to create the context menu for the column header. More... | |
void | set_fixed_width (int fixed_width) |
If fixed_width is not -1, sets the fixed width of column; otherwise unsets it. More... | |
int | get_fixed_width () const |
Gets the fixed width of the column. More... | |
void | set_resizable (bool resizable=true) |
Sets whether this column should be resizable by dragging. More... | |
bool | get_resizable () const |
Returns whether this column is resizable. More... | |
void | set_expand (bool expand=true) |
Sets the column to take available extra space. More... | |
bool | get_expand () const |
Returns whether this column should expand. More... | |
Glib::PropertyProxy_ReadOnly< ColumnView * > | property_column_view () const |
The Gtk::ColumnView this column is a part of. More... | |
Glib::PropertyProxy< Glib::RefPtr< ListItemFactory > > | property_factory () |
Factory for populating list items. More... | |
Glib::PropertyProxy_ReadOnly< Glib::RefPtr< ListItemFactory > > | property_factory () const |
Factory for populating list items. More... | |
Glib::PropertyProxy< Glib::ustring > | property_title () |
Title displayed in the header. More... | |
Glib::PropertyProxy_ReadOnly< Glib::ustring > | property_title () const |
Title displayed in the header. More... | |
Glib::PropertyProxy< Glib::RefPtr< Sorter > > | property_sorter () |
Sorter for sorting items according to this column. More... | |
Glib::PropertyProxy_ReadOnly< Glib::RefPtr< Sorter > > | property_sorter () const |
Sorter for sorting items according to this column. More... | |
Glib::PropertyProxy< bool > | property_visible () |
Whether this column is visible. More... | |
Glib::PropertyProxy_ReadOnly< bool > | property_visible () const |
Whether this column is visible. More... | |
Glib::PropertyProxy< Glib::RefPtr< Gio::MenuModel > > | property_header_menu () |
Menu model used to create the context menu for the column header. More... | |
Glib::PropertyProxy_ReadOnly< Glib::RefPtr< Gio::MenuModel > > | property_header_menu () const |
Menu model used to create the context menu for the column header. More... | |
Glib::PropertyProxy< bool > | property_resizable () |
Whether this column is resizable. More... | |
Glib::PropertyProxy_ReadOnly< bool > | property_resizable () const |
Whether this column is resizable. More... | |
Glib::PropertyProxy< bool > | property_expand () |
Column gets share of extra width allocated to the view. More... | |
Glib::PropertyProxy_ReadOnly< bool > | property_expand () const |
Column gets share of extra width allocated to the view. More... | |
Glib::PropertyProxy< int > | property_fixed_width () |
If not -1, this is the width that the column is allocated, regardless of the size of its content. More... | |
Glib::PropertyProxy_ReadOnly< int > | property_fixed_width () const |
If not -1, this is the width that the column is allocated, regardless of the size of its content. More... | |
Static Public Member Functions | |
static GType | get_type () |
Get the GType for this class, for use with the underlying GObject type system. More... | |
static Glib::RefPtr< ColumnViewColumn > | create (const Glib::ustring & title, const Glib::RefPtr< ListItemFactory > & factory={}) |
Protected Member Functions | |
ColumnViewColumn (const Glib::ustring & title, const Glib::RefPtr< ListItemFactory > & factory={}) | |
Related Functions | |
(Note that these are not member functions.) | |
Glib::RefPtr< Gtk::ColumnViewColumn > | wrap (GtkColumnViewColumn * object, bool take_copy=false) |
A Glib::wrap() method for this object. More... | |
The column added to Gtk::ColumnView.
Gtk::ColumnViewColumn represents the columns being added to Gtk::ColumnView.
Columns have a title, and can optionally have a header menu set with set_header_menu().
A sorter can be associated with a column using set_sorter(), to let users influence sorting by clicking on the column header.
|
noexcept |
|
overridenoexcept |
|
explicitprotected |
|
static |
ColumnView* Gtk::ColumnViewColumn::get_column_view | ( | ) |
Gets the column view that's currently displaying this column.
If self has not been added to a column view yet, nullptr
is returned.
const ColumnView* Gtk::ColumnViewColumn::get_column_view | ( | ) | const |
Gets the column view that's currently displaying this column.
If self has not been added to a column view yet, nullptr
is returned.
bool Gtk::ColumnViewColumn::get_expand | ( | ) | const |
Returns whether this column should expand.
true
if this column expands. Glib::RefPtr<ListItemFactory> Gtk::ColumnViewColumn::get_factory | ( | ) |
Gets the factory that's currently used to populate list items for this column.
Glib::RefPtr<const ListItemFactory> Gtk::ColumnViewColumn::get_factory | ( | ) | const |
Gets the factory that's currently used to populate list items for this column.
int Gtk::ColumnViewColumn::get_fixed_width | ( | ) | const |
Gets the fixed width of the column.
Glib::RefPtr<Gio::MenuModel> Gtk::ColumnViewColumn::get_header_menu | ( | ) |
Gets the menu model that is used to create the context menu for the column header.
Gio::MenuModel
. Glib::RefPtr<const Gio::MenuModel> Gtk::ColumnViewColumn::get_header_menu | ( | ) | const |
Gets the menu model that is used to create the context menu for the column header.
Gio::MenuModel
. bool Gtk::ColumnViewColumn::get_resizable | ( | ) | const |
Returns whether this column is resizable.
true
if this column is resizable. Glib::RefPtr<Sorter> Gtk::ColumnViewColumn::get_sorter | ( | ) |
Returns the sorter that is associated with the column.
Gtk::Sorter
of self. Glib::RefPtr<const Sorter> Gtk::ColumnViewColumn::get_sorter | ( | ) | const |
Returns the sorter that is associated with the column.
Gtk::Sorter
of self. Glib::ustring Gtk::ColumnViewColumn::get_title | ( | ) | const |
Returns the title set with set_title().
|
static |
Get the GType for this class, for use with the underlying GObject type system.
bool Gtk::ColumnViewColumn::get_visible | ( | ) | const |
Returns whether this column is visible.
true
if this column is visible.
|
inline |
Provides access to the underlying C GObject.
|
inline |
Provides access to the underlying C GObject.
GtkColumnViewColumn* Gtk::ColumnViewColumn::gobj_copy | ( | ) |
Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.
|
noexcept |
Glib::PropertyProxy_ReadOnly< ColumnView* > Gtk::ColumnViewColumn::property_column_view | ( | ) | const |
The Gtk::ColumnView
this column is a part of.
Glib::PropertyProxy< bool > Gtk::ColumnViewColumn::property_expand | ( | ) |
Column gets share of extra width allocated to the view.
Default value: false
Glib::PropertyProxy_ReadOnly< bool > Gtk::ColumnViewColumn::property_expand | ( | ) | const |
Column gets share of extra width allocated to the view.
Default value: false
Glib::PropertyProxy< Glib::RefPtr<ListItemFactory> > Gtk::ColumnViewColumn::property_factory | ( | ) |
Factory for populating list items.
Glib::PropertyProxy_ReadOnly< Glib::RefPtr<ListItemFactory> > Gtk::ColumnViewColumn::property_factory | ( | ) | const |
Factory for populating list items.
Glib::PropertyProxy< int > Gtk::ColumnViewColumn::property_fixed_width | ( | ) |
If not -1, this is the width that the column is allocated, regardless of the size of its content.
Default value: -1
Glib::PropertyProxy_ReadOnly< int > Gtk::ColumnViewColumn::property_fixed_width | ( | ) | const |
If not -1, this is the width that the column is allocated, regardless of the size of its content.
Default value: -1
Glib::PropertyProxy< Glib::RefPtr<Gio::MenuModel> > Gtk::ColumnViewColumn::property_header_menu | ( | ) |
Menu model used to create the context menu for the column header.
Glib::PropertyProxy_ReadOnly< Glib::RefPtr<Gio::MenuModel> > Gtk::ColumnViewColumn::property_header_menu | ( | ) | const |
Menu model used to create the context menu for the column header.
Glib::PropertyProxy< bool > Gtk::ColumnViewColumn::property_resizable | ( | ) |
Whether this column is resizable.
Default value: false
Glib::PropertyProxy_ReadOnly< bool > Gtk::ColumnViewColumn::property_resizable | ( | ) | const |
Whether this column is resizable.
Default value: false
Glib::PropertyProxy< Glib::RefPtr<Sorter> > Gtk::ColumnViewColumn::property_sorter | ( | ) |
Sorter for sorting items according to this column.
Glib::PropertyProxy_ReadOnly< Glib::RefPtr<Sorter> > Gtk::ColumnViewColumn::property_sorter | ( | ) | const |
Sorter for sorting items according to this column.
Glib::PropertyProxy< Glib::ustring > Gtk::ColumnViewColumn::property_title | ( | ) |
Title displayed in the header.
Default value: ""
Glib::PropertyProxy_ReadOnly< Glib::ustring > Gtk::ColumnViewColumn::property_title | ( | ) | const |
Title displayed in the header.
Default value: ""
Glib::PropertyProxy< bool > Gtk::ColumnViewColumn::property_visible | ( | ) |
Whether this column is visible.
Default value: true
Glib::PropertyProxy_ReadOnly< bool > Gtk::ColumnViewColumn::property_visible | ( | ) | const |
Whether this column is visible.
Default value: true
void Gtk::ColumnViewColumn::set_expand | ( | bool | expand = true | ) |
Sets the column to take available extra space.
The extra space is shared equally amongst all columns that have the expand set to true
.
expand | true if this column should expand to fill available sace. |
void Gtk::ColumnViewColumn::set_factory | ( | const Glib::RefPtr< ListItemFactory > & | factory | ) |
Sets the Gtk::ListItemFactory
to use for populating list items for this column.
factory | The factory to use. |
void Gtk::ColumnViewColumn::set_fixed_width | ( | int | fixed_width | ) |
If fixed_width is not -1, sets the fixed width of column; otherwise unsets it.
Setting a fixed width overrides the automatically calculated width. Interactive resizing also sets the “fixed-width” property.
fixed_width | The new fixed width, or -1. |
void Gtk::ColumnViewColumn::set_header_menu | ( | const Glib::RefPtr< Gio::MenuModel > & | model | ) |
Sets the menu model that is used to create the context menu for the column header.
model | A Gio::MenuModel . |
void Gtk::ColumnViewColumn::set_resizable | ( | bool | resizable = true | ) |
Sets whether this column should be resizable by dragging.
resizable | Whether this column should be resizable. |
void Gtk::ColumnViewColumn::set_sorter | ( | const Glib::RefPtr< Sorter > & | sorter | ) |
Associates a sorter with the column.
If sorter is nullptr
, the column will not let users change the sorting by clicking on its header.
This sorter can be made active by clicking on the column header, or by calling sort_by_column().
See get_sorter() for the necessary steps for setting up customizable sorting for Gtk::ColumnView.
sorter | The Gtk::Sorter to associate with column. |
void Gtk::ColumnViewColumn::set_title | ( | const Glib::ustring & | title | ) |
Sets the title of this column.
The title is displayed in the header of a Gtk::ColumnView
for this column and is therefore user-facing text that should be translated.
title | Title to use for this column. |
void Gtk::ColumnViewColumn::set_visible | ( | bool | visible = true | ) |
Sets whether this column should be visible in views.
visible | Whether this column should be visible. |
|
related |
A Glib::wrap() method for this object.
object | The C instance. |
take_copy | False if the result should take ownership of the C instance. True if it should take a new copy or ref. |