|
gtkmm
4.0.0
|
A row in a Gtk::TreeListModel. More...
#include <gtkmm/treelistrow.h>

Public Member Functions | |
| TreeListRow (TreeListRow&& src) noexcept | |
| TreeListRow& | operator= (TreeListRow&& src) noexcept |
| ~TreeListRow () noexcept override | |
| GtkTreeListRow* | gobj () |
| Provides access to the underlying C GObject. More... | |
| const GtkTreeListRow* | gobj () const |
| Provides access to the underlying C GObject. More... | |
| GtkTreeListRow* | gobj_copy () |
| Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs. More... | |
| Glib::RefPtr< Glib::ObjectBase > | get_item () |
| Gets the item corresponding to this row,. More... | |
| Glib::RefPtr< const Glib::ObjectBase > | get_item () const |
| Gets the item corresponding to this row,. More... | |
| void | set_expanded (bool expanded=true) |
| Expands or collapses a row. More... | |
| bool | get_expanded () const |
| Gets if a row is currently expanded. More... | |
| bool | is_expandable () const |
| Checks if a row can be expanded. More... | |
| guint | get_position () const |
| Returns the position in the Gtk::TreeListModel that self occupies at the moment. More... | |
| guint | get_depth () const |
| Gets the depth of this row. More... | |
| Glib::RefPtr< Gio::ListModel > | get_children () |
| If the row is expanded, gets the model holding the children of self. More... | |
| Glib::RefPtr< const Gio::ListModel > | get_children () const |
| If the row is expanded, gets the model holding the children of self. More... | |
| Glib::RefPtr< TreeListRow > | get_parent () |
| Gets the row representing the parent for self. More... | |
| Glib::RefPtr< const TreeListRow > | get_parent () const |
| Gets the row representing the parent for self. More... | |
| Glib::RefPtr< TreeListRow > | get_child_row (guint position) |
If self is not expanded or position is greater than the number of children, nullptr is returned. More... | |
| Glib::RefPtr< const TreeListRow > | get_child_row (guint position) const |
If self is not expanded or position is greater than the number of children, nullptr is returned. More... | |
| Glib::PropertyProxy_ReadOnly< Glib::RefPtr< Gio::ListModel > > | property_children () const |
| The model holding the row's children. More... | |
| Glib::PropertyProxy_ReadOnly< guint > | property_depth () const |
| The depth in the tree of this row. More... | |
| Glib::PropertyProxy_ReadOnly< bool > | property_expandable () const |
| If this row can ever be expanded. More... | |
| Glib::PropertyProxy< bool > | property_expanded () |
| If this row is currently expanded. More... | |
| Glib::PropertyProxy_ReadOnly< bool > | property_expanded () const |
| If this row is currently expanded. More... | |
| Glib::PropertyProxy_ReadOnly< Glib::RefPtr< Glib::ObjectBase > > | property_item () const |
| The item held in this row. More... | |
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 (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. More... | |
Related Functions | |
(Note that these are not member functions.) | |
| Glib::RefPtr< Gtk::TreeListRow > | wrap (GtkTreeListRow* object, bool take_copy=false) |
| A Glib::wrap() method for this object. More... | |
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) |
A row in a Gtk::TreeListModel.
Gtk::TreeListRow is the object used by Gtk::TreeListModel to represent items. It allows navigating the model as a tree and modify the state of rows.
Gtk::TreeListRow instances are created by a Gtk::TreeListModel only when the Gtk::TreeListModel::property_passthrough() property is not set.
There are various support objects that can make use of Gtk::TreeListRow objects, such as the Gtk::TreeExpander widget that allows displaying an icon to expand or collapse a row or Gtk::TreeListRowSorter that makes it possible to sort trees properly.
|
noexcept |
|
overridenoexcept |
| Glib::RefPtr<TreeListRow> Gtk::TreeListRow::get_child_row | ( | guint | position | ) |
If self is not expanded or position is greater than the number of children, nullptr is returned.
| position | Position of the child to get. |
| Glib::RefPtr<const TreeListRow> Gtk::TreeListRow::get_child_row | ( | guint | position | ) | const |
If self is not expanded or position is greater than the number of children, nullptr is returned.
| position | Position of the child to get. |
| Glib::RefPtr<Gio::ListModel> Gtk::TreeListRow::get_children | ( | ) |
If the row is expanded, gets the model holding the children of self.
This model is the model created by the Gtk::TreeListModelCreateModelFunc and contains the original items, no matter what value Gtk::TreeListModel::property_passthrough() is set to.
| Glib::RefPtr<const Gio::ListModel> Gtk::TreeListRow::get_children | ( | ) | const |
If the row is expanded, gets the model holding the children of self.
This model is the model created by the Gtk::TreeListModelCreateModelFunc and contains the original items, no matter what value Gtk::TreeListModel::property_passthrough() is set to.
| guint Gtk::TreeListRow::get_depth | ( | ) | const |
Gets the depth of this row.
Rows that correspond to items in the root model have a depth of zero, rows corresponding to items of models of direct children of the root model have a depth of 1 and so on.
The depth of a row never changes until the row is destroyed.
| bool Gtk::TreeListRow::get_expanded | ( | ) | const |
Gets if a row is currently expanded.
true if the row is expanded. | Glib::RefPtr<Glib::ObjectBase> Gtk::TreeListRow::get_item | ( | ) |
Gets the item corresponding to this row,.
The value returned by this function never changes until the row is destroyed.
nullptr when the row was destroyed. | Glib::RefPtr<const Glib::ObjectBase> Gtk::TreeListRow::get_item | ( | ) | const |
Gets the item corresponding to this row,.
The value returned by this function never changes until the row is destroyed.
nullptr when the row was destroyed. | Glib::RefPtr<TreeListRow> Gtk::TreeListRow::get_parent | ( | ) |
Gets the row representing the parent for self.
That is the row that would need to be collapsed to make this row disappear.
If self is a row corresponding to the root model, nullptr is returned.
The value returned by this function never changes until the row is destroyed.
| Glib::RefPtr<const TreeListRow> Gtk::TreeListRow::get_parent | ( | ) | const |
Gets the row representing the parent for self.
That is the row that would need to be collapsed to make this row disappear.
If self is a row corresponding to the root model, nullptr is returned.
The value returned by this function never changes until the row is destroyed.
| guint Gtk::TreeListRow::get_position | ( | ) | const |
Returns the position in the Gtk::TreeListModel that self occupies at the moment.
|
static |
Get the GType for this class, for use with the underlying GObject type system.
|
inline |
Provides access to the underlying C GObject.
|
inline |
Provides access to the underlying C GObject.
| GtkTreeListRow* Gtk::TreeListRow::gobj_copy | ( | ) |
Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.
| bool Gtk::TreeListRow::is_expandable | ( | ) | const |
Checks if a row can be expanded.
This does not mean that the row is actually expanded, this can be checked with get_expanded()
If a row is expandable never changes until the row is destroyed.
true if the row is expandable.
|
noexcept |
| Glib::PropertyProxy_ReadOnly< Glib::RefPtr<Gio::ListModel> > Gtk::TreeListRow::property_children | ( | ) | const |
The model holding the row's children.
| Glib::PropertyProxy_ReadOnly< guint > Gtk::TreeListRow::property_depth | ( | ) | const |
The depth in the tree of this row.
Default value: 0
| Glib::PropertyProxy_ReadOnly< bool > Gtk::TreeListRow::property_expandable | ( | ) | const |
If this row can ever be expanded.
Default value: false
| Glib::PropertyProxy< bool > Gtk::TreeListRow::property_expanded | ( | ) |
If this row is currently expanded.
Default value: false
| Glib::PropertyProxy_ReadOnly< bool > Gtk::TreeListRow::property_expanded | ( | ) | const |
If this row is currently expanded.
Default value: false
| Glib::PropertyProxy_ReadOnly< Glib::RefPtr<Glib::ObjectBase> > Gtk::TreeListRow::property_item | ( | ) | const |
The item held in this row.
| void Gtk::TreeListRow::set_expanded | ( | bool | expanded = true | ) |
Expands or collapses a row.
If a row is expanded, the model of calling the Gtk::TreeListModelCreateModelFunc for the row's item will be inserted after this row. If a row is collapsed, those items will be removed from the model.
If the row is not expandable, this function does nothing.
| expanded | true if the row should be expanded. |
|
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. |
1.8.11