1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265
|
// Generated by gmmproc 2.42.0 -- DO NOT MODIFY!
#include <glibmm.h>
#include <gtkmm/scrollable.h>
#include <gtkmm/private/scrollable_p.h>
/* Copyright 2010 The gtkmm Development Team
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include <gtk/gtk.h>
namespace Gtk
{
void Scrollable::unset_hadjustment()
{
gtk_scrollable_set_hadjustment(gobj(), 0);
}
void Scrollable::unset_vadjustment()
{
gtk_scrollable_set_vadjustment(gobj(), 0);
}
} //namespace Gtk
namespace
{
} // anonymous namespace
// static
GType Glib::Value<Gtk::ScrollablePolicy>::value_type()
{
return gtk_scrollable_policy_get_type();
}
namespace Glib
{
Glib::RefPtr<Gtk::Scrollable> wrap(GtkScrollable* object, bool take_copy)
{
return Glib::RefPtr<Gtk::Scrollable>( dynamic_cast<Gtk::Scrollable*> (Glib::wrap_auto_interface<Gtk::Scrollable> ((GObject*)(object), take_copy)) );
//We use dynamic_cast<> in case of multiple inheritance.
}
} // namespace Glib
namespace Gtk
{
/* The *_Class implementation: */
const Glib::Interface_Class& Scrollable_Class::init()
{
if(!gtype_) // create the GType if necessary
{
// Glib::Interface_Class has to know the interface init function
// in order to add interfaces to implementing types.
class_init_func_ = &Scrollable_Class::iface_init_function;
// We can not derive from another interface, and it is not necessary anyway.
gtype_ = gtk_scrollable_get_type();
}
return *this;
}
void Scrollable_Class::iface_init_function(void* g_iface, void*)
{
BaseClassType *const klass = static_cast<BaseClassType*>(g_iface);
//This is just to avoid an "unused variable" warning when there are no vfuncs or signal handlers to connect.
//This is a temporary fix until I find out why I can not seem to derive a GtkFileChooser interface. murrayc
g_assert(klass != 0);
}
Glib::ObjectBase* Scrollable_Class::wrap_new(GObject* object)
{
return new Scrollable((GtkScrollable*)(object));
}
/* The implementation: */
Scrollable::Scrollable()
:
Glib::Interface(scrollable_class_.init())
{}
Scrollable::Scrollable(GtkScrollable* castitem)
:
Glib::Interface((GObject*)(castitem))
{}
Scrollable::Scrollable(const Glib::Interface_Class& interface_class)
: Glib::Interface(interface_class)
{
}
Scrollable::~Scrollable()
{}
// static
void Scrollable::add_interface(GType gtype_implementer)
{
scrollable_class_.init().add_interface(gtype_implementer);
}
Scrollable::CppClassType Scrollable::scrollable_class_; // initialize static member
GType Scrollable::get_type()
{
return scrollable_class_.init().get_type();
}
GType Scrollable::get_base_type()
{
return gtk_scrollable_get_type();
}
Glib::RefPtr<Adjustment> Scrollable::get_hadjustment()
{
Glib::RefPtr<Adjustment> retvalue = Glib::wrap(gtk_scrollable_get_hadjustment(gobj()));
if(retvalue)
retvalue->reference(); //The function does not do a ref for us.
return retvalue;
}
Glib::RefPtr<const Adjustment> Scrollable::get_hadjustment() const
{
return const_cast<Scrollable*>(this)->get_hadjustment();
}
void Scrollable::set_hadjustment(const Glib::RefPtr<Adjustment>& hadjustment)
{
gtk_scrollable_set_hadjustment(gobj(), Glib::unwrap(hadjustment));
}
Glib::RefPtr<Adjustment> Scrollable::get_vadjustment()
{
Glib::RefPtr<Adjustment> retvalue = Glib::wrap(gtk_scrollable_get_vadjustment(gobj()));
if(retvalue)
retvalue->reference(); //The function does not do a ref for us.
return retvalue;
}
Glib::RefPtr<const Adjustment> Scrollable::get_vadjustment() const
{
Glib::RefPtr<const Adjustment> retvalue = Glib::wrap(gtk_scrollable_get_vadjustment(const_cast<GtkScrollable*>(gobj())));
if(retvalue)
retvalue->reference(); //The function does not do a ref for us.
return retvalue;
}
void Scrollable::set_vadjustment(const Glib::RefPtr<Adjustment>& vadjustment)
{
gtk_scrollable_set_vadjustment(gobj(), Glib::unwrap(vadjustment));
}
ScrollablePolicy Scrollable::get_hscroll_policy() const
{
return ((ScrollablePolicy)(gtk_scrollable_get_hscroll_policy(const_cast<GtkScrollable*>(gobj()))));
}
void Scrollable::set_hscroll_policy(ScrollablePolicy policy)
{
gtk_scrollable_set_hscroll_policy(gobj(), ((GtkScrollablePolicy)(policy)));
}
ScrollablePolicy Scrollable::get_vscroll_policy() const
{
return ((ScrollablePolicy)(gtk_scrollable_get_vscroll_policy(const_cast<GtkScrollable*>(gobj()))));
}
void Scrollable::set_vscroll_policy(ScrollablePolicy policy)
{
gtk_scrollable_set_vscroll_policy(gobj(), ((GtkScrollablePolicy)(policy)));
}
#ifdef GLIBMM_PROPERTIES_ENABLED
Glib::PropertyProxy< Glib::RefPtr<Adjustment> > Scrollable::property_hadjustment()
{
return Glib::PropertyProxy< Glib::RefPtr<Adjustment> >(this, "hadjustment");
}
#endif //GLIBMM_PROPERTIES_ENABLED
#ifdef GLIBMM_PROPERTIES_ENABLED
Glib::PropertyProxy_ReadOnly< Glib::RefPtr<Adjustment> > Scrollable::property_hadjustment() const
{
return Glib::PropertyProxy_ReadOnly< Glib::RefPtr<Adjustment> >(this, "hadjustment");
}
#endif //GLIBMM_PROPERTIES_ENABLED
#ifdef GLIBMM_PROPERTIES_ENABLED
Glib::PropertyProxy< Glib::RefPtr<Adjustment> > Scrollable::property_vadjustment()
{
return Glib::PropertyProxy< Glib::RefPtr<Adjustment> >(this, "vadjustment");
}
#endif //GLIBMM_PROPERTIES_ENABLED
#ifdef GLIBMM_PROPERTIES_ENABLED
Glib::PropertyProxy_ReadOnly< Glib::RefPtr<Adjustment> > Scrollable::property_vadjustment() const
{
return Glib::PropertyProxy_ReadOnly< Glib::RefPtr<Adjustment> >(this, "vadjustment");
}
#endif //GLIBMM_PROPERTIES_ENABLED
#ifdef GLIBMM_PROPERTIES_ENABLED
Glib::PropertyProxy< ScrollablePolicy > Scrollable::property_hscroll_policy()
{
return Glib::PropertyProxy< ScrollablePolicy >(this, "hscroll-policy");
}
#endif //GLIBMM_PROPERTIES_ENABLED
#ifdef GLIBMM_PROPERTIES_ENABLED
Glib::PropertyProxy_ReadOnly< ScrollablePolicy > Scrollable::property_hscroll_policy() const
{
return Glib::PropertyProxy_ReadOnly< ScrollablePolicy >(this, "hscroll-policy");
}
#endif //GLIBMM_PROPERTIES_ENABLED
#ifdef GLIBMM_PROPERTIES_ENABLED
Glib::PropertyProxy< ScrollablePolicy > Scrollable::property_vscroll_policy()
{
return Glib::PropertyProxy< ScrollablePolicy >(this, "vscroll-policy");
}
#endif //GLIBMM_PROPERTIES_ENABLED
#ifdef GLIBMM_PROPERTIES_ENABLED
Glib::PropertyProxy_ReadOnly< ScrollablePolicy > Scrollable::property_vscroll_policy() const
{
return Glib::PropertyProxy_ReadOnly< ScrollablePolicy >(this, "vscroll-policy");
}
#endif //GLIBMM_PROPERTIES_ENABLED
} // namespace Gtk
|