[glom/gtkmm4v4] gtkmm4: Adapt to CursorType as Cursor::Type.



commit 79682039dcc97d68c24e42bcc865a18f40853a4c
Author: Murray Cumming <murrayc murrayc com>
Date:   Fri Apr 28 09:19:33 2017 +0200

    gtkmm4: Adapt to CursorType as Cursor::Type.

 glom/bakery/busy_cursor.cc                         |    4 +-
 glom/bakery/busy_cursor.h                          |    4 +-
 .../canvas/canvas_group_resizable.cc               |   22 ++++++++++----------
 glom/utility_widgets/canvas/canvas_item_movable.cc |    6 ++--
 glom/utility_widgets/canvas/canvas_item_movable.h  |    4 +-
 5 files changed, 20 insertions(+), 20 deletions(-)
---
diff --git a/glom/bakery/busy_cursor.cc b/glom/bakery/busy_cursor.cc
index 79bfc30..43276e1 100644
--- a/glom/bakery/busy_cursor.cc
+++ b/glom/bakery/busy_cursor.cc
@@ -7,12 +7,12 @@ namespace Glom
 //Intialize static member variable:
 BusyCursor::type_map_cursors BusyCursor::m_map_cursors;
 
-BusyCursor::BusyCursor(Gtk::Window& window, Gdk::CursorType cursor_type)
+BusyCursor::BusyCursor(Gtk::Window& window, Gdk::Cursor::Type cursor_type)
 : BusyCursor(&window, cursor_type)
 {
 }
 
-BusyCursor::BusyCursor(Gtk::Window* window, Gdk::CursorType cursor_type)
+BusyCursor::BusyCursor(Gtk::Window* window, Gdk::Cursor::Type cursor_type)
 : m_window(window) //If this is a nested cursor then remember the previously-set cursor, so we can restore 
it.
 {
   if(!m_window)
diff --git a/glom/bakery/busy_cursor.h b/glom/bakery/busy_cursor.h
index 7dde794..71f667a 100644
--- a/glom/bakery/busy_cursor.h
+++ b/glom/bakery/busy_cursor.h
@@ -34,11 +34,11 @@ class BusyCursor
 public:
   /** Associate a busy cursor with the window, for the lifetime of this object.
    */
-  explicit BusyCursor(Gtk::Window& window, Gdk::CursorType cursor_type = Gdk::CursorType::WATCH);
+  explicit BusyCursor(Gtk::Window& window, Gdk::Cursor::Type cursor_type = Gdk::Cursor::Type::WATCH);
 
   /**  Associate a busy cursor with the window, for the lifetime of this object, if window is not 0.
    */
-  explicit BusyCursor(Gtk::Window* window, Gdk::CursorType cursor_type = Gdk::CursorType::WATCH);
+  explicit BusyCursor(Gtk::Window* window, Gdk::Cursor::Type cursor_type = Gdk::Cursor::Type::WATCH);
 
   virtual ~BusyCursor();
 
diff --git a/glom/utility_widgets/canvas/canvas_group_resizable.cc 
b/glom/utility_widgets/canvas/canvas_group_resizable.cc
index 51ee10a..888c7a2 100644
--- a/glom/utility_widgets/canvas/canvas_group_resizable.cc
+++ b/glom/utility_widgets/canvas/canvas_group_resizable.cc
@@ -52,7 +52,7 @@ CanvasGroupResizable::CanvasGroupResizable()
   //    (Goocanvas::PointerEvents)(Goocanvas::EVENTS_VISIBLE_FILL & GOO_CANVAS_EVENTS_VISIBLE_STROKE);
 
 
-  set_drag_cursor(Gdk::CursorType::FLEUR);
+  set_drag_cursor(Gdk::Cursor::Type::FLEUR);
 }
 
 void CanvasGroupResizable::create_manipulators()
@@ -127,14 +127,14 @@ void CanvasGroupResizable::create_rect_manipulators()
   m_manipulator_edge_left->set_grid(m_grid);
   m_manipulator_edge_right->set_grid(m_grid);
 
-  m_manipulator_corner_top_left->set_drag_cursor(Gdk::CursorType::TOP_LEFT_CORNER);
-  m_manipulator_corner_top_right->set_drag_cursor(Gdk::CursorType::TOP_RIGHT_CORNER);
-  m_manipulator_corner_bottom_left->set_drag_cursor(Gdk::CursorType::BOTTOM_LEFT_CORNER);
-  m_manipulator_corner_bottom_right->set_drag_cursor(Gdk::CursorType::BOTTOM_RIGHT_CORNER);
-  m_manipulator_edge_top->set_drag_cursor(Gdk::CursorType::TOP_SIDE);
-  m_manipulator_edge_bottom->set_drag_cursor(Gdk::CursorType::BOTTOM_SIDE);
-  m_manipulator_edge_left->set_drag_cursor(Gdk::CursorType::LEFT_SIDE);
-  m_manipulator_edge_right->set_drag_cursor(Gdk::CursorType::RIGHT_SIDE);
+  m_manipulator_corner_top_left->set_drag_cursor(Gdk::Cursor::Type::TOP_LEFT_CORNER);
+  m_manipulator_corner_top_right->set_drag_cursor(Gdk::Cursor::Type::TOP_RIGHT_CORNER);
+  m_manipulator_corner_bottom_left->set_drag_cursor(Gdk::Cursor::Type::BOTTOM_LEFT_CORNER);
+  m_manipulator_corner_bottom_right->set_drag_cursor(Gdk::Cursor::Type::BOTTOM_RIGHT_CORNER);
+  m_manipulator_edge_top->set_drag_cursor(Gdk::Cursor::Type::TOP_SIDE);
+  m_manipulator_edge_bottom->set_drag_cursor(Gdk::Cursor::Type::BOTTOM_SIDE);
+  m_manipulator_edge_left->set_drag_cursor(Gdk::Cursor::Type::LEFT_SIDE);
+  m_manipulator_edge_right->set_drag_cursor(Gdk::Cursor::Type::RIGHT_SIDE);
 
   //Make sure that this is above the outline group:
   m_group_edge_manipulators->raise();//m_group_outline);
@@ -165,8 +165,8 @@ void CanvasGroupResizable::create_line_manipulators()
   m_manipulator_end->set_grid(m_grid);
   //m_manipulator_corner_top_right->set_snap_corner(CanvasRectMovable::Corners::TOP_RIGHT);
 
-  m_manipulator_start->set_drag_cursor(Gdk::CursorType::TCROSS); //A rather arbitrary cursor.
-  m_manipulator_end->set_drag_cursor(Gdk::CursorType::TCROSS);
+  m_manipulator_start->set_drag_cursor(Gdk::Cursor::Type::TCROSS); //A rather arbitrary cursor.
+  m_manipulator_end->set_drag_cursor(Gdk::Cursor::Type::TCROSS);
 
   manipulator_connect_signals(m_manipulator_start, Manipulators::START);
   manipulator_connect_signals(m_manipulator_end, Manipulators::END);
diff --git a/glom/utility_widgets/canvas/canvas_item_movable.cc 
b/glom/utility_widgets/canvas/canvas_item_movable.cc
index eb79cea..6b4ec7a 100644
--- a/glom/utility_widgets/canvas/canvas_item_movable.cc
+++ b/glom/utility_widgets/canvas/canvas_item_movable.cc
@@ -34,7 +34,7 @@
 
 namespace {
 
-static Glib::RefPtr<Gdk::Cursor> create_drag_cursor(GdkEventAny* event, Gdk::CursorType cursor_type)
+static Glib::RefPtr<Gdk::Cursor> create_drag_cursor(GdkEventAny* event, Gdk::Cursor::Type cursor_type)
 {
   auto window = Glib::wrap(event->window, true);
   auto display = window->get_display();
@@ -52,7 +52,7 @@ CanvasItemMovable::CanvasItemMovable()
   m_drag_start_cursor_x(0.0), m_drag_start_cursor_y(0.0),
   m_drag_start_position_x(0.0), m_drag_start_position_y(0.0),
   m_drag_latest_position_x(0.0), m_drag_latest_position_y(0.0),
-  m_drag_cursor_type(Gdk::CursorType::FLEUR), //arbitrary default
+  m_drag_cursor_type(Gdk::Cursor::Type::FLEUR), //arbitrary default
   m_grid(nullptr),
   m_allow_vertical_movement(true), m_allow_horizontal_movement(true),
   m_selected(false),
@@ -272,7 +272,7 @@ CanvasItemMovable::type_signal_selected CanvasItemMovable::signal_selected()
   return m_signal_selected;
 }
 
-void CanvasItemMovable::set_drag_cursor(Gdk::CursorType cursor_type)
+void CanvasItemMovable::set_drag_cursor(Gdk::Cursor::Type cursor_type)
 {
   m_drag_cursor_type = cursor_type;
 }
diff --git a/glom/utility_widgets/canvas/canvas_item_movable.h 
b/glom/utility_widgets/canvas/canvas_item_movable.h
index 4ddc0ad..45a41ea 100644
--- a/glom/utility_widgets/canvas/canvas_item_movable.h
+++ b/glom/utility_widgets/canvas/canvas_item_movable.h
@@ -56,7 +56,7 @@ public:
    */
   virtual void set_width_height(double width, double height) = 0;
 
-  void set_drag_cursor(Gdk::CursorType cursor_type);
+  void set_drag_cursor(Gdk::Cursor::Type cursor_type);
 
   /** For instance,
    *
@@ -146,7 +146,7 @@ private:
   double m_drag_start_cursor_x, m_drag_start_cursor_y;
   double m_drag_start_position_x, m_drag_start_position_y;
   double m_drag_latest_position_x, m_drag_latest_position_y; //To discover how much the latest motion_event 
has moved the item.
-  Gdk::CursorType m_drag_cursor_type;
+  Gdk::Cursor::Type m_drag_cursor_type;
 
 protected:
   Glib::RefPtr<const CanvasGroupGrid> m_grid;


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