Index

Package: Panels

Description

package Widgets.Containers.Panels is

Classes

Panel

type Panel is new Container with private;

Ancestors:

Immediate Children:

Primitive operations:

Construct
Draw_Content (overriding Widgets.Containers.Draw_Content)
Get_Min_Height (overriding Widgets.Get_Min_Height)
Get_Min_Width (overriding Widgets.Get_Min_Width)
Objects.Construct (Inherited)
Set_Color (overriding Widgets.Set_Color)
Widgets.Activate_Popup (Inherited)
Widgets.Bring_To_Front (Inherited)
Widgets.Construct (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.Handle_Resize (Inherited)
Widgets.Containers.Pack (Inherited)
Widgets.Containers.Remove (Inherited)
Widgets.Containers.Set_Zoom (Inherited)
Widgets.Get_Color (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_Dirty (Inherited)
Widgets.Set_Parent (Inherited)
Widgets.To_String (Inherited)
Widgets.Translate_To_Content (Inherited)
Widgets.Translate_To_Window (Inherited)
A Panel is a simple container for multiple widgets. It can optionally have a border, a background color to display when its children don't fill its content area, and a title bar on the top, with an icon and/or text. The Panel's title bar is displayed automatically if the Panel has either an icon or title text. Panels are useful for visually grouping objects together so that a group of them can be moved or shown/hidden simultaneously by performing the operation once on their Panel container. The Panel class is also extended for more specialized uses as a modal dialog and a context-sensitive popup.

Types

A_Panel

type A_Panel is access all Panel'Class;

Subprograms & Entries

Create_Panel

function Create_Panel
( view: not null access Game_Views.Game_View'Class;
id: String;
title: String := "";
icon: String := "" ) return A_Panel;
Creates a new Panel within 'view' with id 'id'. If either 'title' or 'icon' are passed a value, the panel will be displayed with a title bar at the top, showing its icon and/or title text using left justification.

Get_Title

function Get_Title
( this: access Panel ) return String;
Returns the panel's title string.

Set_Border

procedure Set_Border
( this: access Panel;
border: Border_Type );
Sets the panel's border style.

Set_Color

procedure Set_Color
( this: access Panel;
purpose: Color_Purpose;
color: Color_Type );
Sets the color to be used for a specific purpose when drawing the panel.

Set_Icon

procedure Set_Icon
( this: access Panel;
icon: String );
Sets the icon to display in the Panel's title bar, by filename. If 'icon' is an empty string, the icon will be removed. The display state of the panel's title bar will be automatically updated as necessary.

Set_Title

procedure Set_Title
( this: access Panel;
title: String );
Sets the title text to display in the Panel's title bar. If 'icon' is an empty string, the icon will be removed. The display state of the panel's title bar will be automatically updated as necessary.