// Generated by gtkmmproc -- DO NOT MODIFY! #ifndef GTKMM_DISABLE_DEPRECATED #include #include // -*- c++ -*- /* $Id$ */ /* * * Copyright 1998-2002 The gtkmm Development Team * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ //These were deprecated between 1.2 and 2.0: #include #include #include #include #include #include #include #include #include namespace Gtk { namespace ComboDropDown_Helpers { ComboDropDownList::iterator ComboDropDownList::insert(ComboDropDownList::iterator position, const Element& item) { int pos = -1; if(position.node_) pos = g_list_position(glist(), position.node_); // gtk+ inserts the GList node allocated by g_list_append into the list as is! gtk_list_insert_items((GtkList*)gparent(), g_list_append(0, const_cast(item.Widget::gobj())), pos); return --position; } void ComboDropDownList::remove(const_reference child) { GList child_list; child_list.data = (gpointer)child.gobj(); child_list.next = child_list.prev = 0; gtk_list_remove_items(GTK_LIST(gparent_), &child_list); } ComboDropDownList::iterator ComboDropDownList::erase(iterator position) { //Check that it is a valid iterator, to a real item: if ( !position.node_|| (position == end()) ) return end(); //Get an iterator the the next item, to return: iterator next = position; next++; //Use GTK+ C function to remove it, by providing the GtkWidget*: GList child_list; child_list.data = (gpointer)position->gobj(); child_list.next = child_list.prev = 0; gtk_list_remove_items(GTK_LIST(gparent_), &child_list); return next; } } // namespace ComboList_Helpers ComboDropDown::ComboDropDownList& ComboDropDown::children() { children_proxy_ = ComboDropDownList(gobj()); return children_proxy_; } const ComboDropDown::ComboDropDownList& ComboDropDown::children() const { children_proxy_ = ComboDropDownList(const_cast(gobj())); return children_proxy_; } } // namespace Gtk namespace Gtk { void Combo::remove_item_string(Gtk::Item& item) { gtk_combo_set_item_string(gobj(), item.gobj(), 0); } Glib::ListHandle Combo::get_popdown_strings() const { GList* popdown_strings = 0; GList *const list_children = gtk_container_get_children(reinterpret_cast(gobj()->list)); for(const GList* node = list_children; node != 0; node = node->next) { GtkLabel *const label = reinterpret_cast( gtk_bin_get_child(static_cast(node->data))); popdown_strings = g_list_prepend( popdown_strings, const_cast(gtk_label_get_text(label))); } g_list_free(list_children); popdown_strings = g_list_reverse(popdown_strings); return Glib::ListHandle(popdown_strings, Glib::OWNERSHIP_SHALLOW); } } // namespace Gtk namespace { static void ComboDropDownItem_signal_scroll_horizontal_callback(GtkListItem* self, GtkScrollType p0,gfloat p1,void* data) { using namespace Gtk; typedef sigc::slot< void,ScrollType,float > SlotType; // Do not try to call a signal on a disassociated wrapper. if(Glib::ObjectBase::_get_current_wrapper((GObject*) self)) { #ifdef GLIBMM_EXCEPTIONS_ENABLED try { #endif //GLIBMM_EXCEPTIONS_ENABLED if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data)) (*static_cast(slot))(((ScrollType)(p0)) , p1 ); #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } #endif //GLIBMM_EXCEPTIONS_ENABLED } } static const Glib::SignalProxyInfo ComboDropDownItem_signal_scroll_horizontal_info = { "scroll-horizontal", (GCallback) &ComboDropDownItem_signal_scroll_horizontal_callback, (GCallback) &ComboDropDownItem_signal_scroll_horizontal_callback }; static void ComboDropDownItem_signal_scroll_vertical_callback(GtkListItem* self, GtkScrollType p0,gfloat p1,void* data) { using namespace Gtk; typedef sigc::slot< void,ScrollType,float > SlotType; // Do not try to call a signal on a disassociated wrapper. if(Glib::ObjectBase::_get_current_wrapper((GObject*) self)) { #ifdef GLIBMM_EXCEPTIONS_ENABLED try { #endif //GLIBMM_EXCEPTIONS_ENABLED if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data)) (*static_cast(slot))(((ScrollType)(p0)) , p1 ); #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } #endif //GLIBMM_EXCEPTIONS_ENABLED } } static const Glib::SignalProxyInfo ComboDropDownItem_signal_scroll_vertical_info = { "scroll-vertical", (GCallback) &ComboDropDownItem_signal_scroll_vertical_callback, (GCallback) &ComboDropDownItem_signal_scroll_vertical_callback }; static void ComboDropDown_signal_select_child_callback(GtkList* self, GtkWidget* p0,void* data) { using namespace Gtk; typedef sigc::slot< void,Widget& > SlotType; // Do not try to call a signal on a disassociated wrapper. if(Glib::ObjectBase::_get_current_wrapper((GObject*) self)) { #ifdef GLIBMM_EXCEPTIONS_ENABLED try { #endif //GLIBMM_EXCEPTIONS_ENABLED if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data)) (*static_cast(slot))(*Glib::wrap(p0) ); #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } #endif //GLIBMM_EXCEPTIONS_ENABLED } } static const Glib::SignalProxyInfo ComboDropDown_signal_select_child_info = { "select_child", (GCallback) &ComboDropDown_signal_select_child_callback, (GCallback) &ComboDropDown_signal_select_child_callback }; static const Glib::SignalProxyInfo ComboDropDown_signal_selection_changed_info = { "selection_changed", (GCallback) &Glib::SignalProxyNormal::slot0_void_callback, (GCallback) &Glib::SignalProxyNormal::slot0_void_callback }; static void ComboDropDown_signal_unselect_child_callback(GtkList* self, GtkWidget* p0,void* data) { using namespace Gtk; typedef sigc::slot< void,Widget& > SlotType; // Do not try to call a signal on a disassociated wrapper. if(Glib::ObjectBase::_get_current_wrapper((GObject*) self)) { #ifdef GLIBMM_EXCEPTIONS_ENABLED try { #endif //GLIBMM_EXCEPTIONS_ENABLED if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data)) (*static_cast(slot))(*Glib::wrap(p0) ); #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } #endif //GLIBMM_EXCEPTIONS_ENABLED } } static const Glib::SignalProxyInfo ComboDropDown_signal_unselect_child_info = { "unselect_child", (GCallback) &ComboDropDown_signal_unselect_child_callback, (GCallback) &ComboDropDown_signal_unselect_child_callback }; } // anonymous namespace namespace Glib { Gtk::ComboDropDownItem* wrap(GtkListItem* object, bool take_copy) { return dynamic_cast (Glib::wrap_auto ((GObject*)(object), take_copy)); } } /* namespace Glib */ namespace Gtk { /* The *_Class implementation: */ const Glib::Class& ComboDropDownItem_Class::init() { if(!gtype_) // create the GType if necessary { // Glib::Class has to know the class init function to clone custom types. class_init_func_ = &ComboDropDownItem_Class::class_init_function; // This is actually just optimized away, apparently with no harm. // Make sure that the parent type has been created. //CppClassParent::CppObjectType::get_type(); // Create the wrapper type, with the same class/instance size as the base type. register_derived_type(gtk_list_item_get_type()); // Add derived versions of interfaces, if the C type implements any interfaces: } return *this; } void ComboDropDownItem_Class::class_init_function(void* g_class, void* class_data) { BaseClassType *const klass = static_cast(g_class); CppClassParent::class_init_function(klass, class_data); #ifdef GLIBMM_VFUNCS_ENABLED #endif //GLIBMM_VFUNCS_ENABLED #ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED klass->scroll_horizontal = &scroll_horizontal_callback; klass->scroll_vertical = &scroll_vertical_callback; #endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED } #ifdef GLIBMM_VFUNCS_ENABLED #endif //GLIBMM_VFUNCS_ENABLED #ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED void ComboDropDownItem_Class::scroll_horizontal_callback(GtkListItem* self, GtkScrollType p0, gfloat p1) { Glib::ObjectBase *const obj_base = static_cast( Glib::ObjectBase::_get_current_wrapper((GObject*)self)); // Non-gtkmmproc-generated custom classes implicitly call the default // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc- // generated classes can use this optimisation, which avoids the unnecessary // parameter conversions if there is no possibility of the virtual function // being overridden: if(obj_base && obj_base->is_derived_()) { CppObjectType *const obj = dynamic_cast(obj_base); if(obj) // This can be NULL during destruction. { #ifdef GLIBMM_EXCEPTIONS_ENABLED try // Trap C++ exceptions which would normally be lost because this is a C callback. { #endif //GLIBMM_EXCEPTIONS_ENABLED // Call the virtual member method, which derived classes might override. obj->on_scroll_horizontal(((ScrollType)(p0)) , p1 ); return; #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } #endif //GLIBMM_EXCEPTIONS_ENABLED } } BaseClassType *const base = static_cast( g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class). ); // Call the original underlying C function: if(base && base->scroll_horizontal) (*base->scroll_horizontal)(self, p0, p1); } void ComboDropDownItem_Class::scroll_vertical_callback(GtkListItem* self, GtkScrollType p0, gfloat p1) { Glib::ObjectBase *const obj_base = static_cast( Glib::ObjectBase::_get_current_wrapper((GObject*)self)); // Non-gtkmmproc-generated custom classes implicitly call the default // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc- // generated classes can use this optimisation, which avoids the unnecessary // parameter conversions if there is no possibility of the virtual function // being overridden: if(obj_base && obj_base->is_derived_()) { CppObjectType *const obj = dynamic_cast(obj_base); if(obj) // This can be NULL during destruction. { #ifdef GLIBMM_EXCEPTIONS_ENABLED try // Trap C++ exceptions which would normally be lost because this is a C callback. { #endif //GLIBMM_EXCEPTIONS_ENABLED // Call the virtual member method, which derived classes might override. obj->on_scroll_vertical(((ScrollType)(p0)) , p1 ); return; #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } #endif //GLIBMM_EXCEPTIONS_ENABLED } } BaseClassType *const base = static_cast( g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class). ); // Call the original underlying C function: if(base && base->scroll_vertical) (*base->scroll_vertical)(self, p0, p1); } #endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED Glib::ObjectBase* ComboDropDownItem_Class::wrap_new(GObject* o) { return manage(new ComboDropDownItem((GtkListItem*)(o))); } /* The implementation: */ ComboDropDownItem::ComboDropDownItem(const Glib::ConstructParams& construct_params) : Gtk::Item(construct_params) { } ComboDropDownItem::ComboDropDownItem(GtkListItem* castitem) : Gtk::Item((GtkItem*)(castitem)) { } ComboDropDownItem::~ComboDropDownItem() { destroy_(); } ComboDropDownItem::CppClassType ComboDropDownItem::combodropdownitem_class_; // initialize static member GType ComboDropDownItem::get_type() { return combodropdownitem_class_.init().get_type(); } GType ComboDropDownItem::get_base_type() { return gtk_list_item_get_type(); } ComboDropDownItem::ComboDropDownItem() : // Mark this class as non-derived to allow C++ vfuncs to be skipped. Glib::ObjectBase(0), Gtk::Item(Glib::ConstructParams(combodropdownitem_class_.init())) { } Glib::SignalProxy2< void,ScrollType,float > ComboDropDownItem::signal_scroll_horizontal() { return Glib::SignalProxy2< void,ScrollType,float >(this, &ComboDropDownItem_signal_scroll_horizontal_info); } Glib::SignalProxy2< void,ScrollType,float > ComboDropDownItem::signal_scroll_vertical() { return Glib::SignalProxy2< void,ScrollType,float >(this, &ComboDropDownItem_signal_scroll_vertical_info); } #ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED void Gtk::ComboDropDownItem::on_scroll_horizontal(ScrollType scroll_type, float position) { BaseClassType *const base = static_cast( g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class). ); if(base && base->scroll_horizontal) (*base->scroll_horizontal)(gobj(),((GtkScrollType)(scroll_type)),position); } void Gtk::ComboDropDownItem::on_scroll_vertical(ScrollType scroll_type, float position) { BaseClassType *const base = static_cast( g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class). ); if(base && base->scroll_vertical) (*base->scroll_vertical)(gobj(),((GtkScrollType)(scroll_type)),position); } #endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED #ifdef GLIBMM_VFUNCS_ENABLED #endif //GLIBMM_VFUNCS_ENABLED } // namespace Gtk namespace Glib { Gtk::ComboDropDown* wrap(GtkList* object, bool take_copy) { return dynamic_cast (Glib::wrap_auto ((GObject*)(object), take_copy)); } } /* namespace Glib */ namespace Gtk { /* The *_Class implementation: */ const Glib::Class& ComboDropDown_Class::init() { if(!gtype_) // create the GType if necessary { // Glib::Class has to know the class init function to clone custom types. class_init_func_ = &ComboDropDown_Class::class_init_function; // This is actually just optimized away, apparently with no harm. // Make sure that the parent type has been created. //CppClassParent::CppObjectType::get_type(); // Create the wrapper type, with the same class/instance size as the base type. register_derived_type(gtk_list_get_type()); // Add derived versions of interfaces, if the C type implements any interfaces: } return *this; } void ComboDropDown_Class::class_init_function(void* g_class, void* class_data) { BaseClassType *const klass = static_cast(g_class); CppClassParent::class_init_function(klass, class_data); #ifdef GLIBMM_VFUNCS_ENABLED #endif //GLIBMM_VFUNCS_ENABLED #ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED klass->select_child = &select_child_callback; klass->selection_changed = &selection_changed_callback; klass->unselect_child = &unselect_child_callback; #endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED } #ifdef GLIBMM_VFUNCS_ENABLED #endif //GLIBMM_VFUNCS_ENABLED #ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED void ComboDropDown_Class::select_child_callback(GtkList* self, GtkWidget* p0) { Glib::ObjectBase *const obj_base = static_cast( Glib::ObjectBase::_get_current_wrapper((GObject*)self)); // Non-gtkmmproc-generated custom classes implicitly call the default // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc- // generated classes can use this optimisation, which avoids the unnecessary // parameter conversions if there is no possibility of the virtual function // being overridden: if(obj_base && obj_base->is_derived_()) { CppObjectType *const obj = dynamic_cast(obj_base); if(obj) // This can be NULL during destruction. { #ifdef GLIBMM_EXCEPTIONS_ENABLED try // Trap C++ exceptions which would normally be lost because this is a C callback. { #endif //GLIBMM_EXCEPTIONS_ENABLED // Call the virtual member method, which derived classes might override. obj->on_select_child(*Glib::wrap(p0) ); return; #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } #endif //GLIBMM_EXCEPTIONS_ENABLED } } BaseClassType *const base = static_cast( g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class). ); // Call the original underlying C function: if(base && base->select_child) (*base->select_child)(self, p0); } void ComboDropDown_Class::selection_changed_callback(GtkList* self) { Glib::ObjectBase *const obj_base = static_cast( Glib::ObjectBase::_get_current_wrapper((GObject*)self)); // Non-gtkmmproc-generated custom classes implicitly call the default // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc- // generated classes can use this optimisation, which avoids the unnecessary // parameter conversions if there is no possibility of the virtual function // being overridden: if(obj_base && obj_base->is_derived_()) { CppObjectType *const obj = dynamic_cast(obj_base); if(obj) // This can be NULL during destruction. { #ifdef GLIBMM_EXCEPTIONS_ENABLED try // Trap C++ exceptions which would normally be lost because this is a C callback. { #endif //GLIBMM_EXCEPTIONS_ENABLED // Call the virtual member method, which derived classes might override. obj->on_selection_changed(); return; #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } #endif //GLIBMM_EXCEPTIONS_ENABLED } } BaseClassType *const base = static_cast( g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class). ); // Call the original underlying C function: if(base && base->selection_changed) (*base->selection_changed)(self); } void ComboDropDown_Class::unselect_child_callback(GtkList* self, GtkWidget* p0) { Glib::ObjectBase *const obj_base = static_cast( Glib::ObjectBase::_get_current_wrapper((GObject*)self)); // Non-gtkmmproc-generated custom classes implicitly call the default // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc- // generated classes can use this optimisation, which avoids the unnecessary // parameter conversions if there is no possibility of the virtual function // being overridden: if(obj_base && obj_base->is_derived_()) { CppObjectType *const obj = dynamic_cast(obj_base); if(obj) // This can be NULL during destruction. { #ifdef GLIBMM_EXCEPTIONS_ENABLED try // Trap C++ exceptions which would normally be lost because this is a C callback. { #endif //GLIBMM_EXCEPTIONS_ENABLED // Call the virtual member method, which derived classes might override. obj->on_unselect_child(*Glib::wrap(p0) ); return; #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } #endif //GLIBMM_EXCEPTIONS_ENABLED } } BaseClassType *const base = static_cast( g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class). ); // Call the original underlying C function: if(base && base->unselect_child) (*base->unselect_child)(self, p0); } #endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED Glib::ObjectBase* ComboDropDown_Class::wrap_new(GObject* o) { return manage(new ComboDropDown((GtkList*)(o))); } /* The implementation: */ ComboDropDown::ComboDropDown(const Glib::ConstructParams& construct_params) : Gtk::Container(construct_params) { } ComboDropDown::ComboDropDown(GtkList* castitem) : Gtk::Container((GtkContainer*)(castitem)) { } ComboDropDown::~ComboDropDown() { destroy_(); } ComboDropDown::CppClassType ComboDropDown::combodropdown_class_; // initialize static member GType ComboDropDown::get_type() { return combodropdown_class_.init().get_type(); } GType ComboDropDown::get_base_type() { return gtk_list_get_type(); } namespace ComboDropDown_Helpers { ComboDropDownList::iterator ComboDropDownList::find(const_reference w) { iterator i = begin(); for(i = begin(); i != end() && (i->gobj() != w.gobj()); i++); return i; } ComboDropDownList::iterator ComboDropDownList::find(Widget& w) { iterator i; for(i = begin(); i != end() && ((GtkWidget*)i->gobj() != w.gobj()); i++); return i; } } /* namespace ComboDropDown_Helpers */ namespace ComboDropDown_Helpers { ComboDropDownList::ComboDropDownList() {} ComboDropDownList::ComboDropDownList(GtkList* gparent) : type_base((GObject*)gparent) {} ComboDropDownList::ComboDropDownList(const ComboDropDownList& src) : type_base(src) {} ComboDropDownList& ComboDropDownList::operator=(const ComboDropDownList& src) { type_base::operator=(src); return *this; } GList*& ComboDropDownList::glist() const { return ((GtkList*)gparent_)->children; } void ComboDropDownList::erase(iterator start, iterator stop) { type_base::erase(start, stop); } GtkList* ComboDropDownList::gparent() { return (GtkList*)type_base::gparent(); } const GtkList* ComboDropDownList::gparent() const { return (GtkList*)type_base::gparent(); } ComboDropDownList::reference ComboDropDownList::operator[](size_type l) const { return type_base::operator[](l); } } /* namespace ComboDropDown_Helpers */ ComboDropDown::ComboDropDown() : // Mark this class as non-derived to allow C++ vfuncs to be skipped. Glib::ObjectBase(0), Gtk::Container(Glib::ConstructParams(combodropdown_class_.init())) { } void ComboDropDown::scroll_horizontal(ScrollType scroll_type, float position) { gtk_list_scroll_horizontal(gobj(), ((GtkScrollType)(scroll_type)), position); } void ComboDropDown::scroll_vertical(ScrollType scroll_type, float position) { gtk_list_scroll_vertical(gobj(), ((GtkScrollType)(scroll_type)), position); } Glib::SignalProxy1< void,Widget& > ComboDropDown::signal_select_child() { return Glib::SignalProxy1< void,Widget& >(this, &ComboDropDown_signal_select_child_info); } Glib::SignalProxy0< void > ComboDropDown::signal_selection_changed() { return Glib::SignalProxy0< void >(this, &ComboDropDown_signal_selection_changed_info); } Glib::SignalProxy1< void,Widget& > ComboDropDown::signal_unselect_child() { return Glib::SignalProxy1< void,Widget& >(this, &ComboDropDown_signal_unselect_child_info); } #ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED void Gtk::ComboDropDown::on_select_child(Widget& item) { BaseClassType *const base = static_cast( g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class). ); if(base && base->select_child) (*base->select_child)(gobj(),(item).gobj()); } void Gtk::ComboDropDown::on_selection_changed() { BaseClassType *const base = static_cast( g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class). ); if(base && base->selection_changed) (*base->selection_changed)(gobj()); } void Gtk::ComboDropDown::on_unselect_child(Widget& item) { BaseClassType *const base = static_cast( g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class). ); if(base && base->unselect_child) (*base->unselect_child)(gobj(),(item).gobj()); } #endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED #ifdef GLIBMM_VFUNCS_ENABLED #endif //GLIBMM_VFUNCS_ENABLED } // namespace Gtk namespace Glib { Gtk::Combo* wrap(GtkCombo* object, bool take_copy) { return dynamic_cast (Glib::wrap_auto ((GObject*)(object), take_copy)); } } /* namespace Glib */ namespace Gtk { /* The *_Class implementation: */ const Glib::Class& Combo_Class::init() { if(!gtype_) // create the GType if necessary { // Glib::Class has to know the class init function to clone custom types. class_init_func_ = &Combo_Class::class_init_function; // This is actually just optimized away, apparently with no harm. // Make sure that the parent type has been created. //CppClassParent::CppObjectType::get_type(); // Create the wrapper type, with the same class/instance size as the base type. register_derived_type(gtk_combo_get_type()); // Add derived versions of interfaces, if the C type implements any interfaces: } return *this; } void Combo_Class::class_init_function(void* g_class, void* class_data) { BaseClassType *const klass = static_cast(g_class); CppClassParent::class_init_function(klass, class_data); #ifdef GLIBMM_VFUNCS_ENABLED #endif //GLIBMM_VFUNCS_ENABLED #ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED #endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED } #ifdef GLIBMM_VFUNCS_ENABLED #endif //GLIBMM_VFUNCS_ENABLED #ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED #endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED Glib::ObjectBase* Combo_Class::wrap_new(GObject* o) { return manage(new Combo((GtkCombo*)(o))); } /* The implementation: */ Combo::Combo(const Glib::ConstructParams& construct_params) : Gtk::HBox(construct_params) { } Combo::Combo(GtkCombo* castitem) : Gtk::HBox((GtkHBox*)(castitem)) { } Combo::~Combo() { destroy_(); } Combo::CppClassType Combo::combo_class_; // initialize static member GType Combo::get_type() { return combo_class_.init().get_type(); } GType Combo::get_base_type() { return gtk_combo_get_type(); } Combo::Combo() : // Mark this class as non-derived to allow C++ vfuncs to be skipped. Glib::ObjectBase(0), Gtk::HBox(Glib::ConstructParams(combo_class_.init())) { } void Combo::set_value_in_list(bool value, bool empty) { gtk_combo_set_value_in_list(gobj(), static_cast(value), static_cast(empty)); } void Combo::set_use_arrows(bool arrows_on) { gtk_combo_set_use_arrows(gobj(), static_cast(arrows_on)); } void Combo::set_use_arrows_always(bool arrows_always) { gtk_combo_set_use_arrows_always(gobj(), static_cast(arrows_always)); } void Combo::set_case_sensitive(bool val) { gtk_combo_set_case_sensitive(gobj(), static_cast(val)); } void Combo::set_item_string(Gtk::Item& item, const Glib::ustring& item_value) { gtk_combo_set_item_string(gobj(), (item).gobj(), item_value.c_str()); } void Combo::set_popdown_strings(const Glib::ListHandle& strings) { gtk_combo_set_popdown_strings(gobj(), strings.data()); } void Combo::disable_activate() { gtk_combo_disable_activate(gobj()); } Entry* Combo::get_entry() { return Glib::wrap((GtkEntry*)(gobj()->entry)); } const Entry* Combo::get_entry() const { return Glib::wrap((GtkEntry*)(gobj()->entry)); } ComboDropDown* Combo::get_list() { return Glib::wrap((GtkList*)(gobj()->list)); } const ComboDropDown* Combo::get_list() const { return Glib::wrap((GtkList*)(gobj()->list)); } #ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy Combo::property_enable_arrow_keys() { return Glib::PropertyProxy(this, "enable-arrow-keys"); } #endif //GLIBMM_PROPERTIES_ENABLED #ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy_ReadOnly Combo::property_enable_arrow_keys() const { return Glib::PropertyProxy_ReadOnly(this, "enable-arrow-keys"); } #endif //GLIBMM_PROPERTIES_ENABLED #ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy Combo::property_enable_arrows_always() { return Glib::PropertyProxy(this, "enable-arrows-always"); } #endif //GLIBMM_PROPERTIES_ENABLED #ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy_ReadOnly Combo::property_enable_arrows_always() const { return Glib::PropertyProxy_ReadOnly(this, "enable-arrows-always"); } #endif //GLIBMM_PROPERTIES_ENABLED #ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy Combo::property_case_sensitive() { return Glib::PropertyProxy(this, "case-sensitive"); } #endif //GLIBMM_PROPERTIES_ENABLED #ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy_ReadOnly Combo::property_case_sensitive() const { return Glib::PropertyProxy_ReadOnly(this, "case-sensitive"); } #endif //GLIBMM_PROPERTIES_ENABLED #ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy Combo::property_allow_empty() { return Glib::PropertyProxy(this, "allow-empty"); } #endif //GLIBMM_PROPERTIES_ENABLED #ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy_ReadOnly Combo::property_allow_empty() const { return Glib::PropertyProxy_ReadOnly(this, "allow-empty"); } #endif //GLIBMM_PROPERTIES_ENABLED #ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy Combo::property_value_in_list() { return Glib::PropertyProxy(this, "value-in-list"); } #endif //GLIBMM_PROPERTIES_ENABLED #ifdef GLIBMM_PROPERTIES_ENABLED Glib::PropertyProxy_ReadOnly Combo::property_value_in_list() const { return Glib::PropertyProxy_ReadOnly(this, "value-in-list"); } #endif //GLIBMM_PROPERTIES_ENABLED #ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED #endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED #ifdef GLIBMM_VFUNCS_ENABLED #endif //GLIBMM_VFUNCS_ENABLED } // namespace Gtk #endif // GTKMM_DISABLE_DEPRECATED