Index

Package: Scroll_Panes

Description

package Widgets.Containers.Scroll_Panes is
Copyright (c) 2012 Kevin Wellwood All rights reserved. This source code is distributed under the Modified BSD License. For terms and conditions, see license.txt.

Classes

Scroll_Pane

type Scroll_Pane is new Container and Button_Listener with private;

Ancestors:

Primitive operations:

Adjust_Layout
Construct (overriding Widgets.Construct)
Draw_Content (overriding Widgets.Containers.Draw_Content)
Get_Inc_X
Get_Inc_Y
Handle_Action (overriding Widgets.Buttons.Handle_Action)
Objects.Construct (Inherited)
On_Mouse_Scroll (overriding Widgets.On_Mouse_Scroll)
On_Resize (overriding Widgets.On_Resize)
Widgets.Activate_Popup (Inherited)
Widgets.Bring_To_Front (Inherited)
Widgets.Containers.Add_Child (Inherited)
Widgets.Containers.Apply_Container_Layout (Inherited)
Widgets.Containers.Bring_To_Front (Inherited)
Widgets.Containers.Delete (Inherited)
Widgets.Containers.Delete_Child (Inherited)
Widgets.Containers.Delete_Children (Inherited)
Widgets.Containers.Draw (Inherited)
Widgets.Containers.Draw_Children (Inherited)
Widgets.Containers.Draw_Content_Foreground (Inherited)
Widgets.Containers.Find_Widget_At (Inherited)
Widgets.Containers.Give_Focus (Inherited)
Widgets.Containers.Handle_Rooted (Inherited)
Widgets.Containers.Handle_Shown (Inherited)
Widgets.Containers.Pack (Inherited)
Widgets.Containers.Remove_Child (Inherited)
Widgets.Get_Color (Inherited)
Widgets.Get_Min_Height (Inherited)
Widgets.Get_Min_Width (Inherited)
Widgets.Get_Process_Name (Inherited)
Widgets.Get_View (Inherited)
Widgets.Get_Window (Inherited)
Widgets.Is_Rooted (Inherited)
Widgets.Is_Showing (Inherited)
Widgets.On_Blur (Inherited)
Widgets.On_Click (Inherited)
Widgets.On_Descendant_Shown (Inherited)
Widgets.On_Disabled (Inherited)
Widgets.On_Enabled (Inherited)
Widgets.On_Enter (Inherited)
Widgets.On_Exit (Inherited)
Widgets.On_Focus (Inherited)
Widgets.On_Key_Press (Inherited)
Widgets.On_Key_Release (Inherited)
Widgets.On_Key_Typed (Inherited)
Widgets.On_Mouse_Held (Inherited)
Widgets.On_Mouse_Move (Inherited)
Widgets.On_Mouse_Press (Inherited)
Widgets.On_Mouse_Release (Inherited)
Widgets.On_Rooted (Inherited)
Widgets.On_Shown (Inherited)
Widgets.Set_Border (Inherited)
Widgets.Set_Color (Inherited)
Widgets.Set_Parent (Inherited)
Widgets.Set_Zoom (Inherited)
Widgets.To_String (Inherited)
Widgets.Translate_To_Content (Inherited)
Widgets.Translate_To_Window (Inherited)
A Scroll_Pane is a simple container widget with horizontal and vertical scrollbars that control a client widget's viewport. The client is displayed within the Scroll_Pane's content area as a child widget. Clients should implement the Scrollable interface to support scrolling.

Types

A_Scroll_Pane

type A_Scroll_Pane is access all Scroll_Pane'Class;

Subprograms & Entries

Create_Scroll_Pane

function Create_Scroll_Pane
( view: not null access Game_Views.Game_View'Class;
id: String ) return A_Scroll_Pane;
Creates a new Scroll_Pane within 'view' with id 'id'.

Draw_Hbar

procedure Draw_Hbar
( this: access Scroll_Pane;
draw: Boolean );
Shows or hides the horizontal scrollbar. If 'draw' is True, the scrollbar will be drawn. Toggling the draw state of the scrollbar will repack the scroll pane.

Draw_Vbar

procedure Draw_Vbar
( this: access Scroll_Pane;
draw: Boolean );
Shows or hides the vertical scrollbar. If 'draw' is True, the scrollbar will be drawn. Toggling the draw state of the scrollbar will repack the scroll pane.

Set_Client

procedure Set_Client
( this: access Scroll_Pane;
client: in out A_Widget );
Sets the single client widget of the scroll pane. If the scroll pane already has a client, the old one will be deleted. The client widget should implement the Scrollable interface to support scrolling. 'client' will be consumed.

Set_Padding

procedure Set_Padding
( this: access Scroll_Pane;
padding: Natural );
Sets the padding (in pixels) between the edges of the client and the edges of the scroll pane and scroll bars. See diagram below. padding padding -- -- +------------+--+ | |##| | padding | +------+ |v | | |client| |b | | | | |a | | +------+ |r | | |##| | padding +------------+--+ |# hbar #|//| +------------+--+