X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=gtk2_ardour%2Fmouse_cursors.h;h=7f43e19eecccbbd2daaf80a145b79aa040a98c3b;hb=62a2d6a0647cd636f8711acceccc22142bb899aa;hp=14ce90347e552118d4d652e8ffb05c2d1624a765;hpb=7ec397c0198674de782bfac083e59e3dc8390eb7;p=ardour.git diff --git a/gtk2_ardour/mouse_cursors.h b/gtk2_ardour/mouse_cursors.h index 14ce90347e..7f43e19eec 100644 --- a/gtk2_ardour/mouse_cursors.h +++ b/gtk2_ardour/mouse_cursors.h @@ -73,10 +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__ */