1 // Generated by gtkmmproc -- DO NOT MODIFY!
3 #include <gtkmm/tooltips.h>
4 #include <gtkmm/private/tooltips_p.h>
9 /* Copyright 1998-2002 The gtkmm Development Team
11 * This library is free software; you can redistribute it and/or
12 * modify it under the terms of the GNU Library General Public
13 * License as published by the Free Software Foundation; either
14 * version 2 of the License, or (at your option) any later version.
16 * This library is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19 * Library General Public License for more details.
21 * You should have received a copy of the GNU Library General Public
22 * License along with this library; if not, write to the Free
23 * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
26 #include <gtk/gtkwidget.h>
27 #include <gtk/gtktooltips.h>
28 #include <gdkmm/color.h>
29 #include <gtkmm/widget.h>
35 void Tooltips::set_tip(Gtk::Widget& widget, const Glib::ustring& tip_text)
37 gtk_tooltips_set_tip(gobj(), widget.gobj(), tip_text.c_str(), 0);
40 void Tooltips::unset_tip(Gtk::Widget& widget)
42 gtk_tooltips_set_tip(gobj(), widget.gobj(), 0, 0);
50 } // anonymous namespace
56 Gtk::Tooltips* wrap(GtkTooltips* object, bool take_copy)
58 return dynamic_cast<Gtk::Tooltips *> (Glib::wrap_auto ((GObject*)(object), take_copy));
61 } /* namespace Glib */
67 /* The *_Class implementation: */
69 const Glib::Class& Tooltips_Class::init()
71 if(!gtype_) // create the GType if necessary
73 // Glib::Class has to know the class init function to clone custom types.
74 class_init_func_ = &Tooltips_Class::class_init_function;
76 // This is actually just optimized away, apparently with no harm.
77 // Make sure that the parent type has been created.
78 //CppClassParent::CppObjectType::get_type();
80 // Create the wrapper type, with the same class/instance size as the base type.
81 register_derived_type(gtk_tooltips_get_type());
83 // Add derived versions of interfaces, if the C type implements any interfaces:
89 void Tooltips_Class::class_init_function(void* g_class, void* class_data)
91 BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
92 CppClassParent::class_init_function(klass, class_data);
97 Glib::ObjectBase* Tooltips_Class::wrap_new(GObject* o)
99 return manage(new Tooltips((GtkTooltips*)(o)));
104 /* The implementation: */
106 Tooltips::Tooltips(const Glib::ConstructParams& construct_params)
108 Gtk::Object(construct_params)
112 Tooltips::Tooltips(GtkTooltips* castitem)
114 Gtk::Object((GtkObject*)(castitem))
118 Tooltips::~Tooltips()
123 Tooltips::CppClassType Tooltips::tooltips_class_; // initialize static member
125 GType Tooltips::get_type()
127 return tooltips_class_.init().get_type();
130 GType Tooltips::get_base_type()
132 return gtk_tooltips_get_type();
138 Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
139 Gtk::Object(Glib::ConstructParams(tooltips_class_.init()))
143 void Tooltips::enable()
145 gtk_tooltips_enable(gobj());
148 void Tooltips::disable()
150 gtk_tooltips_disable(gobj());
153 void Tooltips::set_tip(Widget& widget, const Glib::ustring& tip_text, const Glib::ustring& tip_private)
155 gtk_tooltips_set_tip(gobj(), (widget).gobj(), tip_text.c_str(), tip_private.c_str());
158 GtkTooltipsData* Tooltips::data_get(Widget& widget)
160 return gtk_tooltips_data_get((widget).gobj());
163 void Tooltips::force_window()
165 gtk_tooltips_force_window(gobj());