Ardour  8.7-15-gadf511264b
filefilter.h
Go to the documentation of this file.
1 // -*- c++ -*-
2 // Generated by gmmproc 2.45.3 -- DO NOT MODIFY!
3 #ifndef _GTKMM_FILEFILTER_H
4 #define _GTKMM_FILEFILTER_H
5 
6 
7 #include <glibmm/ustring.h>
8 #include <sigc++/sigc++.h>
9 
10 /* $Id: filefilter.hg,v 1.8 2004/11/12 11:51:42 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/object.h>
30 
31 
32 //TODO: remove this if we wrap this in a C++ type:
33 #ifndef DOXYGEN_SHOULD_SKIP_THIS
34 //typedef struct _GtkFileFilterInfo GtkFileFilterInfo;
35 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
36 
37 
38 #ifndef DOXYGEN_SHOULD_SKIP_THIS
39 typedef struct _GtkFileFilter GtkFileFilter;
40 typedef struct _GtkFileFilterClass GtkFileFilterClass;
41 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
42 
43 
44 namespace Gtk
45 { class FileFilter_Class; } // namespace Gtk
46 namespace Gtk
47 {
48 
64 {
66  FILE_FILTER_URI = 1 << 1,
68  FILE_FILTER_MIME_TYPE = 1 << 3
69 };
70 
73  { return static_cast<FileFilterFlags>(static_cast<unsigned>(lhs) | static_cast<unsigned>(rhs)); }
74 
77  { return static_cast<FileFilterFlags>(static_cast<unsigned>(lhs) & static_cast<unsigned>(rhs)); }
78 
81  { return static_cast<FileFilterFlags>(static_cast<unsigned>(lhs) ^ static_cast<unsigned>(rhs)); }
82 
85  { return static_cast<FileFilterFlags>(~static_cast<unsigned>(flags)); }
86 
89  { return (lhs = static_cast<FileFilterFlags>(static_cast<unsigned>(lhs) | static_cast<unsigned>(rhs))); }
90 
93  { return (lhs = static_cast<FileFilterFlags>(static_cast<unsigned>(lhs) & static_cast<unsigned>(rhs))); }
94 
97  { return (lhs = static_cast<FileFilterFlags>(static_cast<unsigned>(lhs) ^ static_cast<unsigned>(rhs))); }
98 
99 } // namespace Gtk
100 
101 
102 #ifndef DOXYGEN_SHOULD_SKIP_THIS
103 namespace Glib
104 {
105 
106 template <>
107 class Value<Gtk::FileFilterFlags> : public Glib::Value_Flags<Gtk::FileFilterFlags>
108 {
109 public:
110  static GType value_type() G_GNUC_CONST;
111 };
112 
113 } // namespace Glib
114 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
115 
116 
117 namespace Gtk
118 {
119 
120 
137 class FileFilter : public Gtk::Object
138 {
139  public:
140 #ifndef DOXYGEN_SHOULD_SKIP_THIS
141  typedef FileFilter CppObjectType;
142  typedef FileFilter_Class CppClassType;
143  typedef GtkFileFilter BaseObjectType;
144  typedef GtkFileFilterClass BaseClassType;
145 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
146 
147  virtual ~FileFilter();
148 
149 #ifndef DOXYGEN_SHOULD_SKIP_THIS
150 
151 private:
152  friend class FileFilter_Class;
153  static CppClassType filefilter_class_;
154 
155  // noncopyable
156  FileFilter(const FileFilter&);
157  FileFilter& operator=(const FileFilter&);
158 
159 protected:
160  explicit FileFilter(const Glib::ConstructParams& construct_params);
161  explicit FileFilter(GtkFileFilter* castitem);
162 
163 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
164 
165 public:
166 #ifndef DOXYGEN_SHOULD_SKIP_THIS
167  static GType get_type() G_GNUC_CONST;
168 
169 
170  static GType get_base_type() G_GNUC_CONST;
171 #endif
172 
174  GtkFileFilter* gobj() { return reinterpret_cast<GtkFileFilter*>(gobject_); }
175 
177  const GtkFileFilter* gobj() const { return reinterpret_cast<GtkFileFilter*>(gobject_); }
178 
179 
180 public:
181  //C++ methods used to invoke GTK+ virtual functions:
182 
183 protected:
184  //GTK+ Virtual Functions (override these to change behaviour):
185 
186  //Default Signal Handlers::
187 
188 
189 private:
190 
191 public:
193 
194 
202  void set_name(const Glib::ustring& name);
203 
210  Glib::ustring get_name() const;
211 
212 
217  void add_mime_type(const Glib::ustring& mime_type);
218 
223  void add_pattern(const Glib::ustring& pattern);
224 
229 
230  class Info
231  {
232  public:
234  Glib::ustring filename;
235  Glib::ustring uri;
236  Glib::ustring display_name;
237  Glib::ustring mime_type;
238  };
239 
241  typedef sigc::slot<bool, const Info&> SlotCustom;
242 
243  void add_custom(FileFilterFlags needed, const SlotCustom& slot);
244 
245 
257 
258  //TODO: This method is onlyused by FileChooser implementors, so we don't need to wrap it.
259 
260  //_WRAP_METHOD(bool filter(const GtkFileFilterInfo* filter_info), gtk_file_filter_filter)
261 
262 
263 };
264 
265 } // namespace Gtk
266 
267 
268 namespace Glib
269 {
278  Gtk::FileFilter* wrap(GtkFileFilter* object, bool take_copy = false);
279 } //namespace Glib
280 
281 
282 #endif /* _GTKMM_FILEFILTER_H */
283 
Glib::ustring mime_type
Definition: filefilter.h:237
Glib::ustring display_name
Definition: filefilter.h:236
Glib::ustring filename
Definition: filefilter.h:234
Glib::ustring uri
Definition: filefilter.h:235
FileFilterFlags contains
Definition: filefilter.h:233
Glib::ustring get_name() const
Gtk::FileFilter * wrap(GtkFileFilter *object, bool take_copy=false)
FileFilterFlags get_needed() const
sigc::slot< bool, const Info & > SlotCustom
For instance, bool on_custom(const Gtk::FileFilter::Info& filter_info);.
Definition: filefilter.h:241
virtual ~FileFilter()
GtkFileFilter * gobj()
Provides access to the underlying C GtkObject.
Definition: filefilter.h:174
const GtkFileFilter * gobj() const
Provides access to the underlying C GtkObject.
Definition: filefilter.h:177
void add_pixbuf_formats()
void add_pattern(const Glib::ustring &pattern)
void set_name(const Glib::ustring &name)
void add_custom(FileFilterFlags needed, const SlotCustom &slot)
void add_mime_type(const Glib::ustring &mime_type)
CellRendererState & operator|=(CellRendererState &lhs, CellRendererState rhs)
Definition: cellrenderer.h:86
CellRendererState operator&(CellRendererState lhs, CellRendererState rhs)
Definition: cellrenderer.h:74
CellRendererState operator^(CellRendererState lhs, CellRendererState rhs)
Definition: cellrenderer.h:78
CellRendererState operator~(CellRendererState flags)
Definition: cellrenderer.h:82
CellRendererState & operator&=(CellRendererState &lhs, CellRendererState rhs)
Definition: cellrenderer.h:90
CellRendererState operator|(CellRendererState lhs, CellRendererState rhs)
Definition: cellrenderer.h:70
CellRendererState & operator^=(CellRendererState &lhs, CellRendererState rhs)
Definition: cellrenderer.h:94
FileFilterFlags
Definition: filefilter.h:64
@ FILE_FILTER_DISPLAY_NAME
Definition: filefilter.h:67
@ FILE_FILTER_MIME_TYPE
Definition: filefilter.h:68
@ FILE_FILTER_FILENAME
Definition: filefilter.h:65
@ FILE_FILTER_URI
Definition: filefilter.h:66
struct _GtkFileFilter GtkFileFilter
Definition: gtkfilefilter.h:36
GtkImageIconNameData name
Definition: gtkimage.h:6
Definition: ardour_ui.h:188
Definition: lobject.h:100