Index

Package: Scroll_Panes

Description

package Widgets.Containers.Scroll_Panes is

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)
Handle_Mouse_Scroll (overriding Widgets.Handle_Mouse_Scroll)
Handle_Resize (overriding Widgets.Containers.Handle_Resize)
Objects.Construct (Inherited)
Widgets.Activate_Popup (Inherited)
Widgets.Bring_To_Front (Inherited)
Widgets.Containers.Add (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.Find_Widget (Inherited)
Widgets.Containers.Handle_Ancestor_Hidden (Inherited)
Widgets.Containers.Handle_Ancestor_Unhidden (Inherited)
Widgets.Containers.Pack (Inherited)
Widgets.Containers.Remove (Inherited)
Widgets.Containers.Set_Zoom (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.Handle_Blur (Inherited)
Widgets.Handle_Click (Inherited)
Widgets.Handle_Descendant_Hidden (Inherited)
Widgets.Handle_Descendant_Unhidden (Inherited)
Widgets.Handle_Disabled (Inherited)
Widgets.Handle_Enabled (Inherited)
Widgets.Handle_Enter (Inherited)
Widgets.Handle_Exit (Inherited)
Widgets.Handle_Focus (Inherited)
Widgets.Handle_Hidden (Inherited)
Widgets.Handle_Key_Held (Inherited)
Widgets.Handle_Key_Press (Inherited)
Widgets.Handle_Key_Release (Inherited)
Widgets.Handle_Mouse_Held (Inherited)
Widgets.Handle_Mouse_Move (Inherited)
Widgets.Handle_Mouse_Press (Inherited)
Widgets.Handle_Mouse_Release (Inherited)
Widgets.Handle_Unhidden (Inherited)
Widgets.Set_Color (Inherited)
Widgets.Set_Dirty (Inherited)
Widgets.Set_Parent (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 #|//| +------------+--+