gtkmm: Gtk::ChildPropertyProxy< T > Class Template Reference

gtkmm 3.24.11

Public Types | Public Member Functions | List of all members
Gtk::ChildPropertyProxy< T > Class Template Reference

A ChildPropertyProxy can be used to get and set the value of a GtkContainer's child property. More...

`#include <gtkmm/childpropertyproxy.h>`

Inheritance diagram for Gtk::ChildPropertyProxy< T >:
[legend]

## Public Types
typedef T | PropertyType

## Public Member Functions
| ChildPropertyProxy (Gtk::Container * parent, Gtk::Widget & child, const char * property_name)
void | set_value (const PropertyType & data)
| Set the value of this property in child.
PropertyType | get_value () const
| Get the value of this property in child.
void | reset_value ()
| Set the value of this property in child back to its default value.
ChildPropertyProxy< T > & | operator= (const PropertyType & data)
| operator PropertyType () const
SignalProxyChildProperty | signal_changed ()
Public Member Functions inherited from Gtk::ChildPropertyProxy_Base
| ChildPropertyProxy_Base (Container * parent, Widget & child, const char * property_name)
| ChildPropertyProxy_Base (const ChildPropertyProxy_Base & other)
SignalProxyChildProperty | signal_changed ()
Container * | get_parent () const
Widget & | get_child () const
const char * | get_name () const

## Additional Inherited Members
Protected Member Functions inherited from Gtk::ChildPropertyProxy_Base
void | set_property_ (const Glib::ValueBase & value)
void | get_property_ (Glib::ValueBase & value) const
void | reset_property_ ()
Protected Attributes inherited from Gtk::ChildPropertyProxy_Base
Container * | parent_
Widget & | child_
const char * | property_name_

## Detailed Description

template<class T>
class Gtk::ChildPropertyProxy< T >

A ChildPropertyProxy can be used to get and set the value of a GtkContainer's child property.

Child properties are not specific to either the container or the contained widget, but rather to their relation. With the ChildPropertyProxy, you may use either get_value() and set_value(), or operator=() and operator PropertyType(), like in this example:

bool first_tab_tab_expand = notebook.property_tab_expand(first_tab_widget);
notebook.property_tab_expand(first_tab_widget) = true;

You may also receive notification when a property's value changes on a child, by connecting to signal_changed().

## Member Typedef Documentation

## ◆ PropertyType

template <class T>

typedef T Gtk::ChildPropertyProxy< T >::PropertyType

## Constructor & Destructor Documentation

## ◆ ChildPropertyProxy()

template <class T>

Gtk::ChildPropertyProxy< T >::ChildPropertyProxy | ( | Gtk::Container * | parent,
|  | Gtk::Widget & | child,
|  | const char * | property_name )
| inline

## Member Function Documentation

## ◆ get_value()

template <class T>

PropertyType Gtk::ChildPropertyProxy< T >::get_value | ( |  | ) | const

Get the value of this property in child.

Returns
  The current value of the property.

## ◆ operator PropertyType()

template <class T>

Gtk::ChildPropertyProxy< T >::operator PropertyType | ( |  | ) | const
| inline

## ◆ operator=()

template <class T>

ChildPropertyProxy< T > & Gtk::ChildPropertyProxy< T >::operator= | ( | const PropertyType & | data | ) |
| inline

## ◆ reset_value()

template <class T>

void Gtk::ChildPropertyProxy< T >::reset_value | ( |  | ) |
| inline

Set the value of this property in child back to its default value.

## ◆ set_value()

template <class T>

void Gtk::ChildPropertyProxy< T >::set_value | ( | const PropertyType & | data | ) |

Set the value of this property in child.

Parameters

  data | The new value for the property.

## ◆ signal_changed()

template <class T>

SignalProxyChildProperty Gtk::ChildPropertyProxy< T >::signal_changed | ( |  | ) |