2 Copyright (C) 2000-2010 Paul Davis
4 This program is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 2 of the License, or
7 (at your option) any later version.
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software
16 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
20 #ifndef __gtk2_ardour_mouse_cursors__
21 #define __gtk2_ardour_mouse_cursors__
23 /** @file Handling of bitmaps to be used for mouse cursors.
25 * Held centrally by the Editor because some cursors are used in several places.
33 void set_cursor_set (const std::string& name);
34 std::string cursor_set() const { return _cursor_set; }
36 Gdk::Cursor* cross_hair;
37 Gdk::Cursor* scissors;
39 Gdk::Cursor* right_side_trim;
40 Gdk::Cursor* anchored_right_side_trim;
41 Gdk::Cursor* left_side_trim;
42 Gdk::Cursor* anchored_left_side_trim;
43 Gdk::Cursor* right_side_trim_left_only;
44 Gdk::Cursor* left_side_trim_right_only;
46 Gdk::Cursor* fade_out;
47 Gdk::Cursor* selector;
49 Gdk::Cursor* grabber_note;
50 Gdk::Cursor* grabber_edit_point;
52 Gdk::Cursor* zoom_out;
56 Gdk::Cursor* midi_pencil;
57 Gdk::Cursor* midi_select;
58 Gdk::Cursor* midi_resize;
59 Gdk::Cursor* midi_erase;
63 Gdk::Cursor* transparent;
64 Gdk::Cursor* resize_left;
65 Gdk::Cursor* resize_top_left;
66 Gdk::Cursor* resize_top;
67 Gdk::Cursor* resize_top_right;
68 Gdk::Cursor* resize_right;
69 Gdk::Cursor* resize_bottom_right;
70 Gdk::Cursor* resize_bottom;
71 Gdk::Cursor* resize_bottom_left;
73 Gdk::Cursor* expand_left_right;
74 Gdk::Cursor* expand_up_down;
76 /* This cursor is not intended to be used directly, it just
77 serves as an out-of-bounds value when we need to indicate
78 "no cursor". NULL/0 doesn't work for this, because it
79 is actually a valid value for a Gdk::Cursor - it indicates
80 "use the parent window's cursor"
83 static bool is_invalid (Gdk::Cursor* c) { if (!_invalid) { create_invalid(); } return c == _invalid; }
84 static Gdk::Cursor* invalid_cursor() { if (!_invalid) { create_invalid(); } return _invalid; }
87 std::string _cursor_set;
90 Gdk::Cursor* make_cursor (const char* name, int hotspot_x = 0, int hotspot_y = 0);
91 static Gdk::Cursor* _invalid;
92 static void create_invalid ();
95 #endif /* __gtk2_ardour_mouse_cursors__ */