[gtkmm] TargetList: Add some add_*_targets() methods.



commit 484e76deb937740720db19277cdb1b19ee67b3d8
Author: Murray Cumming <murrayc murrayc com>
Date:   Sun Oct 7 14:44:56 2012 +0200

    TargetList: Add some add_*_targets() methods.
    
            * gtk/src/targetlist.[hg|ccg]: Add add_text_targets(),
    	add_rich_text_targets(), add_image_targets() and
    	add_uri_targets().

 ChangeLog              |    8 ++++++++
 gtk/src/targetlist.ccg |    1 +
 gtk/src/targetlist.hg  |   16 ++++++++++++++++
 3 files changed, 25 insertions(+), 0 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index b2c858d..52d32ce 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,13 @@
 2012-10-07  Murray Cumming  <murrayc murrayc com>
 
+        TargetList: Add some add_*_targets() methods.
+
+        * gtk/src/targetlist.[hg|ccg]: Add add_text_targets(), 
+	add_rich_text_targets(), add_image_targets() and 
+	add_uri_targets().
+
+2012-10-07  Murray Cumming  <murrayc murrayc com>
+
         TreeModel*: Add some _IGNORE() lines.
 
         * gtk/src/treemodelfilter.hg:
diff --git a/gtk/src/targetlist.ccg b/gtk/src/targetlist.ccg
index 87b1e14..974c2f8 100644
--- a/gtk/src/targetlist.ccg
+++ b/gtk/src/targetlist.ccg
@@ -16,6 +16,7 @@
  */
 
 #include <glibmm/vectorutils.h>
+#include <gtkmm/textbuffer.h>
 
 namespace Gtk
 {
diff --git a/gtk/src/targetlist.hg b/gtk/src/targetlist.hg
index cebb88d..4e6b711 100644
--- a/gtk/src/targetlist.hg
+++ b/gtk/src/targetlist.hg
@@ -21,6 +21,7 @@ _DEFS(gtkmm,gtk)
 
 #include <gtkmm/enums.h>
 #include <gtkmm/targetentry.h>
+//#include <gtkmm/textbuffer.h>
 #include <gdkmm/types.h>
 
 _CC_INCLUDE(gtk/gtk.h)
@@ -28,6 +29,8 @@ _CC_INCLUDE(gtk/gtk.h)
 namespace Gtk
 {
 
+class TextBuffer;
+
 class TargetList
 {
   //GtkTargetList is actually registered as a boxed type, but it has custom
@@ -40,6 +43,19 @@ public:
 #m4 _CONVERSION(`TargetFlags', `guint', `($2)($3)')
   _WRAP_METHOD(void add(const Glib::ustring& target, TargetFlags flags = TargetFlags(0), guint info = 0), gtk_target_list_add)
   void add(const std::vector<TargetEntry>& targets);
+
+  _WRAP_METHOD(void add_text_targets(guint info), gtk_target_list_add_text_targets)
+  _WRAP_METHOD(void add_rich_text_targets(guint info, bool deserializable, const Glib::RefPtr<TextBuffer>& buffer), gtk_target_list_add_rich_text_targets)
+
+  _WRAP_METHOD(void add_image_targets(guint info, bool writable), gtk_target_list_add_image_targets)
+  _WRAP_METHOD(void add_uri_targets(guint info), gtk_target_list_add_uri_targets)
+
+/** TODO:
+void           gtk_target_list_add_table (GtkTargetList        *list,
+                                          const GtkTargetEntry *targets,
+                                          guint                 ntargets);
+*/
+
   _WRAP_METHOD(void remove(const Glib::ustring& target), gtk_target_list_remove)
   _WRAP_METHOD(bool find(const Glib::ustring& target, guint* info) const, gtk_target_list_find)
 };



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]