// Generated by gmmproc 2.86.0 -- DO NOT MODIFY!


#include <glibmm.h>

#include <gtkmm/scrolledwindow.h>
#include <gtkmm/private/scrolledwindow_p.h>


/* Copyright (C) 1998-2002 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, see <https://www.gnu.org/licenses/>.
 */

#include <gtkmm/scrollbar.h>
#include <gtkmm/adjustment.h>
#include <gtk/gtk.h>

namespace Gtk
{

void ScrolledWindow::unset_child()
{
  gtk_scrolled_window_set_child(gobj(), nullptr);
}

} //namespace Gtk

namespace
{


extern "C" {
static void ScrolledWindow_signal_edge_overshot_connect_callback(GtkScrolledWindow* self, GtkPositionType pos,void* data)
{
  using namespace Gtk;
  using SlotType = sigc::slot<void(Gtk::PositionType)>;

  auto obj = dynamic_cast<ScrolledWindow*>(Glib::ObjectBase::_get_current_wrapper((GObject*) self));
  // Do not try to call a signal on a disassociated wrapper.
  if(obj)
  {
    try
    {
      if(const auto slot = Glib::SignalProxyNormal::data_to_slot(data))
        (*static_cast<SlotType*>(slot))(static_cast<Gtk::PositionType>(pos)
);
    }
    catch(...)
    {
       Glib::exception_handlers_invoke();
    }
  }
}
} // extern "C"

static const Glib::SignalProxyInfo ScrolledWindow_signal_edge_overshot_info =
{
  "edge-overshot",
  (GCallback) &ScrolledWindow_signal_edge_overshot_connect_callback,
  (GCallback) &ScrolledWindow_signal_edge_overshot_connect_callback
};


extern "C" {
static void ScrolledWindow_signal_edge_reached_connect_callback(GtkScrolledWindow* self, GtkPositionType pos,void* data)
{
  using namespace Gtk;
  using SlotType = sigc::slot<void(Gtk::PositionType)>;

  auto obj = dynamic_cast<ScrolledWindow*>(Glib::ObjectBase::_get_current_wrapper((GObject*) self));
  // Do not try to call a signal on a disassociated wrapper.
  if(obj)
  {
    try
    {
      if(const auto slot = Glib::SignalProxyNormal::data_to_slot(data))
        (*static_cast<SlotType*>(slot))(static_cast<Gtk::PositionType>(pos)
);
    }
    catch(...)
    {
       Glib::exception_handlers_invoke();
    }
  }
}
} // extern "C"

static const Glib::SignalProxyInfo ScrolledWindow_signal_edge_reached_info =
{
  "edge-reached",
  (GCallback) &ScrolledWindow_signal_edge_reached_connect_callback,
  (GCallback) &ScrolledWindow_signal_edge_reached_connect_callback
};


} // anonymous namespace


namespace Glib
{

Gtk::ScrolledWindow* wrap(GtkScrolledWindow* object, bool take_copy)
{
  return dynamic_cast<Gtk::ScrolledWindow *> (Glib::wrap_auto ((GObject*)(object), take_copy));
}

} /* namespace Glib */

namespace Gtk
{


/* The *_Class implementation: */

const Glib::Class& ScrolledWindow_Class::init()
{
  if(!gtype_) // create the GType if necessary
  {
    // Glib::Class has to know the class init function to clone custom types.
    class_init_func_ = &ScrolledWindow_Class::class_init_function;

    // This is actually just optimized away, apparently with no harm.
    // Make sure that the parent type has been created.
    //CppClassParent::CppObjectType::get_type();

    // Create the wrapper type, with the same class/instance size as the base type.
    register_derived_type(gtk_scrolled_window_get_type());

    // Add derived versions of interfaces, if the C type implements any interfaces:

  }

  return *this;
}


void ScrolledWindow_Class::class_init_function(void* g_class, void* class_data)
{
  const auto klass = static_cast<BaseClassType*>(g_class);
  CppClassParent::class_init_function(klass, class_data);


}


Glib::ObjectBase* ScrolledWindow_Class::wrap_new(GObject* o)
{
  return manage(new ScrolledWindow((GtkScrolledWindow*)(o)));

}


/* The implementation: */

ScrolledWindow::ScrolledWindow(const Glib::ConstructParams& construct_params)
:
  Gtk::Widget(construct_params)
{
  }

ScrolledWindow::ScrolledWindow(GtkScrolledWindow* castitem)
:
  Gtk::Widget((GtkWidget*)(castitem))
{
  }


ScrolledWindow::ScrolledWindow(ScrolledWindow&& src) noexcept
: Gtk::Widget(std::move(src))
{}

ScrolledWindow& ScrolledWindow::operator=(ScrolledWindow&& src) noexcept
{
  Gtk::Widget::operator=(std::move(src));
  return *this;
}

ScrolledWindow::~ScrolledWindow() noexcept
{
  destroy_();
}

ScrolledWindow::CppClassType ScrolledWindow::scrolledwindow_class_; // initialize static member

GType ScrolledWindow::get_type()
{
  return scrolledwindow_class_.init().get_type();
}


GType ScrolledWindow::get_base_type()
{
  return gtk_scrolled_window_get_type();
}


ScrolledWindow::ScrolledWindow()
:
  // Mark this class as non-derived to allow C++ vfuncs to be skipped.
  Glib::ObjectBase(nullptr),
  Gtk::Widget(Glib::ConstructParams(scrolledwindow_class_.init()))
{
  

}

void ScrolledWindow::set_hadjustment(const Glib::RefPtr<Adjustment>& hadjustment)
{
  gtk_scrolled_window_set_hadjustment(gobj(), Glib::unwrap(hadjustment));
}

void ScrolledWindow::set_vadjustment(const Glib::RefPtr<Adjustment>& vadjustment)
{
  gtk_scrolled_window_set_vadjustment(gobj(), Glib::unwrap(vadjustment));
}

Glib::RefPtr<Adjustment> ScrolledWindow::get_hadjustment()
{
  auto retvalue = Glib::wrap(gtk_scrolled_window_get_hadjustment(gobj()));
  if(retvalue)
    retvalue->reference(); //The function does not do a ref for us.
  return retvalue;
}

Glib::RefPtr<const Adjustment> ScrolledWindow::get_hadjustment() const
{
  return const_cast<ScrolledWindow*>(this)->get_hadjustment();
}

Glib::RefPtr<Adjustment> ScrolledWindow::get_vadjustment()
{
  auto retvalue = Glib::wrap(gtk_scrolled_window_get_vadjustment(gobj()));
  if(retvalue)
    retvalue->reference(); //The function does not do a ref for us.
  return retvalue;
}

Glib::RefPtr<const Adjustment> ScrolledWindow::get_vadjustment() const
{
  return const_cast<ScrolledWindow*>(this)->get_vadjustment();
}

void ScrolledWindow::set_policy(PolicyType hscrollbar_policy, PolicyType vscrollbar_policy)
{
  gtk_scrolled_window_set_policy(gobj(), static_cast<GtkPolicyType>(hscrollbar_policy), static_cast<GtkPolicyType>(vscrollbar_policy));
}

void ScrolledWindow::get_policy(PolicyType& hscrollbar_policy, PolicyType& vscrollbar_policy) const
{
  gtk_scrolled_window_get_policy(const_cast<GtkScrolledWindow*>(gobj()), ((GtkPolicyType*) &(hscrollbar_policy)), ((GtkPolicyType*) &(vscrollbar_policy)));
}

void ScrolledWindow::set_placement(CornerType window_placement)
{
  gtk_scrolled_window_set_placement(gobj(), static_cast<GtkCornerType>(window_placement));
}

void ScrolledWindow::unset_placement()
{
  gtk_scrolled_window_unset_placement(gobj());
}

CornerType ScrolledWindow::get_placement() const
{
  return static_cast<CornerType>(gtk_scrolled_window_get_placement(const_cast<GtkScrolledWindow*>(gobj())));
}

void ScrolledWindow::set_has_frame(bool has_frame)
{
  gtk_scrolled_window_set_has_frame(gobj(), static_cast<int>(has_frame));
}

bool ScrolledWindow::get_has_frame() const
{
  return gtk_scrolled_window_get_has_frame(const_cast<GtkScrolledWindow*>(gobj()));
}

Scrollbar* ScrolledWindow::get_vscrollbar()
{
  return Glib::wrap((GtkScrollbar*)gtk_scrolled_window_get_vscrollbar(gobj()));
}

const Scrollbar* ScrolledWindow::get_vscrollbar() const
{
  return Glib::wrap((GtkScrollbar*)gtk_scrolled_window_get_vscrollbar(const_cast<GtkScrolledWindow*>(gobj())));
}

Scrollbar* ScrolledWindow::get_hscrollbar()
{
  return Glib::wrap((GtkScrollbar*)gtk_scrolled_window_get_hscrollbar(gobj()));
}

const Scrollbar* ScrolledWindow::get_hscrollbar() const
{
  return Glib::wrap((GtkScrollbar*)gtk_scrolled_window_get_hscrollbar(const_cast<GtkScrolledWindow*>(gobj())));
}

int ScrolledWindow::get_min_content_width() const
{
  return gtk_scrolled_window_get_min_content_width(const_cast<GtkScrolledWindow*>(gobj()));
}

void ScrolledWindow::set_min_content_width(int width)
{
  gtk_scrolled_window_set_min_content_width(gobj(), width);
}

int ScrolledWindow::get_min_content_height() const
{
  return gtk_scrolled_window_get_min_content_height(const_cast<GtkScrolledWindow*>(gobj()));
}

void ScrolledWindow::set_min_content_height(int height)
{
  gtk_scrolled_window_set_min_content_height(gobj(), height);
}

void ScrolledWindow::set_kinetic_scrolling(bool kinetic_scrolling)
{
  gtk_scrolled_window_set_kinetic_scrolling(gobj(), static_cast<int>(kinetic_scrolling));
}

bool ScrolledWindow::get_kinetic_scrolling() const
{
  return gtk_scrolled_window_get_kinetic_scrolling(const_cast<GtkScrolledWindow*>(gobj()));
}

void ScrolledWindow::set_overlay_scrolling(bool overlay_scrolling)
{
  gtk_scrolled_window_set_overlay_scrolling(gobj(), static_cast<int>(overlay_scrolling));
}

bool ScrolledWindow::get_overlay_scrolling() const
{
  return gtk_scrolled_window_get_overlay_scrolling(const_cast<GtkScrolledWindow*>(gobj()));
}

void ScrolledWindow::set_max_content_width(int width)
{
  gtk_scrolled_window_set_max_content_width(gobj(), width);
}

int ScrolledWindow::get_max_content_width() const
{
  return gtk_scrolled_window_get_max_content_width(const_cast<GtkScrolledWindow*>(gobj()));
}

void ScrolledWindow::set_max_content_height(int height)
{
  gtk_scrolled_window_set_max_content_height(gobj(), height);
}

int ScrolledWindow::get_max_content_height() const
{
  return gtk_scrolled_window_get_max_content_height(const_cast<GtkScrolledWindow*>(gobj()));
}

void ScrolledWindow::set_propagate_natural_width(bool propagate)
{
  gtk_scrolled_window_set_propagate_natural_width(gobj(), static_cast<int>(propagate));
}

bool ScrolledWindow::get_propagate_natural_width() const
{
  return gtk_scrolled_window_get_propagate_natural_width(const_cast<GtkScrolledWindow*>(gobj()));
}

void ScrolledWindow::set_propagate_natural_height(bool propagate)
{
  gtk_scrolled_window_set_propagate_natural_height(gobj(), static_cast<int>(propagate));
}

bool ScrolledWindow::get_propagate_natural_height() const
{
  return gtk_scrolled_window_get_propagate_natural_height(const_cast<GtkScrolledWindow*>(gobj()));
}

void ScrolledWindow::set_child(Widget& child)
{
  gtk_scrolled_window_set_child(gobj(), (child).gobj());
}

Widget* ScrolledWindow::get_child()
{
  return Glib::wrap(gtk_scrolled_window_get_child(gobj()));
}

const Widget* ScrolledWindow::get_child() const
{
  return const_cast<ScrolledWindow*>(this)->get_child();
}


Glib::SignalProxy<void(Gtk::PositionType)> ScrolledWindow::signal_edge_overshot()
{
  return Glib::SignalProxy<void(Gtk::PositionType) >(this, &ScrolledWindow_signal_edge_overshot_info);
}


Glib::SignalProxy<void(Gtk::PositionType)> ScrolledWindow::signal_edge_reached()
{
  return Glib::SignalProxy<void(Gtk::PositionType) >(this, &ScrolledWindow_signal_edge_reached_info);
}


static_assert(Glib::Traits::ValueCompatibleWithWrapProperty<Glib::RefPtr<Adjustment>>::value,
  "Type Glib::RefPtr<Adjustment> cannot be used in _WRAP_PROPERTY. "
  "There is no suitable template specialization of Glib::Value<>.");

Glib::PropertyProxy< Glib::RefPtr<Adjustment> > ScrolledWindow::property_hadjustment() 
{
  return Glib::PropertyProxy< Glib::RefPtr<Adjustment> >(this, "hadjustment");
}

Glib::PropertyProxy_ReadOnly< Glib::RefPtr<Adjustment> > ScrolledWindow::property_hadjustment() const
{
  return Glib::PropertyProxy_ReadOnly< Glib::RefPtr<Adjustment> >(this, "hadjustment");
}

static_assert(Glib::Traits::ValueCompatibleWithWrapProperty<Glib::RefPtr<Adjustment>>::value,
  "Type Glib::RefPtr<Adjustment> cannot be used in _WRAP_PROPERTY. "
  "There is no suitable template specialization of Glib::Value<>.");

Glib::PropertyProxy< Glib::RefPtr<Adjustment> > ScrolledWindow::property_vadjustment() 
{
  return Glib::PropertyProxy< Glib::RefPtr<Adjustment> >(this, "vadjustment");
}

Glib::PropertyProxy_ReadOnly< Glib::RefPtr<Adjustment> > ScrolledWindow::property_vadjustment() const
{
  return Glib::PropertyProxy_ReadOnly< Glib::RefPtr<Adjustment> >(this, "vadjustment");
}

static_assert(Glib::Traits::ValueCompatibleWithWrapProperty<PolicyType>::value,
  "Type PolicyType cannot be used in _WRAP_PROPERTY. "
  "There is no suitable template specialization of Glib::Value<>.");

Glib::PropertyProxy< PolicyType > ScrolledWindow::property_hscrollbar_policy() 
{
  return Glib::PropertyProxy< PolicyType >(this, "hscrollbar-policy");
}

Glib::PropertyProxy_ReadOnly< PolicyType > ScrolledWindow::property_hscrollbar_policy() const
{
  return Glib::PropertyProxy_ReadOnly< PolicyType >(this, "hscrollbar-policy");
}

static_assert(Glib::Traits::ValueCompatibleWithWrapProperty<PolicyType>::value,
  "Type PolicyType cannot be used in _WRAP_PROPERTY. "
  "There is no suitable template specialization of Glib::Value<>.");

Glib::PropertyProxy< PolicyType > ScrolledWindow::property_vscrollbar_policy() 
{
  return Glib::PropertyProxy< PolicyType >(this, "vscrollbar-policy");
}

Glib::PropertyProxy_ReadOnly< PolicyType > ScrolledWindow::property_vscrollbar_policy() const
{
  return Glib::PropertyProxy_ReadOnly< PolicyType >(this, "vscrollbar-policy");
}

static_assert(Glib::Traits::ValueCompatibleWithWrapProperty<CornerType>::value,
  "Type CornerType cannot be used in _WRAP_PROPERTY. "
  "There is no suitable template specialization of Glib::Value<>.");

Glib::PropertyProxy< CornerType > ScrolledWindow::property_window_placement() 
{
  return Glib::PropertyProxy< CornerType >(this, "window-placement");
}

Glib::PropertyProxy_ReadOnly< CornerType > ScrolledWindow::property_window_placement() const
{
  return Glib::PropertyProxy_ReadOnly< CornerType >(this, "window-placement");
}

Glib::PropertyProxy< bool > ScrolledWindow::property_has_frame() 
{
  return Glib::PropertyProxy< bool >(this, "has-frame");
}

Glib::PropertyProxy_ReadOnly< bool > ScrolledWindow::property_has_frame() const
{
  return Glib::PropertyProxy_ReadOnly< bool >(this, "has-frame");
}

Glib::PropertyProxy< int > ScrolledWindow::property_min_content_width() 
{
  return Glib::PropertyProxy< int >(this, "min-content-width");
}

Glib::PropertyProxy_ReadOnly< int > ScrolledWindow::property_min_content_width() const
{
  return Glib::PropertyProxy_ReadOnly< int >(this, "min-content-width");
}

Glib::PropertyProxy< int > ScrolledWindow::property_min_content_height() 
{
  return Glib::PropertyProxy< int >(this, "min-content-height");
}

Glib::PropertyProxy_ReadOnly< int > ScrolledWindow::property_min_content_height() const
{
  return Glib::PropertyProxy_ReadOnly< int >(this, "min-content-height");
}

Glib::PropertyProxy< bool > ScrolledWindow::property_kinetic_scrolling() 
{
  return Glib::PropertyProxy< bool >(this, "kinetic-scrolling");
}

Glib::PropertyProxy_ReadOnly< bool > ScrolledWindow::property_kinetic_scrolling() const
{
  return Glib::PropertyProxy_ReadOnly< bool >(this, "kinetic-scrolling");
}

Glib::PropertyProxy< bool > ScrolledWindow::property_overlay_scrolling() 
{
  return Glib::PropertyProxy< bool >(this, "overlay-scrolling");
}

Glib::PropertyProxy_ReadOnly< bool > ScrolledWindow::property_overlay_scrolling() const
{
  return Glib::PropertyProxy_ReadOnly< bool >(this, "overlay-scrolling");
}

Glib::PropertyProxy< int > ScrolledWindow::property_max_content_width() 
{
  return Glib::PropertyProxy< int >(this, "max-content-width");
}

Glib::PropertyProxy_ReadOnly< int > ScrolledWindow::property_max_content_width() const
{
  return Glib::PropertyProxy_ReadOnly< int >(this, "max-content-width");
}

Glib::PropertyProxy< int > ScrolledWindow::property_max_content_height() 
{
  return Glib::PropertyProxy< int >(this, "max-content-height");
}

Glib::PropertyProxy_ReadOnly< int > ScrolledWindow::property_max_content_height() const
{
  return Glib::PropertyProxy_ReadOnly< int >(this, "max-content-height");
}

Glib::PropertyProxy< bool > ScrolledWindow::property_propagate_natural_width() 
{
  return Glib::PropertyProxy< bool >(this, "propagate-natural-width");
}

Glib::PropertyProxy_ReadOnly< bool > ScrolledWindow::property_propagate_natural_width() const
{
  return Glib::PropertyProxy_ReadOnly< bool >(this, "propagate-natural-width");
}

Glib::PropertyProxy< bool > ScrolledWindow::property_propagate_natural_height() 
{
  return Glib::PropertyProxy< bool >(this, "propagate-natural-height");
}

Glib::PropertyProxy_ReadOnly< bool > ScrolledWindow::property_propagate_natural_height() const
{
  return Glib::PropertyProxy_ReadOnly< bool >(this, "propagate-natural-height");
}

Glib::PropertyProxy< Widget* > ScrolledWindow::property_child() 
{
  return Glib::PropertyProxy< Widget* >(this, "child");
}

Glib::PropertyProxy_ReadOnly< Widget* > ScrolledWindow::property_child() const
{
  return Glib::PropertyProxy_ReadOnly< Widget* >(this, "child");
}


} // namespace Gtk


