/* $Id: viewport.hg,v 1.3 2006/04/12 11:11:25 murrayc Exp $ */

/* viewport.h
 * 
 * Copyright (C) 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, write to the Free
 * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 */

#include <gtkmm/bin.h>
_DEFS(gtkmm,gtk)
_PINCLUDE(gtkmm/private/bin_p.h)


namespace Gtk {
class Adjustment;

/** An adapter which makes widgets scrollable.
 * 
 * @ingroup Widgets
 * @ingroup Containers
 */
class Viewport : public Bin
{
  _CLASS_GTKOBJECT(Viewport,GtkViewport,GTK_VIEWPORT,Gtk::Bin,GtkBin)
public:

  _WRAP_CTOR(Viewport(Adjustment& hadjustment, Adjustment& vadjustment), gtk_viewport_new)


  _WRAP_METHOD(Gtk::Adjustment* get_hadjustment(),
               gtk_viewport_get_hadjustment)
  _WRAP_METHOD(const Gtk::Adjustment* get_hadjustment() const,
               gtk_viewport_get_hadjustment, constversion)

  _WRAP_METHOD(Gtk::Adjustment* get_vadjustment(),
               gtk_viewport_get_vadjustment)
  _WRAP_METHOD(const Gtk::Adjustment* get_vadjustment() const,
               gtk_viewport_get_vadjustment, constversion)

  _WRAP_METHOD(void set_hadjustment(Gtk::Adjustment* adjustment=0),
               gtk_viewport_set_hadjustment)
  _WRAP_METHOD(void set_hadjustment(Gtk::Adjustment& adjustment),
               gtk_viewport_set_hadjustment)

  _WRAP_METHOD(void set_vadjustment(Gtk::Adjustment* adjustment=0),
               gtk_viewport_set_vadjustment)
  _WRAP_METHOD(void set_vadjustment(Gtk::Adjustment& adjustment),
               gtk_viewport_set_vadjustment)

  _WRAP_METHOD(void set_shadow_type(ShadowType type),
               gtk_viewport_set_shadow_type)

  _WRAP_METHOD(ShadowType get_shadow_type() const,
               gtk_viewport_get_shadow_type)

  _WRAP_SIGNAL(void set_scroll_adjustments(Gtk::Adjustment* hadjustment,
                                           Gtk::Adjustment* vadjustment),
               "set_scroll_adjustments")

  _WRAP_PROPERTY("hadjustment", Gtk::Adjustment*)
  _WRAP_PROPERTY("vadjustment", Gtk::Adjustment*)
  _WRAP_PROPERTY("shadow_type", ShadowType)
};

}  /* namespace Gtk */

