line.h

Go to the documentation of this file.
00001 // -*- c++ -*-
00002 // Generated by gtkmmproc -- DO NOT MODIFY!
00003 #ifndef _LIBGNOMECANVASMM_LINE_H
00004 #define _LIBGNOMECANVASMM_LINE_H
00005 
00006 
00007 #include <glibmm.h>
00008 
00009 /* $Id: line.hg,v 1.12 2004/05/02 10:32:35 murrayc Exp $ */
00010 
00011 /* line.h
00012  * 
00013  * Copyright (C) 1998 EMC Capital Management Inc.
00014  * Developed by Havoc Pennington <hp@pobox.com>
00015  *
00016  * Copyright (C) 1999 The Gtk-- Development Team
00017  *
00018  * This library is free software; you can redistribute it and/or
00019  * modify it under the terms of the GNU Library General Public
00020  * License as published by the Free Software Foundation; either
00021  * version 2 of the License, or (at your option) any later version.
00022  *
00023  * This library is distributed in the hope that it will be useful,
00024  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00025  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00026  * Library General Public License for more details.
00027  *
00028  * You should have received a copy of the GNU Library General Public
00029  * License along with this library; if not, write to the Free
00030  * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00031  */
00032 
00033 #include <libgnomecanvasmm/item.h>
00034 #include <libgnomecanvas/gnome-canvas-line.h>
00035 #include <libgnomecanvas/gnome-canvas-util.h>
00036 #include <libgnomecanvas/libgnomecanvas.h>
00037 #include <vector>
00038 
00039 
00040 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00041 typedef struct _GnomeCanvasLine GnomeCanvasLine;
00042 typedef struct _GnomeCanvasLineClass GnomeCanvasLineClass;
00043 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
00044 
00045 
00046 namespace Gnome
00047 {
00048 
00049 namespace Canvas
00050 { class Line_Class; } // namespace Canvas
00051 
00052 } // namespace Gnome
00053 namespace Gnome
00054 {
00055 
00056 namespace Canvas
00057 {
00058 
00059 class GnomeGroup;
00060 
00061 // Sample use of Gnome_CanvasPoints :
00062 
00063 //   Gnome_CanvasPoints points;
00064 //  
00065 //   points.push_back(Art::Point(0, 0));
00066 //   points.push_back(Art::Point(100,0));
00067 //   points.push_back(Art::Point(0,100));
00068 //   points.push_back(Art::Point(100,100));
00069 //
00070 //   line = new Gnome_CanvasLine(&m_canvasgroup,points);
00071 
00072 //using std::vector;
00073 
00078 class Points : public std::vector<Art::Point>
00079 {
00080 public:
00081   Points(size_type nbpoints = 0);
00082   explicit Points(GnomeCanvasPoints* castitem);
00083   ~Points();
00084 
00085 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00086   typedef  GnomeCanvasPoints BaseObjectType;  //So that this works with tempaltes that are intended for normal BoxedTypes.
00087 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
00088 
00089   operator bool() const;
00090   bool is_null() const;
00091 
00092   const GnomeCanvasPoints* gobj() const { return _gobj(); }
00093   GnomeCanvasPoints* gobj() { return _gobj(); }
00094   static GType get_type () { return GNOME_TYPE_CANVAS_POINTS; }
00095 
00096 protected:
00097   GnomeCanvasPoints* _gobj() const;
00098   mutable GnomeCanvasPoints* points_;
00099   mutable bool owned_;
00100 };
00101 
00102 
00103 class Line : public Item
00104 {
00105   public:
00106 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00107   typedef Line CppObjectType;
00108   typedef Line_Class CppClassType;
00109   typedef GnomeCanvasLine BaseObjectType;
00110   typedef GnomeCanvasLineClass BaseClassType;
00111 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
00112 
00113   virtual ~Line();
00114 
00115 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00116 
00117 private:
00118   friend class Line_Class;
00119   static CppClassType line_class_;
00120 
00121   // noncopyable
00122   Line(const Line&);
00123   Line& operator=(const Line&);
00124 
00125 protected:
00126   explicit Line(const Glib::ConstructParams& construct_params);
00127   explicit Line(GnomeCanvasLine* castitem);
00128 
00129 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
00130 
00131 public:
00132 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00133   static GType get_type()      G_GNUC_CONST;
00134   static GType get_base_type() G_GNUC_CONST;
00135 #endif
00136 
00138   GnomeCanvasLine*       gobj()       { return reinterpret_cast<GnomeCanvasLine*>(gobject_); }
00139 
00141   const GnomeCanvasLine* gobj() const { return reinterpret_cast<GnomeCanvasLine*>(gobject_); }
00142 
00143 
00144 public:
00145   //C++ methods used to invoke GTK+ virtual functions:
00146 
00147 protected:
00148   //GTK+ Virtual Functions (override these to change behaviour):
00149 
00150   //Default Signal Handlers::
00151 
00152 
00153 private:
00154 
00155 public:
00156   explicit Line(Group& parent);
00157   Line(Group& parent, const Points& points);
00158 
00165   Glib::PropertyProxy<Points> property_points() ;
00166 
00173   Glib::PropertyProxy_ReadOnly<Points> property_points() const;
00174 
00181   Glib::PropertyProxy<Glib::ustring> property_fill_color() ;
00182 
00189   Glib::PropertyProxy_ReadOnly<Glib::ustring> property_fill_color() const;
00190 
00197   Glib::PropertyProxy<Gdk::Color> property_fill_color_gdk() ;
00198 
00205   Glib::PropertyProxy_ReadOnly<Gdk::Color> property_fill_color_gdk() const;
00206 
00213   Glib::PropertyProxy<guint> property_fill_color_rgba() ;
00214 
00221   Glib::PropertyProxy_ReadOnly<guint> property_fill_color_rgba() const;
00222 
00229   Glib::PropertyProxy< Glib::RefPtr<Gdk::Bitmap> > property_fill_stipple() ;
00230 
00237   Glib::PropertyProxy_ReadOnly< Glib::RefPtr<Gdk::Bitmap> > property_fill_stipple() const;
00238 
00245   Glib::PropertyProxy<guint> property_width_pixels() ;
00246 
00253   Glib::PropertyProxy_ReadOnly<guint> property_width_pixels() const;
00254 
00261   Glib::PropertyProxy<double> property_width_units() ;
00262 
00269   Glib::PropertyProxy_ReadOnly<double> property_width_units() const;
00270 
00277   Glib::PropertyProxy<Gdk::CapStyle> property_cap_style() ;
00278 
00285   Glib::PropertyProxy_ReadOnly<Gdk::CapStyle> property_cap_style() const;
00286 
00293   Glib::PropertyProxy<Gdk::JoinStyle> property_join_style() ;
00294 
00301   Glib::PropertyProxy_ReadOnly<Gdk::JoinStyle> property_join_style() const;
00302 
00309   Glib::PropertyProxy<Gdk::LineStyle> property_line_style() ;
00310 
00317   Glib::PropertyProxy_ReadOnly<Gdk::LineStyle> property_line_style() const;
00318 
00325   Glib::PropertyProxy<bool> property_first_arrowhead() ;
00326 
00333   Glib::PropertyProxy_ReadOnly<bool> property_first_arrowhead() const;
00334 
00341   Glib::PropertyProxy<bool> property_last_arrowhead() ;
00342 
00349   Glib::PropertyProxy_ReadOnly<bool> property_last_arrowhead() const;
00350 
00357   Glib::PropertyProxy<bool> property_smooth() ;
00358 
00365   Glib::PropertyProxy_ReadOnly<bool> property_smooth() const;
00366 
00373   Glib::PropertyProxy<guint> property_spline_steps() ;
00374 
00381   Glib::PropertyProxy_ReadOnly<guint> property_spline_steps() const;
00382 
00389   Glib::PropertyProxy<double> property_arrow_shape_a() ;
00390 
00397   Glib::PropertyProxy_ReadOnly<double> property_arrow_shape_a() const;
00398 
00405   Glib::PropertyProxy<double> property_arrow_shape_b() ;
00406 
00413   Glib::PropertyProxy_ReadOnly<double> property_arrow_shape_b() const;
00414 
00421   Glib::PropertyProxy<double> property_arrow_shape_c() ;
00422 
00429   Glib::PropertyProxy_ReadOnly<double> property_arrow_shape_c() const;
00430 
00431 
00432 };
00433 
00434 } /* namespace Canvas */
00435 } /* namespace Gnome */
00436 
00437 
00438 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00439 namespace Glib
00440 {
00441 
00442 template <>
00443 class Value<Gnome::Canvas::Points> : public Value_Boxed<Gnome::Canvas::Points>
00444 {
00445 public:
00446   static GType value_type() G_GNUC_CONST;
00447 };
00448 
00449 } // namespace Glib
00450 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
00451 
00452 
00453 namespace Glib
00454 {
00460   Gnome::Canvas::Line* wrap(GnomeCanvasLine* object, bool take_copy = false);
00461 } //namespace Glib
00462 
00463 
00464 #endif /* _LIBGNOMECANVASMM_LINE_H */
00465 

Generated on Mon Jun 12 17:41:55 2006 for libgnomecanvasmm by  doxygen 1.4.6