gtkmm: Gtk::EnumListItem Class Reference

gtkmm 4.23.0

Public Member Functions | Static Public Member Functions | Related Symbols | List of all members
Gtk::EnumListItem Class Reference
ListView Classes

Gtk::EnumListItem is the type of items in a Gtk::EnumList. More...

`#include <gtkmm/enumlistitem.h>`

Inheritance diagram for Gtk::EnumListItem:
[legend]

## Public Member Functions
| EnumListItem (EnumListItem && src) noexcept
EnumListItem & | operator= (EnumListItem && src) noexcept
| ~EnumListItem () noexcept override
GtkEnumListItem * | gobj ()
| Provides access to the underlying C GObject.
const GtkEnumListItem * | gobj () const
| Provides access to the underlying C GObject.
GtkEnumListItem * | gobj_copy ()
| Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.
int | get_value () const
| Gets the enum value.
Glib::ustring | get_name () const
| Gets the enum value name.
Glib::ustring | get_nick () const
| Gets the enum value nick.
Glib::PropertyProxy_ReadOnly< int > | property_value () const
| The enum value.
Glib::PropertyProxy_ReadOnly< Glib::ustring > | property_name () const
| The enum value name.
Glib::PropertyProxy_ReadOnly< Glib::ustring > | property_nick () const
| The enum value nick.
Public Member Functions inherited from Glib::Object
| Object (const Object &)=delete
Object & | operator= (const Object &)=delete
| Object (Object &&src) noexcept
Object & | operator= (Object &&src) noexcept
void * | get_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)
void * | steal_data (const QueryQuark &quark)
Glib::RefPtr< Glib::Object > | wrap (GObject *object, bool take_copy=false)
Public Member Functions inherited from Glib::ObjectBase
| ObjectBase (const ObjectBase &)=delete
ObjectBase & | operator= (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
GObject * | gobj ()
const GObject * | gobj () const
GObject * | gobj_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 ()
trackable & | operator= (const trackable &src)
trackable & | operator= (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::EnumListItem > | wrap (GtkEnumListItem * 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
ObjectBase & | operator= (ObjectBase &&src) noexcept
virtual | ~ObjectBase () noexcept=0
void | initialize (GObject *castitem)
void | initialize_move (GObject *castitem, Glib::ObjectBase *previous_wrapper)

## Detailed Description

Gtk::EnumListItem is the type of items in a Gtk::EnumList.

How to get an EnumListItem from an EnumList:

Glib::RefPtr<Gtk::EnumList> enum_list = Gtk::EnumList::create(enum_type);
// Gio::ListModel::get_object()
Glib::RefPtr<Glib::ObjectBase> object = enum_list->get_object(position);
Glib::RefPtr<Gtk::EnumListItem> item = std::dynamic_pointer_cast<Gtk::EnumListItem>(object);
if (!item)
on_error();
std::dynamic_pointer_cast
__shared_ptr< _Tp, _Lp > dynamic_pointer_cast(const __shared_ptr< _Tp1, _Lp > &__r) noexcept
Gtk::EnumList::create
static Glib::RefPtr< EnumList > create(GType enum_type)
Creates a new Gtk::EnumList for enum_type.
Glib::RefPtr
std::shared_ptr< T_CppObject > RefPtr

See also
  Gtk::EnumList

Since gtkmm 4.24

## Constructor & Destructor Documentation

## ◆ EnumListItem()

Gtk::EnumListItem::EnumListItem | ( | EnumListItem && | src | ) |
| noexcept

## ◆ ~EnumListItem()

Gtk::EnumListItem::~EnumListItem | ( |  | ) |
| overridenoexcept

## Member Function Documentation

## ◆ get_name()

Glib::ustring Gtk::EnumListItem::get_name | ( |  | ) | const

Gets the enum value name.

Returns
  The enum value name.

## ◆ get_nick()

Glib::ustring Gtk::EnumListItem::get_nick | ( |  | ) | const

Gets the enum value nick.

Returns
  The enum value nick.

## ◆ get_type()

GType Gtk::EnumListItem::get_type | ( |  | ) |
| static

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

## ◆ get_value()

int Gtk::EnumListItem::get_value | ( |  | ) | const

Gets the enum value.

Returns
  The enum value.

## ◆ gobj() [1/2]

GtkEnumListItem * Gtk::EnumListItem::gobj | ( |  | ) |
| inline

Provides access to the underlying C GObject.

## ◆ gobj() [2/2]

const GtkEnumListItem * Gtk::EnumListItem::gobj | ( |  | ) | const
| inline

Provides access to the underlying C GObject.

## ◆ gobj_copy()

GtkEnumListItem * Gtk::EnumListItem::gobj_copy | ( |  | ) |

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

## ◆ operator=()

EnumListItem & Gtk::EnumListItem::operator= | ( | EnumListItem && | src | ) |
| noexcept

## ◆ property_name()

Glib::PropertyProxy_ReadOnly< Glib::ustring > Gtk::EnumListItem::property_name | ( |  | ) | const

The enum value name.

Since gtkmm 4.24

Default value: ""

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

Glib::PropertyProxy_ReadOnly< Glib::ustring > Gtk::EnumListItem::property_nick | ( |  | ) | const

The enum value nick.

Since gtkmm 4.24

Default value: ""

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

Glib::PropertyProxy_ReadOnly< int > Gtk::EnumListItem::property_value | ( |  | ) | const

The enum value.

Since gtkmm 4.24

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.

## Friends And Related Symbol Documentation

## ◆ wrap()

Glib::RefPtr< Gtk::EnumListItem > wrap | ( | GtkEnumListItem * | object,
|  | bool | take_copy = false )
| related

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

Parameters

  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.

Returns
  A C++ instance that wraps this C instance.