enums.h

Go to the documentation of this file.
00001 // -*- c++ -*-
00002 // Generated by gtkmmproc -- DO NOT MODIFY!
00003 #ifndef _GOOCANVASMM_ENUMS_H
00004 #define _GOOCANVASMM_ENUMS_H
00005 
00006 
00007 #include <glibmm.h>
00008 
00009 /* Copyright (C) 1998-2006 The gtkmm Development Team
00010  *
00011  * This library is free software; you can redistribute it and/or
00012  * modify it under the terms of the GNU Library General Public
00013  * License as published by the Free Software Foundation; either
00014  * version 2 of the License, or (at your option) any later version.
00015  *
00016  * This library is distributed in the hope that it will be useful,
00017  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00018  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00019  * Library General Public License for more details.
00020  *
00021  * You should have received a copy of the GNU Library General Public
00022  * License along with this library; if not, write to the Free
00023  * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00024  */
00025 
00026 #include <goocanvasutils.h>
00027 
00028 #include <cairomm/enums.h>
00029 #include <cairomm/pattern.h>
00030 #include <cairomm/context.h> // For Cairo::Matrix
00031 
00032 
00033 namespace Goocanvas
00034 {
00035 
00036 //TODO: Somehow make the enum values be ITEM_VISIBLE instead of CANVAS_ITEM_VISIBLE. It seems to just find the first _.
00050 enum PointerEvents
00051 {
00052   CANVAS_EVENTS_VISIBLE_MASK = 1 << 0,
00053   CANVAS_EVENTS_PAINTED_MASK = 1 << 1,
00054   CANVAS_EVENTS_FILL_MASK = 1 << 2,
00055   CANVAS_EVENTS_STROKE_MASK = 1 << 3,
00056   CANVAS_EVENTS_NONE = 0,
00057   CANVAS_EVENTS_VISIBLE_PAINTED = 0x1,
00058   CANVAS_EVENTS_VISIBLE_FILL = 0x1,
00059   CANVAS_EVENTS_VISIBLE_STROKE = 0x1,
00060   CANVAS_EVENTS_VISIBLE = 0x1,
00061   CANVAS_EVENTS_PAINTED = 0x2,
00062   CANVAS_EVENTS_FILL = 0x4,
00063   CANVAS_EVENTS_STROKE = 0x8,
00064   CANVAS_EVENTS_ALL = 0x4
00065 };
00066 
00068 inline PointerEvents operator|(PointerEvents lhs, PointerEvents rhs)
00069   { return static_cast<PointerEvents>(static_cast<unsigned>(lhs) | static_cast<unsigned>(rhs)); }
00070 
00072 inline PointerEvents operator&(PointerEvents lhs, PointerEvents rhs)
00073   { return static_cast<PointerEvents>(static_cast<unsigned>(lhs) & static_cast<unsigned>(rhs)); }
00074 
00076 inline PointerEvents operator^(PointerEvents lhs, PointerEvents rhs)
00077   { return static_cast<PointerEvents>(static_cast<unsigned>(lhs) ^ static_cast<unsigned>(rhs)); }
00078 
00080 inline PointerEvents operator~(PointerEvents flags)
00081   { return static_cast<PointerEvents>(~static_cast<unsigned>(flags)); }
00082 
00084 inline PointerEvents& operator|=(PointerEvents& lhs, PointerEvents rhs)
00085   { return (lhs = static_cast<PointerEvents>(static_cast<unsigned>(lhs) | static_cast<unsigned>(rhs))); }
00086 
00088 inline PointerEvents& operator&=(PointerEvents& lhs, PointerEvents rhs)
00089   { return (lhs = static_cast<PointerEvents>(static_cast<unsigned>(lhs) & static_cast<unsigned>(rhs))); }
00090 
00092 inline PointerEvents& operator^=(PointerEvents& lhs, PointerEvents rhs)
00093   { return (lhs = static_cast<PointerEvents>(static_cast<unsigned>(lhs) ^ static_cast<unsigned>(rhs))); }
00094 
00095 } // namespace Goocanvas
00096 
00097 
00098 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00099 namespace Glib
00100 {
00101 
00102 template <>
00103 class Value<Goocanvas::PointerEvents> : public Glib::Value_Flags<Goocanvas::PointerEvents>
00104 {
00105 public:
00106   static GType value_type() G_GNUC_CONST;
00107 };
00108 
00109 } // namespace Glib
00110 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
00111 
00112 
00113 namespace Goocanvas
00114 {
00115 
00119 enum ItemVisibility
00120 {
00121   CANVAS_ITEM_HIDDEN,
00122   CANVAS_ITEM_INVISIBLE,
00123   CANVAS_ITEM_VISIBLE,
00124   CANVAS_ITEM_VISIBLE_ABOVE_THRESHOLD
00125 };
00126 
00127 } // namespace Goocanvas
00128 
00129 
00130 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00131 namespace Glib
00132 {
00133 
00134 template <>
00135 class Value<Goocanvas::ItemVisibility> : public Glib::Value_Enum<Goocanvas::ItemVisibility>
00136 {
00137 public:
00138   static GType value_type() G_GNUC_CONST;
00139 };
00140 
00141 } // namespace Glib
00142 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
00143 
00144 
00145 namespace Goocanvas
00146 {
00147 
00151 enum PathCommandType
00152 {
00153   CANVAS_PATH_MOVE_TO,
00154   CANVAS_PATH_CLOSE_PATH,
00155   CANVAS_PATH_LINE_TO,
00156   CANVAS_PATH_HORIZONTAL_LINE_TO,
00157   CANVAS_PATH_VERTICAL_LINE_TO,
00158   CANVAS_PATH_CURVE_TO,
00159   CANVAS_PATH_SMOOTH_CURVE_TO,
00160   CANVAS_PATH_QUADRATIC_CURVE_TO,
00161   CANVAS_PATH_SMOOTH_QUADRATIC_CURVE_TO,
00162   CANVAS_PATH_ELLIPTICAL_ARC
00163 };
00164 
00165 } // namespace Goocanvas
00166 
00167 
00168 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00169 namespace Glib
00170 {
00171 
00172 template <>
00173 class Value<Goocanvas::PathCommandType> : public Glib::Value_Enum<Goocanvas::PathCommandType>
00174 {
00175 public:
00176   static GType value_type() G_GNUC_CONST;
00177 };
00178 
00179 } // namespace Glib
00180 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
00181 
00182 
00183 namespace Goocanvas
00184 {
00185 
00186 
00187 } //namespace Goocanvas
00188 
00189 namespace Glib
00190 {
00191 
00192 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00193 // Make the cairo enums and structures work with Glib::Value using the
00194 // GTypes goocanvas defines for them in goocanvasutil.h
00195 
00196 template<>
00197 class Value<Cairo::Pattern> : public Glib::ValueBase_Boxed
00198 {
00199 public:
00200   static GType value_type() G_GNUC_CONST;
00201 
00202   void set(const Cairo::Pattern& data) { set_boxed(data.cobj()); }
00203   Cairo::Pattern get() const { return Cairo::Pattern(static_cast<cairo_pattern_t*>(get_boxed())); }
00204 };
00205 
00206 template<>
00207 class Value<Cairo::Matrix*> : public Glib::ValueBase_Boxed
00208 {
00209 public:
00210   static GType value_type() G_GNUC_CONST;
00211 
00212   void set(const Cairo::Matrix* data) { set_boxed(data); }
00213   Cairo::Matrix* get() const { return static_cast<Cairo::Matrix*>(get_boxed()); }
00214 };
00215 
00216 template<>
00217 class Value<Cairo::FillRule> : public Glib::Value_Enum<Cairo::FillRule>
00218 {
00219 public:
00220   static GType value_type() G_GNUC_CONST;
00221 };
00222 
00223 template<>
00224 class Value<Cairo::Operator> : public Glib::Value_Enum<Cairo::Operator>
00225 {
00226 public:
00227   static GType value_type() G_GNUC_CONST;
00228 };
00229 
00230 template<>
00231 class Value<Cairo::Antialias> : public Glib::Value_Enum<Cairo::Antialias>
00232 {
00233 public:
00234   static GType value_type() G_GNUC_CONST;
00235 };
00236 
00237 template<>
00238 class Value<Cairo::LineCap> : public Glib::Value_Enum<Cairo::LineCap>
00239 {
00240 public:
00241   static GType value_type() G_GNUC_CONST;
00242 };
00243 
00244 template<>
00245 class Value<Cairo::LineJoin> : public Glib::Value_Enum<Cairo::LineJoin>
00246 {
00247 public:
00248   static GType value_type() G_GNUC_CONST;
00249 };
00250 
00251 template<>
00252 class Value<Cairo::HintMetrics> : public Glib::Value_Enum<Cairo::HintMetrics>
00253 {
00254 public:
00255   static GType value_type() G_GNUC_CONST;
00256 };
00257 
00258 #endif // DOXYGEN_SHOULD_SKIP_THIS
00259 
00260 }
00261 
00262 
00263 #endif /* _GOOCANVASMM_ENUMS_H */
00264 

Generated on Wed Sep 3 02:56:11 2008 for goocanvasmm by  doxygen 1.5.6