00001
00002
00003 #ifndef _GOOCANVASMM_POINTS_H
00004 #define _GOOCANVASMM_POINTS_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 <glibmm/object.h>
00027 #include <goocanvaspolyline.h>
00028
00029
00030 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00031 extern "C" { typedef struct _GooCanvasPoints GooCanvasPoints; }
00032 #endif
00033
00034 namespace Goocanvas
00035 {
00036
00037 class Points
00038 {
00039 public:
00040 public:
00041 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00042 typedef Points CppObjectType;
00043 typedef GooCanvasPoints BaseObjectType;
00044
00045 static GType get_type() G_GNUC_CONST;
00046 #endif
00047
00048 Points();
00049
00050 explicit Points(GooCanvasPoints* gobject, bool make_a_copy = true);
00051
00052 Points(const Points& other);
00053 Points& operator=(const Points& other);
00054
00055 ~Points();
00056
00057 void swap(Points& other);
00058
00060 GooCanvasPoints* gobj() { return gobject_; }
00061
00063 const GooCanvasPoints* gobj() const { return gobject_; }
00064
00066 GooCanvasPoints* gobj_copy() const;
00067
00068 protected:
00069 GooCanvasPoints* gobject_;
00070
00071 private:
00072
00073
00074 public:
00075
00076 explicit Points(int num_points);
00077 Points(int num_points, const double* coords);
00078
00079
00080 int get_num_points() const;
00081 void set_coordinate(int index, double x, double y);
00082 void get_coordinate(int index, double& x, double& y) const;
00083
00084
00085 };
00086
00087 }
00088
00089
00090 namespace Goocanvas
00091 {
00092
00097 inline void swap(Points& lhs, Points& rhs)
00098 { lhs.swap(rhs); }
00099
00100 }
00101
00102 namespace Glib
00103 {
00104
00113 Goocanvas::Points wrap(GooCanvasPoints* object, bool take_copy = false);
00114
00115 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00116 template <>
00117 class Value<Goocanvas::Points> : public Glib::Value_Boxed<Goocanvas::Points>
00118 {};
00119 #endif
00120
00121 }
00122
00123
00124 #endif
00125