style.h

Go to the documentation of this file.
00001 // -*- c++ -*-
00002 // Generated by gtkmmproc -- DO NOT MODIFY!
00003 #ifndef _GOOCANVASMM_STYLE_H
00004 #define _GOOCANVASMM_STYLE_H
00005 
00006 
00007 #include <glibmm.h>
00008 
00009 
00010 /* Copyright (C) 1998-2006 The gtkmm Development Team
00011  *
00012  * This library is free software; you can redistribute it and/or
00013  * modify it under the terms of the GNU Library General Public
00014  * License as published by the Free Software Foundation; either
00015  * version 2 of the License, or (at your option) any later version.
00016  *
00017  * This library is distributed in the hope that it will be useful,
00018  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00019  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00020  * Library General Public License for more details.
00021  *
00022  * You should have received a copy of the GNU Library General Public
00023  * License along with this library; if not, write to the Free
00024  * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00025  */
00026 
00027 #include <glibmm/object.h>
00028 #include <cairomm/context.h>
00029 #include <cairomm/refptr.h>
00030 
00031 #include <goocanvasstyle.h>
00032 
00033 
00034 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00035 typedef struct _GooCanvasStyle GooCanvasStyle;
00036 typedef struct _GooCanvasStyleClass GooCanvasStyleClass;
00037 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
00038 
00039 
00040 namespace Goocanvas
00041 { class Style_Class; } // namespace Goocanvas
00042 namespace Goocanvas
00043 {
00044 
00045 
00046 class Style : public Glib::Object
00047 {
00048   
00049 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00050 
00051 public:
00052   typedef Style CppObjectType;
00053   typedef Style_Class CppClassType;
00054   typedef GooCanvasStyle BaseObjectType;
00055   typedef GooCanvasStyleClass BaseClassType;
00056 
00057 private:  friend class Style_Class;
00058   static CppClassType style_class_;
00059 
00060 private:
00061   // noncopyable
00062   Style(const Style&);
00063   Style& operator=(const Style&);
00064 
00065 protected:
00066   explicit Style(const Glib::ConstructParams& construct_params);
00067   explicit Style(GooCanvasStyle* castitem);
00068 
00069 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
00070 
00071 public:
00072   virtual ~Style();
00073 
00074 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00075   static GType get_type()      G_GNUC_CONST;
00076   static GType get_base_type() G_GNUC_CONST;
00077 #endif
00078 
00080   GooCanvasStyle*       gobj()       { return reinterpret_cast<GooCanvasStyle*>(gobject_); }
00081 
00083   const GooCanvasStyle* gobj() const { return reinterpret_cast<GooCanvasStyle*>(gobject_); }
00084 
00086   GooCanvasStyle* gobj_copy();
00087 
00088 private:
00089 
00090 protected:
00091   Style();
00092 
00093 public:
00094   
00095   static Glib::RefPtr<Style> create();
00096 
00097   
00098   template<typename PropertyType>
00099   void get_property(GQuark property_id, PropertyType& value) const;
00100   
00101 
00102   template<typename PropertyType>
00103   void set_property(GQuark property_id, const PropertyType& value);
00104   
00105 
00110   Glib::RefPtr<Style> copy() const;
00111   
00115   Glib::RefPtr<Style> get_parent() const;
00116   
00120   void set_parent(const Glib::RefPtr<Style>& style);
00121   
00127   bool set_stroke_options(const Cairo::RefPtr<Cairo::Context>& context);
00128   
00134   bool set_fill_options(const Cairo::RefPtr<Cairo::Context>& context);
00135 
00136 
00137 public:
00138 
00139 public:
00140   //C++ methods used to invoke GTK+ virtual functions:
00141 #ifdef GLIBMM_VFUNCS_ENABLED
00142 #endif //GLIBMM_VFUNCS_ENABLED
00143 
00144 protected:
00145   //GTK+ Virtual Functions (override these to change behaviour):
00146 #ifdef GLIBMM_VFUNCS_ENABLED
00147 #endif //GLIBMM_VFUNCS_ENABLED
00148 
00149   //Default Signal Handlers::
00150 #ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
00151 #endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
00152 
00153 
00154 };
00155 
00156 template<typename PropertyType> inline
00157 void Style::get_property(GQuark property_id, PropertyType& value) const
00158 {
00159   Glib::Value<PropertyType> property_value(goo_canvas_style_get_property(const_cast<GooCanvasStyle*>(gobj()), property_id));
00160   value = property_value.get();
00161 }
00162 
00163 template<typename PropertyType> inline
00164 void Style::set_property(GQuark property_id, const PropertyType& value)
00165 {
00166   Glib::Value<PropertyType> property_value;
00167   property_value.init(Glib::Value<PropertyType>::value_type());
00168   property_value.set(value);
00169   goo_canvas_style_set_property(gobj(), property_id, property_value.gobj());
00170 }
00171 
00172 }
00173 
00174 
00175 namespace Glib
00176 {
00185   Glib::RefPtr<Goocanvas::Style> wrap(GooCanvasStyle* object, bool take_copy = false);
00186 }
00187 
00188 
00189 #endif /* _GOOCANVASMM_STYLE_H */
00190 

Generated on Mon Jul 14 03:48:48 2008 for goocanvasmm by  doxygen 1.5.6