diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2015-01-24 12:26:58 -0500 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2015-01-24 12:26:58 -0500 |
commit | 22435bb53d31d15870985aef23630ad20b6973e9 (patch) | |
tree | 9e939770db2b1d87940bd911c8c8a360e2a4ca7a /gtk2_ardour/mouse_cursors.cc | |
parent | b4e32cd94b2bb37b3b61f465d9c90e6b2a208ab4 (diff) |
make MouseCursors invalid cursor API be static; use to initialize default cursor value in Drag API; use C API to set canvas cursor
Diffstat (limited to 'gtk2_ardour/mouse_cursors.cc')
-rw-r--r-- | gtk2_ardour/mouse_cursors.cc | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/gtk2_ardour/mouse_cursors.cc b/gtk2_ardour/mouse_cursors.cc index 93bba191f8..b50bfa11c6 100644 --- a/gtk2_ardour/mouse_cursors.cc +++ b/gtk2_ardour/mouse_cursors.cc @@ -27,6 +27,8 @@ using namespace ARDOUR_UI_UTILS; +Gdk::Cursor* MouseCursors::_invalid = 0; + MouseCursors::MouseCursors () : cross_hair (0) , scissors (0) @@ -211,11 +213,13 @@ MouseCursors::set_cursor_set (const std::string& name) midi_resize = new Cursor (SIZING); midi_erase = new Cursor (DRAPED_BOX); up_down = new Cursor (SB_V_DOUBLE_ARROW); - - { - char pix[4] = { 0, 0, 0, 0 }; - RefPtr<Bitmap> bits = Bitmap::create (pix, 2, 2); - Color c; - _invalid = new Cursor (bits, bits, c, c, 0, 0); - } +} + +void +MouseCursors::create_invalid() +{ + char pix[4] = { 0, 0, 0, 0 }; + Glib::RefPtr<Gdk::Bitmap> bits = Gdk::Bitmap::create (pix, 2, 2); + Gdk::Color c; + _invalid = new Gdk::Cursor (bits, bits, c, c, 0, 0); } |