Removed gtkmm.h usage.
[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 <vector>
35
36
37 #ifndef DOXYGEN_SHOULD_SKIP_THIS
38 typedef struct _GnomeCanvasSimpleLine GnomeCanvasSimpleLine;
39 typedef struct _GnomeCanvasSimpleLineClass GnomeCanvasSimpleLineClass;
40 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
41
42
43 namespace Gnome
44 {
45
46 namespace Canvas
47 { class SimpleLine_Class; } // namespace Canvas
48
49 } // namespace Gnome
50 namespace Gnome
51 {
52
53 namespace Canvas
54 {
55
56 class GnomeGroup;
57
58 class SimpleLine : public Item
59 {
60   public:
61 #ifndef DOXYGEN_SHOULD_SKIP_THIS
62   typedef SimpleLine CppObjectType;
63   typedef SimpleLine_Class CppClassType;
64   typedef GnomeCanvasSimpleLine BaseObjectType;
65   typedef GnomeCanvasSimpleLineClass BaseClassType;
66 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
67
68   virtual ~SimpleLine();
69
70 #ifndef DOXYGEN_SHOULD_SKIP_THIS
71
72 private:
73   friend class SimpleLine_Class;
74   static CppClassType line_class_;
75
76   // noncopyable
77   SimpleLine(const SimpleLine&);
78   SimpleLine& operator=(const SimpleLine&);
79
80 protected:
81   explicit SimpleLine(const Glib::ConstructParams& construct_params);
82   explicit SimpleLine(GnomeCanvasSimpleLine* castitem);
83
84 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
85
86 public:
87 #ifndef DOXYGEN_SHOULD_SKIP_THIS
88   static GType get_type()      G_GNUC_CONST;
89   static GType get_base_type() G_GNUC_CONST;
90 #endif
91
92   ///Provides access to the underlying C GtkObject.
93   GnomeCanvasSimpleLine*       gobj()       { return reinterpret_cast<GnomeCanvasSimpleLine*>(gobject_); }
94
95   ///Provides access to the underlying C GtkObject.
96   const GnomeCanvasSimpleLine* gobj() const { return reinterpret_cast<GnomeCanvasSimpleLine*>(gobject_); }
97
98
99 public:
100   //C++ methods used to invoke GTK+ virtual functions:
101
102 protected:
103   //GTK+ Virtual Functions (override these to change behaviour):
104
105   //Default Signal Handlers::
106
107
108 private:
109
110 public:
111   explicit SimpleLine(Group& parent);
112   SimpleLine(Group& parent, double x1, double y1, double x2, double y2);
113
114   /** 
115    *
116    * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
117    * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
118    * the value of the property changes.
119    */
120   Glib::PropertyProxy<double> property_x1() ;
121
122 /** 
123    *
124    * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
125    * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
126    * the value of the property changes.
127    */
128   Glib::PropertyProxy_ReadOnly<double> property_x1() const;
129
130   /** 
131    *
132    * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
133    * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
134    * the value of the property changes.
135    */
136   Glib::PropertyProxy<double> property_x2() ;
137
138 /** 
139    *
140    * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
141    * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
142    * the value of the property changes.
143    */
144   Glib::PropertyProxy_ReadOnly<double> property_x2() const;
145
146
147   /** 
148    *
149    * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
150    * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
151    * the value of the property changes.
152    */
153   Glib::PropertyProxy<double> property_y1() ;
154
155 /** 
156    *
157    * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
158    * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
159    * the value of the property changes.
160    */
161   Glib::PropertyProxy_ReadOnly<double> property_y1() const;
162
163   /** 
164    *
165    * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
166    * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
167    * the value of the property changes.
168    */
169   Glib::PropertyProxy<double> property_y2() ;
170
171 /** 
172    *
173    * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
174    * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
175    * the value of the property changes.
176    */
177   Glib::PropertyProxy_ReadOnly<double> property_y2() const;
178
179   /** 
180    *
181    * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
182    * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
183    * the value of the property changes.
184    */
185   Glib::PropertyProxy<guint> property_color_rgba() ;
186
187 /** 
188    *
189    * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
190    * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
191    * the value of the property changes.
192    */
193   Glib::PropertyProxy_ReadOnly<guint> property_color_rgba() const;
194 };
195
196 } /* namespace Canvas */
197 } /* namespace Gnome */
198
199
200 namespace Glib
201 {
202   /** @relates Gnome::Canvas::SimpleLine
203    * @param object The C instance
204    * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
205    * @result A C++ instance that wraps this C instance.
206    */
207   Gnome::Canvas::SimpleLine* wrap(GnomeCanvasSimpleLine* object, bool take_copy = false);
208 }
209 #endif /* _LIBGNOMECANVASMM_LINE_H */
210