// Generated by gmmproc 2.39.93 -- 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


