## Documentation

Table of Contents
Class Inheritance Tree
Widget Screenshots
Package groups

## Index

Package: Scrolled_Window

- Goto spec source

# Description

    package Gtk.Scrolled_Window is

Gtk_Scrolled_Window is a Gtk_Bin child: it's a container the accepts a single child widget. Gtk_Scrolled_Window adds scrollbars to the child widget.

The scrolled window can work in two ways. Some widgets have native scrolling support; these widgets have "slots" for Gtk_Adjustment objects.

The scrolled window installs Gtk_Adjustment objects in the child window's slots using the "set_scroll_adjustments" signal (Conceptually, these widgets implement a "Scrollable" interface).

The second way to use the scrolled window is useful with widgets that lack the "set_scroll_adjustments" signal. The Gtk_Viewport widget acts as a proxy, implementing scrollability for child widgets that lack their own scrolling capabilities.

If a widget has native scrolling abilities, it can be added to the Gtk_Scrolled_Window with Gtk.Container.Add. If a widget does not, you must first add the widget to a Gtk_Viewport, then add the Gtk_Viewport to the scrolled window. The convenience function Add_With_Viewport does exactly this, so you can ignore the presence of the viewport.

If you want to create your own new widget type that can be inserted directly into a scrolled_window, you need to specify a signal for Set_Scroll_Adjustments in the call to Glib.Object.Initialize_Class_Record.

Binding from C File version 2.16.6

<testgtk>create_scrolled.adb</testgtk>

### Screenshot

# Classes

### Gtk_Scrolled_Window_Record

- Goto declaration in source
- Goto full declaration in source

    type Gtk_Scrolled_Window_Record is new Bin.Gtk_Bin_Record with private;

#### Ancestors:

Gtk.Bin.Gtk_Bin_Record
Gtk.Container.Gtk_Container_Record
Gtk.Widget.Gtk_Widget_Record
Glib.Object.GObject_Record

#### Primitive operations:

Add_With_Viewport

- To API doc
- To spec

Get_Hadjustment

- To API doc
- To spec

Get_Hscrollbar

- To API doc
- To spec

Get_Placement

- To API doc
- To spec

Get_Policy

- To API doc
- To spec

Get_Shadow_Type

- To API doc
- To spec

Get_Vadjustment

- To API doc
- To spec

Get_Vscrollbar

- To API doc
- To spec

Glib.Object.Deallocate

- To API doc
- To spec

(Inherited)
Glib.Object.Get_Type

- To API doc
- To spec

(Inherited)
Glib.Object.Notify

- To API doc
- To spec

(Inherited)
Glib.Object.Ref

- To API doc
- To spec

(Inherited)
Glib.Object.Ref_Sink

- To API doc
- To spec

(Inherited)
Glib.Object.Unref

- To API doc
- To spec

(Inherited)
Gtk.Bin.Get_Child

- To API doc
- To spec

(Inherited)
Gtk.Container.Add

- To API doc
- To spec

(Inherited)
Gtk.Container.Check_Resize

- To API doc
- To spec

(Inherited)
Gtk.Container.Child_Get_Property

- To API doc
- To spec

(Inherited)
Gtk.Container.Child_Set_Property

- To API doc
- To spec

(Inherited)
Gtk.Container.Child_Type

- To API doc
- To spec

(Inherited)
Gtk.Container.Forall

- To API doc
- To spec

(Inherited)
Gtk.Container.Foreach

- To API doc
- To spec

(Inherited)
Gtk.Container.Get_Border_Width

- To API doc
- To spec

(Inherited)
Gtk.Container.Get_Children

- To API doc
- To spec

(Inherited)
Gtk.Container.Get_Focus_Chain

- To API doc
- To spec

(Inherited)
Gtk.Container.Get_Focus_Child

- To API doc
- To spec

(Inherited)
Gtk.Container.Get_Focus_Hadjustment

- To API doc
- To spec

(Inherited)
Gtk.Container.Get_Focus_Vadjustment

- To API doc
- To spec

(Inherited)
Gtk.Container.Get_Resize_Mode

- To API doc
- To spec

(Inherited)
Gtk.Container.Propagate_Expose

- To API doc
- To spec

(Inherited)
Gtk.Container.Remove

- To API doc
- To spec

(Inherited)
Gtk.Container.Resize_Children

- To API doc
- To spec

(Inherited)
Gtk.Container.Set_Border_Width

- To API doc
- To spec

(Inherited)
Gtk.Container.Set_Focus_Chain

- To API doc
- To spec

(Inherited)
Gtk.Container.Set_Focus_Child

- To API doc
- To spec

(Inherited)
Gtk.Container.Set_Focus_Hadjustment

- To API doc
- To spec

(Inherited)
Gtk.Container.Set_Focus_Vadjustment

- To API doc
- To spec

(Inherited)
Gtk.Container.Set_Reallocate_Redraws

- To API doc
- To spec

(Inherited)
Gtk.Container.Set_Resize_Mode

- To API doc
- To spec

(Inherited)
Gtk.Container.Unset_Focus_Chain

- To API doc
- To spec

(Inherited)
Gtk.Widget.Activate

- To API doc
- To spec

(Inherited)
Gtk.Widget.Add_Accelerator

- To API doc
- To spec

(Inherited)
Gtk.Widget.Add_Events

- To API doc
- To spec

(Inherited)
Gtk.Widget.Add_Mnemonic_Label

- To API doc
- To spec

(Inherited)
Gtk.Widget.Can_Activate_Accel

- To API doc
- To spec

(Inherited)
Gtk.Widget.Child_Notify

- To API doc
- To spec

(Inherited)
Gtk.Widget.Class_Path

- To API doc
- To spec

(Inherited)
Gtk.Widget.Class_Path_Reversed

- To API doc
- To spec

(Inherited)
Gtk.Widget.Create_Pango_Context

- To API doc
- To spec

(Inherited)
Gtk.Widget.Create_Pango_Layout

- To API doc
- To spec

(Inherited)
Gtk.Widget.Destroy

- To API doc
- To spec

(Inherited)
Gtk.Widget.Draw

- To API doc
- To spec

(Inherited)
Gtk.Widget.Ensure_Style

- To API doc
- To spec

(Inherited)
Gtk.Widget.Error_Bell

- To API doc
- To spec

(Inherited)
Gtk.Widget.Flag_Is_Set

- To API doc
- To spec

(Inherited)
Gtk.Widget.Flags

- To API doc
- To spec

(Inherited)
Gtk.Widget.Freeze_Child_Notify

- To API doc
- To spec

(Inherited)
Gtk.Widget.Get_Allocation_Height

- To API doc
- To spec

(Inherited)
Gtk.Widget.Get_Allocation_Width

- To API doc
- To spec

(Inherited)
Gtk.Widget.Get_Allocation_X

- To API doc
- To spec

(Inherited)
Gtk.Widget.Get_Allocation_Y

- To API doc
- To spec

(Inherited)
Gtk.Widget.Get_Ancestor

- To API doc
- To spec

(Inherited)
Gtk.Widget.Get_Child_Requisition

- To API doc
- To spec

(Inherited)
Gtk.Widget.Get_Child_Visible

- To API doc
- To spec

(Inherited)
Gtk.Widget.Get_Colormap

- To API doc
- To spec

(Inherited)
Gtk.Widget.Get_Composite_Name

- To API doc
- To spec

(Inherited)
Gtk.Widget.Get_Direction

- To API doc
- To spec

(Inherited)
Gtk.Widget.Get_Events

- To API doc
- To spec

(Inherited)
Gtk.Widget.Get_Extension_Events

- To API doc
- To spec

(Inherited)
Gtk.Widget.Get_Has_Tooltip

- To API doc
- To spec

(Inherited)
Gtk.Widget.Get_Name

- To API doc
- To spec

(Inherited)
Gtk.Widget.Get_No_Show_All

- To API doc
- To spec

(Inherited)
Gtk.Widget.Get_Pango_Context

- To API doc
- To spec

(Inherited)
Gtk.Widget.Get_Parent

- To API doc
- To spec

(Inherited)
Gtk.Widget.Get_Parent_Window

- To API doc
- To spec

(Inherited)
Gtk.Widget.Get_Pointer

- To API doc
- To spec

(Inherited)
Gtk.Widget.Get_Root_Window

- To API doc
- To spec

(Inherited)
Gtk.Widget.Get_Size_Request

- To API doc
- To spec

(Inherited)
Gtk.Widget.Get_Snapshot

- To API doc
- To spec

(Inherited)
Gtk.Widget.Get_State

- To API doc
- To spec

(Inherited)
Gtk.Widget.Get_Style

- To API doc
- To spec

(Inherited)
Gtk.Widget.Get_Tooltip_Markup

- To API doc
- To spec

(Inherited)
Gtk.Widget.Get_Tooltip_Text

- To API doc
- To spec

(Inherited)
Gtk.Widget.Get_Tooltip_Window

- To API doc
- To spec

(Inherited)
Gtk.Widget.Get_Toplevel

- To API doc
- To spec

(Inherited)
Gtk.Widget.Get_Visual

- To API doc
- To spec

(Inherited)
Gtk.Widget.Get_Window

- To API doc
- To spec

(Inherited)
Gtk.Widget.Grab_Default

- To API doc
- To spec

(Inherited)
Gtk.Widget.Grab_Focus

- To API doc
- To spec

(Inherited)
Gtk.Widget.Has_Screen

- To API doc
- To spec

(Inherited)
Gtk.Widget.Hide

- To API doc
- To spec

(Inherited)
Gtk.Widget.Hide_All

- To API doc
- To spec

(Inherited)
Gtk.Widget.Input_Shape_Combine_Mask

- To API doc
- To spec

(Inherited)
Gtk.Widget.Intersect

- To API doc
- To spec

(Inherited)
Gtk.Widget.Is_Ancestor

- To API doc
- To spec

(Inherited)
Gtk.Widget.Is_Composited

- To API doc
- To spec

(Inherited)
Gtk.Widget.Is_Focus

- To API doc
- To spec

(Inherited)
Gtk.Widget.Keynav_Failed

- To API doc
- To spec

(Inherited)
Gtk.Widget.List_Mnemonic_Labels

- To API doc
- To spec

(Inherited)
Gtk.Widget.Map

- To API doc
- To spec

(Inherited)
Gtk.Widget.Mnemonic_Activate

- To API doc
- To spec

(Inherited)
Gtk.Widget.Modify_Base

- To API doc
- To spec

(Inherited)
Gtk.Widget.Modify_Bg

- To API doc
- To spec

(Inherited)
Gtk.Widget.Modify_Cursor

- To API doc
- To spec

(Inherited)
Gtk.Widget.Modify_Fg

- To API doc
- To spec

(Inherited)
Gtk.Widget.Modify_Font

- To API doc
- To spec

(Inherited)
Gtk.Widget.Modify_Text

- To API doc
- To spec

(Inherited)
Gtk.Widget.Path

- To API doc
- To spec

(Inherited)
Gtk.Widget.Path_Reversed

- To API doc
- To spec

(Inherited)
Gtk.Widget.Queue_Clear

- To API doc
- To spec

(Inherited)
Gtk.Widget.Queue_Clear_Area

- To API doc
- To spec

(Inherited)
Gtk.Widget.Queue_Draw

- To API doc
- To spec

(Inherited)
Gtk.Widget.Queue_Draw_Area

- To API doc
- To spec

(Inherited)
Gtk.Widget.Queue_Resize

- To API doc
- To spec

(Inherited)
Gtk.Widget.Queue_Resize_No_Redraw

- To API doc
- To spec

(Inherited)
Gtk.Widget.Realize

- To API doc
- To spec

(Inherited)
Gtk.Widget.Region_Intersect

- To API doc
- To spec

(Inherited)
Gtk.Widget.Remove_Accelerator

- To API doc
- To spec

(Inherited)
Gtk.Widget.Remove_Mnemonic_Label

- To API doc
- To spec

(Inherited)
Gtk.Widget.Render_Icon

- To API doc
- To spec

(Inherited)
Gtk.Widget.Reparent

- To API doc
- To spec

(Inherited)
Gtk.Widget.Reset_Rc_Styles

- To API doc
- To spec

(Inherited)
Gtk.Widget.Reset_Shapes

- To API doc
- To spec

(Inherited)
Gtk.Widget.Restore_Default_Style

- To API doc
- To spec

(Inherited)
Gtk.Widget.Send_Expose

- To API doc
- To spec

(Inherited)
Gtk.Widget.Set_Accel_Path

- To API doc
- To spec

(Inherited)
Gtk.Widget.Set_App_Paintable

- To API doc
- To spec

(Inherited)
Gtk.Widget.Set_Child_Visible

- To API doc
- To spec

(Inherited)
Gtk.Widget.Set_Colormap

- To API doc
- To spec

(Inherited)
Gtk.Widget.Set_Composite_Name

- To API doc
- To spec

(Inherited)
Gtk.Widget.Set_Direction

- To API doc
- To spec

(Inherited)
Gtk.Widget.Set_Double_Buffered

- To API doc
- To spec

(Inherited)
Gtk.Widget.Set_Events

- To API doc
- To spec

(Inherited)
Gtk.Widget.Set_Extension_Events

- To API doc
- To spec

(Inherited)
Gtk.Widget.Set_Flags

- To API doc
- To spec

(Inherited)
Gtk.Widget.Set_Has_Tooltip

- To API doc
- To spec

(Inherited)
Gtk.Widget.Set_Name

- To API doc
- To spec

(Inherited)
Gtk.Widget.Set_No_Show_All

- To API doc
- To spec

(Inherited)
Gtk.Widget.Set_Parent

- To API doc
- To spec

(Inherited)
Gtk.Widget.Set_Parent_Window

- To API doc
- To spec

(Inherited)
Gtk.Widget.Set_Redraw_On_Allocate

- To API doc
- To spec

(Inherited)
Gtk.Widget.Set_Scroll_Adjustments

- To API doc
- To spec

(Inherited)
Gtk.Widget.Set_Sensitive

- To API doc
- To spec

(Inherited)
Gtk.Widget.Set_Size_Request

- To API doc
- To spec

(Inherited)
Gtk.Widget.Set_State

- To API doc
- To spec

(Inherited)
Gtk.Widget.Set_Style

- To API doc
- To spec

(Inherited)
Gtk.Widget.Set_Tooltip_Markup

- To API doc
- To spec

(Inherited)
Gtk.Widget.Set_Tooltip_Text

- To API doc
- To spec

(Inherited)
Gtk.Widget.Set_Tooltip_Window

- To API doc
- To spec

(Inherited)
Gtk.Widget.Set_UPosition

- To API doc
- To spec

(Inherited)
Gtk.Widget.Set_USize

- To API doc
- To spec

(Inherited)
Gtk.Widget.Set_Window

- To API doc
- To spec

(Inherited)
Gtk.Widget.Shape_Combine_Mask

- To API doc
- To spec

(Inherited)
Gtk.Widget.Show

- To API doc
- To spec

(Inherited)
Gtk.Widget.Show_All

- To API doc
- To spec

(Inherited)
Gtk.Widget.Show_Now

- To API doc
- To spec

(Inherited)
Gtk.Widget.Size_Allocate

- To API doc
- To spec

(Inherited)
Gtk.Widget.Size_Request

- To API doc
- To spec

(Inherited)
Gtk.Widget.Style_Get_Property

- To API doc
- To spec

(Inherited)
Gtk.Widget.Thaw_Child_Notify

- To API doc
- To spec

(Inherited)
Gtk.Widget.Trigger_Tooltip_Query

- To API doc
- To spec

(Inherited)
Gtk.Widget.Unmap

- To API doc
- To spec

(Inherited)
Gtk.Widget.Unrealize

- To API doc
- To spec

(Inherited)
Gtk.Widget.Unset_Flags

- To API doc
- To spec

(Inherited)
Set_Hadjustment

- To API doc
- To spec

Set_Placement

- To API doc
- To spec

Set_Policy

- To API doc
- To spec

Set_Shadow_Type

- To API doc
- To spec

Set_Vadjustment

- To API doc
- To spec

Unset_Placement

- To API doc
- To spec

# Types

### Gtk_Scrolled_Window

- Goto declaration in source

    type Gtk_Scrolled_Window is access all Gtk_Scrolled_Window_Record'Class;

# Constants & Global variables

### Hadjustment_Property

- Goto declaration in source

(Glib.Properties.Property_Object)

    Hadjustment_Property       : constant Glib.Properties.Property_Object;

### Hscrollbar_Policy_Property

- Goto declaration in source

(Gtk.Enums.Property_Gtk_Policy_Type)

    Hscrollbar_Policy_Property : constant Gtk.Enums.Property_Gtk_Policy_Type;

### Shadow_Type_Property

- Goto declaration in source

(Gtk.Enums.Property_Gtk_Shadow_Type)

    Shadow_Type_Property       : constant Gtk.Enums.Property_Gtk_Shadow_Type;

### Vadjustment_Property

- Goto declaration in source

(Glib.Properties.Property_Object)

    Vadjustment_Property       : constant Glib.Properties.Property_Object;

### Vscrollbar_Policy_Property

- Goto declaration in source

(Gtk.Enums.Property_Gtk_Policy_Type)

    Vscrollbar_Policy_Property : constant Gtk.Enums.Property_Gtk_Policy_Type;

### Window_Placement_Property

- Goto declaration in source

(Gtk.Enums.Property_Gtk_Shadow_Type)

    Window_Placement_Property  : constant Gtk.Enums.Property_Gtk_Shadow_Type;

### Window_Placement_Set_Property

- Goto declaration in source

(Glib.Properties.Property_Boolean)

    Window_Placement_Set_Property : constant Glib.Properties.Property_Boolean;

### Scrollbar_Spacing_Property

- Goto declaration in source

(Glib.Properties.Property_Int)

    Scrollbar_Spacing_Property : constant Glib.Properties.Property_Int;

### Scrollbars_Within_Bevel_Property

- Goto declaration in source

(Glib.Properties.Property_Boolean)

    Scrollbars_Within_Bevel_Property :
         constant Glib.Properties.Property_Boolean;

### Signal_Move_Focus_Out

- Goto declaration in source

(Glib.Signal_Name)

    Signal_Move_Focus_Out : constant Glib.Signal_Name := "move_focus_out";

### Signal_Scroll_Child

- Goto declaration in source

(Glib.Signal_Name)

    Signal_Scroll_Child   : constant Glib.Signal_Name := "scroll_child";

# Subprograms & Entries

### Gtk_New

- Goto spec in source

    procedure Gtk_New (Scrolled_Window: out Gtk_Scrolled_Window;Hadjustment: Gtk_Adjustment := null;Vadjustment: Gtk_Adjustment := null);

Create a new scrolled window. The two arguments are the scrolled window's horizontal and vertical adjustments; these will be shared with the scrollbars and the child widget to keep the bars in sync with the child. Usually you want to use the default value Null_Adjustment for the adjustments, which will cause the scrolled window to create them for you.

### Initialize

- Goto spec in source

    procedure Initialize (Scrolled_Window: access Gtk_Scrolled_Window_Record'Class;Hadjustment: Gtk_Adjustment := null;Vadjustment: Gtk_Adjustment := null);

Internal initialization function. See the section "Creating your own widgets" in the documentation.

### Get_Type

- Goto spec in source
- Goto body in source

    function Get_Type return Gtk.Gtk_Type;

Return the internal value associated with a Gtk_Scrolled_Window.

### Set_Hadjustment

- Goto spec in source

    procedure Set_Hadjustment (Scrolled_Window: access Gtk_Scrolled_Window_Record;Hadjustment: Gtk_Adjustment);

### Get_Hadjustment

- Goto spec in source

    function Get_Hadjustment (Scrolled_Window: access Gtk_Scrolled_Window_Record) return Gtk_Adjustment;

Set the Gtk_Adjustment for the horizontal scrollbar. This adjustment is used to connect the horizontal scrollbar to the child widget's horizontal scroll functionality.

### Set_Vadjustment

- Goto spec in source

    procedure Set_Vadjustment (Scrolled_Window: access Gtk_Scrolled_Window_Record;Vadjustment: Gtk_Adjustment);

### Get_Vadjustment

- Goto spec in source

    function Get_Vadjustment (Scrolled_Window: access Gtk_Scrolled_Window_Record) return Gtk_Adjustment;

Set the Gtk_Adjustment for the vertical scrollbar. This adjustment is used to connect the vertical scrollbar to the child widget's vertical scroll functionality.

### Get_Hscrollbar

- Goto spec in source

    function Get_Hscrollbar (Scrolled_Window: access Gtk_Scrolled_Window_Record) return Gtk.Scrollbar.Gtk_Scrollbar;

Returns the horizontal scrollbar, or null if it doesn't have one.

### Get_Vscrollbar

- Goto spec in source

    function Get_Vscrollbar (Scrolled_Window: access Gtk_Scrolled_Window_Record) return Gtk.Scrollbar.Gtk_Scrollbar;

Returns the vertical scrollbar, or null if it doesn't have one.

### Set_Policy

- Goto spec in source

    procedure Set_Policy (Scrolled_Window: access Gtk_Scrolled_Window_Record;H_Scrollbar_Policy: Enums.Gtk_Policy_Type;V_Scrollbar_Policy: Enums.Gtk_Policy_Type);

### Get_Policy

- Goto spec in source

    procedure Get_Policy (Scrolled_Window: access Gtk_Scrolled_Window_Record;H_Scrollbar_Policy: out Enums.Gtk_Policy_Type;V_Scrollbar_Policy: out Enums.Gtk_Policy_Type);

Set the scrollbar policy for the horizontal and vertical scrollbars. It determines when the scrollbar should appear; it is a value from the Gtk_Policy_Type enumeration. If Policy_Always, the scrollbar is always present; if Policy_Never, the scrollbar is never present; if Policy_Automatic, the scrollbar is present only if needed (that is, if the slider part of the bar would be smaller than the trough - the display is larger than the page size).

### Set_Placement

- Goto spec in source

    procedure Set_Placement (Scrolled_Window: access Gtk_Scrolled_Window_Record;Window_Placement: Gtk.Enums.Gtk_Corner_Type);

### Get_Placement

- Goto spec in source

    function Get_Placement (Scrolled_Window: access Gtk_Scrolled_Window_Record) return Gtk.Enums.Gtk_Corner_Type;

Determine or return the location of the widget with respect to the scrollbars. The default is Corner_Top_Left.

### Unset_Placement

- Goto spec in source

    procedure Unset_Placement (Scrolled_Window: access Gtk_Scrolled_Window_Record);

Unsets the placement of the contents with respect to the scrollbars for the scrolled window. If no window placement is set for a scrolled window, it obeys the "gtk-scrolled-window-placement" XSETTING.

### Set_Shadow_Type

- Goto spec in source

    procedure Set_Shadow_Type (Scrolled_Window: access Gtk_Scrolled_Window_Record;Shadow_Type: Gtk.Enums.Gtk_Shadow_Type);

### Get_Shadow_Type

- Goto spec in source

    function Get_Shadow_Type (Scrolled_Window: access Gtk_Scrolled_Window_Record) return Gtk.Enums.Gtk_Shadow_Type;

Change the type of shadow drawn around the contents of Scrolled_Window.

### Add_With_Viewport

- Goto spec in source

    procedure Add_With_Viewport (Scrolled_Window: access Gtk_Scrolled_Window_Record;Child: access Gtk.Widget.Gtk_Widget_Record'Class);

Used to add children without native scrolling capabilities. This is simply a convenience function; it is equivalent to adding the unscrollable child to a viewport, then adding the viewport to the scrolled window. If a child has native scrolling, use Gtk.Container.Add instead of this function. The viewport scrolls the child by moving its Gdk_Window, and takes the size of the child to be the size of its toplevel Gdk_Window. This will be very wrong for most widgets that support native scrolling; for example, if you add a Gtk_Clist with a viewport, the whole widget will scroll, including the column headings. Thus Gtk_Clist supports scrolling already, and should not be used with the GtkViewport proxy. A widget supports scrolling natively if it contains a valid "set_scroll_adjustments" signal.