<?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-gtkscrolledwindow">
  <refnamediv>
    <refname>gtk.ScrolledWindow</refname>
    <refpurpose>adds scrollbars to its child widget.</refpurpose>
  </refnamediv>

  <refsect1>
    <title>Synopsis</title>

    <classsynopsis language="python">
      <ooclass><classname>gtk.ScrolledWindow</classname></ooclass>
      <ooclass><classname><link
linkend="class-gtkbin">gtk.Bin</link></classname></ooclass>
      <constructorsynopsis language="python">
	<methodname><link linkend="constructor-gtkscrolledwindow">gtk.ScrolledWindow</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-gtkscrolledwindow--set-hadjustment">set_hadjustment</link></methodname>
	<methodparam><parameter
		       role="keyword">hadjustment</parameter></methodparam>
      </methodsynopsis>
      <methodsynopsis language="python">
	<methodname><link
linkend="method-gtkscrolledwindow--set-vadjustment">set_vadjustment</link></methodname>
	<methodparam><parameter
		       role="keyword">vadjustment</parameter></methodparam>
      </methodsynopsis>
      <methodsynopsis language="python">
	<methodname><link
linkend="method-gtkscrolledwindow--get-hadjustment">get_hadjustment</link></methodname>
	<methodparam></methodparam>
      </methodsynopsis>
      <methodsynopsis language="python">
	<methodname><link
linkend="method-gtkscrolledwindow--get-vadjustment">get_vadjustment</link></methodname>
	<methodparam></methodparam>
      </methodsynopsis>
      <methodsynopsis language="python">
	<methodname><link
linkend="method-gtkscrolledwindow--get-hscrollbar">get_hscrollbar</link></methodname>
	<methodparam></methodparam>
      </methodsynopsis>
      <methodsynopsis language="python">
	<methodname><link
linkend="method-gtkscrolledwindow--get-vscrollbar">get_vscrollbar</link></methodname>
	<methodparam></methodparam>
      </methodsynopsis>
      <methodsynopsis language="python">
	<methodname><link
linkend="method-gtkscrolledwindow--set-policy">set_policy</link></methodname>
	<methodparam><parameter
		       role="keyword">hscrollbar_policy</parameter></methodparam>
	<methodparam><parameter
		       role="keyword">vscrollbar_policy</parameter></methodparam>
      </methodsynopsis>
      <methodsynopsis language="python">
	<methodname><link
linkend="method-gtkscrolledwindow--get-policy">get_policy</link></methodname>
	<methodparam><parameter
		       role="keyword">hscrollbar_policy</parameter></methodparam>
	<methodparam><parameter
		       role="keyword">vscrollbar_policy</parameter></methodparam>
      </methodsynopsis>
      <methodsynopsis language="python">
	<methodname><link
linkend="method-gtkscrolledwindow--set-placement">set_placement</link></methodname>
	<methodparam><parameter
		       role="keyword">window_placement</parameter></methodparam>
      </methodsynopsis>
      <methodsynopsis language="python">
	<methodname><link
linkend="method-gtkscrolledwindow--get-placement">get_placement</link></methodname>
	<methodparam></methodparam>  </methodsynopsis>
      <methodsynopsis language="python">
	<methodname><link
linkend="method-gtkscrolledwindow--set-shadow-type">set_shadow_type</link></methodname>
	<methodparam><parameter
		       role="keyword">type</parameter></methodparam>
      </methodsynopsis>
      <methodsynopsis language="python">
	<methodname><link
linkend="method-gtkscrolledwindow--get-shadow-type">get_shadow_type</link></methodname>
	<methodparam></methodparam>  </methodsynopsis>
      <methodsynopsis language="python">
	<methodname><link
linkend="method-gtkscrolledwindow--add-with-viewport">add_with_viewport</link></methodname>
	<methodparam><parameter
		       role="keyword">child</parameter></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-gtkscrolledwindow">gtk.ScrolledWindow</link>
</synopsis>

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


  <refsect1 id="properties-gtkscrolledwindow">
    <title>gtk.ScrolledWindow 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-Construct</entry>
	      <entry>The <link
linkend="class-gtkadjustment"><classname>gtk.Adjustment</classname></link>
for the horizontal position.</entry>
	    </row>

	    <row valign="top">
	      <entry>hscrollbar-policy""</entry>
	      <entry>Read-Write</entry>
	      <entry>The horizontal scrollbar display policy; one of:
<literal>gtk.POLICY_ALWAYS</literal>,
<literal>gtk.POLICY_AUTOMATIC</literal> or
<literal>gtk.POLICY_NEVER</literal>.</entry>
	    </row>

	    <row valign="top">
	      <entry>"shadow-type"</entry>
	      <entry>Read-Write</entry>
	      <entry>The style of bevel around the contents; one of:
<literal>gtk.SHADOW_NONE</literal>, <literal>gtk.SHADOW_IN</literal>,
<literal>gtk.SHADOW_OUT</literal>, <literal>gtk.SHADOW_ETCHED_IN</literal>,
<literal>gtk.SHADOW_ETCHED_OUT</literal>.</entry>
	    </row>

	    <row valign="top">
	      <entry>"vadjustment"</entry>
	      <entry>Read-Write-Construct</entry>
	      <entry>The <link
linkend="class-gtkadjustment"><classname>gtk.Adjustment</classname></link>
for the vertical position.</entry>
	    </row>

	    <row valign="top">
	      <entry>"vscrollbar-policy"</entry>
	      <entry>Read-Write</entry>
	      <entry>The vertical scrollbar display policy; one of:
<literal>gtk.POLICY_ALWAYS</literal>,
<literal>gtk.POLICY_AUTOMATIC</literal> or
<literal>gtk.POLICY_NEVER</literal>.</entry>
	    </row>

	    <row valign="top">
	      <entry>"window-placement"</entry>
	      <entry>Read-Write</entry>
	      <entry>Where the contents are located with respect to the
scrollbars; one of: <literal>gtk.CORNER_TOP_LEFT</literal>,
<literal>gtk.CORNER_BOTTOM_LEFT</literal>,
<literal>gtk.CORNER_TOP_RIGHT</literal>,
<literal>gtk.CORNER_BOTTOM_RIGHT</literal>.</entry>
	    </row>

        <row valign="top">
          <entry>"window-placement-set"</entry>
          <entry>Read-Write</entry>
          <entry>If <literal>True</literal> "window-placement" should be
          used to determine the location of the contents with respect to the
          scrollbars.</entry>
        </row>

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

  </refsect1>

  <refsect1 id="style-properties-gtkscrolledwindow">
    <title>gtk.ScrolledWindow Style Properties</title>

    <para><link linkend="style-properties-gtkwidget">gtk.Widget Style 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>"scrollbar-spacing"</entry>
	      <entry>Read</entry>

	      <entry>The number of pixels between the scrollbars and the
	      scrolled window. Available in <literal>GTK+</literal> 2.2 and
	      above.</entry>
	    </row>
        
        <row valign="top">
	      <entry>"scrollbar-within-bevel"</entry>
	      <entry>Read</entry>

	      <entry>Whether to place scrollbars within the scrolled window's bevel.
          Default value: <literal>False</literal>
          Available in <literal>GTK+</literal> 2.12 and
	      above.</entry>
	    </row>

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

  </refsect1>

  <refsect1 id="signal-prototypes-gtkscrolledwindow">
    <title>gtk.ScrolledWindow 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-gtkscrolledwindow--move-focus-out">move-focus-out</link>"</term>
        <listitem>
          <methodsynopsis language="python"><methodname>callback</methodname>
            <methodparam><parameter>scrolledwindow</parameter></methodparam>
            <methodparam><parameter>direction</parameter></methodparam>
            <methodparam><parameter>user_param1</parameter></methodparam>
            <methodparam><parameter>...</parameter></methodparam>
          </methodsynopsis>
        </listitem>
      </varlistentry>
      <varlistentry>
        <term>"<link linkend="signal-gtkscrolledwindow--scroll-child">scroll-child</link>"</term>
        <listitem>
          <methodsynopsis language="python"><methodname>callback</methodname>
            <methodparam><parameter>scrolledwindow</parameter></methodparam>
            <methodparam><parameter>scrolltype</parameter></methodparam>
            <methodparam><parameter>horizontal</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-gtkscrolledwindow"><classname>gtk.ScrolledWindow</classname></link> 
is a subclass of <link
linkend="class-gtkbin"><classname>gtk.Bin</classname></link> that  adds
scrollbars to a single child widget and optionally draws a beveled frame
around the child widget. The scrolled window can work in two ways:</para>

    <itemizedlist>
      <listitem>
	<simpara>Some widgets have native scrolling support using "slots" to
hold <link
linkend="class-gtkadjustment"><classname>gtk.Adjustment</classname></link>
objects. Widgets with native scroll support include <link
linkend="class-gtktreeview"><classname>gtk.TreeView</classname></link>,
<link
linkend="class-gtktextview"><classname>gtk.TextView</classname></link>, and
<link
linkend="class-gtklayout"><classname>gtk.Layout</classname></link>.</simpara>
      </listitem>
      <listitem>
	<simpara>Widgets that lack native scrolling support use the <link
linkend="class-gtkviewport"><classname>gtk.Viewport</classname></link>
widget that acts as an adapter class, implementing scrollability for child
widgets that lack their own scrolling capabilities. Use <link
linkend="class-gtkviewport"><classname>gtk.Viewport</classname></link> to
scroll child widgets such as <link
linkend="class-gtktable"><classname>gtk.Table</classname></link>, <link
linkend="class-gtkbox"><classname>gtk.Box</classname></link>, and so
on.</simpara>
      </listitem>
    </itemizedlist>

    <para>If a widget has native scrolling abilities, it can be added to the
<link
linkend="class-gtkscrolledwindow"><classname>gtk.ScrolledWindow</classname></link> 
with the <link
linkend="method-gtkcontainer--add"><methodname>gtk.Container.add</methodname>()</link> 
method. If a widget does not, you must first add the widget to a <link
linkend="class-gtkviewport"><classname>gtk.Viewport</classname></link>, then
add the <link
linkend="class-gtkviewport"><classname>gtk.Viewport</classname></link> to
the scrolled window. The convenience method <link
linkend="method-gtkscrolledwindow--add-with-viewport"><methodname>add_with_viewport</methodname>()</link> 
does exactly this, so you can ignore the presence of the viewport.</para>

    <para>The position of the scrollbars is controlled by the scroll
adjustments. The <link
linkend="class-gtkscrolledwindow"><classname>gtk.ScrolledWindow</classname></link> 
uses the attributes in an adjustment (see <link
linkend="class-gtkadjustment"><classname>gtk.Adjustment</classname></link>)
as follows:</para>

    <itemizedlist>
      <listitem>
	<simpara>the <literal>adjustment.lower</literal> attribute is the
minimum value of the scroll region</simpara>
      </listitem>
      <listitem>
	<simpara>the <literal>adjustment.upper</literal> attribute is the
maximum value of the scroll region</simpara>
      </listitem>
      <listitem>
	<simpara>the <literal>adjustment.value</literal> attribute
represents the position of the scrollbar, which must be between
<literal>adjustment.lower</literal> and <literal>adjustment.upper</literal>
- <literal>adjustment.page_size</literal></simpara>
      </listitem>
      <listitem>
	<simpara>the <literal>adjustment.page_size</literal> attribute
represents the size of the visible scrollable area</simpara>
      </listitem>
      <listitem>
	<simpara>the <literal>adjustment.step_increment</literal> attribute
is the distance to scroll when the small stepper arrows are
clicked</simpara>
      </listitem>
      <listitem>
	<simpara>the <literal>adjustment.page_increment</literal> attribute
is the distance to scroll when the <keycap>Page Up</keycap> or <keycap>Page
Down</keycap> keys are pressed</simpara>
      </listitem>
    </itemizedlist>

    <para>If a <link
linkend="class-gtkscrolledwindow"><classname>gtk.ScrolledWindow</classname></link> 
doesn't behave quite as you would like, or doesn't have exactly the right
layout, it's very possible to set up your own scrolling with <link
linkend="class-gtkscrollbar"><classname>gtk.Scrollbar</classname></link> and
for example a <link
linkend="class-gtktable"><classname>gtk.Table</classname></link>.</para>

  </refsect1>

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

    <programlisting><constructorsynopsis language="python">
	<methodname>gtk.ScrolledWindow</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>the horizontal <link
linkend="class-gtkadjustment"><classname>gtk.Adjustment</classname></link>
or None</simpara></listitem>
      </varlistentry>
      <varlistentry>
	<term><parameter
role="keyword">vadjustment</parameter>&nbsp;:</term> <listitem><simpara>a
vertical <link
linkend="class-gtkadjustment"><classname>gtk.Adjustment</classname></link>
or None</simpara></listitem>
      </varlistentry>
      <varlistentry>
	<term><emphasis>Returns</emphasis>&nbsp;:</term>
	<listitem><simpara>a new <link
linkend="class-gtkscrolledwindow"><classname>gtk.ScrolledWindow</classname></link> 
widget</simpara></listitem>
      </varlistentry>
    </variablelist>

    <para>Creates a new scrolled window with the horizontal and vertical
<link
linkend="class-gtkadjustment"><classname>gtk.Adjustment</classname></link>
specified by <parameter>hadjustment</parameter> and
<parameter>vadjustment</parameter> respectively. These will be shared with
the scrollbars and the child widget to keep the bars in sync with the child.
If <parameter>hadjustment</parameter> and <parameter>vadjustment</parameter>
are <literal>None</literal> or not specified the scrolled window will create
them for you.</para>

  </refsect1>

  <refsect1>
    <title>Methods</title>

    <refsect2 id="method-gtkscrolledwindow--set-hadjustment">
      <title>gtk.ScrolledWindow.set_hadjustment</title>

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

      <para>The <methodname>set_hadjustment</methodname>() method sets the
horizontal adjustment (and the "hadjustment" property) to the value of
<parameter>hadjustment</parameter>. <parameter>hadjustment</parameter> must
be a <link
linkend="class-gtkadjustment"><classname>gtk.Adjustment</classname></link>.</para>

    </refsect2>

    <refsect2 id="method-gtkscrolledwindow--set-vadjustment">
      <title>gtk.ScrolledWindow.set_vadjustment</title>

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

      <para>The <methodname>set_vadjustment</methodname>() method sets the
vertical adjustment (and the "vadjustment" property) to the value of
<parameter>vadjustment</parameter>. <parameter>vadjustment</parameter> must
be a <link
linkend="class-gtkadjustment"><classname>gtk.Adjustment</classname></link>.</para>

    </refsect2>

    <refsect2 id="method-gtkscrolledwindow--get-hadjustment">
      <title>gtk.ScrolledWindow.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 <link
linkend="class-gtkadjustment"><classname>gtk.Adjustment</classname></link></simpara></listitem>
	</varlistentry>
      </variablelist>

      <para>The <methodname>get_hadjustment</methodname>() method returns
the value of the "hadjustment" property which is a reference to the
horizontal adjustment.</para>

    </refsect2>

    <refsect2 id="method-gtkscrolledwindow--get-vadjustment">
      <title>gtk.ScrolledWindow.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 <link
linkend="class-gtkadjustment"><classname>gtk.Adjustment</classname></link></simpara></listitem>
	</varlistentry>
      </variablelist>

      <para>The <methodname>get_vadjustment</methodname>() method returns
the value of the "vadjustment" property which is a reference to the vertical
adjustment.</para>

    </refsect2>

    <refsect2 id="method-gtkscrolledwindow--get-hscrollbar">
      <title>gtk.ScrolledWindow.get_hscrollbar</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>get_hscrollbar</methodname>
	  <methodparam></methodparam>
        </methodsynopsis></programlisting>
      <variablelist>
	<varlistentry>
	  <term><emphasis>Returns</emphasis>&nbsp;:</term>
	  <listitem><simpara>The horizontal scrollbar of the scrolled window
or <literal>None</literal> if it does not exist.</simpara></listitem>
	</varlistentry>
      </variablelist>

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

      <para>The <methodname>get_hscrollbar</methodname>() method returns the
<link
linkend="class-gtkhscrollbar"><classname>gtk.HScrollbar</classname></link>
for the scrolled window or <literal>None</literal> if there is no horizontal
scrollbar.</para>

    </refsect2>

    <refsect2 id="method-gtkscrolledwindow--get-vscrollbar">
      <title>gtk.ScrolledWindow.get_vscrollbar</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>get_vscrollbar</methodname>
	  <methodparam></methodparam>  </methodsynopsis></programlisting>
      <variablelist>
	<varlistentry>
	  <term><emphasis>Returns</emphasis>&nbsp;:</term>
	  <listitem><simpara>The vertical scrollbar of the scrolled window
or <literal>None</literal> if it does not exist.</simpara></listitem>
	</varlistentry>
      </variablelist>

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

      <para>The <methodname>get_vscrollbar</methodname>() method returns the
<link
linkend="class-gtkvscrollbar"><classname>gtk.VScrollbar</classname></link>
for the scrolled window or <literal>None</literal> if there is no vertical
scrollbar.</para>

    </refsect2>

    <refsect2 id="method-gtkscrolledwindow--set-policy">
      <title>gtk.ScrolledWindow.set_policy</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>set_policy</methodname>
	  <methodparam><parameter
			 role="keyword">hscrollbar_policy</parameter></methodparam>
	  <methodparam><parameter
			 role="keyword">vscrollbar_policy</parameter></methodparam>
	</methodsynopsis></programlisting>
      <variablelist>
	<varlistentry>
	  <term><parameter
role="keyword">hscrollbar_policy</parameter>&nbsp;:</term>
	  <listitem><simpara>the policy for the horizontal
scrollbar</simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><parameter
role="keyword">vscrollbar_policy</parameter>&nbsp;:</term>
	  <listitem><simpara>the policy for the vertical
scrollbar</simpara></listitem>
	</varlistentry>
      </variablelist>

      <para>The <methodname>set_policy</methodname>() method sets the
"hscrollbar_policy" and "vscrollbar_policy" properties to the value of
<parameter>hscrollbar_policy</parameter> and
<parameter>vscrollbar_policy</parameter> respectively. The policy determines
when the scrollbar should be displayed. The policy value is one of:</para>

      <variablelist>
	<varlistentry>
	  <term>gtk.POLICY_ALWAYS</term>
	  <listitem>
	    <simpara>the scrollbar is always present</simpara>
	  </listitem>
	</varlistentry>
	<varlistentry>
	  <term>gtk.POLICY_AUTOMATIC</term>
	  <listitem>
	    <simpara>the scrollbar is present only if needed i.e. the
contents are larget than the window</simpara>
	  </listitem>
	</varlistentry>
	<varlistentry>
	  <term>gtk.POLICY_NEVER</term>
	  <listitem>
	    <simpara>the scrollbar is never present</simpara>
	  </listitem>
	</varlistentry>
      </variablelist>

      <para></para>

    </refsect2>

    <refsect2 id="method-gtkscrolledwindow--get-policy">
      <title>gtk.ScrolledWindow.get_policy</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>get_policy</methodname>
	  <methodparam></methodparam>
	</methodsynopsis></programlisting>
      <variablelist>
	<varlistentry>
	  <term><emphasis>Returns</emphasis>>&nbsp;:</term>
	  <listitem><simpara>a tuple containing the horizontal and vertical
scrollbar policies</simpara></listitem>
	</varlistentry>
      </variablelist>

      <para>The <methodname>get_policy</methodname>() method returns a tuple
containing the horizontal and vertical scrollbar policies. See the <link
linkend="method-gtkscrolledwindow--set-policy"><methodname>set_policy</methodname>()</link> method for more detail.</para>

    </refsect2>

    <refsect2 id="method-gtkscrolledwindow--set-placement">
      <title>gtk.ScrolledWindow.set_placement</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>set_placement</methodname>
	  <methodparam><parameter
			 role="keyword">window_placement</parameter></methodparam>
	</methodsynopsis></programlisting>
      <variablelist>
	<varlistentry>
	  <term><parameter
role="keyword">window_placement</parameter>&nbsp;:</term>
	  <listitem><simpara>the placement of the contents with respect to
the scrollbars</simpara></listitem>
	</varlistentry>
      </variablelist>

      <para>The <methodname>set_placement</methodname>() method sets the
"window-placement" property to the value specified by
<parameter>window_placement</parameter>. The window placement determines the
location of the child widget with respect to the scrollbars.
<parameter>window_placement</parameter> must be one of:</para>

      <variablelist>
	<varlistentry>
	  <term>gtk.CORNER_TOP_LEFT</term>
	  <listitem>
	    <simpara>Place the scrollbars on the right and bottom of the
widget (default behavior).</simpara>
	  </listitem>
	</varlistentry>
	<varlistentry>
	  <term>gtk.CORNER_BOTTOM_LEFT</term>
	  <listitem>
	    <simpara>Place the scrollbars on the top and right of the
widget.</simpara>
	  </listitem>
	</varlistentry>
	<varlistentry>
	  <term>gtk.CORNER_TOP_RIGHT</term>
	  <listitem>
	    <simpara>Place the scrollbars on the left and bottom of the
widget.</simpara>
	  </listitem>
	</varlistentry>
	<varlistentry>
	  <term>gtk.CORNER_BOTTOM_RIGHT</term>
	  <listitem>
	    <simpara>Place the scrollbars on the top and left of the
widget.</simpara>
	  </listitem>
	</varlistentry>
      </variablelist>

      <para></para>

    </refsect2>

    <refsect2 id="method-gtkscrolledwindow--get-placement">
      <title>gtk.ScrolledWindow.get_placement</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>get_placement</methodname>
	  <methodparam></methodparam>  </methodsynopsis></programlisting>
      <variablelist>
	<varlistentry>
	  <term><emphasis>Returns</emphasis>&nbsp;:</term>
	  <listitem><simpara>the current placement
value.</simpara></listitem>
	</varlistentry>
      </variablelist>

      <para>The <methodname>get_placement</methodname>() method returns the
value of the "window-placement" property that determines the placement of
the scrollbars with respect to the scrolled window. See the <link
linkend="method-gtkscrolledwindow--set-placement"><methodname>set_placement</methodname>()</link> 
method for more detail.</para>

    </refsect2>

    <refsect2 id="method-gtkscrolledwindow--set-shadow-type">
      <title>gtk.ScrolledWindow.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 kind of bevel shadow to draw around the
scrolled window contents</simpara></listitem>
	</varlistentry>
      </variablelist>

      <para>The <methodname>set_shadow_type</methodname>() method sets the
value of the "shadow-type" property to the value of
<parameter>shadow_type</parameter>. <parameter>shadow_type</parameter>
determines the type of bevel shadow drawn around the contents of the
scrolled window. The shadow type must be one of:</para>

      <variablelist>
	<varlistentry>
	  <term>gtk.SHADOW_NONE</term>
	  <listitem>
	    <simpara>No outline.</simpara>
	  </listitem>
	</varlistentry>
	<varlistentry>
	  <term>gtk.SHADOW_IN</term>
	  <listitem>
	    <simpara>The outline is beveled inward.</simpara>
	  </listitem>
	</varlistentry>
	<varlistentry>
	  <term>gtk.SHADOW_OUT</term>
	  <listitem>
	    <simpara>The outline is beveled outward.</simpara>
	  </listitem>
	</varlistentry>
	<varlistentry>
	  <term>gtk.SHADOW_ETCHED_IN</term>
	  <listitem>
	    <simpara>The outline is an inward etched bevel.</simpara>
	  </listitem>
	</varlistentry>
	<varlistentry>
	  <term>gtk.SHADOW_ETCHED_OUT</term>
	  <listitem>
	    <simpara>The outline is an outward etched bevel.</simpara>
	  </listitem>
	</varlistentry>
      </variablelist>

      <para></para>

    </refsect2>

    <refsect2 id="method-gtkscrolledwindow--get-shadow-type">
      <title>gtk.ScrolledWindow.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 current shadow type</simpara></listitem>
	</varlistentry>
      </variablelist>

      <para>The <methodname>get_shadow_type</methodname>() method returns
the value of the "shadow-type" property that determines the shadow type of
the scrolled window. See the <link
linkend="method-gtkscrolledwindow--set-shadow-type"><methodname>set_shadow_type</methodname>()</link> 
method for more detail.</para>

    </refsect2>

    <refsect2 id="method-gtkscrolledwindow--add-with-viewport">
      <title>gtk.ScrolledWindow.add_with_viewport</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>add_with_viewport</methodname>
	  <methodparam><parameter
			 role="keyword">child</parameter></methodparam>
	</methodsynopsis></programlisting>
      <variablelist>
	<varlistentry>
	  <term><parameter role="keyword">child</parameter>&nbsp;:</term>
	  <listitem><simpara>the widget to be scrolled</simpara></listitem>
	</varlistentry>
      </variablelist>

      <para>The <methodname>add_with_viewport</methodname>() method is used
to add a widget (specified by <parameter>child</parameter>) without native
scrolling capabilities to the scrolled window. This is a convenience
function that is equivalent to adding <parameter>child</parameter> to a
<link
linkend="class-gtkviewport"><classname>gtk.Viewport</classname></link>, then
adding the viewport to the scrolled window. If a child has native scrolling
(e.g. <link
linkend="class-gtktextview"><classname>gtk.TextView</classname></link>,
<link
linkend="class-gtktreeview"><classname>gtk.TreeView</classname></link>,
<link linkend="class-gtklayout"><classname>gtk.Layout</classname></link>),
use <link
linkend="method-gtkcontainer--add"><methodname>gtk.Container.add</methodname>()</link> 
instead of this method.</para>

      <para>The viewport scrolls the child by moving its <link
linkend="class-gdkwindow"><classname>gtk.gdk.Window</classname></link>,
and takes the size of the child to be the size of its toplevel <link
linkend="class-gdkwindow"><classname>gtk.gdk.Window</classname></link>.
This will be wrong for most widgets that support native scrolling. For
example, if you add a widget such as <link
linkend="class-gtktreeview"><classname>gtk.TreeView</classname></link> with
a viewport, the whole widget will scroll, including the column
headings.</para>

    </refsect2>

  </refsect1>

  <refsect1>
    <title>Signals</title>

    <refsect2 id="signal-gtkscrolledwindow--move-focus-out">
      <title>The "move-focus-out" gtk.ScrolledWindow Signal</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>callback</methodname>
	  <methodparam><parameter>scrolledwindow</parameter></methodparam>
	  <methodparam><parameter>direction</parameter></methodparam>
	  <methodparam><parameter>user_param1</parameter></methodparam>
	  <methodparam><parameter>...</parameter></methodparam>
	</methodsynopsis></programlisting>

      <variablelist>
	<varlistentry>
	  <term><parameter>scrolledwindow</parameter>&nbsp;:</term>
	  <listitem><simpara>the scrolledwindow that received the
signal</simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><parameter>direction</parameter>&nbsp;:</term>
	  <listitem><simpara>the direction that the focus is moving either
<literal>gtk.DIR_TAB_FORWARD</literal> or
<literal>gtk.DIR_TAB_BACKWARD</literal>.</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 "move-focus-out" signal is emitted when the user presses
<keycombo action="simul"><keycap>Control</keycap><keycap>Tab</keycap>
</keycombo> or <keycombo
action="simul"><keycap>Control</keycap><keycap>Shift</keycap><keycap>Tab</keycap>
</keycombo> to move the focus out of the scrolled window. The
<parameter>direction</parameter> is either
<literal>gtk.DIR_TAB_FORWARD</literal> or
<literal>gtk.DIR_TAB_BACKWARD</literal></para>

    </refsect2>

    <refsect2 id="signal-gtkscrolledwindow--scroll-child">
      <title>The "scroll-child" gtk.ScrolledWindow Signal</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>callback</methodname>
	  <methodparam><parameter>scrolledwindow</parameter></methodparam>
	  <methodparam><parameter>scrolltype</parameter></methodparam>
	  <methodparam><parameter>horizontal</parameter></methodparam>
	  <methodparam><parameter>user_param1</parameter></methodparam>
	  <methodparam><parameter>...</parameter></methodparam>
	</methodsynopsis></programlisting>

      <variablelist>
	<varlistentry>
	  <term><parameter>scrolledwindow</parameter>&nbsp;:</term>
	  <listitem><simpara>the scrolledwindow that received the
signal</simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><parameter>scrolltype</parameter>&nbsp;:</term>
	  <listitem><simpara>the scroll type; one of:
<literal>gtk.SCROLL_STEP_BACKWARD</literal>,
<literal>gtk.SCROLL_STEP_FORWARD</literal>,
<literal>gtk.SCROLL_PAGE_BACKWARD</literal>,
<literal>gtk.SCROLL_PAGE_FORWARD</literal>,
<literal>gtk.SCROLL_PAGE_UP</literal>,
<literal>gtk.SCROLL_PAGE_DOWN</literal>, <literal>gtk.SCROLL_START</literal>
or <literal>gtk.SCROLL_END</literal>.</simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><parameter>horizontal</parameter>&nbsp;:</term>
	  <listitem><simpara>if True scroll in the horizontal
direction</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 "scroll-child" signal is emitted when the child widget is
being scrolled by a keyboard action. The default key bindings with resulting
<parameter>scrolltype</parameter> and <parameter>horizontal</parameter>
arguments are:</para>

      <variablelist>
	<varlistentry>
	  <term><keycombo action="simul"><keycap>Control</keycap>
	      <keycap>Left&nbsp;Arrow</keycap> 
	    </keycombo></term>
	  <listitem>
	    <simpara><literal>gtk.SCROLL_STEP_BACKWARD</literal> -
horizontal</simpara>
	  </listitem>
	</varlistentry>
	<varlistentry>
	  <term><keycombo action="simul"><keycap>Control</keycap>
	      <keycap>Right&nbsp;Arrow</keycap>
	    </keycombo></term>
	  <listitem>
	    <simpara><literal>gtk.SCROLL_STEP_FORWARD</literal> -
horizontal</simpara>
	  </listitem>
	</varlistentry>
	<varlistentry>
	  <term><keycombo action="simul"><keycap>Control</keycap>
	      <keycap>Up&nbsp;Arrow</keycap>
	    </keycombo></term>
	  <listitem>
	    <simpara><literal>gtk.SCROLL_STEP_BACKWARD</literal> -
vertical</simpara>
	  </listitem>
	</varlistentry>
	<varlistentry>
	  <term><keycombo action="simul"><keycap>Control</keycap>
	      <keycap>Down&nbsp;Arrow</keycap>
	    </keycombo></term>
	  <listitem>
	    <simpara><literal>gtk.SCROLL_STEP_FORWARD</literal> -
vertical</simpara>
	  </listitem>
	</varlistentry>
	<varlistentry>
	  <term><keycombo action="simul"><keycap>Control</keycap>
	      <keycap>Page&nbsp;Up</keycap>
	    </keycombo></term>
	  <listitem>
	    <simpara><literal>gtk.SCROLL_PAGE_BACKWARD</literal> -
horizontal</simpara>
	  </listitem>
	</varlistentry>
	<varlistentry>
	  <term><keycombo action="simul"><keycap>Control</keycap>
	      <keycap>Page&nbsp;Down</keycap>
	    </keycombo></term>
	  <listitem>
	    <simpara><literal>gtk.SCROLL_PAGE_FORWARD</literal> -
horizontal</simpara>
	  </listitem>
	</varlistentry>
	<varlistentry>
	  <term><keycombo action="simul"><keycap>Page&nbsp;Up</keycap>
	    </keycombo></term>
	  <listitem>
	    <simpara><literal>gtk.SCROLL_PAGE_BACKWARD</literal> -
vertical</simpara>
	  </listitem>
	</varlistentry>
	<varlistentry>
	  <term><keycombo action="simul"><keycap>Page&nbsp;Down</keycap>
	    </keycombo></term>
	  <listitem>
	    <simpara><literal>gtk.SCROLL_PAGE_FORWARD</literal> -
vertical</simpara>
	  </listitem>
	</varlistentry>
	<varlistentry>
	  <term><keycombo action="simul"><keycap>Control</keycap>
	      <keycap>Home</keycap>
	    </keycombo></term>
	  <listitem>
	    <simpara><literal>gtk.SCROLL_START</literal> -
horizontal</simpara>
	  </listitem>
	</varlistentry>
	<varlistentry>
	  <term><keycombo action="simul"><keycap>Control</keycap>
	      <keycap>End</keycap>
	    </keycombo></term>
	  <listitem>
	    <simpara><literal>gtk.SCROLL_END</literal> -
horizontal</simpara>
	  </listitem>
	</varlistentry>
	<varlistentry>
	  <term><keycombo action="simul"><keycap>Home</keycap>
	    </keycombo></term>
	  <listitem>
	    <simpara><literal>gtk.SCROLL_START</literal> -
vertical</simpara>
	  </listitem>
	</varlistentry>
	<varlistentry>
	  <term><keycombo action="simul"><keycap>End</keycap>
	    </keycombo></term>
	  <listitem>
	    <simpara><literal>gtk.SCROLL_END</literal> - vertical</simpara>
	  </listitem>
	</varlistentry>
      </variablelist>

      <para></para>

    </refsect2>

  </refsect1>

</refentry>
