Index

Package: Labels

Description

package Widgets.Labels is

Classes

Label

type Label is new Widget with private;

Ancestors:

Primitive operations:

Construct
Draw_Content (overriding Widgets.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.Delete (Inherited)
Widgets.Draw (Inherited)
Widgets.Find_Widget (Inherited)
Widgets.Get_Color (Inherited)
Widgets.Get_Process_Name (Inherited)
Widgets.Get_View (Inherited)
Widgets.Get_Window (Inherited)
Widgets.Handle_Ancestor_Hidden (Inherited)
Widgets.Handle_Ancestor_Unhidden (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_Resize (Inherited)
Widgets.Handle_Unhidden (Inherited)
Widgets.Pack (Inherited)
Widgets.Set_Dirty (Inherited)
Widgets.Set_Parent (Inherited)
Widgets.Set_Zoom (Inherited)
Widgets.To_String (Inherited)
Widgets.Translate_To_Content (Inherited)
Widgets.Translate_To_Window (Inherited)
A Label widget is a simple text string with an optional icon to the left of the text. A label is intended for displaying static strings and isn't editable by the interface user.

Types

A_Label

type A_Label is access all Label'Class;

Subprograms & Entries

Create_Label

function Create_Label
( view: not null access Game_Views.Game_View'Class;
id: String;
text: String := "";
icon: String := "" ) return A_Label;
Creates a new Label within 'view' with id 'id'. Both 'text' and 'icon' are optional. 'icon' is the name of a frame in the Theme's tile library. The icon image can have an alpha channel for transparency.

Get_Text

function Get_Text
( this: not null access Label'Class ) return String;
Returns the label's text.

Set_Align

procedure Set_Align
( this: not null access Label'Class;
align: Align_Type );
Sets the label's text alignment. Both the text and icon will be aligned according to 'align'.

Set_Color

procedure Set_Color
( this: access Label;
purpose: Color_Purpose;
color: Color_Type );
Sets the color for a particular purpose when drawing the label. To remove the color behind the icon text, set the Foreground color to transparent.

Set_Icon

procedure Set_Icon
( this: not null access Label'Class;
icon: String );
Sets the label's icon. Pass an empty string to remove it.

Set_Text

procedure Set_Text
( this: not null access Label'Class;
text: String );
Sets the label's text.