1 // Generated by gmmproc 2.45.3 -- DO NOT MODIFY!
2
3
4 #include <glibmm.h>
5
6 #include <gtkmm/tooltip.h>
7 #include <gtkmm/private/tooltip_p.h>
8
9
10 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
11 /*
12 * Copyright (C) 2007 The gtkmm Development Team
13 *
14 * This library is free software; you can redistribute it and/or
15 * modify it under the terms of the GNU Lesser General Public
16 * License as published by the Free Software Foundation; either
17 * version 2.1 of the License, or (at your option) any later version.
18 *
19 * This library is distributed in the hope that it will be useful,
20 * but WITHOUT ANY WARRANTY; without even the implied warranty of
21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
22 * Lesser General Public License for more details.
23 *
24 * You should have received a copy of the GNU Lesser General Public
25 * License along with this library; if not, write to the Free
26 * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
27 */
28
29 #include <gtk/gtk.h>
30
31 namespace Gtk
32 {
33
trigger_tooltip_query(const Glib::RefPtr<Gdk::Display> & display)34 void Tooltip::trigger_tooltip_query(const Glib::RefPtr<Gdk::Display>& display)
35 {
36 gtk_tooltip_trigger_tooltip_query(Glib::unwrap(display));
37 }
38
39 } // namespace Gtk
40
41 namespace
42 {
43 } // anonymous namespace
44
45
46 namespace Glib
47 {
48
wrap(GtkTooltip * object,bool take_copy)49 Glib::RefPtr<Gtk::Tooltip> wrap(GtkTooltip* object, bool take_copy)
50 {
51 return Glib::RefPtr<Gtk::Tooltip>( dynamic_cast<Gtk::Tooltip*> (Glib::wrap_auto ((GObject*)(object), take_copy)) );
52 //We use dynamic_cast<> in case of multiple inheritance.
53 }
54
55 } /* namespace Glib */
56
57
58 namespace Gtk
59 {
60
61
62 /* The *_Class implementation: */
63
init()64 const Glib::Class& Tooltip_Class::init()
65 {
66 if(!gtype_) // create the GType if necessary
67 {
68 // Glib::Class has to know the class init function to clone custom types.
69 class_init_func_ = &Tooltip_Class::class_init_function;
70
71 // This is actually just optimized away, apparently with no harm.
72 // Make sure that the parent type has been created.
73 //CppClassParent::CppObjectType::get_type();
74
75 // Create the wrapper type, with the same class/instance size as the base type.
76 register_derived_type(gtk_tooltip_get_type());
77
78 // Add derived versions of interfaces, if the C type implements any interfaces:
79
80 }
81
82 return *this;
83 }
84
85
class_init_function(void * g_class,void * class_data)86 void Tooltip_Class::class_init_function(void* g_class, void* class_data)
87 {
88 BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
89 CppClassParent::class_init_function(klass, class_data);
90
91
92 }
93
94
wrap_new(GObject * object)95 Glib::ObjectBase* Tooltip_Class::wrap_new(GObject* object)
96 {
97 return new Tooltip((GtkTooltip*)object);
98 }
99
100
101 /* The implementation: */
102
gobj_copy()103 GtkTooltip* Tooltip::gobj_copy()
104 {
105 reference();
106 return gobj();
107 }
108
Tooltip(const Glib::ConstructParams & construct_params)109 Tooltip::Tooltip(const Glib::ConstructParams& construct_params)
110 :
111 Glib::Object(construct_params)
112 {
113
114 }
115
Tooltip(GtkTooltip * castitem)116 Tooltip::Tooltip(GtkTooltip* castitem)
117 :
118 Glib::Object((GObject*)(castitem))
119 {}
120
121
~Tooltip()122 Tooltip::~Tooltip()
123 {}
124
125
126 Tooltip::CppClassType Tooltip::tooltip_class_; // initialize static member
127
get_type()128 GType Tooltip::get_type()
129 {
130 return tooltip_class_.init().get_type();
131 }
132
133
get_base_type()134 GType Tooltip::get_base_type()
135 {
136 return gtk_tooltip_get_type();
137 }
138
139
set_markup(const Glib::ustring & markup)140 void Tooltip::set_markup(const Glib::ustring& markup)
141 {
142 gtk_tooltip_set_markup(gobj(), markup.c_str());
143 }
144
set_text(const Glib::ustring & markup)145 void Tooltip::set_text(const Glib::ustring& markup)
146 {
147 gtk_tooltip_set_text(gobj(), markup.c_str());
148 }
149
set_icon(const Glib::RefPtr<Gdk::Pixbuf> & pixbuf)150 void Tooltip::set_icon(const Glib::RefPtr<Gdk::Pixbuf>& pixbuf)
151 {
152 gtk_tooltip_set_icon(gobj(), Glib::unwrap(pixbuf));
153 }
154
set_icon(const Glib::RefPtr<Gio::Icon> & icon,IconSize size)155 void Tooltip::set_icon(const Glib::RefPtr<Gio::Icon>& icon, IconSize size)
156 {
157 gtk_tooltip_set_icon_from_gicon(gobj(), const_cast<GIcon*>(Glib::unwrap<Gio::Icon>(icon)), static_cast<GtkIconSize>(int(size)));
158 }
159
set_icon_from_stock(const StockID & stock_id,IconSize size)160 void Tooltip::set_icon_from_stock(const StockID& stock_id, IconSize size)
161 {
162 gtk_tooltip_set_icon_from_stock(gobj(), (stock_id).get_c_str(), static_cast<GtkIconSize>(int(size)));
163 }
164
set_icon_from_icon_name(const Glib::ustring & icon_name,IconSize size)165 void Tooltip::set_icon_from_icon_name(const Glib::ustring& icon_name, IconSize size)
166 {
167 gtk_tooltip_set_icon_from_icon_name(gobj(), icon_name.c_str(), static_cast<GtkIconSize>(int(size)));
168 }
169
set_custom(Widget & custom_widget)170 void Tooltip::set_custom(Widget& custom_widget)
171 {
172 gtk_tooltip_set_custom(gobj(), (custom_widget).gobj());
173 }
174
set_tip_area(const Gdk::Rectangle & rect)175 void Tooltip::set_tip_area(const Gdk::Rectangle& rect)
176 {
177 gtk_tooltip_set_tip_area(gobj(), (rect).gobj());
178 }
179
180
181 } // namespace Gtk
182
183
184