r269@gandalf: fugalh | 2006-08-03 20:18:05 -0600
[ardour.git] / gtk2_ardour / simpleline.h
1 // -*- c++ -*-
2 #ifndef _LIBGNOMECANVASMM_SIMPLELINE_H
3 #define _LIBGNOMECANVASMM_SIMPLELINE_H
4
5 #include <glibmm.h>
6
7 /* $Id$ */
8
9 /* line.h
10  * 
11  * Copyright (C) 1998 EMC Capital Management Inc.
12  * Developed by Havoc Pennington <hp@pobox.com>
13  *
14  * Copyright (C) 1999 The Gtk-- Development Team
15  *
16  * This library is free software; you can redistribute it and/or
17  * modify it under the terms of the GNU Library General Public
18  * License as published by the Free Software Foundation; either
19  * version 2 of the License, or (at your option) any later version.
20  *
21  * This library is distributed in the hope that it will be useful,
22  * but WITHOUT ANY WARRANTY; without even the implied warranty of
23  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
24  * Library General Public License for more details.
25  *
26  * You should have received a copy of the GNU Library General Public
27  * License along with this library; if not, write to the Free
28  * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
29  */
30
31 #include <libgnomecanvasmm/item.h>
32 #include <libgnomecanvas/gnome-canvas-util.h>
33 #include <libgnomecanvas/libgnomecanvas.h>
34 #include "canvas-simpleline.h"
35
36 #ifndef DOXYGEN_SHOULD_SKIP_THIS
37 typedef struct _GnomeCanvasSimpleLine GnomeCanvasSimpleLine;
38 typedef struct _GnomeCanvasSimpleLineClass GnomeCanvasSimpleLineClass;
39 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
40
41
42 namespace Gnome
43 {
44
45 namespace Canvas
46 { class SimpleLine_Class; } // namespace Canvas
47
48 } // namespace Gnome
49 namespace Gnome
50 {
51
52 namespace Canvas
53 {
54
55 class GnomeGroup;
56
57 class SimpleLine : public Item
58 {
59   public:
60 #ifndef DOXYGEN_SHOULD_SKIP_THIS
61   typedef SimpleLine CppObjectType;
62   typedef SimpleLine_Class CppClassType;
63   typedef GnomeCanvasSimpleLine BaseObjectType;
64   typedef GnomeCanvasSimpleLineClass BaseClassType;
65 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
66
67   virtual ~SimpleLine();
68
69 #ifndef DOXYGEN_SHOULD_SKIP_THIS
70
71 private:
72   friend class SimpleLine_Class;
73   static CppClassType line_class_;
74
75   // noncopyable
76   SimpleLine(const SimpleLine&);
77   SimpleLine& operator=(const SimpleLine&);
78
79 protected:
80   explicit SimpleLine(const Glib::ConstructParams& construct_params);
81   explicit SimpleLine(GnomeCanvasSimpleLine* castitem);
82
83 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
84
85 public:
86 #ifndef DOXYGEN_SHOULD_SKIP_THIS
87   static GType get_type()      G_GNUC_CONST;
88   static GType get_base_type() G_GNUC_CONST;
89 #endif
90
91   ///Provides access to the underlying C GtkObject.
92   GnomeCanvasSimpleLine*       gobj()       { return reinterpret_cast<GnomeCanvasSimpleLine*>(gobject_); }
93
94   ///Provides access to the underlying C GtkObject.
95   const GnomeCanvasSimpleLine* gobj() const { return reinterpret_cast<GnomeCanvasSimpleLine*>(gobject_); }
96
97
98 public:
99   //C++ methods used to invoke GTK+ virtual functions:
100
101 protected:
102   //GTK+ Virtual Functions (override these to change behaviour):
103
104   //Default Signal Handlers::
105
106
107 private:
108
109 public:
110   explicit SimpleLine(Group& parent);
111   SimpleLine(Group& parent, double x1, double y1, double x2, double y2);
112
113   /** 
114    *
115    * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
116    * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
117    * the value of the property changes.
118    */
119   Glib::PropertyProxy<double> property_x1() ;
120
121 /** 
122    *
123    * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
124    * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
125    * the value of the property changes.
126    */
127   Glib::PropertyProxy_ReadOnly<double> property_x1() const;
128
129   /** 
130    *
131    * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
132    * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
133    * the value of the property changes.
134    */
135   Glib::PropertyProxy<double> property_x2() ;
136
137 /** 
138    *
139    * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
140    * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
141    * the value of the property changes.
142    */
143   Glib::PropertyProxy_ReadOnly<double> property_x2() const;
144
145
146   /** 
147    *
148    * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
149    * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
150    * the value of the property changes.
151    */
152   Glib::PropertyProxy<double> property_y1() ;
153
154 /** 
155    *
156    * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
157    * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
158    * the value of the property changes.
159    */
160   Glib::PropertyProxy_ReadOnly<double> property_y1() const;
161
162   /** 
163    *
164    * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
165    * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
166    * the value of the property changes.
167    */
168   Glib::PropertyProxy<double> property_y2() ;
169
170 /** 
171    *
172    * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
173    * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
174    * the value of the property changes.
175    */
176   Glib::PropertyProxy_ReadOnly<double> property_y2() const;
177
178   /** 
179    *
180    * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
181    * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
182    * the value of the property changes.
183    */
184   Glib::PropertyProxy<guint> property_color_rgba() ;
185
186 /** 
187    *
188    * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
189    * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
190    * the value of the property changes.
191    */
192   Glib::PropertyProxy_ReadOnly<guint> property_color_rgba() const;
193 };
194
195 } /* namespace Canvas */
196 } /* namespace Gnome */
197
198
199 namespace Glib
200 {
201   /** @relates Gnome::Canvas::SimpleLine
202    * @param object The C instance
203    * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
204    * @result A C++ instance that wraps this C instance.
205    */
206   Gnome::Canvas::SimpleLine* wrap(GnomeCanvasSimpleLine* object, bool take_copy = false);
207 }
208 #endif /* _LIBGNOMECANVASMM_LINE_H */
209