X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=gtk2_ardour%2Fmouse_cursors.cc;h=afe743a7d3225d4eb3fd8fee1fbc779a11b9e21c;hb=c1eee02e1b4b39e98e1d78edb950dc60c47332ee;hp=d735ed6c64ea09a77b3e0bf00b060eaf6ec350dd;hpb=f082c42994358816a1cfde55c7482f52021e93fc;p=ardour.git diff --git a/gtk2_ardour/mouse_cursors.cc b/gtk2_ardour/mouse_cursors.cc index d735ed6c64..afe743a7d3 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) @@ -70,6 +72,11 @@ MouseCursors::MouseCursors () { } +MouseCursors::~MouseCursors () +{ + drop_all (); +} + void MouseCursors::drop_all () { @@ -145,8 +152,8 @@ MouseCursors::set_cursor_set (const std::string& name) } /* these will throw exceptions if their images cannot be found. - - the default hotspot coordinates will be overridden by any + + the default hotspot coordinates will be overridden by any data found by Gtkmm2ext::Cursors::load_cursor_info(). the values here from the set of cursors used by Ardour; new cursor/icon sets should come with a hotspot info file. @@ -212,3 +219,12 @@ MouseCursors::set_cursor_set (const std::string& name) midi_erase = new Cursor (DRAPED_BOX); up_down = new Cursor (SB_V_DOUBLE_ARROW); } + +void +MouseCursors::create_invalid() +{ + char pix[4] = { 0, 0, 0, 0 }; + Glib::RefPtr bits = Gdk::Bitmap::create (pix, 2, 2); + Gdk::Color c; + _invalid = new Gdk::Cursor (bits, bits, c, c, 0, 0); +}