2 * Copyright (C) 2012-2015 Paul Davis <paul@linuxaudiosystems.com>
3 * Copyright (C) 2014-2017 Robin Gareus <robin@gareus.org>
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License along
16 * with this program; if not, write to the Free Software Foundation, Inc.,
17 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
20 #ifndef __gtk2_ardour_mouse_cursors__
21 #define __gtk2_ardour_mouse_cursors__
23 /** @file mouse_cursors.h
24 * Handling of bitmaps to be used for mouse cursors.
26 * Held centrally by the Editor because some cursors are used in several places.
35 void set_cursor_set (const std::string& name);
36 std::string cursor_set() const { return _cursor_set; }
38 Gdk::Cursor* cross_hair;
39 Gdk::Cursor* scissors;
41 Gdk::Cursor* right_side_trim;
42 Gdk::Cursor* anchored_right_side_trim;
43 Gdk::Cursor* left_side_trim;
44 Gdk::Cursor* anchored_left_side_trim;
45 Gdk::Cursor* right_side_trim_left_only;
46 Gdk::Cursor* left_side_trim_right_only;
48 Gdk::Cursor* fade_out;
49 Gdk::Cursor* selector;
51 Gdk::Cursor* grabber_note;
53 Gdk::Cursor* zoom_out;
57 Gdk::Cursor* midi_pencil;
58 Gdk::Cursor* midi_select;
59 Gdk::Cursor* midi_resize;
60 Gdk::Cursor* midi_erase;
64 Gdk::Cursor* transparent;
65 Gdk::Cursor* resize_left;
66 Gdk::Cursor* resize_top_left;
67 Gdk::Cursor* resize_top;
68 Gdk::Cursor* resize_top_right;
69 Gdk::Cursor* resize_right;
70 Gdk::Cursor* resize_bottom_right;
71 Gdk::Cursor* resize_bottom;
72 Gdk::Cursor* resize_bottom_left;
74 Gdk::Cursor* expand_left_right;
75 Gdk::Cursor* expand_up_down;
77 /* This cursor is not intended to be used directly, it just
78 serves as an out-of-bounds value when we need to indicate
79 "no cursor". NULL/0 doesn't work for this, because it
80 is actually a valid value for a Gdk::Cursor - it indicates
81 "use the parent window's cursor"
84 static bool is_invalid (Gdk::Cursor* c) { if (!_invalid) { create_invalid(); } return c == _invalid; }
85 static Gdk::Cursor* invalid_cursor() { if (!_invalid) { create_invalid(); } return _invalid; }
88 std::string _cursor_set;
91 Gdk::Cursor* make_cursor (const char* name, int hotspot_x = 0, int hotspot_y = 0);
92 static Gdk::Cursor* _invalid;
93 static void create_invalid ();
96 #endif /* __gtk2_ardour_mouse_cursors__ */