Install ardour as a binary, a script and a set of shared
[ardour.git] / libs / gtkmm2 / gtk / gtkmm / aspectframe.cc
1 // Generated by gtkmmproc -- DO NOT MODIFY!
2
3 #include <gtkmm/aspectframe.h>
4 #include <gtkmm/private/aspectframe_p.h>
5
6 // -*- c++ -*-
7 /* $Id$ */
8
9 /* 
10  *
11  * Copyright 1998-2002 The gtkmm Development Team
12  *
13  * This library is free software; you can redistribute it and/or
14  * modify it under the terms of the GNU Library General Public
15  * License as published by the Free Software Foundation; either
16  * version 2 of the License, or (at your option) any later version.
17  *
18  * This library is distributed in the hope that it will be useful,
19  * but WITHOUT ANY WARRANTY; without even the implied warranty of
20  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
21  * Library General Public License for more details.
22  *
23  * You should have received a copy of the GNU Library General Public
24  * License along with this library; if not, write to the Free
25  * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
26  */
27
28 #include <gtk/gtkaspectframe.h>
29
30
31 namespace
32 {
33 } // anonymous namespace
34
35
36 namespace Glib
37 {
38
39 Gtk::AspectFrame* wrap(GtkAspectFrame* object, bool take_copy)
40 {
41   return dynamic_cast<Gtk::AspectFrame *> (Glib::wrap_auto ((GObject*)(object), take_copy));
42 }
43
44 } /* namespace Glib */
45
46 namespace Gtk
47 {
48
49
50 /* The *_Class implementation: */
51
52 const Glib::Class& AspectFrame_Class::init()
53 {
54   if(!gtype_) // create the GType if necessary
55   {
56     // Glib::Class has to know the class init function to clone custom types.
57     class_init_func_ = &AspectFrame_Class::class_init_function;
58
59     // This is actually just optimized away, apparently with no harm.
60     // Make sure that the parent type has been created.
61     //CppClassParent::CppObjectType::get_type();
62
63     // Create the wrapper type, with the same class/instance size as the base type.
64     register_derived_type(gtk_aspect_frame_get_type());
65
66     // Add derived versions of interfaces, if the C type implements any interfaces:
67   }
68
69   return *this;
70 }
71
72 void AspectFrame_Class::class_init_function(void* g_class, void* class_data)
73 {
74   BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
75   CppClassParent::class_init_function(klass, class_data);
76
77 }
78
79
80 Glib::ObjectBase* AspectFrame_Class::wrap_new(GObject* o)
81 {
82   return manage(new AspectFrame((GtkAspectFrame*)(o)));
83
84 }
85
86
87 /* The implementation: */
88
89 AspectFrame::AspectFrame(const Glib::ConstructParams& construct_params)
90 :
91   Gtk::Frame(construct_params)
92 {
93   }
94
95 AspectFrame::AspectFrame(GtkAspectFrame* castitem)
96 :
97   Gtk::Frame((GtkFrame*)(castitem))
98 {
99   }
100
101 AspectFrame::~AspectFrame()
102 {
103   destroy_();
104 }
105
106 AspectFrame::CppClassType AspectFrame::aspectframe_class_; // initialize static member
107
108 GType AspectFrame::get_type()
109 {
110   return aspectframe_class_.init().get_type();
111 }
112
113 GType AspectFrame::get_base_type()
114 {
115   return gtk_aspect_frame_get_type();
116 }
117
118
119 AspectFrame::AspectFrame(const Glib::ustring& label, AlignmentEnum xalign, AlignmentEnum yalign, float ratio, bool obey_child)
120 :
121   Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
122   Gtk::Frame(Glib::ConstructParams(aspectframe_class_.init(), "label", label.c_str(), "xalign", _gtkmm_align_float_from_enum(xalign), "yalign", _gtkmm_align_float_from_enum(yalign), "ratio", ratio, "obey_child", static_cast<int>(obey_child), (char*) 0))
123 {
124   }
125
126 AspectFrame::AspectFrame(const Glib::ustring& label, float xalign, float yalign, float ratio, bool obey_child)
127 :
128   Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
129   Gtk::Frame(Glib::ConstructParams(aspectframe_class_.init(), "label", label.c_str(), "xalign", xalign, "yalign", yalign, "ratio", ratio, "obey_child", static_cast<int>(obey_child), (char*) 0))
130 {
131   }
132
133 void AspectFrame::set(float xalign, float yalign, float ratio, bool obey_child)
134 {
135   gtk_aspect_frame_set(gobj(), xalign, yalign, ratio, static_cast<int>(obey_child));
136 }
137
138 void AspectFrame::set(AlignmentEnum xalign, AlignmentEnum yalign, float ratio, bool obey_child)
139 {
140   gtk_aspect_frame_set(gobj(), _gtkmm_align_float_from_enum(xalign), _gtkmm_align_float_from_enum(yalign), ratio, static_cast<int>(obey_child));
141 }
142
143
144 Glib::PropertyProxy<float> AspectFrame::property_xalign() 
145 {
146   return Glib::PropertyProxy<float>(this, "xalign");
147 }
148
149 Glib::PropertyProxy_ReadOnly<float> AspectFrame::property_xalign() const
150 {
151   return Glib::PropertyProxy_ReadOnly<float>(this, "xalign");
152 }
153
154 Glib::PropertyProxy<float> AspectFrame::property_yalign() 
155 {
156   return Glib::PropertyProxy<float>(this, "yalign");
157 }
158
159 Glib::PropertyProxy_ReadOnly<float> AspectFrame::property_yalign() const
160 {
161   return Glib::PropertyProxy_ReadOnly<float>(this, "yalign");
162 }
163
164 Glib::PropertyProxy<float> AspectFrame::property_ratio() 
165 {
166   return Glib::PropertyProxy<float>(this, "ratio");
167 }
168
169 Glib::PropertyProxy_ReadOnly<float> AspectFrame::property_ratio() const
170 {
171   return Glib::PropertyProxy_ReadOnly<float>(this, "ratio");
172 }
173
174 Glib::PropertyProxy<bool> AspectFrame::property_obey_child() 
175 {
176   return Glib::PropertyProxy<bool>(this, "obey-child");
177 }
178
179 Glib::PropertyProxy_ReadOnly<bool> AspectFrame::property_obey_child() const
180 {
181   return Glib::PropertyProxy_ReadOnly<bool>(this, "obey-child");
182 }
183
184
185 } // namespace Gtk
186
187