Ardour  8.7-14-g57a6773833
cursor.h
Go to the documentation of this file.
1 // -*- c++ -*-
2 // Generated by gmmproc 2.45.3 -- DO NOT MODIFY!
3 #ifndef _GDKMM_CURSOR_H
4 #define _GDKMM_CURSOR_H
5 
6 
7 #include <glibmm/ustring.h>
8 #include <sigc++/sigc++.h>
9 
10 /* $Id: cursor.hg,v 1.8 2006/04/12 11:11:24 murrayc Exp $ */
11 
12 /* drawable.h
13  *
14  * Copyright (C) 1998-2002 The gtkmm Development Team
15  *
16  * This library is free software; you can redistribute it and/or
17  * modify it under the terms of the GNU Lesser General Public
18  * License as published by the Free Software Foundation; either
19  * version 2.1 of the License, or (at your option) any later version.
20  *
21  * This library is distributed in the hope that it will be useful,
22  * but WITHOUT ANY WARRANTY; without even the implied warranty of
23  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
24  * Lesser General Public License for more details.
25  *
26  * You should have received a copy of the GNU Lesser General Public
27  * License along with this library; if not, write to the Free
28  * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
29  */
30 
31 #include <gdkmm/bitmap.h>
32 #include <gdkmm/display.h>
33 #include <gdkmm/pixbuf.h>
34 #include <gdkmm/color.h>
35 
36 
37 #ifndef DOXYGEN_SHOULD_SKIP_THIS
38 extern "C" { typedef struct _GdkCursor GdkCursor; }
39 #endif
40 
41 namespace Gdk
42 {
43 
51 {
52  X_CURSOR = 0,
53  ARROW = 2,
56  BOAT = 8,
57  BOGOSITY = 10,
61  BOTTOM_TEE = 18,
62  BOX_SPIRAL = 20,
63  CENTER_PTR = 22,
64  CIRCLE = 24,
65  CLOCK = 26,
66  COFFEE_MUG = 28,
67  CROSS = 30,
69  CROSSHAIR = 34,
71  DOT = 38,
72  DOTBOX = 40,
76  DRAPED_BOX = 48,
77  EXCHANGE = 50,
78  FLEUR = 52,
79  GOBBLER = 54,
80  GUMBY = 56,
81  HAND1 = 58,
82  HAND2 = 60,
83  HEART = 62,
84  ICON = 64,
85  IRON_CROSS = 66,
86  LEFT_PTR = 68,
87  LEFT_SIDE = 70,
88  LEFT_TEE = 72,
89  LEFTBUTTON = 74,
90  LL_ANGLE = 76,
91  LR_ANGLE = 78,
92  MAN = 80,
94  MOUSE = 84,
95  PENCIL = 86,
96  PIRATE = 88,
97  PLUS = 90,
99  RIGHT_PTR = 94,
101  RIGHT_TEE = 98,
102  RIGHTBUTTON = 100,
103  RTL_LOGO = 102,
104  SAILBOAT = 104,
109  SB_UP_ARROW = 114,
111  SHUTTLE = 118,
112  SIZING = 120,
113  SPIDER = 122,
114  SPRAYCAN = 124,
115  STAR = 126,
116  TARGET = 128,
117  TCROSS = 130,
121  TOP_SIDE = 138,
122  TOP_TEE = 140,
123  TREK = 142,
124  UL_ANGLE = 144,
125  UMBRELLA = 146,
126  UR_ANGLE = 148,
127  WATCH = 150,
128  XTERM = 152,
129  LAST_CURSOR = 153,
131  CURSOR_IS_PIXMAP = -1
132 };
133 
134 } // namespace Gdk
135 
136 
137 #ifndef DOXYGEN_SHOULD_SKIP_THIS
138 namespace Glib
139 {
140 
141 template <>
142 class Value<Gdk::CursorType> : public Glib::Value_Enum<Gdk::CursorType>
143 {
144 public:
145  static GType value_type() G_GNUC_CONST;
146 };
147 
148 } // namespace Glib
149 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
150 
151 
152 namespace Gdk
153 {
154 
155 
158 class Cursor
159 {
160  public:
161 #ifndef DOXYGEN_SHOULD_SKIP_THIS
162  typedef Cursor CppObjectType;
163  typedef GdkCursor BaseObjectType;
164 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
165 
168  static GType get_type() G_GNUC_CONST;
169 
171 
172  explicit Cursor(GdkCursor* gobject, bool make_a_copy = true);
173 
174  Cursor(const Cursor& other);
175  Cursor& operator=(const Cursor& other);
176 
177  ~Cursor();
178 
179  void swap(Cursor& other);
180 
182  GdkCursor* gobj() { return gobject_; }
183 
185  const GdkCursor* gobj() const { return gobject_; }
186 
189 
190 protected:
192 
193 private:
194 
195 
196 public:
197  explicit Cursor(CursorType cursor_type);
198  Cursor(const Glib::RefPtr<Pixmap>& source, const Glib::RefPtr<Pixmap>& mask,
199  const Color& fg, const Color& bg,
200  int x, int y);
201  explicit Cursor(const Glib::RefPtr<Display>& display, CursorType cursor_type);
202  Cursor(const Glib::RefPtr<Display>& display, const Glib::RefPtr<Pixbuf>& pixbuf, int x, int y);
203  explicit Cursor(const Glib::RefPtr<Display>& display, const Glib::ustring& name);
204 
205 
210  Glib::RefPtr<Display> get_display();
211 
216  Glib::RefPtr<const Display> get_display() const;
217 
218 
227  Glib::RefPtr<Gdk::Pixbuf> get_image();
228 
237  Glib::RefPtr<const Gdk::Pixbuf> get_image() const;
238 
239 
245 
246 
247 };
248 
249 } //namespace Gdk
250 
251 
252 namespace Gdk
253 {
254 
259 inline void swap(Cursor& lhs, Cursor& rhs)
260  { lhs.swap(rhs); }
261 
262 } // namespace Gdk
263 
264 namespace Glib
265 {
266 
275 Gdk::Cursor wrap(GdkCursor* object, bool take_copy = false);
276 
277 #ifndef DOXYGEN_SHOULD_SKIP_THIS
278 template <>
279 class Value<Gdk::Cursor> : public Glib::Value_Boxed<Gdk::Cursor>
280 {};
281 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
282 
283 } // namespace Glib
284 
285 
286 #endif /* _GDKMM_CURSOR_H */
287 
Glib::RefPtr< const Gdk::Pixbuf > get_image() const
Cursor(const Glib::RefPtr< Display > &display, const Glib::ustring &name)
void swap(Cursor &lhs, Cursor &rhs)
Definition: cursor.h:259
Cursor(const Glib::RefPtr< Display > &display, CursorType cursor_type)
Cursor(const Glib::RefPtr< Display > &display, const Glib::RefPtr< Pixbuf > &pixbuf, int x, int y)
const GdkCursor * gobj() const
Provides access to the underlying C instance.
Definition: cursor.h:185
GdkCursor * gobj_copy() const
Provides access to the underlying C instance. The caller is responsible for freeing it....
Glib::RefPtr< Gdk::Pixbuf > get_image()
Cursor(CursorType cursor_type)
GdkCursor * gobj()
Provides access to the underlying C instance.
Definition: cursor.h:182
CursorType get_cursor_type() const
Cursor(const Glib::RefPtr< Pixmap > &source, const Glib::RefPtr< Pixmap > &mask, const Color &fg, const Color &bg, int x, int y)
GdkCursor * gobject_
Definition: cursor.h:191
Gdk::Cursor wrap(GdkCursor *object, bool take_copy=false)
Glib::RefPtr< const Display > get_display() const
static GType get_type() G_GNUC_CONST
void swap(Cursor &other)
Glib::RefPtr< Display > get_display()
CursorType
Definition: cursor.h:51
@ DRAFT_LARGE
Definition: cursor.h:74
@ LR_ANGLE
Definition: cursor.h:91
@ CROSS_REVERSE
Definition: cursor.h:68
@ RIGHT_TEE
Definition: cursor.h:101
@ RIGHT_PTR
Definition: cursor.h:99
@ MIDDLEBUTTON
Definition: cursor.h:93
@ BOTTOM_SIDE
Definition: cursor.h:60
@ ARROW
Definition: cursor.h:53
@ LEFTBUTTON
Definition: cursor.h:89
@ SB_UP_ARROW
Definition: cursor.h:109
@ UR_ANGLE
Definition: cursor.h:126
@ SB_DOWN_ARROW
Definition: cursor.h:105
@ STAR
Definition: cursor.h:115
@ BASED_ARROW_DOWN
Definition: cursor.h:54
@ MAN
Definition: cursor.h:92
@ DOTBOX
Definition: cursor.h:72
@ LL_ANGLE
Definition: cursor.h:90
@ TREK
Definition: cursor.h:123
@ TOP_TEE
Definition: cursor.h:122
@ COFFEE_MUG
Definition: cursor.h:66
@ GUMBY
Definition: cursor.h:80
@ BOX_SPIRAL
Definition: cursor.h:62
@ SB_H_DOUBLE_ARROW
Definition: cursor.h:106
@ SB_LEFT_ARROW
Definition: cursor.h:107
@ PENCIL
Definition: cursor.h:95
@ HAND1
Definition: cursor.h:81
@ DIAMOND_CROSS
Definition: cursor.h:70
@ RIGHTBUTTON
Definition: cursor.h:102
@ SIZING
Definition: cursor.h:112
@ UL_ANGLE
Definition: cursor.h:124
@ CIRCLE
Definition: cursor.h:64
@ LEFT_TEE
Definition: cursor.h:88
@ BASED_ARROW_UP
Definition: cursor.h:55
@ EXCHANGE
Definition: cursor.h:77
@ BOGOSITY
Definition: cursor.h:57
@ BOAT
Definition: cursor.h:56
@ LAST_CURSOR
Definition: cursor.h:129
@ SB_RIGHT_ARROW
Definition: cursor.h:108
@ CROSSHAIR
Definition: cursor.h:69
@ BOTTOM_LEFT_CORNER
Definition: cursor.h:58
@ WATCH
Definition: cursor.h:127
@ MOUSE
Definition: cursor.h:94
@ TOP_RIGHT_CORNER
Definition: cursor.h:120
@ CENTER_PTR
Definition: cursor.h:63
@ SPIDER
Definition: cursor.h:113
@ UMBRELLA
Definition: cursor.h:125
@ LEFT_SIDE
Definition: cursor.h:87
@ RTL_LOGO
Definition: cursor.h:103
@ DRAPED_BOX
Definition: cursor.h:76
@ HAND2
Definition: cursor.h:82
@ PIRATE
Definition: cursor.h:96
@ TOP_SIDE
Definition: cursor.h:121
@ SAILBOAT
Definition: cursor.h:104
@ CURSOR_IS_PIXMAP
Definition: cursor.h:131
@ X_CURSOR
Definition: cursor.h:52
@ TARGET
Definition: cursor.h:116
@ BOTTOM_RIGHT_CORNER
Definition: cursor.h:59
@ SHUTTLE
Definition: cursor.h:111
@ CROSS
Definition: cursor.h:67
@ QUESTION_ARROW
Definition: cursor.h:98
@ SPRAYCAN
Definition: cursor.h:114
@ IRON_CROSS
Definition: cursor.h:85
@ TOP_LEFT_ARROW
Definition: cursor.h:118
@ GOBBLER
Definition: cursor.h:79
@ ICON
Definition: cursor.h:84
@ HEART
Definition: cursor.h:83
@ BLANK_CURSOR
Definition: cursor.h:130
@ PLUS
Definition: cursor.h:97
@ FLEUR
Definition: cursor.h:78
@ DOT
Definition: cursor.h:71
@ XTERM
Definition: cursor.h:128
@ SB_V_DOUBLE_ARROW
Definition: cursor.h:110
@ DRAFT_SMALL
Definition: cursor.h:75
@ LEFT_PTR
Definition: cursor.h:86
@ CLOCK
Definition: cursor.h:65
@ TCROSS
Definition: cursor.h:117
@ RIGHT_SIDE
Definition: cursor.h:100
@ TOP_LEFT_CORNER
Definition: cursor.h:119
@ DOUBLE_ARROW
Definition: cursor.h:73
@ BOTTOM_TEE
Definition: cursor.h:61
GtkImageIconNameData name
Definition: gtkimage.h:6
GtkImagePixbufData pixbuf
Definition: gtkimage.h:2
Definition: lobject.h:100