Install ardour as a binary, a script and a set of shared
[ardour.git] / libs / gtkmm2 / gtk / gtkmm / filechooserdialog.cc
1 // Generated by gtkmmproc -- DO NOT MODIFY!
2
3 #include <gtkmm/filechooserdialog.h>
4 #include <gtkmm/private/filechooserdialog_p.h>
5
6 // -*- c++ -*-
7 /* $Id$ */
8
9 /*
10  *
11  * Copyright 2003 The gtkmm Development Team
12  *
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.
17  *
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.
22  *
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.
26  */
27
28 #include <gtk/gtkfilechooserdialog.h>
29
30
31 namespace Gtk
32 {
33
34 FileChooserDialog::FileChooserDialog(Gtk::Window& parent, const Glib::ustring& title, FileChooserAction action)
35 :
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))
38 {
39   set_transient_for(parent);
40 }
41
42 FileChooserDialog::FileChooserDialog(const Glib::ustring& title, FileChooserAction action)
43 :
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))
46 {
47 }
48
49 FileChooserDialog::FileChooserDialog(const Glib::ustring& title, FileChooserAction action, const Glib::ustring& backend)
50 :
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))
53 {
54 }
55
56 FileChooserDialog::FileChooserDialog(Gtk::Window& parent, const Glib::ustring& title, FileChooserAction action, const Glib::ustring& backend)
57 :
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))
60 {
61   set_transient_for(parent);
62 }
63
64 } // namespace Gtk
65
66
67 namespace
68 {
69 } // anonymous namespace
70
71
72 namespace Glib
73 {
74
75 Gtk::FileChooserDialog* wrap(GtkFileChooserDialog* object, bool take_copy)
76 {
77   return dynamic_cast<Gtk::FileChooserDialog *> (Glib::wrap_auto ((GObject*)(object), take_copy));
78 }
79
80 } /* namespace Glib */
81
82 namespace Gtk
83 {
84
85
86 /* The *_Class implementation: */
87
88 const Glib::Class& FileChooserDialog_Class::init()
89 {
90   if(!gtype_) // create the GType if necessary
91   {
92     // Glib::Class has to know the class init function to clone custom types.
93     class_init_func_ = &FileChooserDialog_Class::class_init_function;
94
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();
98
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());
101
102     // Add derived versions of interfaces, if the C type implements any interfaces:
103   FileChooser::add_interface(get_type());
104   }
105
106   return *this;
107 }
108
109 void FileChooserDialog_Class::class_init_function(void* g_class, void* class_data)
110 {
111   BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
112   CppClassParent::class_init_function(klass, class_data);
113
114 }
115
116
117 Glib::ObjectBase* FileChooserDialog_Class::wrap_new(GObject* o)
118 {
119   return new FileChooserDialog((GtkFileChooserDialog*)(o)); //top-level windows can not be manage()ed.
120
121 }
122
123
124 /* The implementation: */
125
126 FileChooserDialog::FileChooserDialog(const Glib::ConstructParams& construct_params)
127 :
128   Gtk::Dialog(construct_params)
129 {
130   }
131
132 FileChooserDialog::FileChooserDialog(GtkFileChooserDialog* castitem)
133 :
134   Gtk::Dialog((GtkDialog*)(castitem))
135 {
136   }
137
138 FileChooserDialog::~FileChooserDialog()
139 {
140   destroy_();
141 }
142
143 FileChooserDialog::CppClassType FileChooserDialog::filechooserdialog_class_; // initialize static member
144
145 GType FileChooserDialog::get_type()
146 {
147   return filechooserdialog_class_.init().get_type();
148 }
149
150 GType FileChooserDialog::get_base_type()
151 {
152   return gtk_file_chooser_dialog_get_type();
153 }
154
155
156 } // namespace Gtk
157
158