enums.h
Go to the documentation of this file.00001
00002
00003 #ifndef _GOOCANVASMM_ENUMS_H
00004 #define _GOOCANVASMM_ENUMS_H
00005
00006
00007 #include <glibmm.h>
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026 #include <goocanvasutils.h>
00027
00028 #include <cairomm/enums.h>
00029 #include <cairomm/pattern.h>
00030 #include <cairomm/context.h>
00031
00032
00033 namespace Goocanvas
00034 {
00035
00049 enum PointerEvents
00050 {
00051 EVENTS_VISIBLE_MASK = 1 << 0,
00052 EVENTS_PAINTED_MASK = 1 << 1,
00053 EVENTS_FILL_MASK = 1 << 2,
00054 EVENTS_STROKE_MASK = 1 << 3,
00055 EVENTS_NONE = 0,
00056 EVENTS_VISIBLE_PAINTED = 0x1,
00057 EVENTS_VISIBLE_FILL = 0x1,
00058 EVENTS_VISIBLE_STROKE = 0x1,
00059 EVENTS_VISIBLE = 0x1,
00060 EVENTS_PAINTED = 0x2,
00061 EVENTS_FILL = 0x4,
00062 EVENTS_STROKE = 0x8,
00063 EVENTS_ALL = 0x4
00064 };
00065
00067 inline PointerEvents operator|(PointerEvents lhs, PointerEvents rhs)
00068 { return static_cast<PointerEvents>(static_cast<unsigned>(lhs) | static_cast<unsigned>(rhs)); }
00069
00071 inline PointerEvents operator&(PointerEvents lhs, PointerEvents rhs)
00072 { return static_cast<PointerEvents>(static_cast<unsigned>(lhs) & static_cast<unsigned>(rhs)); }
00073
00075 inline PointerEvents operator^(PointerEvents lhs, PointerEvents rhs)
00076 { return static_cast<PointerEvents>(static_cast<unsigned>(lhs) ^ static_cast<unsigned>(rhs)); }
00077
00079 inline PointerEvents operator~(PointerEvents flags)
00080 { return static_cast<PointerEvents>(~static_cast<unsigned>(flags)); }
00081
00083 inline PointerEvents& operator|=(PointerEvents& lhs, PointerEvents rhs)
00084 { return (lhs = static_cast<PointerEvents>(static_cast<unsigned>(lhs) | static_cast<unsigned>(rhs))); }
00085
00087 inline PointerEvents& operator&=(PointerEvents& lhs, PointerEvents rhs)
00088 { return (lhs = static_cast<PointerEvents>(static_cast<unsigned>(lhs) & static_cast<unsigned>(rhs))); }
00089
00091 inline PointerEvents& operator^=(PointerEvents& lhs, PointerEvents rhs)
00092 { return (lhs = static_cast<PointerEvents>(static_cast<unsigned>(lhs) ^ static_cast<unsigned>(rhs))); }
00093
00094 }
00095
00096
00097 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00098 namespace Glib
00099 {
00100
00101 template <>
00102 class Value<Goocanvas::PointerEvents> : public Glib::Value_Flags<Goocanvas::PointerEvents>
00103 {
00104 public:
00105 static GType value_type() G_GNUC_CONST;
00106 };
00107
00108 }
00109 #endif
00110
00111
00112 namespace Goocanvas
00113 {
00114
00118 enum ItemVisibility
00119 {
00120 ITEM_HIDDEN,
00121 ITEM_INVISIBLE,
00122 ITEM_VISIBLE,
00123 ITEM_VISIBLE_ABOVE_THRESHOLD
00124 };
00125
00126 }
00127
00128
00129 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00130 namespace Glib
00131 {
00132
00133 template <>
00134 class Value<Goocanvas::ItemVisibility> : public Glib::Value_Enum<Goocanvas::ItemVisibility>
00135 {
00136 public:
00137 static GType value_type() G_GNUC_CONST;
00138 };
00139
00140 }
00141 #endif
00142
00143
00144 namespace Goocanvas
00145 {
00146
00150 enum PathCommandType
00151 {
00152 PATH_MOVE_TO,
00153 PATH_CLOSE_PATH,
00154 PATH_LINE_TO,
00155 PATH_HORIZONTAL_LINE_TO,
00156 PATH_VERTICAL_LINE_TO,
00157 PATH_CURVE_TO,
00158 PATH_SMOOTH_CURVE_TO,
00159 PATH_QUADRATIC_CURVE_TO,
00160 PATH_SMOOTH_QUADRATIC_CURVE_TO,
00161 PATH_ELLIPTICAL_ARC
00162 };
00163
00164 }
00165
00166
00167 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00168 namespace Glib
00169 {
00170
00171 template <>
00172 class Value<Goocanvas::PathCommandType> : public Glib::Value_Enum<Goocanvas::PathCommandType>
00173 {
00174 public:
00175 static GType value_type() G_GNUC_CONST;
00176 };
00177
00178 }
00179 #endif
00180
00181
00182 namespace Goocanvas
00183 {
00184
00185
00186 }
00187
00188 namespace Glib
00189 {
00190
00191 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00192
00193
00194
00195 template<>
00196 class Value<Cairo::Pattern> : public Glib::ValueBase_Boxed
00197 {
00198 public:
00199 static GType value_type() G_GNUC_CONST;
00200
00201 void set(const Cairo::Pattern& data) { set_boxed(data.cobj()); }
00202 Cairo::Pattern get() const { return Cairo::Pattern(static_cast<cairo_pattern_t*>(get_boxed())); }
00203 };
00204
00205 template<>
00206 class Value<Cairo::Matrix*> : public Glib::ValueBase_Boxed
00207 {
00208 public:
00209 static GType value_type() G_GNUC_CONST;
00210
00211 void set(const Cairo::Matrix* data) { set_boxed(data); }
00212 Cairo::Matrix* get() const { return static_cast<Cairo::Matrix*>(get_boxed()); }
00213 };
00214
00215 template<>
00216 class Value<Cairo::FillRule> : public Glib::Value_Enum<Cairo::FillRule>
00217 {
00218 public:
00219 static GType value_type() G_GNUC_CONST;
00220 };
00221
00222 template<>
00223 class Value<Cairo::Operator> : public Glib::Value_Enum<Cairo::Operator>
00224 {
00225 public:
00226 static GType value_type() G_GNUC_CONST;
00227 };
00228
00229 template<>
00230 class Value<Cairo::Antialias> : public Glib::Value_Enum<Cairo::Antialias>
00231 {
00232 public:
00233 static GType value_type() G_GNUC_CONST;
00234 };
00235
00236 template<>
00237 class Value<Cairo::LineCap> : public Glib::Value_Enum<Cairo::LineCap>
00238 {
00239 public:
00240 static GType value_type() G_GNUC_CONST;
00241 };
00242
00243 template<>
00244 class Value<Cairo::LineJoin> : public Glib::Value_Enum<Cairo::LineJoin>
00245 {
00246 public:
00247 static GType value_type() G_GNUC_CONST;
00248 };
00249
00250 template<>
00251 class Value<Cairo::HintMetrics> : public Glib::Value_Enum<Cairo::HintMetrics>
00252 {
00253 public:
00254 static GType value_type() G_GNUC_CONST;
00255 };
00256
00257 #endif // DOXYGEN_SHOULD_SKIP_THIS
00258
00259 }
00260
00261
00262 #endif
00263