<?xml version="1.0" standalone="no"?>
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
    "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">

<refentry id="class-gtkviewport">
  <refnamediv>
    <refname>gtk.Viewport</refname>
    <refpurpose>a widget displaying a portion of a larger
widget.</refpurpose>
  </refnamediv>

  <refsect1>
    <title>Synopsis</title>

    <classsynopsis language="python">
      <ooclass><classname>gtk.Viewport</classname></ooclass>
      <ooclass><classname><link
linkend="class-gtkbin">gtk.Bin</link></classname></ooclass>
      <constructorsynopsis language="python">
	<methodname><link
linkend="constructor-gtkviewport">gtk.Viewport</link></methodname>
	<methodparam><parameter role="keyword">hadjustment</parameter>
	  <initializer>None</initializer></methodparam>
	<methodparam><parameter role="keyword">vadjustment</parameter>
	  <initializer>None</initializer></methodparam>
      </constructorsynopsis>
      <methodsynopsis language="python">
	<methodname><link
linkend="method-gtkviewport--get-hadjustment">get_hadjustment</link></methodname>
	<methodparam></methodparam>  </methodsynopsis>
      <methodsynopsis language="python">
	<methodname><link
linkend="method-gtkviewport--get-vadjustment">get_vadjustment</link></methodname>
	<methodparam></methodparam>  </methodsynopsis>
      <methodsynopsis language="python">
	<methodname><link
linkend="method-gtkviewport--set-hadjustment">set_hadjustment</link></methodname>
	<methodparam><parameter
		       role="keyword">adjustment</parameter></methodparam>
      </methodsynopsis>
      <methodsynopsis language="python">
	<methodname><link
linkend="method-gtkviewport--set-vadjustment">set_vadjustment</link></methodname>
	<methodparam><parameter
		       role="keyword">adjustment</parameter></methodparam>
      </methodsynopsis>
      <methodsynopsis language="python">
	<methodname><link
linkend="method-gtkviewport--set-shadow-type">set_shadow_type</link></methodname>
	<methodparam><parameter
		       role="keyword">type</parameter></methodparam>
      </methodsynopsis>
      <methodsynopsis language="python">
	<methodname><link
linkend="method-gtkviewport--get-shadow-type">get_shadow_type</link></methodname>
	<methodparam></methodparam>  </methodsynopsis>
      <methodsynopsis language="python">
        <methodname><link linkend="method-gtkviewport--get-bin-window">get_bin_window</link></methodname>
        <methodparam></methodparam>
      </methodsynopsis>
      <methodsynopsis language="python">
        <methodname><link linkend="method-gtkviewport--get-view-window">get_view_window</link></methodname>
        <methodparam></methodparam>
      </methodsynopsis>
    </classsynopsis>

  </refsect1>

  <refsect1>
    <title>Ancestry</title>

<synopsis>+-- <link linkend="class-gobject">gobject.GObject</link>
  +-- <link linkend="class-gtkobject">gtk.Object</link>
    +-- <link linkend="class-gtkwidget">gtk.Widget</link>
      +-- <link linkend="class-gtkcontainer">gtk.Container</link>
        +-- <link linkend="class-gtkbin">gtk.Bin</link>
          +-- <link linkend="class-gtkviewport">gtk.Viewport</link>
</synopsis>

  </refsect1>
  
  <refsect1>
		<title>Implemented Interfaces</title>
		<para>
			<link linkend="class-gtkviewport"><classname>gtk.Viewport</classname></link>
			implements 
			<link linkend="class-gtkbuildable"><classname>gtk.Buildable</classname></link>
		</para>
	</refsect1>


  <refsect1 id="properties-gtkviewport">
    <title>gtk.Viewport Properties</title>

    <para><link linkend="properties-gtkobject">gtk.Object Properties</link></para>
    <para><link linkend="properties-gtkwidget">gtk.Widget Properties</link></para>
    <para><link linkend="properties-gtkcontainer">gtk.Container Properties</link></para>

    <blockquote role="properties">
      <informaltable pgwide="1" frame="none">
	<tgroup cols="3">
	  <colspec column="1" colwidth="1in"/>
	  <colspec column="2" colwidth="1in"/>
	  <colspec column="3" colwidth="4in"/>
	  <tbody>

	    <row valign="top">
	      <entry>"hadjustment"</entry>
	      <entry>Read-Write</entry>
	      <entry>The <link
linkend="class-gtkadjustment"><classname>gtk.Adjustment</classname></link>
that determines the values of the horizontal position for this
viewport.</entry>
	    </row>

	    <row valign="top">
	      <entry>"shadow-type"</entry>
	      <entry>Read-Write</entry>
	      <entry>The type of shadowed box around the viewport:
<literal>gtk.SHADOW_NONE</literal>, <literal>gtk.SHADOW_IN</literal>,
<literal>gtk.SHADOW_OUT</literal>, <literal>gtk.SHADOW_ETCHED_IN</literal>
or <literal>gtk.SHADOW_ETCHED_OUT</literal></entry>
	    </row>

	    <row valign="top">
	      <entry>"vadjustment"</entry>
	      <entry>Read-Write</entry>
	      <entry>The <link
linkend="class-gtkadjustment"><classname>gtk.Adjustment</classname></link>
that determines the values of the vertical position for this
viewport.</entry>
	    </row>

	  </tbody>
	</tgroup>
      </informaltable>
    </blockquote>

  </refsect1>

  <refsect1 id="style-properties-gtkviewport">
    <title>gtk.Viewport Style Properties</title>

    <para><link linkend="style-properties-gtkwidget">gtk.Widget Style Properties</link></para>

  </refsect1>

  <refsect1 id="signal-prototypes-gtkviewport">
    <title>gtk.Viewport Signal Prototypes</title>

    <para><link linkend="signal-prototypes-gobject">gobject.GObject Signal Prototypes</link></para>
    <para><link linkend="signal-prototypes-gtkobject">gtk.Object Signal Prototypes</link></para>
    <para><link linkend="signal-prototypes-gtkwidget">gtk.Widget Signal Prototypes</link></para>
    <para><link linkend="signal-prototypes-gtkcontainer">gtk.Container Signal Prototypes</link></para>

    <variablelist>
      <varlistentry>
        <term>"<link
linkend="signal-gtkviewport--set-scroll-adjustments">set-scroll-adjustments</link>"</term>
        <listitem>
          <methodsynopsis
	    language="python"><methodname>callback</methodname>
            <methodparam><parameter>viewport</parameter></methodparam>
            <methodparam><parameter>hadjustment</parameter></methodparam>
            <methodparam><parameter>vadjustment</parameter></methodparam>
            <methodparam><parameter>user_param1</parameter></methodparam>
            <methodparam><parameter>...</parameter></methodparam>
          </methodsynopsis>
        </listitem>
      </varlistentry>
    </variablelist>

  </refsect1>

  <refsect1>
    <title>Description</title>

    <para>A <link
linkend="class-gtkviewport"><classname>gtk.Viewport</classname></link>
widget provides a view into a portion of a larger widget. A <link
linkend="class-gtkviewport"><classname>gtk.Viewport</classname></link> is
usually used to provide adjustment capability for a widget to be used in a
<link
linkend="class-gtkscrolledwindow"><classname>gtk.ScrolledWindow</classname></link>. 
For example, a label widget doesn't have any adjustments (does not support
the "set-scroll-adjustments" signal) and would need a viewport when added to
a <link
linkend="class-gtkscrolledwindow"><classname>gtk.ScrolledWindow</classname></link> 
to make the scrollbars functional. See the <link
linkend="method-gtkscrolledwindow--add-with-viewport"><methodname>gtk.ScrolledWindow.add_with_viewport</methodname>()</link> 
method for more information.</para>

  </refsect1>

  <refsect1 id="constructor-gtkviewport">
    <title>Constructor</title>

    <programlisting><constructorsynopsis language="python">
	<methodname>gtk.Viewport</methodname>
	<methodparam><parameter role="keyword">hadjustment</parameter>
	  <initializer>None</initializer></methodparam>
	<methodparam><parameter role="keyword">vadjustment</parameter>
	  <initializer>None</initializer></methodparam>
      </constructorsynopsis></programlisting>
    <variablelist>
      <varlistentry>
	<term><parameter
role="keyword">hadjustment</parameter>&nbsp;:</term>
	<listitem><simpara>a horizontal adjustment.</simpara></listitem>
      </varlistentry>
      <varlistentry>
	<term><parameter
role="keyword">vadjustment</parameter>&nbsp;:</term>
	<listitem><simpara>a vertical adjustment.</simpara></listitem>
      </varlistentry>
      <varlistentry>
	<term><emphasis>Returns</emphasis>&nbsp;:</term>
	<listitem><simpara>a new <link
linkend="class-gtkviewport"><classname>gtk.Viewport</classname></link>
widget</simpara></listitem>
      </varlistentry>
    </variablelist>

    <para>Creates a new <link
linkend="class-gtkviewport"><classname>gtk.Viewport</classname></link> with
the horizontal and vertical adjustments specified by
<parameter>hadjustment</parameter> and <parameter>vadjustment</parameter>
respectively. If <parameter>hadjustment</parameter> or
<parameter>vadjustment</parameter> is <literal>None</literal> a new
adjustment will be created.</para>

  </refsect1>

  <refsect1>
    <title>Methods</title>

  <refsect2 id="method-gtkviewport--get-hadjustment">
      <title>gtk.Viewport.get_hadjustment</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>get_hadjustment</methodname>
	  <methodparam></methodparam>  </methodsynopsis></programlisting>
      <variablelist>
	<varlistentry>
	  <term><emphasis>Returns</emphasis>&nbsp;:</term>
	  <listitem><simpara>the horizontal adjustment</simpara></listitem>
	</varlistentry>
      </variablelist>

      <para>The <methodname>get_hadjustment</methodname>() method returns
the value of the "hadjustment" property that contains the horizontal <link
linkend="class-gtkadjustment"><classname>gtk.Adjustment</classname></link>
of the viewport.</para>

    </refsect2>

    <refsect2 id="method-gtkviewport--get-vadjustment">
      <title>gtk.Viewport.get_vadjustment</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>get_vadjustment</methodname>
	  <methodparam></methodparam>  </methodsynopsis></programlisting>
      <variablelist>
	<varlistentry>
	  <term><emphasis>Returns</emphasis>&nbsp;:</term>
	  <listitem><simpara>the vertical adjustment</simpara></listitem>
	</varlistentry>
      </variablelist>

      <para>The <methodname>get_vadjustment</methodname>() method returns
the value of the "vadjustment" property that contains the vertical <link
linkend="class-gtkadjustment"><classname>gtk.Adjustment</classname></link>
of the viewport.</para>

    </refsect2>

    <refsect2 id="method-gtkviewport--set-hadjustment">
      <title>gtk.Viewport.set_hadjustment</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>set_hadjustment</methodname>
	  <methodparam><parameter
			 role="keyword">adjustment</parameter></methodparam>
	</methodsynopsis></programlisting>
      <variablelist>
	<varlistentry>
	  <term><parameter
role="keyword">adjustment</parameter>&nbsp;:</term>
	  <listitem><simpara>a <link
linkend="class-gtkadjustment"><classname>gtk.Adjustment</classname></link>.</simpara></listitem>
	</varlistentry>
      </variablelist>

      <para>The <methodname>set_hadjustment</methodname>() method sets the
"hadjustment" property to the value of <parameter>adjustment</parameter>
that becomes the horizontal adjustment of the viewport.</para>

    </refsect2>

    <refsect2 id="method-gtkviewport--set-vadjustment">
      <title>gtk.Viewport.set_vadjustment</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>set_vadjustment</methodname>
	  <methodparam><parameter
			 role="keyword">adjustment</parameter></methodparam>
	</methodsynopsis></programlisting>
      <variablelist>
	<varlistentry>
	  <term><parameter
role="keyword">adjustment</parameter>&nbsp;:</term>
	  <listitem><simpara>a <link
linkend="class-gtkadjustment"><classname>gtk.Adjustment</classname></link>.</simpara></listitem>
	</varlistentry>
      </variablelist>

      <para>The <methodname>set_vadjustment</methodname>() method sets the
"vadjustment" property to the value of <parameter>adjustment</parameter>
that becomes the vertical adjustment of the viewport.</para>

    </refsect2>

    <refsect2 id="method-gtkviewport--set-shadow-type">
      <title>gtk.Viewport.set_shadow_type</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>set_shadow_type</methodname>
	  <methodparam><parameter
			 role="keyword">type</parameter></methodparam>
	</methodsynopsis></programlisting>
      <variablelist>
	<varlistentry>
	  <term><parameter role="keyword">type</parameter>&nbsp;:</term>
	  <listitem><simpara>the new shadow type.</simpara></listitem>
	</varlistentry>
      </variablelist>

      <para>The <methodname>set_shadow_type</methodname>() method sets the
"shadow-type" property to the value of <parameter>type</parameter>. The
value of <parameter>type</parameter> must be one of:</para>

      <itemizedlist>
	<listitem>
	  <simpara><literal>gtk.SHADOW_NONE</literal></simpara>
	</listitem>
	<listitem>
	  <simpara><literal>gtk.SHADOW_IN</literal></simpara>
	</listitem>
	<listitem>
	  <simpara><literal>gtk.SHADOW_OUT</literal></simpara>
	</listitem>
	<listitem>
	  <simpara><literal>gtk.SHADOW_ETCHED_IN</literal></simpara>
	</listitem>
	<listitem>
	  <simpara><literal>gtk.SHADOW_ETCHED_OUT</literal></simpara>
	</listitem>
      </itemizedlist>

      <para></para>

    </refsect2>

    <refsect2 id="method-gtkviewport--get-shadow-type">
      <title>gtk.Viewport.get_shadow_type</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>get_shadow_type</methodname>
	  <methodparam></methodparam>  </methodsynopsis></programlisting>
      <variablelist>
	<varlistentry>
	  <term><emphasis>Returns</emphasis>&nbsp;:</term>
	  <listitem><simpara>the shadow type</simpara></listitem>
	</varlistentry>
      </variablelist>

      <para>The <methodname>get_shadow_type</methodname>() method returns
the value of the "shadow-type" property that contains the shadow type of the
<link
linkend="class-gtkviewport"><classname>gtk.Viewport</classname></link>. See
the <link
linkend="method-gtkviewport--set-shadow-type"><methodname>set_shadow_type</methodname>()</link> 
method for more information.</para>

    </refsect2>

    <refsect2 id="method-gtkviewport--get-bin-window">
      <title>gtk.Viewport.get_bin_window</title>

      <programlisting><methodsynopsis language="python">
        <methodname>get_bin_window</methodname>
        <methodparam></methodparam>
      </methodsynopsis></programlisting>
      <variablelist>
        <varlistentry>
          <term><emphasis>Returns</emphasis>&nbsp;:</term>
          <listitem><simpara>a <link linkend="class-gdkwindow"><classname>gtk.gdk.Window</classname></link>.</simpara></listitem>
        </varlistentry>
      </variablelist>

      <note>
        <para>This method is available in PyGTK 2.22 and above.</para>
      </note>

      <para>The <methodname>get_bin_window</methodname>() method gets the bin window of the viewport.</para>

    </refsect2>

    <refsect2 id="method-gtkviewport--get-view-window">
      <title>gtk.Viewport.get_view_window</title>

      <programlisting><methodsynopsis language="python">
        <methodname>get_view_window</methodname>
        <methodparam></methodparam>
      </methodsynopsis></programlisting>
      <variablelist>
        <varlistentry>
          <term><emphasis>Returns</emphasis>&nbsp;:</term>
          <listitem><simpara>a a <link linkend="class-gdkwindow"><classname>gtk.gdk.Window</classname></link>.</simpara></listitem>
        </varlistentry>
      </variablelist>

      <note>
        <para>This method is available in PyGTK 2.22 and above.</para>
      </note>

      <para>The <methodname>get_view_window</methodname>() method gets the view window of the viewport.</para>

    </refsect2>

  </refsect1>

  <refsect1>
    <title>Signals</title>

    <refsect2 id="signal-gtkviewport--set-scroll-adjustments">
      <title>The "set-scroll-adjustments" gtk.Viewport Signal</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>callback</methodname>
	  <methodparam><parameter>viewport</parameter></methodparam>
	  <methodparam><parameter>hadjustment</parameter></methodparam>
	  <methodparam><parameter>vadjustment</parameter></methodparam>
	  <methodparam><parameter>user_param1</parameter></methodparam>
	  <methodparam><parameter>...</parameter></methodparam>
	</methodsynopsis></programlisting>

      <variablelist>
	<varlistentry>
	  <term><parameter>viewport</parameter>&nbsp;:</term>
	  <listitem><simpara>the viewport that received the
signal</simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><parameter>hadjustment</parameter>&nbsp;:</term>
	  <listitem><simpara>the horizontal <link
linkend="class-gtkadjustment"><classname>gtk.Adjustment</classname></link></simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><parameter>vadjustment</parameter>&nbsp;:</term>
	  <listitem><simpara>the vertical <link
linkend="class-gtkadjustment"><classname>gtk.Adjustment</classname></link></simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><parameter>user_param1</parameter>&nbsp;:</term>
          <listitem><simpara>the first user parameter (if any) specified
with the <link
linkend="method-gobject--connect"><methodname>connect</methodname>()</link>
method</simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><parameter>...</parameter>&nbsp;:</term>
	  <listitem><simpara>additional user parameters (if
any)</simpara></listitem>
	</varlistentry>
      </variablelist>

      <para>The "set-scroll-adjustments" signal is emitted when one or both
of the horizontal and vertical <link
linkend="class-gtkadjustment"><classname>gtk.Adjustment</classname></link>
objects is changed.</para>

    </refsect2>

  </refsect1>

</refentry>
