Guitarix
fastmeter.cc
Go to the documentation of this file.
1 // Generated by gtkmmproc -- DO NOT MODIFY!
2 
3 
4 #include <glibmm.h>
5 
6 #include <gxwmm/fastmeter.h>
7 #include <gxwmm/private/fastmeter_p.h>
8 
9 
10 /*
11  * Copyright (C) 2009, 2010 Hermann Meyer, James Warden, Andreas Degert
12  *
13  * This program is free software; you can redistribute it and/or modify
14  * it under the terms of the GNU General Public License as published by
15  * the Free Software Foundation; either version 2 of the License, or
16  * (at your option) any later version.
17  *
18  * This program 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
21  * GNU General Public License for more details.
22  *
23  * You should have received a copy of the GNU General Public License
24  * along with this program; if not, write to the Free Software
25  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
26  */
27 
28 #include <gxw/GxFastMeter.h>
29 
30 namespace
31 {
32 } // anonymous namespace
33 
34 
35 namespace Glib
36 {
37 
38 Gxw::FastMeter* wrap(GxFastMeter* object, bool take_copy)
39 {
40  return dynamic_cast<Gxw::FastMeter *> (Glib::wrap_auto ((GObject*)(object), take_copy));
41 }
42 
43 } /* namespace Glib */
44 
45 namespace Gxw
46 {
47 
48 
49 /* The *_Class implementation: */
50 
51 const Glib::Class& FastMeter_Class::init()
52 {
53  if(!gtype_) // create the GType if necessary
54  {
55  // Glib::Class has to know the class init function to clone custom types.
56  class_init_func_ = &FastMeter_Class::class_init_function;
57 
58  // This is actually just optimized away, apparently with no harm.
59  // Make sure that the parent type has been created.
60  //CppClassParent::CppObjectType::get_type();
61 
62  // Create the wrapper type, with the same class/instance size as the base type.
63  register_derived_type(gx_fast_meter_get_type());
64 
65  // Add derived versions of interfaces, if the C type implements any interfaces:
66 
67  }
68 
69  return *this;
70 }
71 
72 
73 void FastMeter_Class::class_init_function(void* g_class, void* class_data)
74 {
75  BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
76  CppClassParent::class_init_function(klass, class_data);
77 
78 
79 }
80 
81 
82 Glib::ObjectBase* FastMeter_Class::wrap_new(GObject* o)
83 {
84  return manage(new FastMeter((GxFastMeter*)(o)));
85 
86 }
87 
88 
89 /* The implementation: */
90 
91 FastMeter::FastMeter(const Glib::ConstructParams& construct_params)
92 :
93  Gtk::DrawingArea(construct_params)
94 {
95  }
96 
98 :
99  Gtk::DrawingArea((GtkDrawingArea*)(castitem))
100 {
101  }
102 
104 {
105  destroy_();
106 }
107 
108 FastMeter::CppClassType FastMeter::fastmeter_class_; // initialize static member
109 
111 {
112  return fastmeter_class_.init().get_type();
113 }
114 
115 
117 {
118  return gx_fast_meter_get_type();
119 }
120 
121 
123 :
124  // Mark this class as non-derived to allow C++ vfuncs to be skipped.
125  Glib::ObjectBase(0),
126  Gtk::DrawingArea(Glib::ConstructParams(fastmeter_class_.init()))
127 {
128 
129 
130 }
131 
132 void FastMeter::set(double lvl)
133 {
134  gx_fast_meter_set(gobj(), lvl);
135 }
136 
137 void FastMeter::set_by_power(double lvl)
138 {
139  gx_fast_meter_set_by_power(gobj(), lvl);
140 }
141 
142 void FastMeter::set_c_level(double lvl)
143 {
144  gx_fast_meter_set_c_level(gobj(), lvl);
145 }
146 
148 {
149  gx_fast_meter_clear(gobj());
150 }
151 
153 {
154  gx_fast_meter_set_hold_count(gobj(), val);
155 }
156 
157 
158 #ifdef GLIBMM_PROPERTIES_ENABLED
159 Glib::PropertyProxy< int > FastMeter::property_hold()
160 {
161  return Glib::PropertyProxy< int >(this, "hold");
162 }
163 #endif //GLIBMM_PROPERTIES_ENABLED
164 
165 #ifdef GLIBMM_PROPERTIES_ENABLED
166 Glib::PropertyProxy_ReadOnly< int > FastMeter::property_hold() const
167 {
168  return Glib::PropertyProxy_ReadOnly< int >(this, "hold");
169 }
170 #endif //GLIBMM_PROPERTIES_ENABLED
171 
172 #ifdef GLIBMM_PROPERTIES_ENABLED
173 Glib::PropertyProxy< int > FastMeter::property_dimen()
174 {
175  return Glib::PropertyProxy< int >(this, "dimen");
176 }
177 #endif //GLIBMM_PROPERTIES_ENABLED
178 
179 #ifdef GLIBMM_PROPERTIES_ENABLED
180 Glib::PropertyProxy_ReadOnly< int > FastMeter::property_dimen() const
181 {
182  return Glib::PropertyProxy_ReadOnly< int >(this, "dimen");
183 }
184 #endif //GLIBMM_PROPERTIES_ENABLED
185 
186 #ifdef GLIBMM_PROPERTIES_ENABLED
187 Glib::PropertyProxy< Glib::ustring > FastMeter::property_var_id()
188 {
189  return Glib::PropertyProxy< Glib::ustring >(this, "var-id");
190 }
191 #endif //GLIBMM_PROPERTIES_ENABLED
192 
193 #ifdef GLIBMM_PROPERTIES_ENABLED
194 Glib::PropertyProxy_ReadOnly< Glib::ustring > FastMeter::property_var_id() const
195 {
196  return Glib::PropertyProxy_ReadOnly< Glib::ustring >(this, "var-id");
197 }
198 #endif //GLIBMM_PROPERTIES_ENABLED
199 
200 
201 } // namespace Gxw
202 
203 
Glib
Definition: bigknob.cc:41
GxFastMeter
struct _GxFastMeter GxFastMeter
Definition: fastmeter.h:32
Gxw::FastMeter::FastMeter
FastMeter()
Definition: fastmeter.cc:122
cabinet_impulse_former::init
void init(int samplingFreq)
Definition: cabinet_impulse_former.cc:37
Gxw::FastMeter::set
void set(double lvl)
Definition: fastmeter.cc:132
Gxw::FastMeter::gobj
GxFastMeter * gobj()
Provides access to the underlying C GtkObject.
Definition: fastmeter.h:78
gx_fast_meter_get_type
GType gx_fast_meter_get_type(void)
Gxw
Definition: bigknob.cc:51
Gxw::FastMeter::get_base_type
static GType get_base_type() G_GNUC_CONST
Definition: fastmeter.cc:116
Glib::wrap
Gxw::BigKnob * wrap(GxBigKnob *object, bool take_copy)
Definition: bigknob.cc:44
Gxw::FastMeter::~FastMeter
virtual ~FastMeter()
Definition: fastmeter.cc:103
Gxw::FastMeter::set_hold_count
void set_hold_count(int val)
Definition: fastmeter.cc:152
Gxw::FastMeter::set_by_power
void set_by_power(double lvl)
Definition: fastmeter.cc:137
Gxw::FastMeter_Class::wrap_new
static Glib::ObjectBase * wrap_new(GObject *)
Definition: fastmeter.cc:82
Gxw::FastMeter::set_c_level
void set_c_level(double lvl)
Definition: fastmeter.cc:142
Gxw::FastMeter_Class
Definition: wrap_init.cc:88
Gxw::FastMeter
Definition: fastmeter.h:42
Gxw::FastMeter::clear
void clear()
Definition: fastmeter.cc:147
Gxw::FastMeter::get_type
static GType get_type() G_GNUC_CONST
Definition: fastmeter.cc:110