libgnomecanvasmm
line.h
Go to the documentation of this file.
1// -*- c++ -*-
2// Generated by gtkmmproc -- DO NOT MODIFY!
3#ifndef _LIBGNOMECANVASMM_LINE_H
4#define _LIBGNOMECANVASMM_LINE_H
5
6
7#include <glibmm.h>
8
9/* $Id: line.hg,v 1.12 2004/05/02 10:32:35 murrayc Exp $ */
10
11/* line.h
12 *
13 * Copyright (C) 1998 EMC Capital Management Inc.
14 * Developed by Havoc Pennington <hp@pobox.com>
15 *
16 * Copyright (C) 1999 The Gtk-- Development Team
17 *
18 * This library is free software; you can redistribute it and/or
19 * modify it under the terms of the GNU Lesser General Public
20 * License as published by the Free Software Foundation; either
21 * version 2.1 of the License, or (at your option) any later version.
22 *
23 * This library is distributed in the hope that it will be useful,
24 * but WITHOUT ANY WARRANTY; without even the implied warranty of
25 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
26 * Lesser General Public License for more details.
27 *
28 * You should have received a copy of the GNU Lesser General Public
29 * License along with this library; if not, write to the Free
30 * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
31 */
32
34#include <libgnomecanvas/gnome-canvas-line.h>
35#include <libgnomecanvas/gnome-canvas-util.h>
36#include <libgnomecanvas/libgnomecanvas.h>
37#include <vector>
38
39
40#ifndef DOXYGEN_SHOULD_SKIP_THIS
41typedef struct _GnomeCanvasLine GnomeCanvasLine;
42typedef struct _GnomeCanvasLineClass GnomeCanvasLineClass;
43#endif /* DOXYGEN_SHOULD_SKIP_THIS */
44
45
46namespace Gnome
47{
48
49namespace Canvas
50{ class Line_Class; } // namespace Canvas
51
52} // namespace Gnome
53namespace Gnome
54{
55
56namespace Canvas
57{
58
59class GnomeGroup;
60
61// Sample use of Gnome_CanvasPoints :
62
63// Gnome_CanvasPoints points;
64//
65// points.push_back(Art::Point(0, 0));
66// points.push_back(Art::Point(100,0));
67// points.push_back(Art::Point(0,100));
68// points.push_back(Art::Point(100,100));
69//
70// line = new Gnome_CanvasLine(&m_canvasgroup,points);
71
72//using std::vector;
73
78class Points : public std::vector<Art::Point>
79{
80public:
81 Points(size_type nbpoints = 0);
82 explicit Points(GnomeCanvasPoints* castitem);
84
85#ifndef DOXYGEN_SHOULD_SKIP_THIS
86 typedef GnomeCanvasPoints BaseObjectType; //So that this works with tempaltes that are intended for normal BoxedTypes.
87#endif /* DOXYGEN_SHOULD_SKIP_THIS */
88
89 operator bool() const;
90 bool is_null() const;
91
92 const GnomeCanvasPoints* gobj() const { return _gobj(); }
93 GnomeCanvasPoints* gobj() { return _gobj(); }
94 static GType get_type () { return GNOME_TYPE_CANVAS_POINTS; }
95
96protected:
97 GnomeCanvasPoints* _gobj() const;
98 mutable GnomeCanvasPoints* points_;
99 mutable bool owned_;
100};
101
102
103class Line : public Item
104{
105 public:
106#ifndef DOXYGEN_SHOULD_SKIP_THIS
107 typedef Line CppObjectType;
108 typedef Line_Class CppClassType;
109 typedef GnomeCanvasLine BaseObjectType;
110 typedef GnomeCanvasLineClass BaseClassType;
111#endif /* DOXYGEN_SHOULD_SKIP_THIS */
112
113 virtual ~Line();
114
115#ifndef DOXYGEN_SHOULD_SKIP_THIS
116
117private:
118 friend class Line_Class;
119 static CppClassType line_class_;
120
121 // noncopyable
122 Line(const Line&);
123 Line& operator=(const Line&);
124
125protected:
126 explicit Line(const Glib::ConstructParams& construct_params);
127 explicit Line(GnomeCanvasLine* castitem);
128
129#endif /* DOXYGEN_SHOULD_SKIP_THIS */
130
131public:
132#ifndef DOXYGEN_SHOULD_SKIP_THIS
133 static GType get_type() G_GNUC_CONST;
134 static GType get_base_type() G_GNUC_CONST;
135#endif
136
138 GnomeCanvasLine* gobj() { return reinterpret_cast<GnomeCanvasLine*>(gobject_); }
139
141 const GnomeCanvasLine* gobj() const { return reinterpret_cast<GnomeCanvasLine*>(gobject_); }
142
143
144public:
145 //C++ methods used to invoke GTK+ virtual functions:
146#ifdef GLIBMM_VFUNCS_ENABLED
147#endif //GLIBMM_VFUNCS_ENABLED
148
149protected:
150 //GTK+ Virtual Functions (override these to change behaviour):
151#ifdef GLIBMM_VFUNCS_ENABLED
152#endif //GLIBMM_VFUNCS_ENABLED
153
154 //Default Signal Handlers::
155#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
156#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
157
158
159private:
160
161public:
162 explicit Line(Group& parent);
163 Line(Group& parent, const Points& points);
164
165 #ifdef GLIBMM_PROPERTIES_ENABLED
172 Glib::PropertyProxy<Points> property_points() ;
173#endif //#GLIBMM_PROPERTIES_ENABLED
174
175#ifdef GLIBMM_PROPERTIES_ENABLED
182 Glib::PropertyProxy_ReadOnly<Points> property_points() const;
183#endif //#GLIBMM_PROPERTIES_ENABLED
184
185 #ifdef GLIBMM_PROPERTIES_ENABLED
192 Glib::PropertyProxy<Glib::ustring> property_fill_color() ;
193#endif //#GLIBMM_PROPERTIES_ENABLED
194
195#ifdef GLIBMM_PROPERTIES_ENABLED
202 Glib::PropertyProxy_ReadOnly<Glib::ustring> property_fill_color() const;
203#endif //#GLIBMM_PROPERTIES_ENABLED
204
205 #ifdef GLIBMM_PROPERTIES_ENABLED
212 Glib::PropertyProxy<Gdk::Color> property_fill_color_gdk() ;
213#endif //#GLIBMM_PROPERTIES_ENABLED
214
215#ifdef GLIBMM_PROPERTIES_ENABLED
222 Glib::PropertyProxy_ReadOnly<Gdk::Color> property_fill_color_gdk() const;
223#endif //#GLIBMM_PROPERTIES_ENABLED
224
225 #ifdef GLIBMM_PROPERTIES_ENABLED
232 Glib::PropertyProxy<guint> property_fill_color_rgba() ;
233#endif //#GLIBMM_PROPERTIES_ENABLED
234
235#ifdef GLIBMM_PROPERTIES_ENABLED
242 Glib::PropertyProxy_ReadOnly<guint> property_fill_color_rgba() const;
243#endif //#GLIBMM_PROPERTIES_ENABLED
244
245 #ifdef GLIBMM_PROPERTIES_ENABLED
252 Glib::PropertyProxy< Glib::RefPtr<Gdk::Bitmap> > property_fill_stipple() ;
253#endif //#GLIBMM_PROPERTIES_ENABLED
254
255#ifdef GLIBMM_PROPERTIES_ENABLED
262 Glib::PropertyProxy_ReadOnly< Glib::RefPtr<Gdk::Bitmap> > property_fill_stipple() const;
263#endif //#GLIBMM_PROPERTIES_ENABLED
264
265 #ifdef GLIBMM_PROPERTIES_ENABLED
272 Glib::PropertyProxy<guint> property_width_pixels() ;
273#endif //#GLIBMM_PROPERTIES_ENABLED
274
275#ifdef GLIBMM_PROPERTIES_ENABLED
282 Glib::PropertyProxy_ReadOnly<guint> property_width_pixels() const;
283#endif //#GLIBMM_PROPERTIES_ENABLED
284
285 #ifdef GLIBMM_PROPERTIES_ENABLED
292 Glib::PropertyProxy<double> property_width_units() ;
293#endif //#GLIBMM_PROPERTIES_ENABLED
294
295#ifdef GLIBMM_PROPERTIES_ENABLED
302 Glib::PropertyProxy_ReadOnly<double> property_width_units() const;
303#endif //#GLIBMM_PROPERTIES_ENABLED
304
305 #ifdef GLIBMM_PROPERTIES_ENABLED
312 Glib::PropertyProxy<Gdk::CapStyle> property_cap_style() ;
313#endif //#GLIBMM_PROPERTIES_ENABLED
314
315#ifdef GLIBMM_PROPERTIES_ENABLED
322 Glib::PropertyProxy_ReadOnly<Gdk::CapStyle> property_cap_style() const;
323#endif //#GLIBMM_PROPERTIES_ENABLED
324
325 #ifdef GLIBMM_PROPERTIES_ENABLED
332 Glib::PropertyProxy<Gdk::JoinStyle> property_join_style() ;
333#endif //#GLIBMM_PROPERTIES_ENABLED
334
335#ifdef GLIBMM_PROPERTIES_ENABLED
342 Glib::PropertyProxy_ReadOnly<Gdk::JoinStyle> property_join_style() const;
343#endif //#GLIBMM_PROPERTIES_ENABLED
344
345 #ifdef GLIBMM_PROPERTIES_ENABLED
352 Glib::PropertyProxy<Gdk::LineStyle> property_line_style() ;
353#endif //#GLIBMM_PROPERTIES_ENABLED
354
355#ifdef GLIBMM_PROPERTIES_ENABLED
362 Glib::PropertyProxy_ReadOnly<Gdk::LineStyle> property_line_style() const;
363#endif //#GLIBMM_PROPERTIES_ENABLED
364
365 #ifdef GLIBMM_PROPERTIES_ENABLED
372 Glib::PropertyProxy<bool> property_first_arrowhead() ;
373#endif //#GLIBMM_PROPERTIES_ENABLED
374
375#ifdef GLIBMM_PROPERTIES_ENABLED
382 Glib::PropertyProxy_ReadOnly<bool> property_first_arrowhead() const;
383#endif //#GLIBMM_PROPERTIES_ENABLED
384
385 #ifdef GLIBMM_PROPERTIES_ENABLED
392 Glib::PropertyProxy<bool> property_last_arrowhead() ;
393#endif //#GLIBMM_PROPERTIES_ENABLED
394
395#ifdef GLIBMM_PROPERTIES_ENABLED
402 Glib::PropertyProxy_ReadOnly<bool> property_last_arrowhead() const;
403#endif //#GLIBMM_PROPERTIES_ENABLED
404
405 #ifdef GLIBMM_PROPERTIES_ENABLED
412 Glib::PropertyProxy<bool> property_smooth() ;
413#endif //#GLIBMM_PROPERTIES_ENABLED
414
415#ifdef GLIBMM_PROPERTIES_ENABLED
422 Glib::PropertyProxy_ReadOnly<bool> property_smooth() const;
423#endif //#GLIBMM_PROPERTIES_ENABLED
424
425 #ifdef GLIBMM_PROPERTIES_ENABLED
432 Glib::PropertyProxy<guint> property_spline_steps() ;
433#endif //#GLIBMM_PROPERTIES_ENABLED
434
435#ifdef GLIBMM_PROPERTIES_ENABLED
442 Glib::PropertyProxy_ReadOnly<guint> property_spline_steps() const;
443#endif //#GLIBMM_PROPERTIES_ENABLED
444
445 #ifdef GLIBMM_PROPERTIES_ENABLED
452 Glib::PropertyProxy<double> property_arrow_shape_a() ;
453#endif //#GLIBMM_PROPERTIES_ENABLED
454
455#ifdef GLIBMM_PROPERTIES_ENABLED
462 Glib::PropertyProxy_ReadOnly<double> property_arrow_shape_a() const;
463#endif //#GLIBMM_PROPERTIES_ENABLED
464
465 #ifdef GLIBMM_PROPERTIES_ENABLED
472 Glib::PropertyProxy<double> property_arrow_shape_b() ;
473#endif //#GLIBMM_PROPERTIES_ENABLED
474
475#ifdef GLIBMM_PROPERTIES_ENABLED
482 Glib::PropertyProxy_ReadOnly<double> property_arrow_shape_b() const;
483#endif //#GLIBMM_PROPERTIES_ENABLED
484
485 #ifdef GLIBMM_PROPERTIES_ENABLED
492 Glib::PropertyProxy<double> property_arrow_shape_c() ;
493#endif //#GLIBMM_PROPERTIES_ENABLED
494
495#ifdef GLIBMM_PROPERTIES_ENABLED
502 Glib::PropertyProxy_ReadOnly<double> property_arrow_shape_c() const;
503#endif //#GLIBMM_PROPERTIES_ENABLED
504
505
506};
507
508} /* namespace Canvas */
509} /* namespace Gnome */
510
511
512#ifndef DOXYGEN_SHOULD_SKIP_THIS
513namespace Glib
514{
515
516template <>
517class Value<Gnome::Canvas::Points> : public Value_Boxed<Gnome::Canvas::Points>
518{
519public:
520 static GType value_type() G_GNUC_CONST;
521};
522
523} // namespace Glib
524#endif /* DOXYGEN_SHOULD_SKIP_THIS */
525
526
527namespace Glib
528{
537 Gnome::Canvas::Line* wrap(GnomeCanvasLine* object, bool take_copy = false);
538} //namespace Glib
539
540
541#endif /* _LIBGNOMECANVASMM_LINE_H */
542
Definition: group.h:60
Definition: item.h:67
Definition: line.h:104
Line(Group &parent)
Glib::PropertyProxy_ReadOnly< bool > property_smooth() const
You rarely need to use properties because there are get_ and set_ methods for almost all of them.
Glib::PropertyProxy< double > property_arrow_shape_b()
You rarely need to use properties because there are get_ and set_ methods for almost all of them.
Glib::PropertyProxy< Gdk::LineStyle > property_line_style()
You rarely need to use properties because there are get_ and set_ methods for almost all of them.
Glib::PropertyProxy< Gdk::Color > property_fill_color_gdk()
You rarely need to use properties because there are get_ and set_ methods for almost all of them.
Glib::PropertyProxy_ReadOnly< bool > property_last_arrowhead() const
You rarely need to use properties because there are get_ and set_ methods for almost all of them.
Glib::PropertyProxy_ReadOnly< Gdk::LineStyle > property_line_style() const
You rarely need to use properties because there are get_ and set_ methods for almost all of them.
GnomeCanvasLine * gobj()
Provides access to the underlying C GtkObject.
Definition: line.h:138
Glib::PropertyProxy_ReadOnly< Gdk::Color > property_fill_color_gdk() const
You rarely need to use properties because there are get_ and set_ methods for almost all of them.
const GnomeCanvasLine * gobj() const
Provides access to the underlying C GtkObject.
Definition: line.h:141
Glib::PropertyProxy< double > property_width_units()
You rarely need to use properties because there are get_ and set_ methods for almost all of them.
Glib::PropertyProxy_ReadOnly< bool > property_first_arrowhead() const
You rarely need to use properties because there are get_ and set_ methods for almost all of them.
Glib::PropertyProxy< Glib::ustring > property_fill_color()
You rarely need to use properties because there are get_ and set_ methods for almost all of them.
Glib::PropertyProxy_ReadOnly< Gdk::CapStyle > property_cap_style() const
You rarely need to use properties because there are get_ and set_ methods for almost all of them.
Glib::PropertyProxy< guint > property_fill_color_rgba()
You rarely need to use properties because there are get_ and set_ methods for almost all of them.
Glib::PropertyProxy< bool > property_smooth()
You rarely need to use properties because there are get_ and set_ methods for almost all of them.
Glib::PropertyProxy_ReadOnly< double > property_arrow_shape_c() const
You rarely need to use properties because there are get_ and set_ methods for almost all of them.
Glib::PropertyProxy_ReadOnly< guint > property_width_pixels() const
You rarely need to use properties because there are get_ and set_ methods for almost all of them.
Glib::PropertyProxy< Points > property_points()
You rarely need to use properties because there are get_ and set_ methods for almost all of them.
Glib::PropertyProxy< Gdk::CapStyle > property_cap_style()
You rarely need to use properties because there are get_ and set_ methods for almost all of them.
Glib::PropertyProxy< bool > property_last_arrowhead()
You rarely need to use properties because there are get_ and set_ methods for almost all of them.
Glib::PropertyProxy_ReadOnly< double > property_arrow_shape_b() const
You rarely need to use properties because there are get_ and set_ methods for almost all of them.
Glib::PropertyProxy_ReadOnly< double > property_width_units() const
You rarely need to use properties because there are get_ and set_ methods for almost all of them.
Glib::PropertyProxy< double > property_arrow_shape_c()
You rarely need to use properties because there are get_ and set_ methods for almost all of them.
Glib::PropertyProxy_ReadOnly< Gdk::JoinStyle > property_join_style() const
You rarely need to use properties because there are get_ and set_ methods for almost all of them.
Glib::PropertyProxy_ReadOnly< Glib::ustring > property_fill_color() const
You rarely need to use properties because there are get_ and set_ methods for almost all of them.
Glib::PropertyProxy_ReadOnly< Points > property_points() const
You rarely need to use properties because there are get_ and set_ methods for almost all of them.
Glib::PropertyProxy_ReadOnly< Glib::RefPtr< Gdk::Bitmap > > property_fill_stipple() const
You rarely need to use properties because there are get_ and set_ methods for almost all of them.
Glib::PropertyProxy_ReadOnly< guint > property_fill_color_rgba() const
You rarely need to use properties because there are get_ and set_ methods for almost all of them.
Glib::PropertyProxy_ReadOnly< double > property_arrow_shape_a() const
You rarely need to use properties because there are get_ and set_ methods for almost all of them.
Glib::PropertyProxy< guint > property_spline_steps()
You rarely need to use properties because there are get_ and set_ methods for almost all of them.
Glib::PropertyProxy< Gdk::JoinStyle > property_join_style()
You rarely need to use properties because there are get_ and set_ methods for almost all of them.
Glib::PropertyProxy< Glib::RefPtr< Gdk::Bitmap > > property_fill_stipple()
You rarely need to use properties because there are get_ and set_ methods for almost all of them.
Gnome::Canvas::Line * wrap(GnomeCanvasLine *object, bool take_copy=false)
A Glib::wrap() method for this object.
Glib::PropertyProxy< bool > property_first_arrowhead()
You rarely need to use properties because there are get_ and set_ methods for almost all of them.
Line(Group &parent, const Points &points)
Glib::PropertyProxy< double > property_arrow_shape_a()
You rarely need to use properties because there are get_ and set_ methods for almost all of them.
Glib::PropertyProxy_ReadOnly< guint > property_spline_steps() const
You rarely need to use properties because there are get_ and set_ methods for almost all of them.
Glib::PropertyProxy< guint > property_width_pixels()
You rarely need to use properties because there are get_ and set_ methods for almost all of them.
Wrapper for GnomeCanvasPoints.
Definition: line.h:79
Points(GnomeCanvasPoints *castitem)
GnomeCanvasPoints * points_
Definition: line.h:98
bool is_null() const
GnomeCanvasPoints * _gobj() const
bool owned_
Definition: line.h:99
const GnomeCanvasPoints * gobj() const
Definition: line.h:92
GnomeCanvasPoints * gobj()
Definition: line.h:93
Points(size_type nbpoints=0)
static GType get_type()
Definition: line.h:94
Definition: bpath.h:150
Definition: affinetrans.h:30