Index

Package: Containers

Description

package Widgets.Containers is

Classes

Container (abstract)

type Container is abstract new Widget with private;

Ancestors:

Immediate Children:

Primitive operations:

Apply_Container_Layout
Bring_To_Front
Delete (overriding Widgets.Delete)
Delete_Child
Delete_Children
Draw (overriding Widgets.Draw)
Draw_Children
Draw_Content (overriding Widgets.Draw_Content)
Find_Widget (overriding Widgets.Find_Widget)
Handle_Ancestor_Hidden (overriding Widgets.Handle_Ancestor_Hidden)
Handle_Ancestor_Unhidden (overriding Widgets.Handle_Ancestor_Unhidden)
Handle_Resize (overriding Widgets.Handle_Resize)
Objects.Construct (Inherited)
Pack (overriding Widgets.Pack)
Set_Zoom (overriding Widgets.Set_Zoom)
Widgets.Activate_Popup (Inherited)
Widgets.Bring_To_Front (Inherited)
Widgets.Construct (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_Mouse_Scroll (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 Container widget is a parent widget that contains multiple child widgets. Each child widget is drawn within the content area of the parent. Widget layouts applied to child widgets are relative to the content area of their container. An input event not handled by a widget will be passed up the widget tree to its container.

Types

A_Container

type A_Container is access all Container'Class;

Subprograms & Entries

Add

procedure Add
( this: access Container;
child: in out A_Widget;
consume: Boolean := True );
Adds 'child' as a child widget of this container. The child's parent is set by this procedure. If 'consume' is True, 'child' will be consumed, otherwise it will be left as-is. In either case, however, the Container will own 'child' after this is called, and will delete it if it's still a child at the time of deletion.

Bring_To_Front

procedure Bring_To_Front
( this: access Container;
child: not null A_Widget );
Brings the 'child' widget to the front of the drawing Z-order within this container. If 'child' overlaps any sibling widgets, it will be drawn on top.

Apply_Container_Layout

procedure Apply_Container_Layout
( this: access Container;
child: not null A_Widget );
Applies the container's special child layout to the given child widget.

Delete_Children

procedure Delete_Children
( this: access Container );
Removes and deletes all child widgets.

Draw_Content (abstract)

procedure Draw_Content
( this: access Container;
dc: Drawing_Context ) is abstract;
Draws the container's content behind its children. This will be called before child widgets are drawn, in the back-to-front drawing model.

Remove

procedure Remove
( this: access Container;
child: not null A_Widget );
Removes the widget from the child list without deleting it. The child's parent reference is not modified.