X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=gtk2_ardour%2Fmouse_cursors.h;h=da3317dffa5ffcb374b755f3cbfa12129732dc66;hb=69777d600fe2e1e034d24551ac9faec2c2481584;hp=6c5c94b5e917330ed80cb450f7f2efe0c96242b8;hpb=9b1cd13706cae80c3e03c1682b22c9ac2061a351;p=ardour.git diff --git a/gtk2_ardour/mouse_cursors.h b/gtk2_ardour/mouse_cursors.h index 6c5c94b5e9..da3317dffa 100644 --- a/gtk2_ardour/mouse_cursors.h +++ b/gtk2_ardour/mouse_cursors.h @@ -29,6 +29,7 @@ class MouseCursors { public: MouseCursors (); + ~MouseCursors (); void set_cursor_set (const std::string& name); std::string cursor_set() const { return _cursor_set; } @@ -47,7 +48,6 @@ public: Gdk::Cursor* selector; Gdk::Cursor* grabber; Gdk::Cursor* grabber_note; - Gdk::Cursor* grabber_edit_point; Gdk::Cursor* zoom_in; Gdk::Cursor* zoom_out; Gdk::Cursor* time_fx; @@ -73,11 +73,23 @@ public: Gdk::Cursor* expand_left_right; Gdk::Cursor* expand_up_down; + /* This cursor is not intended to be used directly, it just + serves as an out-of-bounds value when we need to indicate + "no cursor". NULL/0 doesn't work for this, because it + is actually a valid value for a Gdk::Cursor - it indicates + "use the parent window's cursor" + */ + + static bool is_invalid (Gdk::Cursor* c) { if (!_invalid) { create_invalid(); } return c == _invalid; } + static Gdk::Cursor* invalid_cursor() { if (!_invalid) { create_invalid(); } return _invalid; } + private: std::string _cursor_set; void drop_all (); Gdk::Cursor* make_cursor (const char* name, int hotspot_x = 0, int hotspot_y = 0); + static Gdk::Cursor* _invalid; + static void create_invalid (); }; #endif /* __gtk2_ardour_mouse_cursors__ */