Install ardour as a binary, a script and a set of shared
[ardour.git] / libs / gtkmm2 / gtk / gtkmm / tooltips.cc
1 // Generated by gtkmmproc -- DO NOT MODIFY!
2
3 #include <gtkmm/tooltips.h>
4 #include <gtkmm/private/tooltips_p.h>
5
6 // -*- c++ -*-
7 /* $Id$ */
8
9 /* Copyright 1998-2002 The gtkmm Development Team
10  *
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.
15  *
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.
20  *
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.
24  */
25
26 #include <gtk/gtkwidget.h>
27 #include <gtk/gtktooltips.h>
28 #include <gdkmm/color.h>
29 #include <gtkmm/widget.h>
30
31
32 namespace Gtk
33 {
34
35 void Tooltips::set_tip(Gtk::Widget& widget, const Glib::ustring& tip_text)
36 {
37   gtk_tooltips_set_tip(gobj(), widget.gobj(), tip_text.c_str(), 0);
38 }
39
40 void Tooltips::unset_tip(Gtk::Widget& widget)
41 {
42   gtk_tooltips_set_tip(gobj(), widget.gobj(), 0, 0);
43 }
44
45 } // namespace Gtk
46
47
48 namespace
49 {
50 } // anonymous namespace
51
52
53 namespace Glib
54 {
55
56 Gtk::Tooltips* wrap(GtkTooltips* object, bool take_copy)
57 {
58   return dynamic_cast<Gtk::Tooltips *> (Glib::wrap_auto ((GObject*)(object), take_copy));
59 }
60
61 } /* namespace Glib */
62
63 namespace Gtk
64 {
65
66
67 /* The *_Class implementation: */
68
69 const Glib::Class& Tooltips_Class::init()
70 {
71   if(!gtype_) // create the GType if necessary
72   {
73     // Glib::Class has to know the class init function to clone custom types.
74     class_init_func_ = &Tooltips_Class::class_init_function;
75
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();
79
80     // Create the wrapper type, with the same class/instance size as the base type.
81     register_derived_type(gtk_tooltips_get_type());
82
83     // Add derived versions of interfaces, if the C type implements any interfaces:
84   }
85
86   return *this;
87 }
88
89 void Tooltips_Class::class_init_function(void* g_class, void* class_data)
90 {
91   BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
92   CppClassParent::class_init_function(klass, class_data);
93
94 }
95
96
97 Glib::ObjectBase* Tooltips_Class::wrap_new(GObject* o)
98 {
99   return manage(new Tooltips((GtkTooltips*)(o)));
100
101 }
102
103
104 /* The implementation: */
105
106 Tooltips::Tooltips(const Glib::ConstructParams& construct_params)
107 :
108   Gtk::Object(construct_params)
109 {
110   }
111
112 Tooltips::Tooltips(GtkTooltips* castitem)
113 :
114   Gtk::Object((GtkObject*)(castitem))
115 {
116   }
117
118 Tooltips::~Tooltips()
119 {
120   destroy_();
121 }
122
123 Tooltips::CppClassType Tooltips::tooltips_class_; // initialize static member
124
125 GType Tooltips::get_type()
126 {
127   return tooltips_class_.init().get_type();
128 }
129
130 GType Tooltips::get_base_type()
131 {
132   return gtk_tooltips_get_type();
133 }
134
135
136 Tooltips::Tooltips()
137 :
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()))
140 {
141   }
142
143 void Tooltips::enable()
144 {
145   gtk_tooltips_enable(gobj());
146 }
147
148 void Tooltips::disable()
149 {
150   gtk_tooltips_disable(gobj());
151 }
152
153 void Tooltips::set_tip(Widget& widget, const Glib::ustring& tip_text, const Glib::ustring& tip_private)
154 {
155   gtk_tooltips_set_tip(gobj(), (widget).gobj(), tip_text.c_str(), tip_private.c_str());
156 }
157
158 GtkTooltipsData* Tooltips::data_get(Widget& widget)
159 {
160   return gtk_tooltips_data_get((widget).gobj());
161 }
162
163 void Tooltips::force_window()
164 {
165   gtk_tooltips_force_window(gobj());
166 }
167
168
169 } // namespace Gtk
170
171