[gtkmm] TreeView: Change TreeViewDropPosition to TreeView::DropPosition.



commit 2247657f15974f5540fe910dd145846d22a0f82f
Author: Murray Cumming <murrayc murrayc com>
Date:   Thu Apr 27 21:32:13 2017 +0200

    TreeView: Change TreeViewDropPosition to TreeView::DropPosition.

 gtk/src/treeview.ccg    |    4 ++--
 gtk/src/treeview.hg     |    9 +++++----
 tools/m4/convert_gtk.m4 |    2 +-
 3 files changed, 8 insertions(+), 7 deletions(-)
---
diff --git a/gtk/src/treeview.ccg b/gtk/src/treeview.ccg
index d270f79..17ea640 100644
--- a/gtk/src/treeview.ccg
+++ b/gtk/src/treeview.ccg
@@ -207,14 +207,14 @@ int TreeView::append_column(const Glib::ustring& title, CellRenderer& cell)
   return insert_column(title, cell, -1 /* at the end */);
 }
 
-void TreeView::get_drag_dest_row(TreeModel::Path& path, TreeViewDropPosition& pos) const
+void TreeView::get_drag_dest_row(TreeModel::Path& path, DropPosition& pos) const
 {
   GtkTreePath* pTreePath = nullptr;
   gtk_tree_view_get_drag_dest_row(const_cast<GtkTreeView*>(gobj()), &pTreePath, (GtkTreeViewDropPosition*) 
&pos);
   path = TreeModel::Path(pTreePath, true); //true = take_copy.
 }
 
-bool TreeView::get_dest_row_at_pos(int drag_x, int drag_y, TreeModel::Path& path, TreeViewDropPosition& pos) 
const
+bool TreeView::get_dest_row_at_pos(int drag_x, int drag_y, TreeModel::Path& path, DropPosition& pos) const
 {
   GtkTreePath* pTreePath = nullptr;
   const bool bResult = gtk_tree_view_get_dest_row_at_pos(
diff --git a/gtk/src/treeview.hg b/gtk/src/treeview.hg
index 1cdeba6..5ba464b 100644
--- a/gtk/src/treeview.hg
+++ b/gtk/src/treeview.hg
@@ -38,7 +38,6 @@ namespace Gtk
 {
 
 _CC_INCLUDE(gtk/gtk.h)
-_WRAP_ENUM(TreeViewDropPosition, GtkTreeViewDropPosition)
 _WRAP_ENUM(TreeViewGridLines, GtkTreeViewGridLines)
 
 
@@ -105,6 +104,8 @@ class TreeView
   _IGNORE(gtk_tree_view_get_path_at_pos, gtk_tree_view_get_cursor,
           gtk_tree_view_insert_column_with_data_func, gtk_tree_view_get_drag_dest_row, 
gtk_tree_view_get_dest_row_at_pos)
 public:
+  _WRAP_ENUM(DropPosition, GtkTreeViewDropPosition)
+
   /**  A visible column in a Gtk::TreeView widget.
    */
   typedef TreeViewColumn Column;
@@ -609,7 +610,7 @@ public:
    * @param path The path of the row to highlight
    * @param pos Specifies whether to drop before, after or into the row
    */
-  _WRAP_METHOD(void set_drag_dest_row(const TreeModel::Path& path, TreeViewDropPosition pos), 
gtk_tree_view_set_drag_dest_row)
+  _WRAP_METHOD(void set_drag_dest_row(const TreeModel::Path& path, DropPosition pos), 
gtk_tree_view_set_drag_dest_row)
 
   /** Remove an existing highlight.
    * See set_drag_dest_row().
@@ -623,7 +624,7 @@ public:
    * @param path Return location for the path of the highlighted row
    * @param pos Return location for the drop position
    */
-  void get_drag_dest_row(TreeModel::Path& path, TreeViewDropPosition& pos) const;
+  void get_drag_dest_row(TreeModel::Path& path, DropPosition& pos) const;
 
   /** Determines the destination row for a given position.
    *
@@ -632,7 +633,7 @@ public:
    * @param path Return location for the path of the highlighted row
    * @param pos Return location for the drop position
    */
-  bool get_dest_row_at_pos(int drag_x, int drag_y, TreeModel::Path& path, TreeViewDropPosition& pos) const;
+  bool get_dest_row_at_pos(int drag_x, int drag_y, TreeModel::Path& path, DropPosition& pos) const;
 
 #m4 
_CONVERSION(`cairo_surface_t*',`Cairo::RefPtr<Cairo::Surface>',`Cairo::make_refptr_for_instance<Cairo::Surface>(new
 Cairo::Surface($3, true /* take reference */))')
   _WRAP_METHOD(Cairo::RefPtr<Cairo::Surface> create_row_drag_icon(const TreeModel::Path& path) const, 
gtk_tree_view_create_row_drag_icon)
diff --git a/tools/m4/convert_gtk.m4 b/tools/m4/convert_gtk.m4
index 3e8ca87..ac0a350 100644
--- a/tools/m4/convert_gtk.m4
+++ b/tools/m4/convert_gtk.m4
@@ -121,7 +121,7 @@ _CONV_ENUM(Gtk,ToolbarStyle)
 _CONV_ENUM(Gtk,ToolPaletteDragTargets)
 _CONV_INCLASS_ENUM(Gtk,TreeModel,Flags)
 _CONV_ENUM(Gtk,TreeViewColumnSizing)
-_CONV_ENUM(Gtk,TreeViewDropPosition)
+_CONV_INCLASS_ENUM(Gtk,TreeView,DropPosition)
 _CONV_ENUM(Gtk,TreeViewGridLines)
 _CONV_ENUM(Gtk,UpdateType)
 _CONV_ENUM(Gtk,Visibility)


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