use entered track for fit-tracks if in internal edit mode and no tracks or regions...
[ardour2.git] / gtk2_ardour / mouse_cursors.cc
blob5c06b55803c5e77b2c29a890f353c548ee2a5dd7
1 /*
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 #include <gdkmm/cursor.h>
21 #include "utils.h"
22 #include "mouse_cursors.h"
23 #include "editor_xpms"
25 MouseCursors::MouseCursors ()
27 using namespace Glib;
28 using namespace Gdk;
31 RefPtr<Pixbuf> p (::get_icon ("zoom_in_cursor"));
32 zoom_in = new Cursor (Display::get_default(), p, 5, 5);
36 RefPtr<Pixbuf> p (::get_icon ("zoom_out_cursor"));
37 zoom_out = new Cursor (Display::get_default(), p, 5, 5);
40 Color fbg ("#ffffff");
41 Color ffg ("#000000");
44 RefPtr<Bitmap> source = Bitmap::create (fader_cursor_bits, fader_cursor_width, fader_cursor_height);
45 RefPtr<Bitmap> mask = Bitmap::create (fader_cursor_mask_bits, fader_cursor_width, fader_cursor_height);
46 fader = new Cursor (source, mask, ffg, fbg, fader_cursor_x_hot, fader_cursor_y_hot);
50 RefPtr<Bitmap> source = Bitmap::create (speaker_cursor_bits, speaker_cursor_width, speaker_cursor_height);
51 RefPtr<Bitmap> mask = Bitmap::create (speaker_cursor_mask_bits, speaker_cursor_width, speaker_cursor_height);
52 speaker = new Cursor (source, mask, ffg, fbg, speaker_cursor_x_hot, speaker_cursor_y_hot);
56 char pix[4] = { 0, 0, 0, 0 };
57 RefPtr<Bitmap> bits = Bitmap::create (pix, 2, 2);
58 Color c;
59 transparent = new Cursor (bits, bits, c, c, 0, 0);
63 char pix[4] = { 0, 0, 0, 0 };
64 RefPtr<Bitmap> bits = Bitmap::create (pix, 2, 2);
65 Color c;
66 transparent = new Cursor (bits, bits, c, c, 0, 0);
70 RefPtr<Pixbuf> p (::get_icon ("grabber"));
71 grabber = new Cursor (Display::get_default(), p, 5, 0);
75 RefPtr<Pixbuf> p (::get_icon ("grabber_note"));
76 grabber_note = new Cursor (Display::get_default(), p, 5, 10);
80 RefPtr<Pixbuf> p (::get_icon ("grabber_edit_point"));
81 grabber_edit_point = new Cursor (Display::get_default(), p, 5, 17);
84 cross_hair = new Cursor (CROSSHAIR);
85 trimmer = new Cursor (SB_H_DOUBLE_ARROW);
88 RefPtr<Pixbuf> p (::get_icon ("trim_left_cursor"));
89 left_side_trim = new Cursor (Display::get_default(), p, 5, 11);
93 RefPtr<Pixbuf> p (::get_icon ("trim_right_cursor"));
94 right_side_trim = new Cursor (Display::get_default(), p, 23, 11);
98 RefPtr<Pixbuf> p (::get_icon ("trim_left_cursor_right_only"));
99 left_side_trim_right_only = new Cursor (Display::get_default(), p, 5, 11);
103 RefPtr<Pixbuf> p (::get_icon ("trim_right_cursor_left_only"));
104 right_side_trim_left_only = new Cursor (Display::get_default(), p, 23, 11);
108 RefPtr<Pixbuf> p (::get_icon ("fade_in_cursor"));
109 fade_in = new Cursor (Display::get_default(), p, 0, 0);
113 RefPtr<Pixbuf> p (::get_icon ("fade_out_cursor"));
114 fade_out = new Cursor (Display::get_default(), p, 29, 0);
118 RefPtr<Pixbuf> p (::get_icon ("resize_left_cursor"));
119 resize_left = new Cursor (Display::get_default(), p, 3, 10);
123 RefPtr<Pixbuf> p (::get_icon ("resize_top_left_cursor"));
124 resize_top_left = new Cursor (Display::get_default(), p, 3, 3);
128 RefPtr<Pixbuf> p (::get_icon ("resize_top_cursor"));
129 resize_top = new Cursor (Display::get_default(), p, 10, 3);
133 RefPtr<Pixbuf> p (::get_icon ("resize_top_right_cursor"));
134 resize_top_right = new Cursor (Display::get_default(), p, 18, 3);
138 RefPtr<Pixbuf> p (::get_icon ("resize_right_cursor"));
139 resize_right = new Cursor (Display::get_default(), p, 24, 10);
143 RefPtr<Pixbuf> p (::get_icon ("resize_bottom_right_cursor"));
144 resize_bottom_right = new Cursor (Display::get_default(), p, 18, 18);
148 RefPtr<Pixbuf> p (::get_icon ("resize_bottom_cursor"));
149 resize_bottom = new Cursor (Display::get_default(), p, 10, 24);
153 RefPtr<Pixbuf> p (::get_icon ("resize_bottom_left_cursor"));
154 resize_bottom_left = new Cursor (Display::get_default(), p, 3, 18);
158 RefPtr<Pixbuf> p (::get_icon ("move_cursor"));
159 move = new Cursor (Display::get_default(), p, 11, 11);
163 RefPtr<Pixbuf> p (::get_icon ("expand_left_right_cursor"));
164 expand_left_right = new Cursor (Display::get_default(), p, 11, 4);
168 RefPtr<Pixbuf> p (::get_icon ("expand_up_down_cursor"));
169 expand_up_down = new Cursor (Display::get_default(), p, 4, 11);
172 selector = new Cursor (XTERM);
173 time_fx = new Cursor (SIZING);
174 wait = new Cursor (WATCH);
175 timebar = new Cursor(LEFT_PTR);
176 midi_pencil = new Cursor (PENCIL);
177 midi_select = new Cursor (CENTER_PTR);
178 midi_resize = new Cursor (SIZING);
179 midi_erase = new Cursor (DRAPED_BOX);
180 up_down = new Cursor (SB_V_DOUBLE_ARROW);