more miscellaneous fixes to make things even nicer
[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 /* $Id$ */
8
9 /* rect.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 <libgnomecanvasmm/group.h>
33 #include <libgnomecanvasmm/shape.h>
34 #include "canvas-simplerect.h"
35
36
37 #ifndef DOXYGEN_SHOULD_SKIP_THIS
38 typedef struct _GnomeCanvasSimpleRect GnomeCanvasSimpleRect;
39 typedef struct _GnomeCanvasSimpleRectClass GnomeCanvasSimpleRectClass;
40 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
41
42
43 namespace Gnome
44 {
45
46 namespace Canvas
47 { class SimpleRect_Class; } // namespace Canvas
48
49 } // namespace Gnome
50 namespace Gnome
51 {
52
53 namespace Canvas
54 {
55
56 //class Group;
57
58
59 class SimpleRect : public Item
60 {
61   public:
62 #ifndef DOXYGEN_SHOULD_SKIP_THIS
63   typedef SimpleRect CppObjectType;
64   typedef SimpleRect_Class CppClassType;
65   typedef GnomeCanvasSimpleRect BaseObjectType;
66   typedef GnomeCanvasSimpleRectClass BaseClassType;
67 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
68
69   virtual ~SimpleRect();
70
71 #ifndef DOXYGEN_SHOULD_SKIP_THIS
72
73 private:
74   friend class SimpleRect_Class;
75   static CppClassType rect_class_;
76
77   // noncopyable
78   SimpleRect(const SimpleRect&);
79   SimpleRect& operator=(const SimpleRect&);
80
81 protected:
82   explicit SimpleRect(const Glib::ConstructParams& construct_params);
83   explicit SimpleRect(GnomeCanvasSimpleRect* castitem);
84
85 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
86
87 public:
88 #ifndef DOXYGEN_SHOULD_SKIP_THIS
89   static GType get_type()      G_GNUC_CONST;
90   static GType get_base_type() G_GNUC_CONST;
91 #endif
92
93   ///Provides access to the underlying C GtkObject.
94   GnomeCanvasSimpleRect*       gobj()       { return reinterpret_cast<GnomeCanvasSimpleRect*>(gobject_); }
95
96   ///Provides access to the underlying C GtkObject.
97   const GnomeCanvasSimpleRect* gobj() const { return reinterpret_cast<GnomeCanvasSimpleRect*>(gobject_); }
98
99
100 public:
101   //C++ methods used to invoke GTK+ virtual functions:
102
103 protected:
104   //GTK+ Virtual Functions (override these to change behaviour):
105
106   //Default Signal Handlers::
107
108
109 private:
110
111
112 public:
113     SimpleRect(Group& parent, double x1, double y1, double x2, double y2);
114     explicit SimpleRect(Group& parent);
115
116     Glib::PropertyProxy<double> property_x1();
117     Glib::PropertyProxy_ReadOnly<double> property_x1() const;
118     Glib::PropertyProxy<double> property_y1();
119     Glib::PropertyProxy_ReadOnly<double> property_y1() const;
120     Glib::PropertyProxy<double> property_x2();
121     Glib::PropertyProxy_ReadOnly<double> property_x2() const;
122     Glib::PropertyProxy<double> property_y2();
123     Glib::PropertyProxy_ReadOnly<double> property_y2() const;
124     Glib::PropertyProxy<guint> property_outline_pixels();
125     Glib::PropertyProxy_ReadOnly<guint> property_outline_pixels() const;
126     Glib::PropertyProxy<guint> property_outline_what();
127     Glib::PropertyProxy_ReadOnly<guint> property_outline_what() const;
128     Glib::PropertyProxy<bool> property_fill();
129     Glib::PropertyProxy_ReadOnly<bool> property_fill() const;
130     Glib::PropertyProxy<guint> property_fill_color_rgba();
131     Glib::PropertyProxy_ReadOnly<guint> property_fill_color_rgba() const;
132     Glib::PropertyProxy<guint> property_outline_color_rgba();
133     Glib::PropertyProxy_ReadOnly<guint> property_outline_color_rgba() const;
134     Glib::PropertyProxy<bool> property_draw();
135     Glib::PropertyProxy_ReadOnly<bool> property_draw() const;
136
137 };
138
139 } /* namespace Canvas */
140 } /* namespace Gnome */
141
142 namespace Glib
143 {
144   /** @relates Gnome::Canvas::SimpleRect
145    * @param object The C instance
146    * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
147    * @result A C++ instance that wraps this C instance.
148    */
149   Gnome::Canvas::SimpleRect* wrap(GnomeCanvasSimpleRect* object, bool take_copy = false);
150 }
151 #endif /* _LIBGNOMECANVASMM_RECT_H */
152