Guitarix
switch.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/switch.h>
7 #include <gxwmm/private/switch_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/GxSwitch.h>
29 
30 Gxw::Switch::Switch(const Glib::ustring& base_name):
31  // Mark this class as non-derived to allow C++ vfuncs to be skipped.
32  Glib::ObjectBase(0),
33  Gtk::ToggleButton(Glib::ConstructParams(switch_class_.init(), "base_name",base_name.c_str(), static_cast<char*>(0)))
34 {}
35 
36 namespace
37 {
38 } // anonymous namespace
39 
40 
41 namespace Glib
42 {
43 
44 Gxw::Switch* wrap(GxSwitch* object, bool take_copy)
45 {
46  return dynamic_cast<Gxw::Switch *> (Glib::wrap_auto ((GObject*)(object), take_copy));
47 }
48 
49 } /* namespace Glib */
50 
51 namespace Gxw
52 {
53 
54 
55 /* The *_Class implementation: */
56 
57 const Glib::Class& Switch_Class::init()
58 {
59  if(!gtype_) // create the GType if necessary
60  {
61  // Glib::Class has to know the class init function to clone custom types.
62  class_init_func_ = &Switch_Class::class_init_function;
63 
64  // This is actually just optimized away, apparently with no harm.
65  // Make sure that the parent type has been created.
66  //CppClassParent::CppObjectType::get_type();
67 
68  // Create the wrapper type, with the same class/instance size as the base type.
69  register_derived_type(gx_switch_get_type());
70 
71  // Add derived versions of interfaces, if the C type implements any interfaces:
73 
74  }
75 
76  return *this;
77 }
78 
79 
80 void Switch_Class::class_init_function(void* g_class, void* class_data)
81 {
82  BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
83  CppClassParent::class_init_function(klass, class_data);
84 
85 
86 }
87 
88 
89 Glib::ObjectBase* Switch_Class::wrap_new(GObject* o)
90 {
91  return manage(new Switch((GxSwitch*)(o)));
92 
93 }
94 
95 
96 /* The implementation: */
97 
98 Switch::Switch(const Glib::ConstructParams& construct_params)
99 :
100  Gtk::ToggleButton(construct_params)
101 {
102  }
103 
105 :
106  Gtk::ToggleButton((GtkToggleButton*)(castitem))
107 {
108  }
109 
111 {
112  destroy_();
113 }
114 
115 Switch::CppClassType Switch::switch_class_; // initialize static member
116 
118 {
119  return switch_class_.init().get_type();
120 }
121 
122 
124 {
125  return gx_switch_get_type();
126 }
127 
128 
130 :
131  // Mark this class as non-derived to allow C++ vfuncs to be skipped.
132  Glib::ObjectBase(0),
133  Gtk::ToggleButton(Glib::ConstructParams(switch_class_.init()))
134 {
135 
136 
137 }
138 
139 void Switch::set_label_ref(Gtk::Label* p1)
140 {
141  gx_switch_set_label_ref(gobj(), (GtkLabel*)Glib::unwrap(p1));
142 }
143 
145 {
146  return Glib::wrap(gx_switch_get_label_ref(gobj()));
147 }
148 
149 void Switch::set_base_name(const Glib::ustring& p1)
150 {
151  gx_switch_set_base_name(gobj(), p1.c_str());
152 }
153 
154 Glib::ustring Switch::get_base_name()
155 {
156  return Glib::convert_const_gchar_ptr_to_ustring(gx_switch_get_base_name(gobj()));
157 }
158 
159 
160 #ifdef GLIBMM_PROPERTIES_ENABLED
161 Glib::PropertyProxy< Glib::ustring > Switch::property_base_name()
162 {
163  return Glib::PropertyProxy< Glib::ustring >(this, "base-name");
164 }
165 #endif //GLIBMM_PROPERTIES_ENABLED
166 
167 #ifdef GLIBMM_PROPERTIES_ENABLED
168 Glib::PropertyProxy_ReadOnly< Glib::ustring > Switch::property_base_name() const
169 {
170  return Glib::PropertyProxy_ReadOnly< Glib::ustring >(this, "base-name");
171 }
172 #endif //GLIBMM_PROPERTIES_ENABLED
173 
174 #ifdef GLIBMM_PROPERTIES_ENABLED
175 Glib::PropertyProxy< Gtk::Label > Switch::property_label_ref()
176 {
177  return Glib::PropertyProxy< Gtk::Label >(this, "label-ref");
178 }
179 #endif //GLIBMM_PROPERTIES_ENABLED
180 
181 #ifdef GLIBMM_PROPERTIES_ENABLED
182 Glib::PropertyProxy_ReadOnly< Gtk::Label > Switch::property_label_ref() const
183 {
184  return Glib::PropertyProxy_ReadOnly< Gtk::Label >(this, "label-ref");
185 }
186 #endif //GLIBMM_PROPERTIES_ENABLED
187 
188 #ifdef GLIBMM_PROPERTIES_ENABLED
189 Glib::PropertyProxy< Glib::ustring > Switch::property_var_id()
190 {
191  return Glib::PropertyProxy< Glib::ustring >(this, "var-id");
192 }
193 #endif //GLIBMM_PROPERTIES_ENABLED
194 
195 #ifdef GLIBMM_PROPERTIES_ENABLED
196 Glib::PropertyProxy_ReadOnly< Glib::ustring > Switch::property_var_id() const
197 {
198  return Glib::PropertyProxy_ReadOnly< Glib::ustring >(this, "var-id");
199 }
200 #endif //GLIBMM_PROPERTIES_ENABLED
201 
202 
203 } // namespace Gxw
204 
205 
Gxw::Switch::get_label_ref
Gtk::Label * get_label_ref()
Definition: switch.cc:144
Glib
Definition: bigknob.cc:41
Gxw::Switch::Switch
Switch()
Definition: switch.cc:129
cabinet_impulse_former::init
void init(int samplingFreq)
Definition: cabinet_impulse_former.cc:37
Gxw::Switch::set_base_name
void set_base_name(const Glib::ustring &p1)
Definition: switch.cc:149
Gxw::Switch::set_label_ref
void set_label_ref(Gtk::Label *p1)
Definition: switch.cc:139
GxSwitch
struct _GxSwitch GxSwitch
Definition: switch.h:34
Gxw::Switch
Definition: switch.h:44
Gxw::ControlParameter::add_interface
static void add_interface(GType gtype_implementer)
Definition: controlparameter.cc:107
Gxw
Definition: bigknob.cc:51
gx_switch_get_type
GType gx_switch_get_type(void)
Glib::wrap
Gxw::BigKnob * wrap(GxBigKnob *object, bool take_copy)
Definition: bigknob.cc:44
Gxw::Switch::~Switch
virtual ~Switch()
Definition: switch.cc:110
Gxw::Switch::gobj
GxSwitch * gobj()
Provides access to the underlying C GtkObject.
Definition: switch.h:80
Gxw::Switch::get_base_name
Glib::ustring get_base_name()
Definition: switch.cc:154
Gxw::Switch_Class::wrap_new
static Glib::ObjectBase * wrap_new(GObject *)
Definition: switch.cc:89
Gxw::Switch::get_base_type
static GType get_base_type() G_GNUC_CONST
Definition: switch.cc:123
Gxw::Switch_Class
Definition: wrap_init.cc:105
Gxw::Switch::get_type
static GType get_type() G_GNUC_CONST
Definition: switch.cc:117
Glib::wrap
Gxw::Switch * wrap(GxSwitch *object, bool take_copy)
Definition: switch.cc:44