Debian Codegraph @

gtk/src/filechooserdialog.ccg

raw
1 /* Copyright (C) 2003 The gtkmm Development Team
2 *
3 * This library is free software; you can redistribute it and/or
4 * modify it under the terms of the GNU Lesser General Public
5 * License as published by the Free Software Foundation; either
6 * version 2.1 of the License, or (at your option) any later version.
7 *
8 * This library is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 * Lesser General Public License for more details.
12 *
13 * You should have received a copy of the GNU Lesser General Public
14 * License along with this library; if not, see <https://www.gnu.org/licenses/>.
15 */
16
17 #include <gtk/gtk.h>
18
19 namespace Gtk
20 {
21
22 FileChooserDialog::FileChooserDialog(Gtk::Window& parent, const Glib::ustring& title, FileChooserAction action)
23 :
24 _CONSTRUCT("title", title.c_str(), "action", static_cast<GtkFileChooserAction>(action))
25 {
26 set_transient_for(parent);
27 }
28
29 FileChooserDialog::FileChooserDialog(const Glib::ustring& title, FileChooserAction action)
30 :
31 _CONSTRUCT("title", title.c_str(), "action", static_cast<GtkFileChooserAction>(action))
32 {
33 }
34
35 FileChooserDialog::FileChooserDialog(Gtk::Window& parent, const Glib::ustring& title,
36 FileChooserAction action, DialogFlags flags)
37 :
38 _CONSTRUCT("transient-for", parent.gobj(),
39 "title", title.c_str(),
40 "action", static_cast<GtkFileChooserAction>(action),
41 "use-header-bar", (flags & DIALOG_USE_HEADER_BAR) != 0,
42 "modal", (flags & DIALOG_MODAL) != 0,
43 "destroy-with-parent", (flags & DIALOG_DESTROY_WITH_PARENT) != 0)
44 {
45 }
46
47 FileChooserDialog::FileChooserDialog(const Glib::ustring& title, FileChooserAction action,
48 DialogFlags flags)
49 :
50 _CONSTRUCT("title", title.c_str(),
51 "action", static_cast<GtkFileChooserAction>(action),
52 "use-header-bar", (flags & DIALOG_USE_HEADER_BAR) != 0,
53 "modal", (flags & DIALOG_MODAL) != 0,
54 "destroy-with-parent", (flags & DIALOG_DESTROY_WITH_PARENT) != 0)
55 {
56 }
57
58 _DEPRECATE_IFDEF_START
59 FileChooserDialog::FileChooserDialog(const Glib::ustring& title, FileChooserAction action, const Glib::ustring& backend)
60 :
61 _CONSTRUCT("title", title.c_str(), "action", static_cast<GtkFileChooserAction>(action), "file-system-backend", backend.c_str())
62 {
63 }
64
65 FileChooserDialog::FileChooserDialog(Gtk::Window& parent, const Glib::ustring& title, FileChooserAction action, const Glib::ustring& backend)
66 :
67 _CONSTRUCT("title", title.c_str(), "action", static_cast<GtkFileChooserAction>(action), "file-system-backend", backend.c_str())
68 {
69 set_transient_for(parent);
70 }
71 _DEPRECATE_IFDEF_END
72
73 } // namespace Gtk