6 #include <gxwmm/regler.h>
7 #include <gxwmm/private/regler_p.h>
28 #include <gxw/GxRegler.h>
35 static gboolean Regler_signal_value_entry_callback(
GxRegler*
self, GdkRectangle* p0,GdkEventButton* p1,
void* data)
38 typedef sigc::slot< bool,const Gdk::Rectangle&,GdkEventButton* > SlotType;
41 if(Glib::ObjectBase::_get_current_wrapper((GObject*)
self))
43 #ifdef GLIBMM_EXCEPTIONS_ENABLED
46 #endif //GLIBMM_EXCEPTIONS_ENABLED
47 if(sigc::slot_base *
const slot = Glib::SignalProxyNormal::data_to_slot(data))
48 return static_cast<int>((*static_cast<SlotType*>(slot))(
Glib::wrap(p0)
50 #ifdef GLIBMM_EXCEPTIONS_ENABLED
54 Glib::exception_handlers_invoke();
56 #endif //GLIBMM_EXCEPTIONS_ENABLED
59 typedef gboolean RType;
63 static gboolean Regler_signal_value_entry_notify_callback(
GxRegler*
self, GdkRectangle* p0,GdkEventButton* p1,
void* data)
66 typedef sigc::slot< void,const Gdk::Rectangle&,GdkEventButton* > SlotType;
69 if(Glib::ObjectBase::_get_current_wrapper((GObject*)
self))
71 #ifdef GLIBMM_EXCEPTIONS_ENABLED
74 #endif //GLIBMM_EXCEPTIONS_ENABLED
75 if(sigc::slot_base *
const slot = Glib::SignalProxyNormal::data_to_slot(data))
78 #ifdef GLIBMM_EXCEPTIONS_ENABLED
82 Glib::exception_handlers_invoke();
84 #endif //GLIBMM_EXCEPTIONS_ENABLED
87 typedef gboolean RType;
91 static const Glib::SignalProxyInfo Regler_signal_value_entry_info =
94 (GCallback) &Regler_signal_value_entry_callback,
95 (GCallback) &Regler_signal_value_entry_notify_callback
99 static gint Regler_signal_input_value_callback(
GxRegler*
self, gpointer p0,gpointer p1,
void* data)
102 typedef sigc::slot< int,void *,void * > SlotType;
105 if(Glib::ObjectBase::_get_current_wrapper((GObject*)
self))
107 #ifdef GLIBMM_EXCEPTIONS_ENABLED
110 #endif //GLIBMM_EXCEPTIONS_ENABLED
111 if(sigc::slot_base *
const slot = Glib::SignalProxyNormal::data_to_slot(data))
112 return (*static_cast<SlotType*>(slot))(p0
115 #ifdef GLIBMM_EXCEPTIONS_ENABLED
119 Glib::exception_handlers_invoke();
121 #endif //GLIBMM_EXCEPTIONS_ENABLED
128 static gint Regler_signal_input_value_notify_callback(
GxRegler*
self, gpointer p0,gpointer p1,
void* data)
131 typedef sigc::slot< void,void *,void * > SlotType;
134 if(Glib::ObjectBase::_get_current_wrapper((GObject*)
self))
136 #ifdef GLIBMM_EXCEPTIONS_ENABLED
139 #endif //GLIBMM_EXCEPTIONS_ENABLED
140 if(sigc::slot_base *
const slot = Glib::SignalProxyNormal::data_to_slot(data))
141 (*static_cast<SlotType*>(slot))(p0
144 #ifdef GLIBMM_EXCEPTIONS_ENABLED
148 Glib::exception_handlers_invoke();
150 #endif //GLIBMM_EXCEPTIONS_ENABLED
157 static const Glib::SignalProxyInfo Regler_signal_input_value_info =
160 (GCallback) &Regler_signal_input_value_callback,
161 (GCallback) &Regler_signal_input_value_notify_callback
165 static gchar* Regler_signal_format_value_callback(
GxRegler*
self, gdouble p0,
void* data)
168 typedef sigc::slot< Glib::ustring,double > SlotType;
171 if(Glib::ObjectBase::_get_current_wrapper((GObject*)
self))
173 #ifdef GLIBMM_EXCEPTIONS_ENABLED
176 #endif //GLIBMM_EXCEPTIONS_ENABLED
177 if(sigc::slot_base *
const slot = Glib::SignalProxyNormal::data_to_slot(data))
178 return (strlen((*static_cast<SlotType*>(slot))(p0
179 ).c_str()) ? g_strdup((*static_cast<SlotType*>(slot))(p0
181 #ifdef GLIBMM_EXCEPTIONS_ENABLED
185 Glib::exception_handlers_invoke();
187 #endif //GLIBMM_EXCEPTIONS_ENABLED
190 typedef gchar* RType;
194 static gchar* Regler_signal_format_value_notify_callback(
GxRegler*
self, gdouble p0,
void* data)
197 typedef sigc::slot< void,double > SlotType;
200 if(Glib::ObjectBase::_get_current_wrapper((GObject*)
self))
202 #ifdef GLIBMM_EXCEPTIONS_ENABLED
205 #endif //GLIBMM_EXCEPTIONS_ENABLED
206 if(sigc::slot_base *
const slot = Glib::SignalProxyNormal::data_to_slot(data))
207 (*static_cast<SlotType*>(slot))(p0
209 #ifdef GLIBMM_EXCEPTIONS_ENABLED
213 Glib::exception_handlers_invoke();
215 #endif //GLIBMM_EXCEPTIONS_ENABLED
218 typedef gchar* RType;
222 static const Glib::SignalProxyInfo Regler_signal_format_value_info =
225 (GCallback) &Regler_signal_format_value_callback,
226 (GCallback) &Regler_signal_format_value_notify_callback
238 return dynamic_cast<Gxw::Regler *> (Glib::wrap_auto ((GObject*)(
object), take_copy));
254 class_init_func_ = &Regler_Class::class_init_function;
272 void Regler_Class::class_init_function(
void* g_class,
void* class_data)
274 BaseClassType *
const klass = static_cast<BaseClassType*>(g_class);
275 CppClassParent::class_init_function(klass, class_data);
278 klass->value_entry = &value_entry_callback;
279 klass->input_value = &input_value_callback;
280 klass->format_value = &format_value_callback;
284 gboolean Regler_Class::value_entry_callback(
GxRegler*
self, GdkRectangle* p0, GdkEventButton* p1)
286 Glib::ObjectBase *
const obj_base = static_cast<Glib::ObjectBase*>(
287 Glib::ObjectBase::_get_current_wrapper((GObject*)
self));
294 if(obj_base && obj_base->is_derived_())
296 CppObjectType *
const obj = dynamic_cast<CppObjectType* const>(obj_base);
299 #ifdef GLIBMM_EXCEPTIONS_ENABLED
302 #endif //GLIBMM_EXCEPTIONS_ENABLED
304 return static_cast<int>(obj->on_value_entry(
Glib::wrap(p0)
306 #ifdef GLIBMM_EXCEPTIONS_ENABLED
310 Glib::exception_handlers_invoke();
312 #endif //GLIBMM_EXCEPTIONS_ENABLED
316 BaseClassType *
const base = static_cast<BaseClassType*>(
317 g_type_class_peek_parent(G_OBJECT_GET_CLASS(
self))
321 if(base && base->value_entry)
322 return (*base->value_entry)(
self, p0, p1);
324 typedef gboolean RType;
327 gint Regler_Class::input_value_callback(
GxRegler*
self, gpointer p0, gpointer p1)
329 Glib::ObjectBase *
const obj_base = static_cast<Glib::ObjectBase*>(
330 Glib::ObjectBase::_get_current_wrapper((GObject*)
self));
337 if(obj_base && obj_base->is_derived_())
339 CppObjectType *
const obj = dynamic_cast<CppObjectType* const>(obj_base);
342 #ifdef GLIBMM_EXCEPTIONS_ENABLED
345 #endif //GLIBMM_EXCEPTIONS_ENABLED
347 return obj->on_input_value(p0
350 #ifdef GLIBMM_EXCEPTIONS_ENABLED
354 Glib::exception_handlers_invoke();
356 #endif //GLIBMM_EXCEPTIONS_ENABLED
360 BaseClassType *
const base = static_cast<BaseClassType*>(
361 g_type_class_peek_parent(G_OBJECT_GET_CLASS(
self))
365 if(base && base->input_value)
366 return (*base->input_value)(
self, p0, p1);
371 gchar* Regler_Class::format_value_callback(
GxRegler*
self, gdouble p0)
373 Glib::ObjectBase *
const obj_base = static_cast<Glib::ObjectBase*>(
374 Glib::ObjectBase::_get_current_wrapper((GObject*)
self));
381 if(obj_base && obj_base->is_derived_())
383 CppObjectType *
const obj = dynamic_cast<CppObjectType* const>(obj_base);
386 #ifdef GLIBMM_EXCEPTIONS_ENABLED
389 #endif //GLIBMM_EXCEPTIONS_ENABLED
391 return (strlen(obj->on_format_value(p0
392 ).c_str()) ? g_strdup(obj->on_format_value(p0
394 #ifdef GLIBMM_EXCEPTIONS_ENABLED
398 Glib::exception_handlers_invoke();
400 #endif //GLIBMM_EXCEPTIONS_ENABLED
404 BaseClassType *
const base = static_cast<BaseClassType*>(
405 g_type_class_peek_parent(G_OBJECT_GET_CLASS(
self))
409 if(base && base->format_value)
410 return (*base->format_value)(
self, p0);
412 typedef gchar* RType;
428 Gtk::Range(construct_params)
434 Gtk::Range((GtkRange*)(castitem))
447 return regler_class_.init().get_type();
459 gx_regler_set_label_ref(
gobj(), (GtkLabel*)Glib::unwrap(p1));
469 gx_regler_set_show_value(
gobj(), static_cast<int>(p1));
474 return gx_regler_get_show_value(
gobj());
479 gx_regler_set_value_position(
gobj(), ((GtkPositionType)(p1)));
484 return ((Gtk::PositionType)(gx_regler_get_value_position(
gobj())));
491 Gtk::Range(
Glib::ConstructParams(regler_class_.
init()))
500 return Glib::SignalProxy2< bool,const Gdk::Rectangle&,GdkEventButton* >(
this, &Regler_signal_value_entry_info);
506 return Glib::SignalProxy2< int,void *,void * >(
this, &Regler_signal_input_value_info);
512 return Glib::SignalProxy1< Glib::ustring,double >(
this, &Regler_signal_format_value_info);
516 #ifdef GLIBMM_PROPERTIES_ENABLED
517 Glib::PropertyProxy< Gtk::Label > Regler::property_label_ref()
519 return Glib::PropertyProxy< Gtk::Label >(
this,
"label-ref");
521 #endif //GLIBMM_PROPERTIES_ENABLED
523 #ifdef GLIBMM_PROPERTIES_ENABLED
524 Glib::PropertyProxy_ReadOnly< Gtk::Label > Regler::property_label_ref()
const
526 return Glib::PropertyProxy_ReadOnly< Gtk::Label >(
this,
"label-ref");
528 #endif //GLIBMM_PROPERTIES_ENABLED
530 #ifdef GLIBMM_PROPERTIES_ENABLED
531 Glib::PropertyProxy< bool > Regler::property_show_value()
533 return Glib::PropertyProxy< bool >(
this,
"show-value");
535 #endif //GLIBMM_PROPERTIES_ENABLED
537 #ifdef GLIBMM_PROPERTIES_ENABLED
538 Glib::PropertyProxy_ReadOnly< bool > Regler::property_show_value()
const
540 return Glib::PropertyProxy_ReadOnly< bool >(
this,
"show-value");
542 #endif //GLIBMM_PROPERTIES_ENABLED
544 #ifdef GLIBMM_PROPERTIES_ENABLED
545 Glib::PropertyProxy< double > Regler::property_value_xalign()
547 return Glib::PropertyProxy< double >(
this,
"value-xalign");
549 #endif //GLIBMM_PROPERTIES_ENABLED
551 #ifdef GLIBMM_PROPERTIES_ENABLED
552 Glib::PropertyProxy_ReadOnly< double > Regler::property_value_xalign()
const
554 return Glib::PropertyProxy_ReadOnly< double >(
this,
"value-xalign");
556 #endif //GLIBMM_PROPERTIES_ENABLED
558 #ifdef GLIBMM_PROPERTIES_ENABLED
559 Glib::PropertyProxy_ReadOnly< int > Regler::property_digits()
const
561 return Glib::PropertyProxy_ReadOnly< int >(
this,
"digits");
563 #endif //GLIBMM_PROPERTIES_ENABLED
565 #ifdef GLIBMM_PROPERTIES_ENABLED
566 Glib::PropertyProxy< Gtk::PositionType > Regler::property_value_position()
568 return Glib::PropertyProxy< Gtk::PositionType >(
this,
"value-position");
570 #endif //GLIBMM_PROPERTIES_ENABLED
572 #ifdef GLIBMM_PROPERTIES_ENABLED
573 Glib::PropertyProxy_ReadOnly< Gtk::PositionType > Regler::property_value_position()
const
575 return Glib::PropertyProxy_ReadOnly< Gtk::PositionType >(
this,
"value-position");
577 #endif //GLIBMM_PROPERTIES_ENABLED
583 g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_))
586 if(base && base->value_entry)
587 return (*base->value_entry)(gobj(),const_cast<GdkRectangle*>(p1.gobj()),p2);
595 g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_))
598 if(base && base->input_value)
599 return (*base->input_value)(gobj(),spin,new_val);
607 g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_))
610 if(base && base->format_value)
611 return Glib::convert_const_gchar_ptr_to_ustring((*base->format_value)(gobj(),value));
613 typedef Glib::ustring RType;