Ardour  9.0-pre0-582-g084a23a80d
selectiondata.h
Go to the documentation of this file.
1 // -*- c++ -*-
2 // Generated by gmmproc 2.45.3 -- DO NOT MODIFY!
3 #ifndef _GTKMM_SELECTIONDATA_H
4 #define _GTKMM_SELECTIONDATA_H
5 
6 
7 #include <glibmm/ustring.h>
8 #include <sigc++/sigc++.h>
9 
10 /* $Id: selectiondata.hg,v 1.9 2006/07/05 16:59:28 murrayc Exp $ */
11 
12 /* Copyright(C) 2002 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 
30 #include <gdkmm/display.h>
31 
32 
33 #ifndef DOXYGEN_SHOULD_SKIP_THIS
34 extern "C" { typedef struct _GtkSelectionData GtkSelectionData; }
35 #endif
36 
37 namespace Gtk
38 {
39 
40 #ifndef DOXYGEN_SHOULD_SKIP_THIS
41 class TextBuffer;
42 #endif //DOXYGEN_SHOULD_SKIP_THIS
43 
45 {
46  public:
47 #ifndef DOXYGEN_SHOULD_SKIP_THIS
48  typedef SelectionData CppObjectType;
49  typedef GtkSelectionData BaseObjectType;
50 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
51 
54  static GType get_type() G_GNUC_CONST;
55 
57 
58  explicit SelectionData(GtkSelectionData* gobject, bool make_a_copy = true);
59 
61  SelectionData& operator=(const SelectionData& other);
62 
64 
65  void swap(SelectionData& other);
66 
69 
71  const GtkSelectionData* gobj() const { return gobject_; }
72 
75 
76 protected:
78 
79 private:
80 
81 
82 public:
83 
84  //TODO : document this. It's like the other set(), but it uses this SelectionData's target type.
85  //Why would you ever want to use any other type?
86  void set(int format, const guint8* data, int length);
87 
96  void set(const std::string& type, int format, const guint8* data, int length);
97 
104  void set(const std::string& type, const std::string& data);
105 
106 
114  bool set_text(const Glib::ustring& data);
115 
116 
122  Glib::ustring get_text() const;
123 
124 
133  bool set_pixbuf(const Glib::RefPtr<Gdk::Pixbuf>& pixbuf);
134 
142  Glib::RefPtr<Gdk::Pixbuf> get_pixbuf();
143 
151  Glib::RefPtr<const Gdk::Pixbuf> get_pixbuf() const;
152 
153 #
154 
155 
164  bool set_uris(const Glib::StringArrayHandle& uris);
165 
171  Glib::StringArrayHandle get_uris() const;
172 
173 
178  const guchar* get_data() const;
179 
184  int get_length() const;
185 
186  std::string get_data_as_string() const;
187 
188  //TODO: Change the return type to std::string, when we can break ABI:
189 
195 
198  std::string get_target() const;
199 
200 
203 
204 
207  std::string get_data_type() const; // get_type() already exists
208 
209 
214  int get_format() const;
215 
216 
221  Glib::RefPtr<Gdk::Display> get_display();
222 
227  Glib::RefPtr<const Gdk::Display> get_display() const;
228 
229 
237  bool targets_include_uri() const;
238 
246  bool targets_include_text() const;
247 
257  bool targets_include_rich_text(const Glib::RefPtr<TextBuffer>& buffer) const;
258 
268  bool targets_include_image(bool writable = true) const;
269 
270 
271 };
272 
273 } // namespace Gtk
274 
275 
276 namespace Gtk
277 {
278 
283 inline void swap(SelectionData& lhs, SelectionData& rhs)
284  { lhs.swap(rhs); }
285 
286 } // namespace Gtk
287 
288 namespace Glib
289 {
290 
299 Gtk::SelectionData wrap(GtkSelectionData* object, bool take_copy = false);
300 
301 #ifndef DOXYGEN_SHOULD_SKIP_THIS
302 template <>
303 class Value<Gtk::SelectionData> : public Glib::Value_Boxed<Gtk::SelectionData>
304 {};
305 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
306 
307 } // namespace Glib
308 
309 
310 #endif /* _GTKMM_SELECTIONDATA_H */
311 
const guchar * get_data() const
bool targets_include_text() const
void set(const std::string &type, const std::string &data)
std::string get_target() const
int get_format() const
std::string get_data_as_string() const
bool targets_include_uri() const
bool targets_include_rich_text(const Glib::RefPtr< TextBuffer > &buffer) const
Glib::RefPtr< const Gdk::Pixbuf > get_pixbuf() const
Glib::StringArrayHandle get_uris() const
void set(const std::string &type, int format, const guint8 *data, int length)
const GtkSelectionData * gobj() const
Provides access to the underlying C instance.
Definition: selectiondata.h:71
void swap(SelectionData &other)
bool targets_include_image(bool writable=true) const
GtkSelectionData * gobj()
Provides access to the underlying C instance.
Definition: selectiondata.h:68
Gdk::ArrayHandle_AtomString get_targets() const
See also Gtk::Clipboard::request_targets()
Gtk::SelectionData wrap(GtkSelectionData *object, bool take_copy=false)
GdkAtom get_selection() const
Glib::RefPtr< const Gdk::Display > get_display() const
bool set_text(const Glib::ustring &data)
std::string get_data_type() const
Glib::RefPtr< Gdk::Pixbuf > get_pixbuf()
Glib::ustring get_text() const
void set(int format, const guint8 *data, int length)
static GType get_type() G_GNUC_CONST
GtkSelectionData * gobj_copy() const
Provides access to the underlying C instance. The caller is responsible for freeing it....
bool set_uris(const Glib::StringArrayHandle &uris)
bool set_pixbuf(const Glib::RefPtr< Gdk::Pixbuf > &pixbuf)
Glib::RefPtr< Gdk::Display > get_display()
int get_length() const
void swap(SelectionData &lhs, SelectionData &rhs)
GtkSelectionData * gobject_
Definition: selectiondata.h:77
struct _GdkAtom * GdkAtom
Definition: gdktypes.h:80
GtkImagePixbufData pixbuf
Definition: gtkimage.h:2
PBD::PropertyDescriptor< timecnt_t > length
Glib::ArrayHandle< std::string, AtomStringTraits > ArrayHandle_AtomString
Definition: ardour_ui.h:188
Definition: lobject.h:100