~ubuntu-branches/ubuntu/utopic/ardour3/utopic

« back to all changes in this revision

Viewing changes to gtk2_ardour/mouse_cursors.cc

  • Committer: Package Import Robot
  • Author(s): Felipe Sateler
  • Date: 2013-09-21 19:05:02 UTC
  • Revision ID: package-import@ubuntu.com-20130921190502-8gsftrku6jnzhd7v
Tags: upstream-3.4~dfsg
ImportĀ upstreamĀ versionĀ 3.4~dfsg

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
    Copyright (C) 2000-2010 Paul Davis
 
3
 
 
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.
 
8
 
 
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.
 
13
 
 
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.
 
17
 
 
18
*/
 
19
 
 
20
#include <gdkmm/cursor.h>
 
21
#include "utils.h"
 
22
#include "mouse_cursors.h"
 
23
#include "editor_xpms"
 
24
 
 
25
MouseCursors::MouseCursors ()
 
26
{
 
27
        using namespace Glib;
 
28
        using namespace Gdk;
 
29
 
 
30
        {
 
31
                RefPtr<Pixbuf> p (::get_icon ("zoom_in_cursor"));
 
32
                zoom_in = new Cursor (Display::get_default(), p, 10, 5);
 
33
        }
 
34
 
 
35
        {
 
36
                RefPtr<Pixbuf> p (::get_icon ("zoom_out_cursor"));
 
37
                zoom_out = new Cursor (Display::get_default(), p, 5, 5);
 
38
        }
 
39
 
 
40
        Color fbg ("#ffffff");
 
41
        Color ffg ("#000000");
 
42
 
 
43
        {
 
44
                RefPtr<Bitmap> source = Bitmap::create ((char const *) fader_cursor_bits, fader_cursor_width, fader_cursor_height);
 
45
                RefPtr<Bitmap> mask = Bitmap::create ((char const *) 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);
 
47
        }
 
48
 
 
49
        {
 
50
                RefPtr<Bitmap> source = Bitmap::create ((char const *) speaker_cursor_bits, speaker_cursor_width, speaker_cursor_height);
 
51
                RefPtr<Bitmap> mask = Bitmap::create ((char const *) speaker_cursor_mask_bits, speaker_cursor_width, speaker_cursor_height);
 
52
                speaker = new Cursor (source, mask, ffg, fbg, speaker_cursor_width >> 1, speaker_cursor_height >> 1);
 
53
        }
 
54
 
 
55
        {
 
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);
 
60
        }
 
61
 
 
62
        {
 
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);
 
67
        }
 
68
 
 
69
        {
 
70
                RefPtr<Pixbuf> p (::get_icon ("grabber"));
 
71
                grabber = new Cursor (Display::get_default(), p, 5, 0);
 
72
        }
 
73
 
 
74
        {
 
75
                RefPtr<Pixbuf> p (::get_icon ("grabber_note"));
 
76
                grabber_note = new Cursor (Display::get_default(), p, 5, 10);
 
77
        }
 
78
 
 
79
        {
 
80
                RefPtr<Pixbuf> p (::get_icon ("grabber_edit_point"));
 
81
                grabber_edit_point = new Cursor (Display::get_default(), p, 5, 17);
 
82
        }
 
83
 
 
84
        cross_hair = new Cursor (CROSSHAIR);
 
85
        trimmer =  new Cursor (SB_H_DOUBLE_ARROW);
 
86
 
 
87
        {
 
88
                RefPtr<Pixbuf> p (::get_icon ("trim_left_cursor"));
 
89
                left_side_trim = new Cursor (Display::get_default(), p, 5, 11);
 
90
        }
 
91
 
 
92
        {
 
93
                RefPtr<Pixbuf> p (::get_icon ("trim_right_cursor"));
 
94
                right_side_trim = new Cursor (Display::get_default(), p, 23, 11);
 
95
        }
 
96
 
 
97
        {
 
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);
 
100
        }
 
101
 
 
102
        {
 
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);
 
105
        }
 
106
 
 
107
        {
 
108
                RefPtr<Pixbuf> p (::get_icon ("fade_in_cursor"));
 
109
                fade_in = new Cursor (Display::get_default(), p, 0, 0);
 
110
        }
 
111
 
 
112
        {
 
113
                RefPtr<Pixbuf> p (::get_icon ("fade_out_cursor"));
 
114
                fade_out = new Cursor (Display::get_default(), p, 29, 0);
 
115
        }
 
116
 
 
117
        {
 
118
                RefPtr<Pixbuf> p (::get_icon ("resize_left_cursor"));
 
119
                resize_left = new Cursor (Display::get_default(), p, 3, 10);
 
120
        }
 
121
 
 
122
        {
 
123
                RefPtr<Pixbuf> p (::get_icon ("resize_top_left_cursor"));
 
124
                resize_top_left = new Cursor (Display::get_default(), p, 3, 3);
 
125
        }
 
126
 
 
127
        {
 
128
                RefPtr<Pixbuf> p (::get_icon ("resize_top_cursor"));
 
129
                resize_top = new Cursor (Display::get_default(), p, 10, 3);
 
130
        }
 
131
 
 
132
        {
 
133
                RefPtr<Pixbuf> p (::get_icon ("resize_top_right_cursor"));
 
134
                resize_top_right = new Cursor (Display::get_default(), p, 18, 3);
 
135
        }
 
136
 
 
137
        {
 
138
                RefPtr<Pixbuf> p (::get_icon ("resize_right_cursor"));
 
139
                resize_right = new Cursor (Display::get_default(), p, 24, 10);
 
140
        }
 
141
 
 
142
        {
 
143
                RefPtr<Pixbuf> p (::get_icon ("resize_bottom_right_cursor"));
 
144
                resize_bottom_right = new Cursor (Display::get_default(), p, 18, 18);
 
145
        }
 
146
 
 
147
        {
 
148
                RefPtr<Pixbuf> p (::get_icon ("resize_bottom_cursor"));
 
149
                resize_bottom = new Cursor (Display::get_default(), p, 10, 24);
 
150
        }
 
151
 
 
152
        {
 
153
                RefPtr<Pixbuf> p (::get_icon ("resize_bottom_left_cursor"));
 
154
                resize_bottom_left = new Cursor (Display::get_default(), p, 3, 18);
 
155
        }
 
156
 
 
157
        {
 
158
                RefPtr<Pixbuf> p (::get_icon ("move_cursor"));
 
159
                move = new Cursor (Display::get_default(), p, 11, 11);
 
160
        }
 
161
 
 
162
        {
 
163
                RefPtr<Pixbuf> p (::get_icon ("expand_left_right_cursor"));
 
164
                expand_left_right = new Cursor (Display::get_default(), p, 11, 4);
 
165
        }
 
166
 
 
167
        {
 
168
                RefPtr<Pixbuf> p (::get_icon ("expand_up_down_cursor"));
 
169
                expand_up_down = new Cursor (Display::get_default(), p, 4, 11);
 
170
        }
 
171
 
 
172
        {
 
173
                RefPtr<Pixbuf> p (::get_icon ("i_beam_cursor"));
 
174
                selector = new Cursor (Display::get_default(), p, 4, 11);
 
175
        }
 
176
 
 
177
        time_fx = new Cursor (SIZING);
 
178
        wait = new Cursor (WATCH);
 
179
        timebar = new Cursor(LEFT_PTR);
 
180
        midi_pencil = new Cursor (PENCIL);
 
181
        midi_select = new Cursor (CENTER_PTR);
 
182
        midi_resize = new Cursor (SIZING);
 
183
        midi_erase = new Cursor (DRAPED_BOX);
 
184
        up_down = new Cursor (SB_V_DOUBLE_ARROW);
 
185
}