1 // Generated by gtkmmproc -- DO NOT MODIFY!
3 #include <gtkmm/aboutdialog.h>
4 #include <gtkmm/private/aboutdialog_p.h>
11 * Copyright 2004 The gtkmm Development Team
13 * This library is free software; you can redistribute it and/or
14 * modify it under the terms of the GNU Library General Public
15 * License as published by the Free Software Foundation; either
16 * version 2 of the License, or (at your option) any later version.
18 * This library is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
21 * Library General Public License for more details.
23 * You should have received a copy of the GNU Library General Public
24 * License along with this library; if not, write to the Free
25 * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
28 #include <gtk/gtkaboutdialog.h>
29 #include <gtk/gtklabel.h>
35 // This Signal Proxy allows the C++ coder to specify
36 // a sigc::slot instead of a static function.
37 class SignalProxy_ActivateLink
40 typedef Gtk::AboutDialog::SlotActivateLink SlotType;
42 SignalProxy_ActivateLink(const SlotType& slot)
45 ~SignalProxy_ActivateLink();
47 static void gtk_callback(GtkAboutDialog* about, const gchar* link, gpointer data);
48 static void gtk_callback_destroy(void* data);
54 SignalProxy_ActivateLink::~SignalProxy_ActivateLink()
57 void SignalProxy_ActivateLink::gtk_callback(GtkAboutDialog* about, const gchar* link, gpointer data)
59 SignalProxy_ActivateLink *const self = static_cast<SignalProxy_ActivateLink*>(data);
63 Gtk::AboutDialog* pCppAbout = Glib::wrap(about);
64 (self->slot_)( *pCppAbout, Glib::convert_const_gchar_ptr_to_ustring(link) );
68 Glib::exception_handlers_invoke();
73 void SignalProxy_ActivateLink::gtk_callback_destroy(void* data)
75 delete static_cast<SignalProxy_ActivateLink*>(data);
78 } // anonymous namespace
85 void AboutDialog::set_email_hook(const SlotActivateLink& slot)
87 // Create a signal proxy. A pointer to this will be passed
88 // through the callback's data parameter. It will be deleted
89 // when SignalProxy_ActivateLink::gtk_callback_destroy() is called.
90 SignalProxy_ActivateLink *const pSignalProxy = new SignalProxy_ActivateLink(slot);
92 gtk_about_dialog_set_email_hook(
93 &SignalProxy_ActivateLink::gtk_callback, pSignalProxy,
94 &SignalProxy_ActivateLink::gtk_callback_destroy);
98 void AboutDialog::set_url_hook(const SlotActivateLink& slot)
100 // Create a signal proxy. A pointer to this will be passed
101 // through the callback's data parameter. It will be deleted
102 // when SignalProxy_ActivateLink::gtk_callback_destroy() is called.
103 SignalProxy_ActivateLink *const pSignalProxy = new SignalProxy_ActivateLink(slot);
105 gtk_about_dialog_set_url_hook(
106 &SignalProxy_ActivateLink::gtk_callback, pSignalProxy,
107 &SignalProxy_ActivateLink::gtk_callback_destroy);
115 } // anonymous namespace
121 Gtk::AboutDialog* wrap(GtkAboutDialog* object, bool take_copy)
123 return dynamic_cast<Gtk::AboutDialog *> (Glib::wrap_auto ((GObject*)(object), take_copy));
126 } /* namespace Glib */
132 /* The *_Class implementation: */
134 const Glib::Class& AboutDialog_Class::init()
136 if(!gtype_) // create the GType if necessary
138 // Glib::Class has to know the class init function to clone custom types.
139 class_init_func_ = &AboutDialog_Class::class_init_function;
141 // This is actually just optimized away, apparently with no harm.
142 // Make sure that the parent type has been created.
143 //CppClassParent::CppObjectType::get_type();
145 // Create the wrapper type, with the same class/instance size as the base type.
146 register_derived_type(gtk_about_dialog_get_type());
148 // Add derived versions of interfaces, if the C type implements any interfaces:
154 void AboutDialog_Class::class_init_function(void* g_class, void* class_data)
156 BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
157 CppClassParent::class_init_function(klass, class_data);
162 Glib::ObjectBase* AboutDialog_Class::wrap_new(GObject* o)
164 return new AboutDialog((GtkAboutDialog*)(o)); //top-level windows can not be manage()ed.
169 /* The implementation: */
171 AboutDialog::AboutDialog(const Glib::ConstructParams& construct_params)
173 Gtk::Dialog(construct_params)
177 AboutDialog::AboutDialog(GtkAboutDialog* castitem)
179 Gtk::Dialog((GtkDialog*)(castitem))
183 AboutDialog::~AboutDialog()
188 AboutDialog::CppClassType AboutDialog::aboutdialog_class_; // initialize static member
190 GType AboutDialog::get_type()
192 return aboutdialog_class_.init().get_type();
195 GType AboutDialog::get_base_type()
197 return gtk_about_dialog_get_type();
201 AboutDialog::AboutDialog()
203 Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
204 Gtk::Dialog(Glib::ConstructParams(aboutdialog_class_.init()))
208 Glib::ustring AboutDialog::get_name() const
210 return Glib::convert_const_gchar_ptr_to_ustring(gtk_about_dialog_get_name(const_cast<GtkAboutDialog*>(gobj())));
213 void AboutDialog::set_name(const Glib::ustring& name)
215 gtk_about_dialog_set_name(gobj(), name.c_str());
218 Glib::ustring AboutDialog::get_version() const
220 return Glib::convert_const_gchar_ptr_to_ustring(gtk_about_dialog_get_version(const_cast<GtkAboutDialog*>(gobj())));
223 void AboutDialog::set_version(const Glib::ustring& version)
225 gtk_about_dialog_set_version(gobj(), version.c_str());
228 Glib::ustring AboutDialog::get_copyright() const
230 return Glib::convert_const_gchar_ptr_to_ustring(gtk_about_dialog_get_copyright(const_cast<GtkAboutDialog*>(gobj())));
233 void AboutDialog::set_copyright(const Glib::ustring& copyright)
235 gtk_about_dialog_set_copyright(gobj(), copyright.c_str());
238 Glib::ustring AboutDialog::get_comments() const
240 return Glib::convert_const_gchar_ptr_to_ustring(gtk_about_dialog_get_comments(const_cast<GtkAboutDialog*>(gobj())));
243 void AboutDialog::set_comments(const Glib::ustring& comments)
245 gtk_about_dialog_set_comments(gobj(), comments.c_str());
248 Glib::ustring AboutDialog::get_license() const
250 return Glib::convert_const_gchar_ptr_to_ustring(gtk_about_dialog_get_license(const_cast<GtkAboutDialog*>(gobj())));
253 void AboutDialog::set_license(const Glib::ustring& license)
255 gtk_about_dialog_set_license(gobj(), license.c_str());
258 Glib::ustring AboutDialog::get_website() const
260 return Glib::convert_const_gchar_ptr_to_ustring(gtk_about_dialog_get_website(const_cast<GtkAboutDialog*>(gobj())));
263 void AboutDialog::set_website(const Glib::ustring& website)
265 gtk_about_dialog_set_website(gobj(), website.c_str());
268 Glib::ustring AboutDialog::get_website_label() const
270 return Glib::convert_const_gchar_ptr_to_ustring(gtk_about_dialog_get_website_label(const_cast<GtkAboutDialog*>(gobj())));
273 void AboutDialog::set_website_label(const Glib::ustring& website_label)
275 gtk_about_dialog_set_website_label(gobj(), website_label.c_str());
278 Glib::StringArrayHandle AboutDialog::get_authors() const
280 return Glib::StringArrayHandle(gtk_about_dialog_get_authors(const_cast<GtkAboutDialog*>(gobj())));
283 void AboutDialog::set_authors(const Glib::StringArrayHandle& authors) const
285 gtk_about_dialog_set_authors(const_cast<GtkAboutDialog*>(gobj()), const_cast<const gchar**>((authors).data()));
288 Glib::StringArrayHandle AboutDialog::get_documenters() const
290 return Glib::StringArrayHandle(gtk_about_dialog_get_documenters(const_cast<GtkAboutDialog*>(gobj())));
293 void AboutDialog::set_documenters(const Glib::StringArrayHandle& documenters)
295 gtk_about_dialog_set_documenters(gobj(), const_cast<const gchar**>((documenters).data()));
298 Glib::StringArrayHandle AboutDialog::get_artists() const
300 return Glib::StringArrayHandle(gtk_about_dialog_get_artists(const_cast<GtkAboutDialog*>(gobj())));
303 void AboutDialog::set_artists(const Glib::StringArrayHandle& artists)
305 gtk_about_dialog_set_artists(gobj(), const_cast<const gchar**>((artists).data()));
308 Glib::ustring AboutDialog::get_translator_credits() const
310 return Glib::convert_const_gchar_ptr_to_ustring(gtk_about_dialog_get_translator_credits(const_cast<GtkAboutDialog*>(gobj())));
313 void AboutDialog::set_translator_credits(const Glib::ustring& translator_credits)
315 gtk_about_dialog_set_translator_credits(gobj(), translator_credits.c_str());
318 Glib::RefPtr<Gdk::Pixbuf> AboutDialog::get_logo()
320 return Glib::wrap(gtk_about_dialog_get_logo(gobj()));
323 Glib::RefPtr<const Gdk::Pixbuf> AboutDialog::get_logo() const
325 return Glib::wrap(gtk_about_dialog_get_logo(const_cast<GtkAboutDialog*>(gobj())));
328 void AboutDialog::set_logo(const Glib::RefPtr<Gdk::Pixbuf>& logo)
330 gtk_about_dialog_set_logo(gobj(), Glib::unwrap(logo));
333 Glib::ustring AboutDialog::get_logo_icon_name() const
335 return Glib::convert_const_gchar_ptr_to_ustring(gtk_about_dialog_get_logo_icon_name(const_cast<GtkAboutDialog*>(gobj())));
338 void AboutDialog::set_logo_icon_name(const Glib::ustring& icon_name)
340 gtk_about_dialog_set_logo_icon_name(gobj(), icon_name.c_str());
344 Glib::PropertyProxy<Glib::ustring> AboutDialog::property_name()
346 return Glib::PropertyProxy<Glib::ustring>(this, "name");
349 Glib::PropertyProxy_ReadOnly<Glib::ustring> AboutDialog::property_name() const
351 return Glib::PropertyProxy_ReadOnly<Glib::ustring>(this, "name");
354 Glib::PropertyProxy<Glib::ustring> AboutDialog::property_version()
356 return Glib::PropertyProxy<Glib::ustring>(this, "version");
359 Glib::PropertyProxy_ReadOnly<Glib::ustring> AboutDialog::property_version() const
361 return Glib::PropertyProxy_ReadOnly<Glib::ustring>(this, "version");
364 Glib::PropertyProxy<Glib::ustring> AboutDialog::property_copyright()
366 return Glib::PropertyProxy<Glib::ustring>(this, "copyright");
369 Glib::PropertyProxy_ReadOnly<Glib::ustring> AboutDialog::property_copyright() const
371 return Glib::PropertyProxy_ReadOnly<Glib::ustring>(this, "copyright");
374 Glib::PropertyProxy<Glib::ustring> AboutDialog::property_comments()
376 return Glib::PropertyProxy<Glib::ustring>(this, "comments");
379 Glib::PropertyProxy_ReadOnly<Glib::ustring> AboutDialog::property_comments() const
381 return Glib::PropertyProxy_ReadOnly<Glib::ustring>(this, "comments");
384 Glib::PropertyProxy<Glib::ustring> AboutDialog::property_website()
386 return Glib::PropertyProxy<Glib::ustring>(this, "website");
389 Glib::PropertyProxy_ReadOnly<Glib::ustring> AboutDialog::property_website() const
391 return Glib::PropertyProxy_ReadOnly<Glib::ustring>(this, "website");
394 Glib::PropertyProxy<Glib::ustring> AboutDialog::property_website_label()
396 return Glib::PropertyProxy<Glib::ustring>(this, "website-label");
399 Glib::PropertyProxy_ReadOnly<Glib::ustring> AboutDialog::property_website_label() const
401 return Glib::PropertyProxy_ReadOnly<Glib::ustring>(this, "website-label");
404 Glib::PropertyProxy<Glib::ustring> AboutDialog::property_license()
406 return Glib::PropertyProxy<Glib::ustring>(this, "license");
409 Glib::PropertyProxy_ReadOnly<Glib::ustring> AboutDialog::property_license() const
411 return Glib::PropertyProxy_ReadOnly<Glib::ustring>(this, "license");
414 Glib::PropertyProxy<Glib::StringArrayHandle> AboutDialog::property_authors()
416 return Glib::PropertyProxy<Glib::StringArrayHandle>(this, "authors");
419 Glib::PropertyProxy_ReadOnly<Glib::StringArrayHandle> AboutDialog::property_authors() const
421 return Glib::PropertyProxy_ReadOnly<Glib::StringArrayHandle>(this, "authors");
424 Glib::PropertyProxy<Glib::StringArrayHandle> AboutDialog::property_documenters()
426 return Glib::PropertyProxy<Glib::StringArrayHandle>(this, "documenters");
429 Glib::PropertyProxy_ReadOnly<Glib::StringArrayHandle> AboutDialog::property_documenters() const
431 return Glib::PropertyProxy_ReadOnly<Glib::StringArrayHandle>(this, "documenters");
434 Glib::PropertyProxy<Glib::StringArrayHandle> AboutDialog::property_translator_credits()
436 return Glib::PropertyProxy<Glib::StringArrayHandle>(this, "translator-credits");
439 Glib::PropertyProxy_ReadOnly<Glib::StringArrayHandle> AboutDialog::property_translator_credits() const
441 return Glib::PropertyProxy_ReadOnly<Glib::StringArrayHandle>(this, "translator-credits");
444 Glib::PropertyProxy<Glib::StringArrayHandle> AboutDialog::property_artists()
446 return Glib::PropertyProxy<Glib::StringArrayHandle>(this, "artists");
449 Glib::PropertyProxy_ReadOnly<Glib::StringArrayHandle> AboutDialog::property_artists() const
451 return Glib::PropertyProxy_ReadOnly<Glib::StringArrayHandle>(this, "artists");
454 Glib::PropertyProxy< Glib::RefPtr<Gdk::Pixbuf> > AboutDialog::property_logo()
456 return Glib::PropertyProxy< Glib::RefPtr<Gdk::Pixbuf> >(this, "logo");
459 Glib::PropertyProxy_ReadOnly< Glib::RefPtr<Gdk::Pixbuf> > AboutDialog::property_logo() const
461 return Glib::PropertyProxy_ReadOnly< Glib::RefPtr<Gdk::Pixbuf> >(this, "logo");
464 Glib::PropertyProxy<Glib::ustring> AboutDialog::property_logo_icon_name()
466 return Glib::PropertyProxy<Glib::ustring>(this, "logo-icon-name");
469 Glib::PropertyProxy_ReadOnly<Glib::ustring> AboutDialog::property_logo_icon_name() const
471 return Glib::PropertyProxy_ReadOnly<Glib::ustring>(this, "logo-icon-name");