1 // -*- c++ -*-
2 // Generated by gtkmmproc -- DO NOT MODIFY!
3 #ifndef _GOOCANVASMM_ENUMS_H
4 #define _GOOCANVASMM_ENUMS_H
5 
6 
7 #include <glibmm/ustring.h>
8 #include <sigc++/sigc++.h>
9 
10 /* Copyright (C) 1998-2006 The gtkmm Development Team
11  *
12  * This library is free software; you can redistribute it and/or
13  * modify it under the terms of the GNU Lesser General Public
14  * License as published by the Free Software Foundation; either
15  * version 2.1 of the License, or (at your option) any later version.
16  *
17  * This library is distributed in the hope that it will be useful,
18  * but WITHOUT ANY WARRANTY; without even the implied warranty of
19  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
20  * Lesser General Public License for more details.
21  *
22  * You should have received a copy of the GNU Lesser General Public
23  * License along with this library; if not, write to the Free
24  * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
25  */
26 
27 #include <goocanvasutils.h>
28 
29 #include <cairomm/enums.h>
30 #include <cairomm/pattern.h>
31 #include <cairomm/context.h> // For Cairo::Matrix
32 #include <glibmm/value.h>
33 
34 
35 namespace Goocanvas
36 {
37 
38 /** @addtogroup goocanvasmmEnums goocanvasmm Enums and Flags */
39 
40 /**
41  *
42  * @ingroup goocanvasmmEnums
43  * @par Bitwise operators:
44  * <tt>%PointerEvents operator|(PointerEvents, PointerEvents)</tt><br>
45  * <tt>%PointerEvents operator&(PointerEvents, PointerEvents)</tt><br>
46  * <tt>%PointerEvents operator^(PointerEvents, PointerEvents)</tt><br>
47  * <tt>%PointerEvents operator~(PointerEvents)</tt><br>
48  * <tt>%PointerEvents& operator|=(PointerEvents&, PointerEvents)</tt><br>
49  * <tt>%PointerEvents& operator&=(PointerEvents&, PointerEvents)</tt><br>
50  * <tt>%PointerEvents& operator^=(PointerEvents&, PointerEvents)</tt><br>
51  */
52 enum PointerEvents
53 {
54   EVENTS_VISIBLE_MASK = 1 << 0,
55   EVENTS_PAINTED_MASK = 1 << 1,
56   EVENTS_FILL_MASK = 1 << 2,
57   EVENTS_STROKE_MASK = 1 << 3,
58   EVENTS_NONE = 0x0,
59   EVENTS_VISIBLE_PAINTED = 0xF,
60   EVENTS_VISIBLE_FILL = 0x5,
61   EVENTS_VISIBLE_STROKE = 0x9,
62   EVENTS_VISIBLE = 0xD,
63   EVENTS_PAINTED = 0xE,
64   EVENTS_FILL = 0x4,
65   EVENTS_STROKE = 0x8,
66   EVENTS_ALL = 0xC
67 };
68 
69 /** @ingroup goocanvasmmEnums */
70 inline PointerEvents operator|(PointerEvents lhs, PointerEvents rhs)
71   { return static_cast<PointerEvents>(static_cast<unsigned>(lhs) | static_cast<unsigned>(rhs)); }
72 
73 /** @ingroup goocanvasmmEnums */
74 inline PointerEvents operator&(PointerEvents lhs, PointerEvents rhs)
75   { return static_cast<PointerEvents>(static_cast<unsigned>(lhs) & static_cast<unsigned>(rhs)); }
76 
77 /** @ingroup goocanvasmmEnums */
78 inline PointerEvents operator^(PointerEvents lhs, PointerEvents rhs)
79   { return static_cast<PointerEvents>(static_cast<unsigned>(lhs) ^ static_cast<unsigned>(rhs)); }
80 
81 /** @ingroup goocanvasmmEnums */
82 inline PointerEvents operator~(PointerEvents flags)
83   { return static_cast<PointerEvents>(~static_cast<unsigned>(flags)); }
84 
85 /** @ingroup goocanvasmmEnums */
86 inline PointerEvents& operator|=(PointerEvents& lhs, PointerEvents rhs)
87   { return (lhs = static_cast<PointerEvents>(static_cast<unsigned>(lhs) | static_cast<unsigned>(rhs))); }
88 
89 /** @ingroup goocanvasmmEnums */
90 inline PointerEvents& operator&=(PointerEvents& lhs, PointerEvents rhs)
91   { return (lhs = static_cast<PointerEvents>(static_cast<unsigned>(lhs) & static_cast<unsigned>(rhs))); }
92 
93 /** @ingroup goocanvasmmEnums */
94 inline PointerEvents& operator^=(PointerEvents& lhs, PointerEvents rhs)
95   { return (lhs = static_cast<PointerEvents>(static_cast<unsigned>(lhs) ^ static_cast<unsigned>(rhs))); }
96 
97 } // namespace Goocanvas
98 
99 
100 #ifndef DOXYGEN_SHOULD_SKIP_THIS
101 namespace Glib
102 {
103 
104 template <>
105 class Value<Goocanvas::PointerEvents> : public Glib::Value_Flags<Goocanvas::PointerEvents>
106 {
107 public:
108   static GType value_type() G_GNUC_CONST;
109 };
110 
111 } // namespace Glib
112 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
113 
114 
115 namespace Goocanvas
116 {
117 
118 /**
119  *
120  * @ingroup goocanvasmmEnums
121  */
122 enum ItemVisibility
123 {
124   ITEM_HIDDEN,
125   ITEM_INVISIBLE,
126   ITEM_VISIBLE,
127   ITEM_VISIBLE_ABOVE_THRESHOLD
128 };
129 
130 } // namespace Goocanvas
131 
132 
133 #ifndef DOXYGEN_SHOULD_SKIP_THIS
134 namespace Glib
135 {
136 
137 template <>
138 class Value<Goocanvas::ItemVisibility> : public Glib::Value_Enum<Goocanvas::ItemVisibility>
139 {
140 public:
141   static GType value_type() G_GNUC_CONST;
142 };
143 
144 } // namespace Glib
145 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
146 
147 
148 namespace Goocanvas
149 {
150 
151 /**
152  *
153  * @ingroup goocanvasmmEnums
154  */
155 enum PathCommandType
156 {
157   PATH_MOVE_TO,
158   PATH_CLOSE_PATH,
159   PATH_LINE_TO,
160   PATH_HORIZONTAL_LINE_TO,
161   PATH_VERTICAL_LINE_TO,
162   PATH_CURVE_TO,
163   PATH_SMOOTH_CURVE_TO,
164   PATH_QUADRATIC_CURVE_TO,
165   PATH_SMOOTH_QUADRATIC_CURVE_TO,
166   PATH_ELLIPTICAL_ARC
167 };
168 
169 } // namespace Goocanvas
170 
171 
172 #ifndef DOXYGEN_SHOULD_SKIP_THIS
173 namespace Glib
174 {
175 
176 template <>
177 class Value<Goocanvas::PathCommandType> : public Glib::Value_Enum<Goocanvas::PathCommandType>
178 {
179 public:
180   static GType value_type() G_GNUC_CONST;
181 };
182 
183 } // namespace Glib
184 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
185 
186 
187 namespace Goocanvas
188 {
189 
190 /**
191  *
192  * @ingroup goocanvasmmEnums
193  */
194 enum AnchorType
195 {
196   ANCHOR_CENTER,
197   ANCHOR_NORTH,
198   ANCHOR_NORTH_WEST,
199   ANCHOR_NORTH_EAST,
200   ANCHOR_SOUTH,
201   ANCHOR_SOUTH_WEST,
202   ANCHOR_SOUTH_EAST,
203   ANCHOR_WEST,
204   ANCHOR_EAST,
205   ANCHOR_N = ANCHOR_NORTH,
206   ANCHOR_NW = ANCHOR_NORTH_WEST,
207   ANCHOR_NE = ANCHOR_NORTH_EAST,
208   ANCHOR_S = ANCHOR_SOUTH,
209   ANCHOR_SW = ANCHOR_SOUTH_WEST,
210   ANCHOR_SE = ANCHOR_SOUTH_EAST,
211   ANCHOR_W = ANCHOR_WEST,
212   ANCHOR_E = ANCHOR_EAST
213 };
214 
215 } // namespace Goocanvas
216 
217 
218 #ifndef DOXYGEN_SHOULD_SKIP_THIS
219 namespace Glib
220 {
221 
222 template <>
223 class Value<Goocanvas::AnchorType> : public Glib::Value_Enum<Goocanvas::AnchorType>
224 {
225 public:
226   static GType value_type() G_GNUC_CONST;
227 };
228 
229 } // namespace Glib
230 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
231 
232 
233 namespace Goocanvas
234 {
235 
236 
237 } //namespace Goocanvas
238 
239 namespace Glib
240 {
241 
242 #ifndef DOXYGEN_SHOULD_SKIP_THIS
243 // Make the cairo enums and structures work with Glib::Value using the
244 // GTypes goocanvas defines for them in goocanvasutil.h
245 
246 template<>
247 class Value<Cairo::Matrix*> : public Glib::ValueBase_Boxed
248 {
249 public:
250   static GType value_type() G_GNUC_CONST;
251 
set(const Cairo::Matrix * data)252   void set(const Cairo::Matrix* data) { set_boxed(data); }
get()253   Cairo::Matrix* get() const { return static_cast<Cairo::Matrix*>(get_boxed()); }
254 };
255 
256 template<>
257 class Value<Cairo::FillRule> : public Glib::Value_Enum<Cairo::FillRule>
258 {
259 public:
260   static GType value_type() G_GNUC_CONST;
261 };
262 
263 template<>
264 class Value<Cairo::Operator> : public Glib::Value_Enum<Cairo::Operator>
265 {
266 public:
267   static GType value_type() G_GNUC_CONST;
268 };
269 
270 template<>
271 class Value<Cairo::Antialias> : public Glib::Value_Enum<Cairo::Antialias>
272 {
273 public:
274   static GType value_type() G_GNUC_CONST;
275 };
276 
277 template<>
278 class Value<Cairo::LineCap> : public Glib::Value_Enum<Cairo::LineCap>
279 {
280 public:
281   static GType value_type() G_GNUC_CONST;
282 };
283 
284 template<>
285 class Value<Cairo::LineJoin> : public Glib::Value_Enum<Cairo::LineJoin>
286 {
287 public:
288   static GType value_type() G_GNUC_CONST;
289 };
290 
291 template<>
292 class Value<Cairo::HintMetrics> : public Glib::Value_Enum<Cairo::HintMetrics>
293 {
294 public:
295   static GType value_type() G_GNUC_CONST;
296 };
297 
298 #endif // DOXYGEN_SHOULD_SKIP_THIS
299 
300 }
301 
302 
303 #endif /* _GOOCANVASMM_ENUMS_H */
304 
305