1 // Generated by gtkmmproc -- DO NOT MODIFY!
3 #include <gtkmm/filechooserdialog.h>
4 #include <gtkmm/private/filechooserdialog_p.h>
11 * Copyright 2003 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/gtkfilechooserdialog.h>
34 FileChooserDialog::FileChooserDialog(Gtk::Window& parent, const Glib::ustring& title, FileChooserAction action)
36 Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
37 Gtk::Dialog(Glib::ConstructParams(filechooserdialog_class_.init(), "title",title.c_str(),"action",(GtkFileChooserAction)action, (char*) 0))
39 set_transient_for(parent);
42 FileChooserDialog::FileChooserDialog(const Glib::ustring& title, FileChooserAction action)
44 Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
45 Gtk::Dialog(Glib::ConstructParams(filechooserdialog_class_.init(), "title",title.c_str(),"action",(GtkFileChooserAction)action, (char*) 0))
49 FileChooserDialog::FileChooserDialog(const Glib::ustring& title, FileChooserAction action, const Glib::ustring& backend)
51 Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
52 Gtk::Dialog(Glib::ConstructParams(filechooserdialog_class_.init(), "title",title.c_str(),"action",(GtkFileChooserAction)action,"file-system-backend",backend.c_str(), (char*) 0))
56 FileChooserDialog::FileChooserDialog(Gtk::Window& parent, const Glib::ustring& title, FileChooserAction action, const Glib::ustring& backend)
58 Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
59 Gtk::Dialog(Glib::ConstructParams(filechooserdialog_class_.init(), "title",title.c_str(),"action",(GtkFileChooserAction)action,"file-system-backend",backend.c_str(), (char*) 0))
61 set_transient_for(parent);
69 } // anonymous namespace
75 Gtk::FileChooserDialog* wrap(GtkFileChooserDialog* object, bool take_copy)
77 return dynamic_cast<Gtk::FileChooserDialog *> (Glib::wrap_auto ((GObject*)(object), take_copy));
80 } /* namespace Glib */
86 /* The *_Class implementation: */
88 const Glib::Class& FileChooserDialog_Class::init()
90 if(!gtype_) // create the GType if necessary
92 // Glib::Class has to know the class init function to clone custom types.
93 class_init_func_ = &FileChooserDialog_Class::class_init_function;
95 // This is actually just optimized away, apparently with no harm.
96 // Make sure that the parent type has been created.
97 //CppClassParent::CppObjectType::get_type();
99 // Create the wrapper type, with the same class/instance size as the base type.
100 register_derived_type(gtk_file_chooser_dialog_get_type());
102 // Add derived versions of interfaces, if the C type implements any interfaces:
103 FileChooser::add_interface(get_type());
109 void FileChooserDialog_Class::class_init_function(void* g_class, void* class_data)
111 BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
112 CppClassParent::class_init_function(klass, class_data);
117 Glib::ObjectBase* FileChooserDialog_Class::wrap_new(GObject* o)
119 return new FileChooserDialog((GtkFileChooserDialog*)(o)); //top-level windows can not be manage()ed.
124 /* The implementation: */
126 FileChooserDialog::FileChooserDialog(const Glib::ConstructParams& construct_params)
128 Gtk::Dialog(construct_params)
132 FileChooserDialog::FileChooserDialog(GtkFileChooserDialog* castitem)
134 Gtk::Dialog((GtkDialog*)(castitem))
138 FileChooserDialog::~FileChooserDialog()
143 FileChooserDialog::CppClassType FileChooserDialog::filechooserdialog_class_; // initialize static member
145 GType FileChooserDialog::get_type()
147 return filechooserdialog_class_.init().get_type();
150 GType FileChooserDialog::get_base_type()
152 return gtk_file_chooser_dialog_get_type();