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

Gtk::ListHeader is used by list widgets to represent the headers they display. More...

#include <gtkmm/listheader.h>

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

Public Member Functions

 ListHeader (ListHeader &&src) noexcept
 
ListHeaderoperator= (ListHeader &&src) noexcept
 
 ~ListHeader () noexcept override
 
GtkListHeadergobj ()
 Provides access to the underlying C GObject.
 
const GtkListHeadergobj () const
 Provides access to the underlying C GObject.
 
GtkListHeadergobj_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::ObjectBaseget_item ()
 Gets the model item at the start of the section.
 
Glib::RefPtr< const Glib::ObjectBaseget_item () const
 Gets the model item at the start of the section.
 
guint get_start () const
 Gets the start position in the model of the section that self is currently the header for.
 
guint get_end () const
 Gets the end position in the model of the section that self is currently the header for.
 
guint get_n_items () const
 Gets the the number of items in the section.
 
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_ReadOnly< guint > property_end () const
 The first position no longer part of this section.
 
Glib::PropertyProxy_ReadOnly< Glib::RefPtr< Glib::ObjectBase > > property_item () const
 The item at the start of the section.
 
Glib::PropertyProxy_ReadOnly< guint > property_n_items () const
 Number of items in this section.
 
Glib::PropertyProxy_ReadOnly< guint > property_start () const
 First position of items in this section.
 
- Public Member Functions inherited from Glib::Object
 Object (const Object &)=delete
 
Objectoperator= (const Object &)=delete
 
 Object (Object &&src) noexcept
 
Objectoperator= (Object &&src) noexcept
 
voidget_data (const QueryQuark &key)
 
void set_data (const Quark &key, void *data)
 
void set_data_with_c_callback (const Quark &key, void *data, GDestroyNotify notify)
 
void set_data (const Quark &key, void *data, DestroyNotify notify)
 
void remove_data (const QueryQuark &quark)
 
voidsteal_data (const QueryQuark &quark)
 
Glib::RefPtr< Glib::Objectwrap (GObject *object, bool take_copy=false)
 
- Public Member Functions inherited from Glib::ObjectBase
 ObjectBase (const ObjectBase &)=delete
 
ObjectBaseoperator= (const ObjectBase &)=delete
 
void set_property_value (const Glib::ustring &property_name, const Glib::ValueBase &value)
 
void get_property_value (const Glib::ustring &property_name, Glib::ValueBase &value) const
 
void set_property (const Glib::ustring &property_name, const PropertyType &value)
 
void get_property (const Glib::ustring &property_name, PropertyType &value) const
 
PropertyType get_property (const Glib::ustring &property_name) const
 
sigc::connection connect_property_changed (const Glib::ustring &property_name, const sigc::slot< void()> &slot)
 
sigc::connection connect_property_changed (const Glib::ustring &property_name, sigc::slot< void()> &&slot)
 
void freeze_notify ()
 
void thaw_notify ()
 
virtual void reference () const
 
virtual void unreference () const
 
GObjectgobj ()
 
const GObjectgobj () const
 
GObjectgobj_copy () const
 
- Public Member Functions inherited from sigc::trackable
 trackable () noexcept
 
 trackable (const trackable &src) noexcept
 
 trackable (trackable &&src) noexcept
 
 ~trackable ()
 
void add_destroy_notify_callback (notifiable *data, func_destroy_notify func) const
 
void notify_callbacks ()
 
trackableoperator= (const trackable &src)
 
trackableoperator= (trackable &&src) noexcept
 
void remove_destroy_notify_callback (notifiable *data) const
 

Static Public Member Functions

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::ListHeaderwrap (GtkListHeader *object, bool take_copy=false)
 A Glib::wrap() method for this object.
 

Additional Inherited Members

- Public Types inherited from Glib::Object
typedef void(*)(gpointer data DestroyNotify)
 
- Public Types inherited from sigc::trackable
typedef internal::func_destroy_notify func_destroy_notify
 
- Public Types inherited from sigc::notifiable
typedef internal::func_destroy_notify func_destroy_notify
 
- Protected Member Functions inherited from Glib::Object
 Object ()
 
 Object (const Glib::ConstructParams &construct_params)
 
 Object (GObject *castitem)
 
 ~Object () noexcept override
 
- Protected Member Functions inherited from Glib::ObjectBase
 ObjectBase ()
 
 ObjectBase (const char *custom_type_name)
 
 ObjectBase (const std::type_info &custom_type_info)
 
 ObjectBase (ObjectBase &&src) noexcept
 
ObjectBaseoperator= (ObjectBase &&src) noexcept
 
virtual ~ObjectBase () noexcept=0
 
void initialize (GObject *castitem)
 
void initialize_move (GObject *castitem, Glib::ObjectBase *previous_wrapper)
 

Detailed Description

Gtk::ListHeader is used by list widgets to represent the headers they display.

The Gtk::ListHeaders are managed just like Gtk::ListItems via their factory, but provide a different set of properties suitable for managing the header instead of individual items.

See also
Gtk::ListView, Gio::ListModel
Since gtkmm 4.12:

Constructor & Destructor Documentation

◆ ListHeader()

Gtk::ListHeader::ListHeader ( ListHeader &&  src)
noexcept

◆ ~ListHeader()

Gtk::ListHeader::~ListHeader ( )
overridenoexcept

Member Function Documentation

◆ get_child() [1/2]

Widget * Gtk::ListHeader::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::ListHeader::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_end()

guint Gtk::ListHeader::get_end ( ) const

Gets the end position in the model of the section that self is currently the header for.

If self is unbound, GTK_INVALID_LIST_POSITION is returned.

Since gtkmm 4.12:
Returns
The end position of the section.

◆ get_item() [1/2]

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

Gets the model item at the start of the section.

This is the item that occupies the list model at position property_start().

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::ListHeader::get_item ( ) const

Gets the model item at the start of the section.

This is the item that occupies the list model at position property_start().

If self is unbound, this function returns nullptr.

Since gtkmm 4.12:
Returns
The item displayed.

◆ get_n_items()

guint Gtk::ListHeader::get_n_items ( ) const

Gets the the number of items in the section.

If self is unbound, 0 is returned.

Since gtkmm 4.12:
Returns
The number of items in the section.

◆ get_start()

guint Gtk::ListHeader::get_start ( ) const

Gets the start position in the model of the section that self is currently the header for.

If self is unbound, GTK_INVALID_LIST_POSITION is returned.

Since gtkmm 4.12:
Returns
The start position of the section.

◆ get_type()

static GType Gtk::ListHeader::get_type ( )
static

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

◆ gobj() [1/2]

GtkListHeader * Gtk::ListHeader::gobj ( )
inline

Provides access to the underlying C GObject.

◆ gobj() [2/2]

const GtkListHeader * Gtk::ListHeader::gobj ( ) const
inline

Provides access to the underlying C GObject.

◆ gobj_copy()

GtkListHeader * Gtk::ListHeader::gobj_copy ( )

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

◆ operator=()

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

◆ property_child() [1/2]

Glib::PropertyProxy< Widget * > Gtk::ListHeader::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::ListHeader::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_end()

Glib::PropertyProxy_ReadOnly< guint > Gtk::ListHeader::property_end ( ) const

The first position no longer part of this section.

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

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

The item at the start of the section.

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

Glib::PropertyProxy_ReadOnly< guint > Gtk::ListHeader::property_n_items ( ) const

Number of items in this section.

Since gtkmm 4.12:

Default value: 0

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

Glib::PropertyProxy_ReadOnly< guint > Gtk::ListHeader::property_start ( ) const

First position of items in this section.

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.

◆ set_child()

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

Sets the child to be used for this listitem.

This function is typically called by applications when setting up a header 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.

◆ unset_child()

void Gtk::ListHeader::unset_child ( )

Friends And Related Symbol Documentation

◆ wrap()

Glib::RefPtr< Gtk::ListHeader > wrap ( GtkListHeader 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.