Guitarix
portdisplay.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/portdisplay.h>
7 #include <gxwmm/private/portdisplay_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/GxPortDisplay.h>
29 
30 Gxw::PortDisplay::PortDisplay(Gtk::Adjustment& adjustment):
31  // Mark this class as non-derived to allow C++ vfuncs to be skipped.
32  Glib::ObjectBase(0),
33  Gxw::VSlider(Glib::ConstructParams(portdisplay_class_.init(), "adjustment",adjustment.gobj(), static_cast<char*>(0)))
34 {}
35 
36 namespace
37 {
38 } // anonymous namespace
39 
40 
41 namespace Glib
42 {
43 
44 Gxw::PortDisplay* wrap(GxPortDisplay* object, bool take_copy)
45 {
46  return dynamic_cast<Gxw::PortDisplay *> (Glib::wrap_auto ((GObject*)(object), take_copy));
47 }
48 
49 } /* namespace Glib */
50 
51 namespace Gxw
52 {
53 
54 void PortDisplay::set_state(int cutoff_low, int cutoff_high)
55 {
56  gx_port_display_set_state(gobj(), cutoff_low, cutoff_high);
57 }
58 
59 
60 /* The *_Class implementation: */
61 
62 const Glib::Class& PortDisplay_Class::init()
63 {
64  if(!gtype_) // create the GType if necessary
65  {
66  // Glib::Class has to know the class init function to clone custom types.
67  class_init_func_ = &PortDisplay_Class::class_init_function;
68 
69  // This is actually just optimized away, apparently with no harm.
70  // Make sure that the parent type has been created.
71  //CppClassParent::CppObjectType::get_type();
72 
73  // Create the wrapper type, with the same class/instance size as the base type.
74  register_derived_type(gx_port_display_get_type());
75 
76  // Add derived versions of interfaces, if the C type implements any interfaces:
77 
78  }
79 
80  return *this;
81 }
82 
83 
84 void PortDisplay_Class::class_init_function(void* g_class, void* class_data)
85 {
86  BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
87  CppClassParent::class_init_function(klass, class_data);
88 
89 
90 }
91 
92 
93 Glib::ObjectBase* PortDisplay_Class::wrap_new(GObject* o)
94 {
95  return manage(new PortDisplay((GxPortDisplay*)(o)));
96 
97 }
98 
99 
100 /* The implementation: */
101 
102 PortDisplay::PortDisplay(const Glib::ConstructParams& construct_params)
103 :
104  Gxw::VSlider(construct_params)
105 {
106  }
107 
109 :
110  Gxw::VSlider((GxVSlider*)(castitem))
111 {
112  }
113 
115 {
116  destroy_();
117 }
118 
119 PortDisplay::CppClassType PortDisplay::portdisplay_class_; // initialize static member
120 
122 {
123  return portdisplay_class_.init().get_type();
124 }
125 
126 
128 {
129  return gx_port_display_get_type();
130 }
131 
132 
134 :
135  // Mark this class as non-derived to allow C++ vfuncs to be skipped.
136  Glib::ObjectBase(0),
137  Gxw::VSlider(Glib::ConstructParams(portdisplay_class_.init()))
138 {
139 
140 
141 }
142 
143 
144 } // namespace Gxw
145 
146 
Glib
Definition: bigknob.cc:41
cabinet_impulse_former::init
void init(int samplingFreq)
Definition: cabinet_impulse_former.cc:37
Glib::wrap
Gxw::PortDisplay * wrap(GxPortDisplay *object, bool take_copy)
Definition: portdisplay.cc:44
Gxw::PortDisplay::gobj
GxPortDisplay * gobj()
Provides access to the underlying C GtkObject.
Definition: portdisplay.h:79
Gxw::PortDisplay::PortDisplay
PortDisplay()
Definition: portdisplay.cc:133
Gxw::PortDisplay
Definition: portdisplay.h:43
gx_port_display_get_type
GType gx_port_display_get_type(void)
Gxw::PortDisplay::get_base_type
static GType get_base_type() G_GNUC_CONST
Definition: portdisplay.cc:127
Gxw::PortDisplay_Class::wrap_new
static Glib::ObjectBase * wrap_new(GObject *)
Definition: portdisplay.cc:93
Gxw
Definition: bigknob.cc:51
Gxw::PortDisplay::set_state
void set_state(int cutoff_low, int cutoff_high)
Definition: portdisplay.cc:54
GxPortDisplay
struct _GxPortDisplay GxPortDisplay
Definition: portdisplay.h:33
GxVSlider
struct _GxVSlider GxVSlider
Definition: vslider.h:33
Gxw::VSlider
Definition: vslider.h:43
Gxw::PortDisplay::get_type
static GType get_type() G_GNUC_CONST
Definition: portdisplay.cc:121
Gxw::PortDisplay_Class
Definition: wrap_init.cc:96
Gxw::PortDisplay::~PortDisplay
virtual ~PortDisplay()
Definition: portdisplay.cc:114