Merged revisions 6293,6296-6306,6308 via svnmerge from
[ardour.git] / libs / gtkmm2 / gtk / gtkmm / filechooserdialog.cc
1 // Generated by gtkmmproc -- DO NOT MODIFY!
2
3
4 #include <gtkmm/filechooserdialog.h>
5 #include <gtkmm/private/filechooserdialog_p.h>
6
7 // -*- c++ -*-
8 /* $Id$ */
9
10 /*
11  *
12  * Copyright 2003 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 Library General Public
16  * License as published by the Free Software Foundation; either
17  * version 2 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  * Library General Public License for more details.
23  *
24  * You should have received a copy of the GNU Library 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/gtkfilechooserdialog.h>
30
31
32 namespace Gtk
33 {
34
35 FileChooserDialog::FileChooserDialog(Gtk::Window& parent, const Glib::ustring& title, FileChooserAction action)
36 :
37   // Mark this class as non-derived to allow C++ vfuncs to be skipped.
38   Glib::ObjectBase(0),
39   Gtk::Dialog(Glib::ConstructParams(filechooserdialog_class_.init(), "title",title.c_str(),"action",(GtkFileChooserAction)action, static_cast<char*>(0)))
40 {
41   set_transient_for(parent);
42 }
43
44 FileChooserDialog::FileChooserDialog(const Glib::ustring& title, FileChooserAction action)
45 :
46   // Mark this class as non-derived to allow C++ vfuncs to be skipped.
47   Glib::ObjectBase(0),
48   Gtk::Dialog(Glib::ConstructParams(filechooserdialog_class_.init(), "title",title.c_str(),"action",(GtkFileChooserAction)action, static_cast<char*>(0)))
49 {
50 }
51
52 FileChooserDialog::FileChooserDialog(const Glib::ustring& title, FileChooserAction action, const Glib::ustring& backend)
53 :
54   // Mark this class as non-derived to allow C++ vfuncs to be skipped.
55   Glib::ObjectBase(0),
56   Gtk::Dialog(Glib::ConstructParams(filechooserdialog_class_.init(), "title",title.c_str(),"action",(GtkFileChooserAction)action,"file-system-backend",backend.c_str(), static_cast<char*>(0)))
57 {
58 }
59
60 FileChooserDialog::FileChooserDialog(Gtk::Window& parent, const Glib::ustring& title, FileChooserAction action, const Glib::ustring& backend)
61 :
62   // Mark this class as non-derived to allow C++ vfuncs to be skipped.
63   Glib::ObjectBase(0),
64   Gtk::Dialog(Glib::ConstructParams(filechooserdialog_class_.init(), "title",title.c_str(),"action",(GtkFileChooserAction)action,"file-system-backend",backend.c_str(), static_cast<char*>(0)))
65 {
66   set_transient_for(parent);
67 }
68
69 } // namespace Gtk
70
71
72 namespace
73 {
74 } // anonymous namespace
75
76
77 namespace Glib
78 {
79
80 Gtk::FileChooserDialog* wrap(GtkFileChooserDialog* object, bool take_copy)
81 {
82   return dynamic_cast<Gtk::FileChooserDialog *> (Glib::wrap_auto ((GObject*)(object), take_copy));
83 }
84
85 } /* namespace Glib */
86
87 namespace Gtk
88 {
89
90
91 /* The *_Class implementation: */
92
93 const Glib::Class& FileChooserDialog_Class::init()
94 {
95   if(!gtype_) // create the GType if necessary
96   {
97     // Glib::Class has to know the class init function to clone custom types.
98     class_init_func_ = &FileChooserDialog_Class::class_init_function;
99
100     // This is actually just optimized away, apparently with no harm.
101     // Make sure that the parent type has been created.
102     //CppClassParent::CppObjectType::get_type();
103
104     // Create the wrapper type, with the same class/instance size as the base type.
105     register_derived_type(gtk_file_chooser_dialog_get_type());
106
107     // Add derived versions of interfaces, if the C type implements any interfaces:
108   FileChooser::add_interface(get_type());
109   }
110
111   return *this;
112 }
113
114 void FileChooserDialog_Class::class_init_function(void* g_class, void* class_data)
115 {
116   BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
117   CppClassParent::class_init_function(klass, class_data);
118
119 #ifdef GLIBMM_VFUNCS_ENABLED
120 #endif //GLIBMM_VFUNCS_ENABLED
121
122 #ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
123 #endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
124 }
125
126 #ifdef GLIBMM_VFUNCS_ENABLED
127 #endif //GLIBMM_VFUNCS_ENABLED
128
129 #ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
130 #endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
131
132
133 Glib::ObjectBase* FileChooserDialog_Class::wrap_new(GObject* o)
134 {
135   return new FileChooserDialog((GtkFileChooserDialog*)(o)); //top-level windows can not be manage()ed.
136
137 }
138
139
140 /* The implementation: */
141
142 FileChooserDialog::FileChooserDialog(const Glib::ConstructParams& construct_params)
143 :
144   Gtk::Dialog(construct_params)
145 {
146   }
147
148 FileChooserDialog::FileChooserDialog(GtkFileChooserDialog* castitem)
149 :
150   Gtk::Dialog((GtkDialog*)(castitem))
151 {
152   }
153
154 FileChooserDialog::~FileChooserDialog()
155 {
156   destroy_();
157 }
158
159 FileChooserDialog::CppClassType FileChooserDialog::filechooserdialog_class_; // initialize static member
160
161 GType FileChooserDialog::get_type()
162 {
163   return filechooserdialog_class_.init().get_type();
164 }
165
166 GType FileChooserDialog::get_base_type()
167 {
168   return gtk_file_chooser_dialog_get_type();
169 }
170
171
172 #ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
173 #endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
174
175 #ifdef GLIBMM_VFUNCS_ENABLED
176 #endif //GLIBMM_VFUNCS_ENABLED
177
178
179 } // namespace Gtk
180
181