1 // Generated by gmmproc 2.60.0 -- DO NOT MODIFY! 2 #ifndef _GTKMM_APPCHOOSERDIALOG_H 3 #define _GTKMM_APPCHOOSERDIALOG_H 4 5 6 #include <glibmm/ustring.h> 7 #include <sigc++/sigc++.h> 8 9 /* Copyright (C) 2011 The gtkmm Development Team 10 * 11 * This library is free software; you can redistribute it and/or 12 * modify it under the terms of the GNU Lesser General Public 13 * License as published by the Free Software Foundation; either 14 * version 2.1 of the License, or (at your option) any later version. 15 * 16 * This library is distributed in the hope that it will be useful, 17 * but WITHOUT ANY WARRANTY; without even the implied warranty of 18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 19 * Lesser General Public License for more details. 20 * 21 * You should have received a copy of the GNU Lesser General Public 22 * License along with this library; if not, write to the Free Software 23 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 24 */ 25 26 #include <gtkmm/appchooser.h> 27 #include <gtkmm/dialog.h> 28 #include <gtkmm/menu.h> 29 #include <giomm/file.h> 30 31 32 #ifndef DOXYGEN_SHOULD_SKIP_THIS 33 using GtkAppChooserDialog = struct _GtkAppChooserDialog; 34 using GtkAppChooserDialogClass = struct _GtkAppChooserDialogClass; 35 #endif /* DOXYGEN_SHOULD_SKIP_THIS */ 36 37 38 #ifndef DOXYGEN_SHOULD_SKIP_THIS 39 namespace Gtk 40 { class AppChooserDialog_Class; } // namespace Gtk 41 #endif //DOXYGEN_SHOULD_SKIP_THIS 42 43 namespace Gtk 44 { 45 46 /** An application chooser dialog. 47 * 48 * This dialog shows an AppChooserWidget inside a Dialog. 49 * 50 * Note that AppChooserDialog does not have any interesting methods of its own. 51 * Instead, you should get the embedded AppChooserWidget using get_widget() and 52 * call its methods if the generic AppChooser base class API is not sufficient for your needs. 53 * 54 * To set the heading that is shown above the AppChooserWidget, use set_heading(). 55 * 56 * See @ref giommContentType in glibmm for more information about content types. 57 * 58 * The AppChooserDialog dialog looks like this: 59 * @image html appchooserdialog1.png 60 * 61 * @ingroup Dialogs 62 * 63 * @newin{3,0} 64 */ 65 66 class AppChooserDialog 67 : public Dialog, 68 public AppChooser 69 { 70 public: 71 #ifndef DOXYGEN_SHOULD_SKIP_THIS 72 typedef AppChooserDialog CppObjectType; 73 typedef AppChooserDialog_Class CppClassType; 74 typedef GtkAppChooserDialog BaseObjectType; 75 typedef GtkAppChooserDialogClass BaseClassType; 76 #endif /* DOXYGEN_SHOULD_SKIP_THIS */ 77 78 AppChooserDialog(AppChooserDialog&& src) noexcept; 79 AppChooserDialog& operator=(AppChooserDialog&& src) noexcept; 80 81 // noncopyable 82 AppChooserDialog(const AppChooserDialog&) = delete; 83 AppChooserDialog& operator=(const AppChooserDialog&) = delete; 84 85 ~AppChooserDialog() noexcept override; 86 87 #ifndef DOXYGEN_SHOULD_SKIP_THIS 88 89 private: 90 friend class AppChooserDialog_Class; 91 static CppClassType appchooserdialog_class_; 92 93 protected: 94 explicit AppChooserDialog(const Glib::ConstructParams& construct_params); 95 explicit AppChooserDialog(GtkAppChooserDialog* castitem); 96 97 #endif /* DOXYGEN_SHOULD_SKIP_THIS */ 98 99 public: 100 101 /** Get the GType for this class, for use with the underlying GObject type system. 102 */ 103 static GType get_type() G_GNUC_CONST; 104 105 #ifndef DOXYGEN_SHOULD_SKIP_THIS 106 107 108 static GType get_base_type() G_GNUC_CONST; 109 #endif 110 111 /// Provides access to the underlying C GObject. gobj()112 GtkAppChooserDialog* gobj() { return reinterpret_cast<GtkAppChooserDialog*>(gobject_); } 113 114 /// Provides access to the underlying C GObject. gobj()115 const GtkAppChooserDialog* gobj() const { return reinterpret_cast<GtkAppChooserDialog*>(gobject_); } 116 117 118 public: 119 //C++ methods used to invoke GTK+ virtual functions: 120 121 protected: 122 //GTK+ Virtual Functions (override these to change behaviour): 123 124 //Default Signal Handlers:: 125 126 127 private: 128 129 130 public: 131 132 explicit AppChooserDialog(const Glib::ustring& content_type); 133 134 AppChooserDialog(const Glib::ustring& content_type, Gtk::Window& parent); 135 136 137 explicit AppChooserDialog(const Glib::RefPtr<Gio::File>& file); 138 139 AppChooserDialog(const Glib::RefPtr<Gio::File>& file, Gtk::Window& parent); 140 141 142 /** Returns the Gtk::AppChooserWidget of this dialog. 143 * 144 * @newin{3,0} 145 * 146 * @return The Gtk::AppChooserWidget of @a self. 147 */ 148 Widget* get_widget(); 149 150 /** Returns the Gtk::AppChooserWidget of this dialog. 151 * 152 * @newin{3,0} 153 * 154 * @return The Gtk::AppChooserWidget of @a self. 155 */ 156 const Widget* get_widget() const; 157 158 159 /** Sets the text to display at the top of the dialog. 160 * If the heading is not set, the dialog displays a default text. 161 * 162 * @param heading A string containing Pango markup. 163 */ 164 void set_heading(const Glib::ustring& heading); 165 166 /** Returns the text to display at the top of the dialog. 167 * 168 * @return The text to display at the top of the dialog, or <tt>nullptr</tt>, in which 169 * case a default text is displayed. 170 */ 171 Glib::ustring get_heading() const; 172 173 /** The GFile used by the Gtk::AppChooserDialog. 174 * The dialog's Gtk::AppChooserWidget content type will be guessed from the 175 * file, if present. 176 * 177 * @return A PropertyProxy_ReadOnly that allows you to get the value of the property, 178 * or receive notification when the value of the property changes. 179 */ 180 Glib::PropertyProxy_ReadOnly< Glib::RefPtr<Gio::File> > property_gfile() const; 181 182 183 /** The text to show at the top of the dialog. 184 * The string may contain Pango markup. 185 * 186 * Default value: "" 187 * 188 * @return A PropertyProxy that allows you to get or set the value of the property, 189 * or receive notification when the value of the property changes. 190 */ 191 Glib::PropertyProxy< Glib::ustring > property_heading() ; 192 193 /** The text to show at the top of the dialog. 194 * The string may contain Pango markup. 195 * 196 * Default value: "" 197 * 198 * @return A PropertyProxy_ReadOnly that allows you to get the value of the property, 199 * or receive notification when the value of the property changes. 200 */ 201 Glib::PropertyProxy_ReadOnly< Glib::ustring > property_heading() const; 202 203 204 }; 205 206 } // namespace Gtk 207 208 209 namespace Glib 210 { 211 /** A Glib::wrap() method for this object. 212 * 213 * @param object The C instance. 214 * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref. 215 * @result A C++ instance that wraps this C instance. 216 * 217 * @relates Gtk::AppChooserDialog 218 */ 219 Gtk::AppChooserDialog* wrap(GtkAppChooserDialog* object, bool take_copy = false); 220 } //namespace Glib 221 222 223 #endif /* _GTKMM_APPCHOOSERDIALOG_H */ 224 225