Index

Package: Checkboxes

Description

package Widgets.Buttons.Checkboxes is

Classes

Checkbox

type Checkbox is new Button with private;

Ancestors:

Primitive operations:

Draw_Content (overriding Widgets.Buttons.Draw_Content)
Get_Min_Height (overriding Widgets.Buttons.Get_Min_Height)
Get_Min_Width (overriding Widgets.Buttons.Get_Min_Width)
Handle_Key_Press (overriding Widgets.Handle_Key_Press)
Handle_Mouse_Press (overriding Widgets.Handle_Mouse_Press)
Objects.Construct (Inherited)
Set_Check_Icon
Widgets.Activate_Popup (Inherited)
Widgets.Bring_To_Front (Inherited)
Widgets.Buttons.Add_Listener (Inherited)
Widgets.Buttons.Add_Listener (Inherited)
Widgets.Buttons.Construct (Inherited)
Widgets.Buttons.Dispatch_Action (Inherited)
Widgets.Buttons.Remove_Listener (Inherited)
Widgets.Buttons.Set_Color (Inherited)
Widgets.Buttons.Set_Icon (Inherited)
Widgets.Buttons.Set_State (Inherited)
Widgets.Buttons.Set_Text (Inherited)
Widgets.Buttons.To_String (Inherited)
Widgets.Buttons.Toggle_State (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_Release (Inherited)
Widgets.Handle_Mouse_Held (Inherited)
Widgets.Handle_Mouse_Move (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.Translate_To_Content (Inherited)
Widgets.Translate_To_Window (Inherited)
A Checkbox is a variation of a button that toggles its state when pressed with a mouse or activated with the keyboard. It differs from a toggle button in that it has a checkbox icon that changes with the state, not a pressed/released look. It's state remains until the mouse presses on it again to toggle the state back again.

Types

A_Checkbox

type A_Checkbox is access all Checkbox'Class;

Subprograms & Entries

Create_Checkbox

function Create_Checkbox
( view: not null access Game_Views.Game_View'Class;
id: String;
text: String := "";
icon: String := "" ) return A_Checkbox;
Creates a new checkbox within 'view' with id 'id'. 'text' is the checkbox's text and 'icon' is the filename to use for the icon next to the text. Both are optional but at least one should be specified or the checkbox will be blank. The default state of the new checkbox is False.

Set_Check_Icon

procedure Set_Check_Icon
( this: access Checkbox;
icon: String );
Sets the filename of the checkmark icon to display in the box when the checkbox is checked. The icon should be BOX_SIZE pixels square.