fix load+save of plugin parameter automation
[ardour.git] / gtk2_ardour / simplerect.h
1 // -*- c++ -*-
2 #ifndef _LIBGNOMECANVASMM_SIMPLERECT_H
3 #define _LIBGNOMECANVASMM_SIMPLERECT_H
4
5 #include <glibmm.h>
6
7
8 /* rect.h
9  *
10  * Copyright (C) 1998 EMC Capital Management Inc.
11  * Developed by Havoc Pennington <hp@pobox.com>
12  *
13  * Copyright (C) 1999 The Gtk-- Development Team
14  *
15  * This library is free software; you can redistribute it and/or
16  * modify it under the terms of the GNU Library General Public
17  * License as published by the Free Software Foundation; either
18  * version 2 of the License, or (at your option) any later version.
19  *
20  * This library is distributed in the hope that it will be useful,
21  * but WITHOUT ANY WARRANTY; without even the implied warranty of
22  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
23  * Library General Public License for more details.
24  *
25  * You should have received a copy of the GNU Library General Public
26  * License along with this library; if not, write to the Free
27  * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
28  */
29
30 #include <libgnomecanvasmm/item.h>
31 #include <libgnomecanvasmm/group.h>
32 #include <libgnomecanvasmm/shape.h>
33 #include "canvas-simplerect.h"
34
35
36 #ifndef DOXYGEN_SHOULD_SKIP_THIS
37 typedef struct _GnomeCanvasSimpleRect GnomeCanvasSimpleRect;
38 typedef struct _GnomeCanvasSimpleRectClass GnomeCanvasSimpleRectClass;
39 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
40
41
42 namespace Gnome
43 {
44
45 namespace Canvas
46 { class SimpleRect_Class; } // namespace Canvas
47
48 } // namespace Gnome
49 namespace Gnome
50 {
51
52 namespace Canvas
53 {
54
55 //class Group;
56
57
58 class SimpleRect : public Item
59 {
60   public:
61 #ifndef DOXYGEN_SHOULD_SKIP_THIS
62   typedef SimpleRect CppObjectType;
63   typedef SimpleRect_Class CppClassType;
64   typedef GnomeCanvasSimpleRect BaseObjectType;
65   typedef GnomeCanvasSimpleRectClass BaseClassType;
66 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
67
68   virtual ~SimpleRect();
69
70 #ifndef DOXYGEN_SHOULD_SKIP_THIS
71
72 private:
73   friend class SimpleRect_Class;
74   static CppClassType rect_class_;
75
76   // noncopyable
77   SimpleRect(const SimpleRect&);
78   SimpleRect& operator=(const SimpleRect&);
79
80 protected:
81   explicit SimpleRect(const Glib::ConstructParams& construct_params);
82   explicit SimpleRect(GnomeCanvasSimpleRect* 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   GnomeCanvasSimpleRect*       gobj()       { return reinterpret_cast<GnomeCanvasSimpleRect*>(gobject_); }
94
95   ///Provides access to the underlying C GtkObject.
96   const GnomeCanvasSimpleRect* gobj() const { return reinterpret_cast<GnomeCanvasSimpleRect*>(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
111 public:
112     SimpleRect(Group& parent, double x1, double y1, double x2, double y2);
113     explicit SimpleRect(Group& parent);
114
115     Glib::PropertyProxy<double> property_x1();
116     Glib::PropertyProxy_ReadOnly<double> property_x1() const;
117     Glib::PropertyProxy<double> property_y1();
118     Glib::PropertyProxy_ReadOnly<double> property_y1() const;
119     Glib::PropertyProxy<double> property_x2();
120     Glib::PropertyProxy_ReadOnly<double> property_x2() const;
121     Glib::PropertyProxy<double> property_y2();
122     Glib::PropertyProxy_ReadOnly<double> property_y2() const;
123     Glib::PropertyProxy<guint> property_outline_pixels();
124     Glib::PropertyProxy_ReadOnly<guint> property_outline_pixels() const;
125     Glib::PropertyProxy<guint> property_outline_what();
126     Glib::PropertyProxy_ReadOnly<guint> property_outline_what() const;
127     Glib::PropertyProxy<bool> property_fill();
128     Glib::PropertyProxy_ReadOnly<bool> property_fill() const;
129     Glib::PropertyProxy<guint> property_fill_color_rgba();
130     Glib::PropertyProxy_ReadOnly<guint> property_fill_color_rgba() const;
131     Glib::PropertyProxy<guint> property_outline_color_rgba();
132     Glib::PropertyProxy_ReadOnly<guint> property_outline_color_rgba() const;
133     Glib::PropertyProxy<bool> property_draw();
134     Glib::PropertyProxy_ReadOnly<bool> property_draw() const;
135
136 };
137
138 } /* namespace Canvas */
139 } /* namespace Gnome */
140
141 namespace Glib
142 {
143   /** @relates Gnome::Canvas::SimpleRect
144    * @param object The C instance
145    * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
146    * @result A C++ instance that wraps this C instance.
147    */
148   Gnome::Canvas::SimpleRect* wrap(GnomeCanvasSimpleRect* object, bool take_copy = false);
149 }
150 #endif /* _LIBGNOMECANVASMM_RECT_H */
151