1/* Copyright (C) 2011 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, write to the Free Software
15 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
16 */
17
18#include <gtkmm/appchooser.h>
19#include <gtkmm/dialog.h>
20#include <gtkmm/menu.h>
21#include <giomm/file.h>
22_DEFS(gtkmm,gtk)
23_PINCLUDE(gtkmm/private/dialog_p.h)
24
25
26namespace Gtk
27{
28
29/** An application chooser dialog.
30 *
31 * This dialog shows an AppChooserWidget inside a Dialog.
32 *
33 * Note that AppChooserDialog does not have any interesting methods of its own.
34 * Instead, you should get the embedded AppChooserWidget using get_widget() and
35 * call its methods if the generic AppChooser base class API is not sufficient for your needs.
36 *
37 * To set the heading that is shown above the AppChooserWidget, use set_heading().
38 *
39 * See @ref giommContentType in glibmm for more information about content types.
40 *
41 * The AppChooserDialog dialog looks like this:
42 * @image html appchooserdialog1.png
43 *
44 * @ingroup Dialogs
45 *
46 * @newin{3,0}
47 */
48class AppChooserDialog
49  : public Dialog,
50    public AppChooser
51{
52  _CLASS_GTKOBJECT(AppChooserDialog, GtkAppChooserDialog, GTK_APP_CHOOSER_DIALOG, Dialog, GtkDialog)
53  _IMPLEMENTS_INTERFACE(AppChooser)
54  _UNMANAGEABLE
55public:
56
57  explicit AppChooserDialog(const Glib::ustring& content_type);
58
59  AppChooserDialog(const Glib::ustring& content_type, Gtk::Window& parent);
60  _IGNORE(gtk_app_chooser_dialog_new_for_content_type)
61
62  explicit AppChooserDialog(const Glib::RefPtr<Gio::File>& file);
63
64  AppChooserDialog(const Glib::RefPtr<Gio::File>& file, Gtk::Window& parent);
65  _IGNORE(gtk_app_chooser_dialog_new)
66
67  _WRAP_METHOD(Widget* get_widget(), gtk_app_chooser_dialog_get_widget)
68  _WRAP_METHOD(const Widget* get_widget() const, gtk_app_chooser_dialog_get_widget, constversion)
69
70  _WRAP_METHOD(void set_heading(const Glib::ustring& heading), gtk_app_chooser_dialog_set_heading)
71  _WRAP_METHOD(Glib::ustring get_heading() const, gtk_app_chooser_dialog_get_heading)
72
73  _WRAP_PROPERTY("gfile", Glib::RefPtr<Gio::File>)
74  _WRAP_PROPERTY("heading", Glib::ustring)
75};
76
77} // namespace Gtk
78