Ardour  9.0-pre0-582-g084a23a80d
clipboard.h
Go to the documentation of this file.
1 // -*- c++ -*-
2 // Generated by gmmproc 2.45.3 -- DO NOT MODIFY!
3 #ifndef _GTKMM_CLIPBOARD_H
4 #define _GTKMM_CLIPBOARD_H
5 
6 
7 #include <glibmm/ustring.h>
8 #include <sigc++/sigc++.h>
9 
10 /* $Id: clipboard.hg,v 1.17 2006/06/13 17:16:26 murrayc Exp $ */
11 
12 /* clipboard.h
13  *
14  * Copyright (C) 2002 The gtkmm Development Team
15  *
16  * This library is free software; you can redistribute it and/or
17  * modify it under the terms of the GNU Lesser General Public
18  * License as published by the Free Software Foundation; either
19  * version 2.1 of the License, or (at your option) any later version.
20  *
21  * This library is distributed in the hope that it will be useful,
22  * but WITHOUT ANY WARRANTY; without even the implied warranty of
23  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
24  * Lesser General Public License for more details.
25  *
26  * You should have received a copy of the GNU Lesser General Public
27  * License along with this library; if not, write to the Free
28  * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
29  */
30 
31 #include <gdkmm/display.h>
32 #include <gdkmm/pixbuf.h>
33 #include <gtkmm/targetentry.h>
34 #include <gtkmm/selectiondata.h>
35 #include <glibmm/object.h>
36 #include <glibmm/containers.h>
37 
38 
39 #ifndef DOXYGEN_SHOULD_SKIP_THIS
40 typedef struct _GtkClipboard GtkClipboard;
41 typedef struct _GtkClipboardClass GtkClipboardClass;
42 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
43 
44 
45 #ifndef DOXYGEN_SHOULD_SKIP_THIS
46 namespace Gtk
47 { class Clipboard_Class; } // namespace Gtk
48 #endif //DOXYGEN_SHOULD_SKIP_THIS
49 
50 namespace Gtk
51 {
52 
53 #ifndef DOXYGEN_SHOULD_SKIP_THIS
54 class TextBuffer;
55 #endif //DOXYGEN_SHOULD_SKIP_THIS
56 
84 class Clipboard : public Glib::Object
85 {
86 
87 #ifndef DOXYGEN_SHOULD_SKIP_THIS
88 
89 public:
90  typedef Clipboard CppObjectType;
91  typedef Clipboard_Class CppClassType;
92  typedef GtkClipboard BaseObjectType;
93  typedef GtkClipboardClass BaseClassType;
94 
95 private: friend class Clipboard_Class;
96  static CppClassType clipboard_class_;
97 
98 private:
99  // noncopyable
100  Clipboard(const Clipboard&);
101  Clipboard& operator=(const Clipboard&);
102 
103 protected:
104  explicit Clipboard(const Glib::ConstructParams& construct_params);
105  explicit Clipboard(GtkClipboard* castitem);
106 
107 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
108 
109 public:
110  virtual ~Clipboard();
111 
114  static GType get_type() G_GNUC_CONST;
115 
116 #ifndef DOXYGEN_SHOULD_SKIP_THIS
117 
118 
119  static GType get_base_type() G_GNUC_CONST;
120 #endif
121 
123  GtkClipboard* gobj() { return reinterpret_cast<GtkClipboard*>(gobject_); }
124 
126  const GtkClipboard* gobj() const { return reinterpret_cast<GtkClipboard*>(gobject_); }
127 
130 
131 private:
132 
133 public:
134 
135 
145  static Glib::RefPtr<Clipboard> get(GdkAtom selection = GDK_SELECTION_CLIPBOARD);
146 
182  static Glib::RefPtr<Clipboard> get_for_display(const Glib::RefPtr<Gdk::Display>& display, GdkAtom selection = GDK_SELECTION_CLIPBOARD);
183 
184 
189  Glib::RefPtr<Gdk::Display> get_display();
190 
195  Glib::RefPtr<const Gdk::Display> get_display() const;
196 
198  typedef sigc::slot<void, SelectionData&, guint> SlotGet;
199 
201  typedef sigc::slot<void> SlotClear;
202 
216  bool set(const ArrayHandle_TargetEntry& targets, const SlotGet& slot_get, const SlotClear& slot_clear);
217 
218 
226  Glib::RefPtr<Glib::Object> get_owner();
227 
235  Glib::RefPtr<const Glib::Object> get_owner() const;
236 
237 
244  void clear();
245 
255  void set_text(const Glib::ustring& text);
256 
257 
265  void set_image(const Glib::RefPtr<Gdk::Pixbuf>& pixbuf);
266 
268  typedef sigc::slot<void, const SelectionData&> SlotReceived;
269 
281  void request_contents(const Glib::ustring& target, const SlotReceived& slot);
282 
283 
285  typedef sigc::slot<void, const Glib::ustring&> SlotTextReceived;
286 
300  void request_text(const SlotTextReceived& slot);
301 
302 
304  typedef sigc::slot<void, const Glib::ustring&, const std::string&> SlotRichTextReceived;
305 
318  void request_rich_text(const Glib::RefPtr<TextBuffer>& buffer, const SlotRichTextReceived& slot);
319 
320 
322  typedef sigc::slot<void, const Glib::StringArrayHandle&> SlotUrisReceived;
323 
334  void request_uris(const SlotUrisReceived& slot);
335 
336 
338  typedef sigc::slot<void, const Glib::RefPtr<Gdk::Pixbuf>&> SlotImageReceived;
339 
355  void request_image(const SlotImageReceived& slot);
356 
357 
359  typedef sigc::slot<void, const Glib::StringArrayHandle&> SlotTargetsReceived;
360 
374 
375 
385  SelectionData wait_for_contents(const Glib::ustring& target) const;
386 
387 
399  Glib::ustring wait_for_text() const;
400 
401  std::string wait_for_rich_text(const Glib::RefPtr<TextBuffer>& buffer, std::string& format);
402 
403 
404  //Maybe the result should be const, but constness is not so clear-cut here. murrayc
405 
418  Glib::RefPtr<Gdk::Pixbuf> wait_for_image() const;
419 
420 
434 
448  bool wait_is_rich_text_available(const Glib::RefPtr<TextBuffer>& buffer) const;
449 
463 
477 
488  bool wait_is_target_available(const Glib::ustring& target);
489 
496  Glib::StringArrayHandle wait_for_targets() const;
497 
498 
511  Glib::StringArrayHandle wait_for_uris() const;
512 
522 
530  //gtkmmproc error: void : ignored method defs lookup failed
531 
532 
536  void store();
537 
538  //We use no_default_handler because this signal was added and we don't want to break the ABI by adding a virtual function.
539 
546  Glib::SignalProxy1< void,GdkEventOwnerChange* > signal_owner_change();
547 
548 
549 public:
550 
551 public:
552  //C++ methods used to invoke GTK+ virtual functions:
553 
554 protected:
555  //GTK+ Virtual Functions (override these to change behaviour):
556 
557  //Default Signal Handlers::
558 
559 
560 };
561 
562 } /* namespace Gtk */
563 
564 
565 namespace Glib
566 {
575  Glib::RefPtr<Gtk::Clipboard> wrap(GtkClipboard* object, bool take_copy = false);
576 }
577 
578 
579 #endif /* _GTKMM_CLIPBOARD_H */
580 
std::string wait_for_rich_text(const Glib::RefPtr< TextBuffer > &buffer, std::string &format)
static Glib::RefPtr< Clipboard > get(GdkAtom selection=GDK_SELECTION_CLIPBOARD)
sigc::slot< void, SelectionData &, guint > SlotGet
For instance: void on_get(Gtk::SelectionData& selection_data, guint info);.
Definition: clipboard.h:198
sigc::slot< void, const Glib::RefPtr< Gdk::Pixbuf > & > SlotImageReceived
For instance: void on_image_received(const Glib::RefPtr<Gdk::Pixbuf>& text);.
Definition: clipboard.h:338
void request_rich_text(const Glib::RefPtr< TextBuffer > &buffer, const SlotRichTextReceived &slot)
sigc::slot< void > SlotClear
For instance: void on_clear();.
Definition: clipboard.h:201
sigc::slot< void, const Glib::ustring &, const std::string & > SlotRichTextReceived
For instance: void on_rich_text_received(const Glib::ustring& format, const std::string& text);.
Definition: clipboard.h:304
bool wait_is_rich_text_available(const Glib::RefPtr< TextBuffer > &buffer) const
Glib::SignalProxy1< void, GdkEventOwnerChange * > signal_owner_change()
sigc::slot< void, const SelectionData & > SlotReceived
For instance: void on_received(const SelectionData& selection_data);.
Definition: clipboard.h:268
Glib::ustring wait_for_text() const
virtual ~Clipboard()
void request_uris(const SlotUrisReceived &slot)
GtkClipboard * gobj_copy()
Provides access to the underlying C instance. The caller is responsible for unrefing it....
void set_image(const Glib::RefPtr< Gdk::Pixbuf > &pixbuf)
Glib::RefPtr< Gdk::Pixbuf > wait_for_image() const
void set_can_store()
Glib::RefPtr< Gdk::Display > get_display()
bool set(const ArrayHandle_TargetEntry &targets, const SlotGet &slot_get, const SlotClear &slot_clear)
SelectionData wait_for_contents(const Glib::ustring &target) const
Glib::RefPtr< Glib::Object > get_owner()
bool wait_is_text_available() const
Glib::StringArrayHandle wait_for_targets() const
void request_contents(const Glib::ustring &target, const SlotReceived &slot)
sigc::slot< void, const Glib::StringArrayHandle & > SlotUrisReceived
For instance: void on_uris_received(const Glib::StringArrayHandle& uris);.
Definition: clipboard.h:322
static Glib::RefPtr< Clipboard > get_for_display(const Glib::RefPtr< Gdk::Display > &display, GdkAtom selection=GDK_SELECTION_CLIPBOARD)
sigc::slot< void, const Glib::ustring & > SlotTextReceived
For instance: void on_text_received(const Glib::ustring& text);.
Definition: clipboard.h:285
bool wait_is_uris_available() const
void set_can_store(const ArrayHandle_TargetEntry &targets)
void request_text(const SlotTextReceived &slot)
void set_text(const Glib::ustring &text)
bool wait_is_target_available(const Glib::ustring &target)
const GtkClipboard * gobj() const
Provides access to the underlying C GObject.
Definition: clipboard.h:126
void request_image(const SlotImageReceived &slot)
bool wait_is_image_available() const
Glib::RefPtr< Gtk::Clipboard > wrap(GtkClipboard *object, bool take_copy=false)
Glib::RefPtr< const Glib::Object > get_owner() const
sigc::slot< void, const Glib::StringArrayHandle & > SlotTargetsReceived
For instance: void on_targetsreceived(const Glib::StringArrayHandle& targets);.
Definition: clipboard.h:359
static GType get_type() G_GNUC_CONST
void request_targets(const SlotTargetsReceived &slot)
Glib::StringArrayHandle wait_for_uris() const
GtkClipboard * gobj()
Provides access to the underlying C GObject.
Definition: clipboard.h:123
Glib::RefPtr< const Gdk::Display > get_display() const
#define GDK_SELECTION_CLIPBOARD
Definition: gdkselection.h:43
struct _GdkAtom * GdkAtom
Definition: gdktypes.h:80
GtkImagePixbufData pixbuf
Definition: gtkimage.h:2
struct _GtkClipboard GtkClipboard
Definition: gtkwidget.h:483
Definition: ardour_ui.h:188
Glib::ArrayHandle< TargetEntry, TargetEntry_Traits > ArrayHandle_TargetEntry
Definition: targetentry.h:91
link region and track selection