1 // Generated by gtkmmproc -- DO NOT MODIFY!
3 #include <gtkmm/inputdialog.h>
4 #include <gtkmm/private/inputdialog_p.h>
11 * Copyright 1998-2002 The gtkmm Development Team
13 * This library is free software; you can redistribute it and/or
14 * modify it under the terms of the GNU Library General Public
15 * License as published by the Free Software Foundation; either
16 * version 2 of the License, or (at your option) any later version.
18 * This library is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
21 * Library General Public License for more details.
23 * You should have received a copy of the GNU Library General Public
24 * License along with this library; if not, write to the Free
25 * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
28 #include <gtk/gtkinputdialog.h>
29 #include <gtkmm/button.h>
30 #include <gtkmm/optionmenu.h>
31 #include <gtkmm/scrolledwindow.h>
32 #include <gtkmm/table.h>
38 void InputDialog_signal_enable_device_callback(GtkInputDialog* self, GdkDevice* p0,void* data)
41 typedef sigc::slot< void,const Glib::RefPtr<Gdk::Device>& > SlotType;
43 // Do not try to call a signal on a disassociated wrapper.
44 if(Glib::ObjectBase::_get_current_wrapper((GObject*) self))
48 if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data))
49 (*static_cast<SlotType*>(slot))(Glib::wrap(p0, true)
54 Glib::exception_handlers_invoke();
59 const Glib::SignalProxyInfo InputDialog_signal_enable_device_info =
62 (GCallback) &InputDialog_signal_enable_device_callback,
63 (GCallback) &InputDialog_signal_enable_device_callback
67 void InputDialog_signal_disable_device_callback(GtkInputDialog* self, GdkDevice* p0,void* data)
70 typedef sigc::slot< void,const Glib::RefPtr<Gdk::Device>& > SlotType;
72 // Do not try to call a signal on a disassociated wrapper.
73 if(Glib::ObjectBase::_get_current_wrapper((GObject*) self))
77 if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data))
78 (*static_cast<SlotType*>(slot))(Glib::wrap(p0, true)
83 Glib::exception_handlers_invoke();
88 const Glib::SignalProxyInfo InputDialog_signal_disable_device_info =
91 (GCallback) &InputDialog_signal_disable_device_callback,
92 (GCallback) &InputDialog_signal_disable_device_callback
95 } // anonymous namespace
101 Gtk::InputDialog* wrap(GtkInputDialog* object, bool take_copy)
103 return dynamic_cast<Gtk::InputDialog *> (Glib::wrap_auto ((GObject*)(object), take_copy));
106 } /* namespace Glib */
112 /* The *_Class implementation: */
114 const Glib::Class& InputDialog_Class::init()
116 if(!gtype_) // create the GType if necessary
118 // Glib::Class has to know the class init function to clone custom types.
119 class_init_func_ = &InputDialog_Class::class_init_function;
121 // This is actually just optimized away, apparently with no harm.
122 // Make sure that the parent type has been created.
123 //CppClassParent::CppObjectType::get_type();
125 // Create the wrapper type, with the same class/instance size as the base type.
126 register_derived_type(gtk_input_dialog_get_type());
128 // Add derived versions of interfaces, if the C type implements any interfaces:
134 void InputDialog_Class::class_init_function(void* g_class, void* class_data)
136 BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
137 CppClassParent::class_init_function(klass, class_data);
139 klass->enable_device = &enable_device_callback;
140 klass->disable_device = &disable_device_callback;
144 void InputDialog_Class::enable_device_callback(GtkInputDialog* self, GdkDevice* p0)
146 CppObjectType *const obj = dynamic_cast<CppObjectType*>(
147 Glib::ObjectBase::_get_current_wrapper((GObject*)self));
149 // Non-gtkmmproc-generated custom classes implicitly call the default
150 // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
151 // generated classes can use this optimisation, which avoids the unnecessary
152 // parameter conversions if there is no possibility of the virtual function
154 if(obj && obj->is_derived_())
156 try // Trap C++ exceptions which would normally be lost because this is a C callback.
158 // Call the virtual member method, which derived classes might override.
159 obj->on_enable_device(Glib::wrap(p0, true)
164 Glib::exception_handlers_invoke();
169 BaseClassType *const base = static_cast<BaseClassType*>(
170 g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
173 // Call the original underlying C function:
174 if(base && base->enable_device)
175 (*base->enable_device)(self, p0);
179 void InputDialog_Class::disable_device_callback(GtkInputDialog* self, GdkDevice* p0)
181 CppObjectType *const obj = dynamic_cast<CppObjectType*>(
182 Glib::ObjectBase::_get_current_wrapper((GObject*)self));
184 // Non-gtkmmproc-generated custom classes implicitly call the default
185 // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
186 // generated classes can use this optimisation, which avoids the unnecessary
187 // parameter conversions if there is no possibility of the virtual function
189 if(obj && obj->is_derived_())
191 try // Trap C++ exceptions which would normally be lost because this is a C callback.
193 // Call the virtual member method, which derived classes might override.
194 obj->on_disable_device(Glib::wrap(p0, true)
199 Glib::exception_handlers_invoke();
204 BaseClassType *const base = static_cast<BaseClassType*>(
205 g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
208 // Call the original underlying C function:
209 if(base && base->disable_device)
210 (*base->disable_device)(self, p0);
215 Glib::ObjectBase* InputDialog_Class::wrap_new(GObject* o)
217 return new InputDialog((GtkInputDialog*)(o)); //top-level windows can not be manage()ed.
222 /* The implementation: */
224 InputDialog::InputDialog(const Glib::ConstructParams& construct_params)
226 Gtk::Dialog(construct_params)
230 InputDialog::InputDialog(GtkInputDialog* castitem)
232 Gtk::Dialog((GtkDialog*)(castitem))
236 InputDialog::~InputDialog()
241 InputDialog::CppClassType InputDialog::inputdialog_class_; // initialize static member
243 GType InputDialog::get_type()
245 return inputdialog_class_.init().get_type();
248 GType InputDialog::get_base_type()
250 return gtk_input_dialog_get_type();
254 InputDialog::InputDialog()
256 Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
257 Gtk::Dialog(Glib::ConstructParams(inputdialog_class_.init()))
261 Table* InputDialog::get_axis_list()
263 return Glib::wrap((GtkTable*)(gobj()->axis_list));
266 const Table* InputDialog::get_axis_list() const
268 return Glib::wrap((GtkTable*)(gobj()->axis_list));
271 ScrolledWindow* InputDialog::get_axis_box()
273 return Glib::wrap((GtkScrolledWindow*)(gobj()->axis_listbox));
276 const ScrolledWindow* InputDialog::get_axis_box() const
278 return Glib::wrap((GtkScrolledWindow*)(gobj()->axis_listbox));
281 OptionMenu* InputDialog::get_mode_optionmenu()
283 return Glib::wrap((GtkOptionMenu*)(gobj()->mode_optionmenu));
286 const OptionMenu* InputDialog::get_mode_optionmenu() const
288 return Glib::wrap((GtkOptionMenu*)(gobj()->mode_optionmenu));
291 Button* InputDialog::get_close_button()
293 return Glib::wrap((GtkButton*)(gobj()->close_button));
296 const Button* InputDialog::get_close_button() const
298 return Glib::wrap((GtkButton*)(gobj()->close_button));
301 Button* InputDialog::get_save_button()
303 return Glib::wrap((GtkButton*)(gobj()->save_button));
306 const Button* InputDialog::get_save_button() const
308 return Glib::wrap((GtkButton*)(gobj()->save_button));
311 Glib::RefPtr<Gdk::Device> InputDialog::get_current_device()
313 Glib::RefPtr<Gdk::Device> ref_ptr(Glib::wrap(gobj()->current_device));
316 ref_ptr->reference();
321 Glib::RefPtr<const Gdk::Device> InputDialog::get_current_device() const
323 Glib::RefPtr<const Gdk::Device> ref_ptr(Glib::wrap(gobj()->current_device));
326 ref_ptr->reference();
331 Table* InputDialog::get_keys_list()
333 return Glib::wrap((GtkTable*)(gobj()->keys_list));
336 const Table* InputDialog::get_keys_list() const
338 return Glib::wrap((GtkTable*)(gobj()->keys_list));
341 ScrolledWindow* InputDialog::get_keys_box()
343 return Glib::wrap((GtkScrolledWindow*)(gobj()->keys_listbox));
346 const ScrolledWindow* InputDialog::get_keys_box() const
348 return Glib::wrap((GtkScrolledWindow*)(gobj()->keys_listbox));
352 Glib::SignalProxy1< void,const Glib::RefPtr<Gdk::Device>& > InputDialog::signal_enable_device()
354 return Glib::SignalProxy1< void,const Glib::RefPtr<Gdk::Device>& >(this, &InputDialog_signal_enable_device_info);
357 Glib::SignalProxy1< void,const Glib::RefPtr<Gdk::Device>& > InputDialog::signal_disable_device()
359 return Glib::SignalProxy1< void,const Glib::RefPtr<Gdk::Device>& >(this, &InputDialog_signal_disable_device_info);
363 void Gtk::InputDialog::on_enable_device(const Glib::RefPtr<Gdk::Device>& device)
365 BaseClassType *const base = static_cast<BaseClassType*>(
366 g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
369 if(base && base->enable_device)
370 (*base->enable_device)(gobj(),Glib::unwrap(device));
373 void Gtk::InputDialog::on_disable_device(const Glib::RefPtr<Gdk::Device>& device)
375 BaseClassType *const base = static_cast<BaseClassType*>(
376 g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
379 if(base && base->disable_device)
380 (*base->disable_device)(gobj(),Glib::unwrap(device));