Ardour  9.0-pre0-582-g084a23a80d
filechooser.h
Go to the documentation of this file.
1 // -*- c++ -*-
2 // Generated by gmmproc 2.45.3 -- DO NOT MODIFY!
3 #ifndef _GTKMM_FILECHOOSER_H
4 #define _GTKMM_FILECHOOSER_H
5 
6 
7 #include <glibmm/ustring.h>
8 #include <sigc++/sigc++.h>
9 
10 /* $Id: filechooser.hg,v 1.23 2006/04/18 13:28:56 murrayc Exp $ */
11 
12 /* Copyright (C) 2003 The gtkmm Development Team
13  *
14  * This library is free software; you can redistribute it and/or
15  * modify it under the terms of the GNU Lesser General Public
16  * License as published by the Free Software Foundation; either
17  * version 2.1 of the License, or (at your option) any later version.
18  *
19  * This library is distributed in the hope that it will be useful,
20  * but WITHOUT ANY WARRANTY; without even the implied warranty of
21  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
22  * Lesser General Public License for more details.
23  *
24  * You should have received a copy of the GNU Lesser General Public
25  * License along with this library; if not, write to the Free
26  * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
27  */
28 
29 #include <gtkmm/widget.h>
30 #include <gtkmm/filefilter.h>
31 #include <glibmm/interface.h>
32 #include <giomm/file.h>
33 
34 
35 #ifndef DOXYGEN_SHOULD_SKIP_THIS
36 typedef struct _GtkFileChooser GtkFileChooser;
37 typedef struct _GtkFileChooserClass GtkFileChooserClass;
38 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
39 
40 
41 #ifndef DOXYGEN_SHOULD_SKIP_THIS
42 namespace Gtk
43 { class FileChooser_Class; } // namespace Gtk
44 #endif // DOXYGEN_SHOULD_SKIP_THIS
45 
46 namespace Gtk
47 {
48 
56 {
61 };
62 
63 } // namespace Gtk
64 
65 
66 #ifndef DOXYGEN_SHOULD_SKIP_THIS
67 namespace Glib
68 {
69 
70 template <>
71 class Value<Gtk::FileChooserAction> : public Glib::Value_Enum<Gtk::FileChooserAction>
72 {
73 public:
74  static GType value_type() G_GNUC_CONST;
75 };
76 
77 } // namespace Glib
78 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
79 
80 
81 namespace Gtk
82 {
83 
89 {
93 };
94 
95 } // namespace Gtk
96 
97 
98 #ifndef DOXYGEN_SHOULD_SKIP_THIS
99 namespace Glib
100 {
101 
102 template <>
103 class Value<Gtk::FileChooserConfirmation> : public Glib::Value_Enum<Gtk::FileChooserConfirmation>
104 {
105 public:
106  static GType value_type() G_GNUC_CONST;
107 };
108 
109 } // namespace Glib
110 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
111 
112 
113 namespace Gtk
114 {
115 
116 
117 //Note that GTK_FILE_SYSTEM_ERROR is not currently public GTK+ API and should
118 //never be instantiated by the GTK+ C API.
119 
122 class FileChooserError : public Glib::Error
123 {
124 public:
127  enum Code
128  {
133  };
134 
135  FileChooserError(Code error_code, const Glib::ustring& error_message);
136  explicit FileChooserError(GError* gobject);
137  Code code() const;
138 
139 #ifndef DOXYGEN_SHOULD_SKIP_THIS
140 private:
141 
142  static void throw_func(GError* gobject);
143 
144  friend void wrap_init(); // uses throw_func()
145 
146  #endif //DOXYGEN_SHOULD_SKIP_THIS
147 };
148 
149 } // namespace Gtk
150 
151 #ifndef DOXYGEN_SHOULD_SKIP_THIS
152 namespace Glib
153 {
154 
155 template <>
156 class Value<Gtk::FileChooserError::Code> : public Glib::Value_Enum<Gtk::FileChooserError::Code>
157 {
158 public:
159  static GType value_type() G_GNUC_CONST;
160 };
161 
162 } // namespace Glib
163 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
164 
165 
166 namespace Gtk
167 {
168 
169 
205 class FileChooser : public Glib::Interface
206 {
207 
208 #ifndef DOXYGEN_SHOULD_SKIP_THIS
209 
210 public:
211  typedef FileChooser CppObjectType;
212  typedef FileChooser_Class CppClassType;
213  typedef GtkFileChooser BaseObjectType;
214  typedef GtkFileChooserClass BaseClassType;
215 
216 private:
217  friend class FileChooser_Class;
218  static CppClassType filechooser_class_;
219 
220  // noncopyable
221  FileChooser(const FileChooser&);
222  FileChooser& operator=(const FileChooser&);
223 
224 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
225 protected:
230 
231 #ifndef DOXYGEN_SHOULD_SKIP_THIS
238  explicit FileChooser(const Glib::Interface_Class& interface_class);
239 
240 public:
241  // This is public so that C++ wrapper instances can be
242  // created for C instances of unwrapped types.
243  // For instance, if an unexpected C type implements the C interface.
244  explicit FileChooser(GtkFileChooser* castitem);
245 
246 protected:
247 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
248 
249 public:
250  virtual ~FileChooser();
251 
252  static void add_interface(GType gtype_implementer);
253 
256  static GType get_type() G_GNUC_CONST;
257 
258 #ifndef DOXYGEN_SHOULD_SKIP_THIS
259  static GType get_base_type() G_GNUC_CONST;
260 #endif
261 
263  GtkFileChooser* gobj() { return reinterpret_cast<GtkFileChooser*>(gobject_); }
264 
266  const GtkFileChooser* gobj() const { return reinterpret_cast<GtkFileChooser*>(gobject_); }
267 
268 private:
269 
270 public:
271 
272 
282 
289 
302  void set_local_only(bool local_only = true);
303 
309  bool get_local_only() const;
310 
317  void set_select_multiple(bool select_multiple = true);
318 
324  bool get_select_multiple() const;
325 
326 
331  void set_show_hidden(bool show_hidden = true);
332 
338  bool get_show_hidden() const;
339 
340 
355  void set_do_overwrite_confirmation(bool do_overwrite_confirmation = true);
356 
364 
365 
372  void set_create_folders(bool create_folders = true);
373 
379  bool get_create_folders() const;
380 
381 
394  void set_current_name(const Glib::ustring& name);
395 
407  Glib::ustring get_filename() const;
408 
436  bool set_filename(const Glib::ustring& filename);
437 
446  bool select_filename(const Glib::ustring& filename);
447 
454  void unselect_filename(const Glib::ustring& filename);
455 
458  void select_all();
459 
462  void unselect_all();
463 
472  Glib::SListHandle<Glib::ustring> get_filenames() const;
473 
482  bool set_current_folder(const Glib::ustring& filename);
483 
493  Glib::ustring get_current_folder() const;
494 
495 
496 /* URI manipulation
497  */
498 
509  Glib::ustring get_uri() const;
510 
537  bool set_uri(const Glib::ustring& uri);
538 
547  bool select_uri(const Glib::ustring& uri);
548 
555  void unselect_uri(const Glib::ustring& uri);
556 
563  Glib::SListHandle<Glib::ustring> get_uris() const;
564 
565 
574  bool set_current_folder_uri(const Glib::ustring& uri);
575 
589  Glib::ustring get_current_folder_uri() const;
590 
591 
619  bool set_file(const Glib::RefPtr<const Gio::File>& uri);
620 
621 
629  bool select_file(const Glib::RefPtr<const Gio::File>& file);
630 
636  void unselect_file(const Glib::RefPtr<const Gio::File>& file);
637 
638 
647  Glib::SListHandle< Glib::RefPtr<Gio::File> > get_files();
648 
649 
657  bool set_current_folder_file(const Glib::RefPtr<const Gio::File>& file);
658 
659  //No refreturn is needed here, because the C function provides a reference:
660 
666  Glib::RefPtr<Gio::File> get_current_folder_file();
667 
668  //No refreturn is needed here, because the C function provides a reference:
669 
680  Glib::RefPtr<Gio::File> get_file();
681 
692  Glib::RefPtr<const Gio::File> get_file() const;
693 
694 /* Preview widget
695  */
696 
713  void set_preview_widget(Gtk::Widget& preview_widget);
714 
715 
722 
729 
730 
741 
749 
750 
760  void set_use_preview_label(bool use_label = true);
761 
768  bool get_use_preview_label() const;
769 
770 
778  Glib::ustring get_preview_filename() const;
779 
786  Glib::ustring get_preview_uri() const;
787 
788  //No refreturn is needed here, because the C function provides a reference:
789 
796  Glib::RefPtr<Gio::File> get_preview_file();
797 
804  Glib::RefPtr<const Gio::File> get_preview_file() const;
805 
806 /* Extra widget
807  */
808 
813  void set_extra_widget(Gtk::Widget& extra_widget);
814 
821 
828 
829 /* List of user selectable filters
830  */
831 
841  void add_filter(const FileFilter& filter);
842 
847  void remove_filter(const FileFilter& filter);
848 
849 
856  Glib::SListHandle< FileFilter* > list_filters();
857 
864  Glib::SListHandle< const FileFilter* > list_filters() const;
865 
866 /* Current filter
867  */
868 
878  void set_filter(const FileFilter& filter);
879 
885 
890  const FileFilter* get_filter() const;
891 
892 /* Per-application shortcut folders */
893 
894 
904  bool add_shortcut_folder(const Glib::ustring& folder);
905 
914  bool remove_shortcut_folder(const Glib::ustring& folder);
915 
922  Glib::SListHandle<Glib::ustring> list_shortcut_folders() const;
923 
924 
934  bool add_shortcut_folder_uri(const Glib::ustring& uri);
935 
944  bool remove_shortcut_folder_uri(const Glib::ustring& uri);
945 
951  Glib::SListHandle<Glib::ustring> list_shortcut_folder_uris() const;
952 
953 
971  Glib::SignalProxy0< void > signal_current_folder_changed();
972 
973 
993  Glib::SignalProxy0< void > signal_selection_changed();
994 
995 
1017  Glib::SignalProxy0< void > signal_update_preview();
1018 
1019 
1035  Glib::SignalProxy0< void > signal_file_activated();
1036 
1037 
1044  Glib::SignalProxy0< FileChooserConfirmation > signal_confirm_overwrite();
1045 
1046 
1052  Glib::PropertyProxy< FileChooserAction > property_action() ;
1053 
1059  Glib::PropertyProxy_ReadOnly< FileChooserAction > property_action() const;
1060 
1061  //TODO: _WRAP_PROPERTY("file-system-backend", FileSystem) //FileSystem is not really public API.
1067  Glib::PropertyProxy< FileFilter* > property_filter() ;
1068 
1074  Glib::PropertyProxy_ReadOnly< FileFilter* > property_filter() const;
1075 
1081  Glib::PropertyProxy< bool > property_local_only() ;
1082 
1088  Glib::PropertyProxy_ReadOnly< bool > property_local_only() const;
1089 
1095  Glib::PropertyProxy< Widget* > property_preview_widget() ;
1096 
1102  Glib::PropertyProxy_ReadOnly< Widget* > property_preview_widget() const;
1103 
1109  Glib::PropertyProxy< bool > property_preview_widget_active() ;
1110 
1116  Glib::PropertyProxy_ReadOnly< bool > property_preview_widget_active() const;
1117 
1123  Glib::PropertyProxy< bool > property_use_preview_label() ;
1124 
1130  Glib::PropertyProxy_ReadOnly< bool > property_use_preview_label() const;
1131 
1137  Glib::PropertyProxy< Widget* > property_extra_widget() ;
1138 
1144  Glib::PropertyProxy_ReadOnly< Widget* > property_extra_widget() const;
1145 
1151  Glib::PropertyProxy< bool > property_select_multiple() ;
1152 
1158  Glib::PropertyProxy_ReadOnly< bool > property_select_multiple() const;
1159 
1165  Glib::PropertyProxy< bool > property_show_hidden() ;
1166 
1172  Glib::PropertyProxy_ReadOnly< bool > property_show_hidden() const;
1173 
1179  Glib::PropertyProxy< bool > property_do_overwrite_confirmation() ;
1180 
1186  Glib::PropertyProxy_ReadOnly< bool > property_do_overwrite_confirmation() const;
1187 
1193  Glib::PropertyProxy< bool > property_create_folders() ;
1194 
1200  Glib::PropertyProxy_ReadOnly< bool > property_create_folders() const;
1201 
1202 
1203 public:
1204 
1205 public:
1206  //C++ methods used to invoke GTK+ virtual functions:
1207 
1208 protected:
1209  //GTK+ Virtual Functions (override these to change behaviour):
1210 
1211  //Default Signal Handlers::
1212 
1213 
1214 };
1215 
1216 } // namespace Gtk
1217 
1218 
1219 namespace Glib
1220 {
1229  Glib::RefPtr<Gtk::FileChooser> wrap(GtkFileChooser* object, bool take_copy = false);
1230 
1231 } // namespace Glib
1232 
1233 
1234 #endif /* _GTKMM_FILECHOOSER_H */
1235 
FileChooserError(Code error_code, const Glib::ustring &error_message)
FileChooserError(GError *gobject)
Glib::PropertyProxy_ReadOnly< Widget * > property_extra_widget() const
Glib::PropertyProxy< FileFilter * > property_filter()
Glib::SignalProxy0< FileChooserConfirmation > signal_confirm_overwrite()
Glib::SListHandle< const FileFilter * > list_filters() const
static GType get_type() G_GNUC_CONST
void set_filter(const FileFilter &filter)
void set_do_overwrite_confirmation(bool do_overwrite_confirmation=true)
void unselect_uri(const Glib::ustring &uri)
Glib::ustring get_filename() const
GtkFileChooser * gobj()
Provides access to the underlying C GObject.
Definition: filechooser.h:263
Glib::PropertyProxy< bool > property_preview_widget_active()
bool remove_shortcut_folder_uri(const Glib::ustring &uri)
void set_preview_widget_active(bool active=true)
bool add_shortcut_folder(const Glib::ustring &folder)
Glib::RefPtr< const Gio::File > get_file() const
Glib::SListHandle< Glib::RefPtr< Gio::File > > get_files()
bool get_use_preview_label() const
Glib::PropertyProxy< Widget * > property_preview_widget()
Glib::SignalProxy0< void > signal_current_folder_changed()
Glib::RefPtr< Gio::File > get_current_folder_file()
bool set_current_folder_uri(const Glib::ustring &uri)
void set_select_multiple(bool select_multiple=true)
bool set_current_folder_file(const Glib::RefPtr< const Gio::File > &file)
Glib::PropertyProxy< bool > property_do_overwrite_confirmation()
Glib::PropertyProxy< bool > property_show_hidden()
bool set_current_folder(const Glib::ustring &filename)
Glib::RefPtr< Gtk::FileChooser > wrap(GtkFileChooser *object, bool take_copy=false)
Glib::PropertyProxy_ReadOnly< bool > property_create_folders() const
bool add_shortcut_folder_uri(const Glib::ustring &uri)
Glib::RefPtr< Gio::File > get_file()
Glib::PropertyProxy_ReadOnly< FileFilter * > property_filter() const
bool get_local_only() const
Glib::PropertyProxy_ReadOnly< Widget * > property_preview_widget() const
void set_show_hidden(bool show_hidden=true)
Glib::SListHandle< FileFilter * > list_filters()
Glib::SListHandle< Glib::ustring > list_shortcut_folder_uris() const
bool get_preview_widget_active() const
void set_use_preview_label(bool use_label=true)
void set_current_name(const Glib::ustring &name)
bool get_select_multiple() const
Glib::ustring get_uri() const
bool select_file(const Glib::RefPtr< const Gio::File > &file)
Glib::PropertyProxy_ReadOnly< bool > property_local_only() const
Glib::PropertyProxy_ReadOnly< bool > property_use_preview_label() const
bool get_show_hidden() const
Glib::PropertyProxy< FileChooserAction > property_action()
Gtk::Widget * get_preview_widget()
void set_create_folders(bool create_folders=true)
bool set_file(const Glib::RefPtr< const Gio::File > &uri)
Glib::PropertyProxy_ReadOnly< bool > property_select_multiple() const
void remove_filter(const FileFilter &filter)
Glib::SignalProxy0< void > signal_file_activated()
Glib::SListHandle< Glib::ustring > list_shortcut_folders() const
Glib::ustring get_current_folder() const
Glib::PropertyProxy_ReadOnly< bool > property_do_overwrite_confirmation() const
const GtkFileChooser * gobj() const
Provides access to the underlying C GObject.
Definition: filechooser.h:266
Glib::RefPtr< const Gio::File > get_preview_file() const
Glib::SListHandle< Glib::ustring > get_uris() const
Glib::PropertyProxy< bool > property_create_folders()
void unselect_file(const Glib::RefPtr< const Gio::File > &file)
Gtk::Widget * get_extra_widget()
Glib::SListHandle< Glib::ustring > get_filenames() const
FileChooserAction get_action() const
Glib::PropertyProxy< bool > property_use_preview_label()
bool set_uri(const Glib::ustring &uri)
Glib::RefPtr< Gio::File > get_preview_file()
void set_action(FileChooserAction action)
bool remove_shortcut_folder(const Glib::ustring &folder)
void set_preview_widget(Gtk::Widget &preview_widget)
bool get_do_overwrite_confirmation() const
Glib::PropertyProxy< Widget * > property_extra_widget()
void set_extra_widget(Gtk::Widget &extra_widget)
bool get_create_folders() const
const Gtk::Widget * get_extra_widget() const
Glib::PropertyProxy_ReadOnly< FileChooserAction > property_action() const
static void add_interface(GType gtype_implementer)
bool select_uri(const Glib::ustring &uri)
Glib::PropertyProxy< bool > property_select_multiple()
Glib::ustring get_preview_uri() const
const FileFilter * get_filter() const
bool select_filename(const Glib::ustring &filename)
Glib::PropertyProxy_ReadOnly< bool > property_show_hidden() const
bool set_filename(const Glib::ustring &filename)
virtual ~FileChooser()
const Gtk::Widget * get_preview_widget() const
Glib::ustring get_preview_filename() const
FileFilter * get_filter()
void unselect_filename(const Glib::ustring &filename)
void add_filter(const FileFilter &filter)
void set_local_only(bool local_only=true)
Glib::PropertyProxy< bool > property_local_only()
Glib::ustring get_current_folder_uri() const
Glib::PropertyProxy_ReadOnly< bool > property_preview_widget_active() const
Glib::SignalProxy0< void > signal_update_preview()
Glib::SignalProxy0< void > signal_selection_changed()
FileChooserAction
Definition: filechooser.h:56
FileChooserConfirmation
Definition: filechooser.h:89
@ FILE_CHOOSER_ACTION_OPEN
Definition: filechooser.h:57
@ FILE_CHOOSER_ACTION_CREATE_FOLDER
Definition: filechooser.h:60
@ FILE_CHOOSER_ACTION_SAVE
Definition: filechooser.h:58
@ FILE_CHOOSER_ACTION_SELECT_FOLDER
Definition: filechooser.h:59
@ FILE_CHOOSER_CONFIRMATION_ACCEPT_FILENAME
Definition: filechooser.h:91
@ FILE_CHOOSER_CONFIRMATION_CONFIRM
Definition: filechooser.h:90
@ FILE_CHOOSER_CONFIRMATION_SELECT_AGAIN
Definition: filechooser.h:92
struct _GtkFileChooser GtkFileChooser
GtkImageIconNameData name
Definition: gtkimage.h:6
PBD::PropertyDescriptor< bool > active
Definition: ardour_ui.h:188
void wrap_init()
Definition: lobject.h:100