gtkmm: 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 >:

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. More...

 
PropertyType get_value () const
 Get the value of this property in child. More...

 
void reset_value ()
 Set the value of this property in child back to its default value. More...

 
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 ()
 
Containerget_parent () const
 
Widgetget_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
Containerparent_
 
Widgetchild_
 
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

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

Constructor & Destructor Documentation

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

Member Function Documentation

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.
template <class T >
Gtk::ChildPropertyProxy< T >::operator PropertyType ( ) const
inline
template <class T >
ChildPropertyProxy<T>& Gtk::ChildPropertyProxy< T >::operator= ( const PropertyType data)
inline
template <class T >
void Gtk::ChildPropertyProxy< T >::reset_value ( )
inline

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

template <class T >
void Gtk::ChildPropertyProxy< T >::set_value ( const PropertyType data)

Set the value of this property in child.

Parameters
dataThe new value for the property.
template <class T >
SignalProxyChildProperty Gtk::ChildPropertyProxy< T >::signal_changed ( )