| 1 |
#ifndef _GTKMM_CHILDPROPERTYPROXY_BASE_H |
| 2 |
#define _GTKMM_CHILDPROPERTYPROXY_BASE_H |
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
|
| 18 |
|
| 19 |
|
| 20 |
|
| 21 |
|
| 22 |
#include <glibmm/value.h> |
| 23 |
#include <glibmm/propertyproxy_base.h> |
| 24 |
#include <gtkmm/widget.h> |
| 25 |
|
| 26 |
#include <sigc++/sigc++.h> |
| 27 |
|
| 28 |
|
| 29 |
namespace Gtk |
| 30 |
{ |
| 31 |
|
| 32 |
|
| 33 |
|
| 34 |
class GTKMM_API SignalProxyChildProperty : public Glib::SignalProxyProperty |
| 35 |
{ |
| 36 |
public: |
| 37 |
SignalProxyChildProperty(Widget* child, const char* property_name) |
| 38 |
: Glib::SignalProxyProperty(child, property_name) {} |
| 39 |
|
| 40 |
sigc::connection connect(const SlotType& sl); |
| 41 |
}; |
| 42 |
|
| 43 |
class GTKMM_API Container; |
| 44 |
|
| 45 |
class GTKMM_API ChildPropertyProxy_Base |
| 46 |
{ |
| 47 |
public: |
| 48 |
ChildPropertyProxy_Base(Container* parent, Widget& child, const char* property_name); |
| 49 |
ChildPropertyProxy_Base(const ChildPropertyProxy_Base& other); |
| 50 |
|
| 51 |
SignalProxyChildProperty signal_changed(); |
| 52 |
|
| 53 |
Container* get_parent() const { return parent_; } |
| 54 |
Widget& get_child() const { return child_; } |
| 55 |
const char* get_name() const { return property_name_; } |
| 56 |
|
| 57 |
protected: |
| 58 |
void set_property_(const Glib::ValueBase& value); |
| 59 |
void get_property_(Glib::ValueBase& value) const; |
| 60 |
void reset_property_(); |
| 61 |
|
| 62 |
Container* parent_; |
| 63 |
Widget& child_; |
| 64 |
const char* property_name_; |
| 65 |
}; |
| 66 |
|
| 67 |
} |
| 68 |
|
| 69 |
#endif |