gtkmm 4.14.0
Public Member Functions | Static Public Member Functions | Related Symbols | List of all members
Gtk::ColumnViewCell Class Reference

Gtk::ColumnViewCell is used by Gtk::ColumnViewColumn to represent items in a cell in Gtk::ColumnView. More...

#include <gtkmm/columnviewcell.h>

Inheritance diagram for Gtk::ColumnViewCell:
Inheritance graph
[legend]

Public Member Functions

 ColumnViewCell (ColumnViewCell &&src) noexcept
 
ColumnViewCelloperator= (ColumnViewCell &&src) noexcept
 
 ~ColumnViewCell () noexcept override
 
GtkColumnViewCellgobj ()
 Provides access to the underlying C GObject.
 
const GtkColumnViewCellgobj () const
 Provides access to the underlying C GObject.
 
GtkColumnViewCellgobj_copy ()
 Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.
 
Glib::RefPtr< Glib::ObjectBase > get_item ()
 Gets the model item that associated with self.
 
Glib::RefPtr< const Glib::ObjectBase > get_item () const
 Gets the model item that associated with self.
 
guint get_position () const
 Gets the position in the model that self currently displays.
 
bool get_selected () const
 Checks if the item is displayed as selected.
 
bool get_focusable () const
 Checks if a list item has been set to be focusable via set_focusable().
 
void set_focusable (bool focusable=true)
 Sets self to be focusable.
 
void set_child (Widget &child)
 Sets the child to be used for this listitem.
 
void unset_child ()
 
Widgetget_child ()
 Gets the child previously set via set_child() or nullptr if none was set.
 
const Widgetget_child () const
 Gets the child previously set via set_child() or nullptr if none was set.
 
Glib::PropertyProxy< Widget * > property_child ()
 Widget used for display.
 
Glib::PropertyProxy_ReadOnly< Widget * > property_child () const
 Widget used for display.
 
Glib::PropertyProxy< bool > property_focusable ()
 If the item can be focused with the keyboard.
 
Glib::PropertyProxy_ReadOnly< bool > property_focusable () const
 If the item can be focused with the keyboard.
 
Glib::PropertyProxy_ReadOnly< Glib::RefPtr< Glib::ObjectBase > > property_item () const
 Displayed item.
 
Glib::PropertyProxy_ReadOnly< guint > property_position () const
 Position of the item.
 
Glib::PropertyProxy_ReadOnly< bool > property_selected () const
 If the item is currently selected.
 
- Public Member Functions inherited from Gtk::ListItem
 ListItem (ListItem &&src) noexcept
 
ListItemoperator= (ListItem &&src) noexcept
 
 ~ListItem () noexcept override
 
GtkListItemgobj ()
 Provides access to the underlying C GObject.
 
const GtkListItemgobj () const
 Provides access to the underlying C GObject.
 
GtkListItemgobj_copy ()
 Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.
 
Glib::RefPtr< Glib::ObjectBase > get_item ()
 Gets the model item that associated with self.
 
Glib::RefPtr< const Glib::ObjectBase > get_item () const
 Gets the model item that associated with self.
 
guint get_position () const
 Gets the position in the model that self currently displays.
 
bool get_selected () const
 Checks if the item is displayed as selected.
 
bool get_selectable () const
 Checks if a list item has been set to be selectable via set_selectable().
 
void set_selectable (bool selectable=true)
 Sets self to be selectable.
 
bool get_activatable () const
 Checks if a list item has been set to be activatable via set_activatable().
 
void set_activatable (bool activatable=true)
 Sets self to be activatable.
 
bool get_focusable () const
 Checks if a list item has been set to be focusable via set_focusable().
 
void set_focusable (bool focusable=true)
 Sets self to be focusable.
 
void set_child (Widget &child)
 Sets the child to be used for this listitem.
 
void unset_child ()
 
Widgetget_child ()
 Gets the child previously set via set_child() or nullptr if none was set.
 
const Widgetget_child () const
 Gets the child previously set via set_child() or nullptr if none was set.
 
void gtk_set_accessible_description (const Glib::ustring & description)
 Sets the accessible description for the list item, which may be used by e.g. screen readers.
 
Glib::ustring get_accessible_description () const
 Gets the accessible description of self.
 
void gtk_set_accessible_label (const Glib::ustring &label)
 Sets the accessible label for the list item, which may be used by e.g. screen readers.
 
Glib::ustring get_accessible_label () const
 Gets the accessible label of self.
 
Glib::PropertyProxy< Glib::ustring > property_accessible_description ()
 The accessible description to set on the list item.
 
Glib::PropertyProxy_ReadOnly< Glib::ustring > property_accessible_description () const
 The accessible description to set on the list item.
 
Glib::PropertyProxy< Glib::ustring > property_accessible_label ()
 The accessible label to set on the list item.
 
Glib::PropertyProxy_ReadOnly< Glib::ustring > property_accessible_label () const
 The accessible label to set on the list item.
 
Glib::PropertyProxy< bool > property_activatable ()
 If the item can be activated by the user.
 
Glib::PropertyProxy_ReadOnly< bool > property_activatable () const
 If the item can be activated by the user.
 
Glib::PropertyProxy< Widget * > property_child ()
 Widget used for display.
 
Glib::PropertyProxy_ReadOnly< Widget * > property_child () const
 Widget used for display.
 
Glib::PropertyProxy< bool > property_focusable ()
 If the item can be focused with the keyboard.
 
Glib::PropertyProxy_ReadOnly< bool > property_focusable () const
 If the item can be focused with the keyboard.
 
Glib::PropertyProxy_ReadOnly< Glib::RefPtr< Glib::ObjectBase > > property_item () const
 Displayed item.
 
Glib::PropertyProxy_ReadOnly< guint > property_position () const
 Position of the item.
 
Glib::PropertyProxy< bool > property_selectable ()
 If the item can be selected by the user.
 
Glib::PropertyProxy_ReadOnly< bool > property_selectable () const
 If the item can be selected by the user.
 
Glib::PropertyProxy_ReadOnly< bool > property_selected () const
 If the item is currently selected.
 

Static Public Member Functions

static GType get_type ()
 Get the GType for this class, for use with the underlying GObject type system.
 
- Static Public Member Functions inherited from Gtk::ListItem
static GType get_type ()
 Get the GType for this class, for use with the underlying GObject type system.
 

Related Symbols

(Note that these are not member symbols.)

Glib::RefPtr< Gtk::ColumnViewCellwrap (GtkColumnViewCell *object, bool take_copy=false)
 A Glib::wrap() method for this object.
 

Detailed Description

Gtk::ColumnViewCell is used by Gtk::ColumnViewColumn to represent items in a cell in Gtk::ColumnView.

The Gtk::ColumnViewCells are managed by the columnview widget (with its factory) and cannot be created by applications, but they need to be populated by application code. This is done by calling set_child().

Gtk::ColumnViewCells exist in 2 stages:

  1. The unbound stage where the listitem is not currently connected to an item in the list. In that case, property_item() is not set.
  2. The bound stage where the listitem references an item from the list. property_item() is set.

    Since gtkmm 4.12:

Constructor & Destructor Documentation

◆ ColumnViewCell()

Gtk::ColumnViewCell::ColumnViewCell ( ColumnViewCell &&  src)
noexcept

◆ ~ColumnViewCell()

Gtk::ColumnViewCell::~ColumnViewCell ( )
overridenoexcept

Member Function Documentation

◆ get_child() [1/2]

Widget * Gtk::ColumnViewCell::get_child ( )

Gets the child previously set via set_child() or nullptr if none was set.

Since gtkmm 4.12:
Returns
The child.

◆ get_child() [2/2]

const Widget * Gtk::ColumnViewCell::get_child ( ) const

Gets the child previously set via set_child() or nullptr if none was set.

Since gtkmm 4.12:
Returns
The child.

◆ get_focusable()

bool Gtk::ColumnViewCell::get_focusable ( ) const

Checks if a list item has been set to be focusable via set_focusable().

Since gtkmm 4.12:
Returns
true if the item is focusable.

◆ get_item() [1/2]

Glib::RefPtr< Glib::ObjectBase > Gtk::ColumnViewCell::get_item ( )

Gets the model item that associated with self.

If self is unbound, this function returns nullptr.

Since gtkmm 4.12:
Returns
The item displayed.

◆ get_item() [2/2]

Glib::RefPtr< const Glib::ObjectBase > Gtk::ColumnViewCell::get_item ( ) const

Gets the model item that associated with self.

If self is unbound, this function returns nullptr.

Since gtkmm 4.12:
Returns
The item displayed.

◆ get_position()

guint Gtk::ColumnViewCell::get_position ( ) const

Gets the position in the model that self currently displays.

If self is unbound, GTK_INVALID_LIST_POSITION is returned.

Since gtkmm 4.12:
Returns
The position of this item.

◆ get_selected()

bool Gtk::ColumnViewCell::get_selected ( ) const

Checks if the item is displayed as selected.

The selected state is maintained by the liste widget and its model and cannot be set otherwise.

Since gtkmm 4.12:
Returns
true if the item is selected.

◆ get_type()

static GType Gtk::ColumnViewCell::get_type ( )
static

Get the GType for this class, for use with the underlying GObject type system.

◆ gobj() [1/2]

GtkColumnViewCell * Gtk::ColumnViewCell::gobj ( )
inline

Provides access to the underlying C GObject.

◆ gobj() [2/2]

const GtkColumnViewCell * Gtk::ColumnViewCell::gobj ( ) const
inline

Provides access to the underlying C GObject.

◆ gobj_copy()

GtkColumnViewCell * Gtk::ColumnViewCell::gobj_copy ( )

Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.

◆ operator=()

ColumnViewCell & Gtk::ColumnViewCell::operator= ( ColumnViewCell &&  src)
noexcept

◆ property_child() [1/2]

Glib::PropertyProxy< Widget * > Gtk::ColumnViewCell::property_child ( )

Widget used for display.

Since gtkmm 4.12:
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_child() [2/2]

Glib::PropertyProxy_ReadOnly< Widget * > Gtk::ColumnViewCell::property_child ( ) const

Widget used for display.

Since gtkmm 4.12:
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_focusable() [1/2]

Glib::PropertyProxy< bool > Gtk::ColumnViewCell::property_focusable ( )

If the item can be focused with the keyboard.

Since gtkmm 4.12:

Default value: false

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_focusable() [2/2]

Glib::PropertyProxy_ReadOnly< bool > Gtk::ColumnViewCell::property_focusable ( ) const

If the item can be focused with the keyboard.

Since gtkmm 4.12:

Default value: false

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

Glib::PropertyProxy_ReadOnly< Glib::RefPtr< Glib::ObjectBase > > Gtk::ColumnViewCell::property_item ( ) const

Displayed item.

Since gtkmm 4.12:
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_position()

Glib::PropertyProxy_ReadOnly< guint > Gtk::ColumnViewCell::property_position ( ) const

Position of the item.

Since gtkmm 4.12:

Default value: 4294967295

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

Glib::PropertyProxy_ReadOnly< bool > Gtk::ColumnViewCell::property_selected ( ) const

If the item is currently selected.

Since gtkmm 4.12:

Default value: false

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

◆ set_child()

void Gtk::ColumnViewCell::set_child ( Widget child)

Sets the child to be used for this listitem.

This function is typically called by applications when setting up a listitem so that the widget can be reused when binding it multiple times.

Since gtkmm 4.12:
Parameters
childThe list item's child or nullptr to unset.

◆ set_focusable()

void Gtk::ColumnViewCell::set_focusable ( bool  focusable = true)

Sets self to be focusable.

If an item is focusable, it can be focused using the keyboard. This works similar to Gtk::Widget::set_focusable().

Note that if items are not focusable, the keyboard cannot be used to activate them and selecting only works if one of the listitem's children is focusable.

By default, list items are focusable.

Since gtkmm 4.12:
Parameters
focusableIf the item should be focusable.

◆ unset_child()

void Gtk::ColumnViewCell::unset_child ( )

Friends And Related Symbol Documentation

◆ wrap()

Glib::RefPtr< Gtk::ColumnViewCell > wrap ( GtkColumnViewCell 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.