Debian Codegraph @

gtk/src/appchooserdialog.hg

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