1 // Generated by gtkmmproc -- DO NOT MODIFY!
3 #include <libgnomecanvasmm/pixbuf.h>
4 #include <libgnomecanvasmm/private/pixbuf_p.h>
10 * Copyright (C) 2002 The libgnomecanvasmm Development Team
12 * This library is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU Library General Public
14 * License as published by the Free Software Foundation; either
15 * version 2 of the License, or (at your option) any later version.
17 * This library is distributed in the hope that it will be useful,
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20 * Library General Public License for more details.
22 * You should have received a copy of the GNU Library General Public
23 * License along with this library; if not, write to the Free
24 * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
34 Pixbuf::Pixbuf (Group& parent,
36 const Glib::RefPtr<Gdk::Pixbuf>& image)
37 : Item (GNOME_CANVAS_ITEM (g_object_new (get_type (), NULL)))
39 item_construct (parent);
42 "pixbuf", image->gobj (),
43 "width", (double) gdk_pixbuf_get_width (image->gobj ()),
44 "height", (double) gdk_pixbuf_get_height (image->gobj ()),
49 Pixbuf::Pixbuf (Group& parent)
50 : Item (GNOME_CANVAS_ITEM (g_object_new (get_type (), NULL)))
52 item_construct (parent);
63 } // anonymous namespace
69 Gnome::Canvas::Pixbuf* wrap(GnomeCanvasPixbuf* object, bool take_copy)
71 return dynamic_cast<Gnome::Canvas::Pixbuf *> (Glib::wrap_auto ((GObject*)(object), take_copy));
74 } /* namespace Glib */
83 /* The *_Class implementation: */
85 const Glib::Class& Pixbuf_Class::init()
87 if(!gtype_) // create the GType if necessary
89 // Glib::Class has to know the class init function to clone custom types.
90 class_init_func_ = &Pixbuf_Class::class_init_function;
92 // This is actually just optimized away, apparently with no harm.
93 // Make sure that the parent type has been created.
94 //CppClassParent::CppObjectType::get_type();
96 // Create the wrapper type, with the same class/instance size as the base type.
97 register_derived_type(gnome_canvas_pixbuf_get_type());
99 // Add derived versions of interfaces, if the C type implements any interfaces:
105 void Pixbuf_Class::class_init_function(void* g_class, void* class_data)
107 BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
108 CppClassParent::class_init_function(klass, class_data);
113 Glib::ObjectBase* Pixbuf_Class::wrap_new(GObject* o)
115 return manage(new Pixbuf((GnomeCanvasPixbuf*)(o)));
120 /* The implementation: */
122 Pixbuf::Pixbuf(const Glib::ConstructParams& construct_params)
124 Item(construct_params)
128 Pixbuf::Pixbuf(GnomeCanvasPixbuf* castitem)
130 Item((GnomeCanvasItem*)(castitem))
139 Pixbuf::CppClassType Pixbuf::pixbuf_class_; // initialize static member
141 GType Pixbuf::get_type()
143 return pixbuf_class_.init().get_type();
146 GType Pixbuf::get_base_type()
148 return gnome_canvas_pixbuf_get_type();
152 Glib::PropertyProxy< Glib::RefPtr<Gdk::Pixbuf> > Pixbuf::property_pixbuf()
154 return Glib::PropertyProxy< Glib::RefPtr<Gdk::Pixbuf> >(this, "pixbuf");
157 Glib::PropertyProxy_ReadOnly< Glib::RefPtr<Gdk::Pixbuf> > Pixbuf::property_pixbuf() const
159 return Glib::PropertyProxy_ReadOnly< Glib::RefPtr<Gdk::Pixbuf> >(this, "pixbuf");
162 Glib::PropertyProxy<double> Pixbuf::property_width()
164 return Glib::PropertyProxy<double>(this, "width");
167 Glib::PropertyProxy_ReadOnly<double> Pixbuf::property_width() const
169 return Glib::PropertyProxy_ReadOnly<double>(this, "width");
172 Glib::PropertyProxy<bool> Pixbuf::property_width_set()
174 return Glib::PropertyProxy<bool>(this, "width-set");
177 Glib::PropertyProxy_ReadOnly<bool> Pixbuf::property_width_set() const
179 return Glib::PropertyProxy_ReadOnly<bool>(this, "width-set");
182 Glib::PropertyProxy<bool> Pixbuf::property_width_in_pixels()
184 return Glib::PropertyProxy<bool>(this, "width-in-pixels");
187 Glib::PropertyProxy_ReadOnly<bool> Pixbuf::property_width_in_pixels() const
189 return Glib::PropertyProxy_ReadOnly<bool>(this, "width-in-pixels");
192 Glib::PropertyProxy<double> Pixbuf::property_height()
194 return Glib::PropertyProxy<double>(this, "height");
197 Glib::PropertyProxy_ReadOnly<double> Pixbuf::property_height() const
199 return Glib::PropertyProxy_ReadOnly<double>(this, "height");
202 Glib::PropertyProxy<bool> Pixbuf::property_height_set()
204 return Glib::PropertyProxy<bool>(this, "height-set");
207 Glib::PropertyProxy_ReadOnly<bool> Pixbuf::property_height_set() const
209 return Glib::PropertyProxy_ReadOnly<bool>(this, "height-set");
212 Glib::PropertyProxy<bool> Pixbuf::property_height_in_pixels()
214 return Glib::PropertyProxy<bool>(this, "height-in-pixels");
217 Glib::PropertyProxy_ReadOnly<bool> Pixbuf::property_height_in_pixels() const
219 return Glib::PropertyProxy_ReadOnly<bool>(this, "height-in-pixels");
222 Glib::PropertyProxy<double> Pixbuf::property_x()
224 return Glib::PropertyProxy<double>(this, "x");
227 Glib::PropertyProxy_ReadOnly<double> Pixbuf::property_x() const
229 return Glib::PropertyProxy_ReadOnly<double>(this, "x");
232 Glib::PropertyProxy<bool> Pixbuf::property_x_in_pixels()
234 return Glib::PropertyProxy<bool>(this, "x-in-pixels");
237 Glib::PropertyProxy_ReadOnly<bool> Pixbuf::property_x_in_pixels() const
239 return Glib::PropertyProxy_ReadOnly<bool>(this, "x-in-pixels");
242 Glib::PropertyProxy<double> Pixbuf::property_y()
244 return Glib::PropertyProxy<double>(this, "y");
247 Glib::PropertyProxy_ReadOnly<double> Pixbuf::property_y() const
249 return Glib::PropertyProxy_ReadOnly<double>(this, "y");
252 Glib::PropertyProxy<bool> Pixbuf::property_y_in_pixels()
254 return Glib::PropertyProxy<bool>(this, "y-in-pixels");
257 Glib::PropertyProxy_ReadOnly<bool> Pixbuf::property_y_in_pixels() const
259 return Glib::PropertyProxy_ReadOnly<bool>(this, "y-in-pixels");
262 Glib::PropertyProxy<Gtk::AnchorType> Pixbuf::property_anchor()
264 return Glib::PropertyProxy<Gtk::AnchorType>(this, "anchor");
267 Glib::PropertyProxy_ReadOnly<Gtk::AnchorType> Pixbuf::property_anchor() const
269 return Glib::PropertyProxy_ReadOnly<Gtk::AnchorType>(this, "anchor");
273 } // namespace Canvas