00001
00002
00003 #ifndef _LIBGNOMECANVASMM_LINE_H
00004 #define _LIBGNOMECANVASMM_LINE_H
00005
00006 #include <glibmm.h>
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032 #include <libgnomecanvasmm/item.h>
00033 #include <libgnomecanvas/gnome-canvas-line.h>
00034 #include <libgnomecanvas/gnome-canvas-util.h>
00035 #include <libgnomecanvas/libgnomecanvas.h>
00036 #include <vector>
00037
00038
00039 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00040 typedef struct _GnomeCanvasLine GnomeCanvasLine;
00041 typedef struct _GnomeCanvasLineClass GnomeCanvasLineClass;
00042 #endif
00043
00044
00045 namespace Gnome
00046 {
00047
00048 namespace Canvas
00049 { class Line_Class; }
00050
00051 }
00052 namespace Gnome
00053 {
00054
00055 namespace Canvas
00056 {
00057
00058 class GnomeGroup;
00059
00060
00061
00062
00063
00064
00065
00066
00067
00068
00069
00070
00071
00072
00077 class Points : public std::vector<Art::Point>
00078 {
00079 public:
00080 Points(size_type nbpoints = 0);
00081 explicit Points(GnomeCanvasPoints* castitem);
00082 ~Points();
00083
00084 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00085 typedef GnomeCanvasPoints BaseObjectType;
00086 #endif
00087
00088 operator bool() const;
00089 bool is_null() const;
00090
00091 const GnomeCanvasPoints* gobj() const { return _gobj(); }
00092 GnomeCanvasPoints* gobj() { return _gobj(); }
00093 static GType get_type () { return GNOME_TYPE_CANVAS_POINTS; }
00094
00095 protected:
00096 GnomeCanvasPoints* _gobj() const;
00097 mutable GnomeCanvasPoints* points_;
00098 mutable bool owned_;
00099 };
00100
00101
00102 class Line : public Item
00103 {
00104 public:
00105 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00106 typedef Line CppObjectType;
00107 typedef Line_Class CppClassType;
00108 typedef GnomeCanvasLine BaseObjectType;
00109 typedef GnomeCanvasLineClass BaseClassType;
00110 #endif
00111
00112 virtual ~Line();
00113
00114 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00115
00116 private:
00117 friend class Line_Class;
00118 static CppClassType line_class_;
00119
00120
00121 Line(const Line&);
00122 Line& operator=(const Line&);
00123
00124 protected:
00125 explicit Line(const Glib::ConstructParams& construct_params);
00126 explicit Line(GnomeCanvasLine* castitem);
00127
00128 #endif
00129
00130 public:
00131 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00132 static GType get_type() G_GNUC_CONST;
00133 static GType get_base_type() G_GNUC_CONST;
00134 #endif
00135
00137 GnomeCanvasLine* gobj() { return reinterpret_cast<GnomeCanvasLine*>(gobject_); }
00138
00140 const GnomeCanvasLine* gobj() const { return reinterpret_cast<GnomeCanvasLine*>(gobject_); }
00141
00142
00143 public:
00144
00145
00146 protected:
00147
00148
00149
00150
00151
00152 private:
00153
00154 public:
00155 explicit Line(Group& parent);
00156 Line(Group& parent, const Points& points);
00157
00164 Glib::PropertyProxy<Points> property_points() ;
00165
00172 Glib::PropertyProxy_ReadOnly<Points> property_points() const;
00173
00180 Glib::PropertyProxy<Glib::ustring> property_fill_color() ;
00181
00188 Glib::PropertyProxy_ReadOnly<Glib::ustring> property_fill_color() const;
00189
00196 Glib::PropertyProxy<Gdk::Color> property_fill_color_gdk() ;
00197
00204 Glib::PropertyProxy_ReadOnly<Gdk::Color> property_fill_color_gdk() const;
00205
00212 Glib::PropertyProxy<guint> property_fill_color_rgba() ;
00213
00220 Glib::PropertyProxy_ReadOnly<guint> property_fill_color_rgba() const;
00221
00228 Glib::PropertyProxy< Glib::RefPtr<Gdk::Bitmap> > property_fill_stipple() ;
00229
00236 Glib::PropertyProxy_ReadOnly< Glib::RefPtr<Gdk::Bitmap> > property_fill_stipple() const;
00237
00244 Glib::PropertyProxy<guint> property_width_pixels() ;
00245
00252 Glib::PropertyProxy_ReadOnly<guint> property_width_pixels() const;
00253
00260 Glib::PropertyProxy<double> property_width_units() ;
00261
00268 Glib::PropertyProxy_ReadOnly<double> property_width_units() const;
00269
00276 Glib::PropertyProxy<Gdk::CapStyle> property_cap_style() ;
00277
00284 Glib::PropertyProxy_ReadOnly<Gdk::CapStyle> property_cap_style() const;
00285
00292 Glib::PropertyProxy<Gdk::JoinStyle> property_join_style() ;
00293
00300 Glib::PropertyProxy_ReadOnly<Gdk::JoinStyle> property_join_style() const;
00301
00308 Glib::PropertyProxy<Gdk::LineStyle> property_line_style() ;
00309
00316 Glib::PropertyProxy_ReadOnly<Gdk::LineStyle> property_line_style() const;
00317
00324 Glib::PropertyProxy<bool> property_first_arrowhead() ;
00325
00332 Glib::PropertyProxy_ReadOnly<bool> property_first_arrowhead() const;
00333
00340 Glib::PropertyProxy<bool> property_last_arrowhead() ;
00341
00348 Glib::PropertyProxy_ReadOnly<bool> property_last_arrowhead() const;
00349
00356 Glib::PropertyProxy<bool> property_smooth() ;
00357
00364 Glib::PropertyProxy_ReadOnly<bool> property_smooth() const;
00365
00372 Glib::PropertyProxy<guint> property_spline_steps() ;
00373
00380 Glib::PropertyProxy_ReadOnly<guint> property_spline_steps() const;
00381
00388 Glib::PropertyProxy<double> property_arrow_shape_a() ;
00389
00396 Glib::PropertyProxy_ReadOnly<double> property_arrow_shape_a() const;
00397
00404 Glib::PropertyProxy<double> property_arrow_shape_b() ;
00405
00412 Glib::PropertyProxy_ReadOnly<double> property_arrow_shape_b() const;
00413
00420 Glib::PropertyProxy<double> property_arrow_shape_c() ;
00421
00428 Glib::PropertyProxy_ReadOnly<double> property_arrow_shape_c() const;
00429
00430
00431 };
00432
00433 }
00434 }
00435
00436
00437 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00438 namespace Glib
00439 {
00440
00441 template <>
00442 class Value<Gnome::Canvas::Points> : public Value_Boxed<Gnome::Canvas::Points>
00443 {
00444 public:
00445 static GType value_type() G_GNUC_CONST;
00446 };
00447
00448 }
00449 #endif
00450
00451 namespace Glib
00452 {
00458 Gnome::Canvas::Line* wrap(GnomeCanvasLine* object, bool take_copy = false);
00459 }
00460 #endif
00461