Index

Package: Toggles

Description

package Widgets.Buttons.Toggles is

Classes

Toggle_Button

type Toggle_Button is new Button with private;

Ancestors:

Primitive operations:

Handle_Key_Press (overriding Widgets.Handle_Key_Press)
Handle_Mouse_Press (overriding Widgets.Handle_Mouse_Press)
Objects.Construct (Inherited)
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.Draw_Content (Inherited)
Widgets.Buttons.Get_Min_Height (Inherited)
Widgets.Buttons.Get_Min_Width (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 Toggle_Button is a variation of a button that toggles its state when pressed with a mouse or activated with the keyboard. It's state remains until the mouse presses on it again to toggle the state back again.

Types

A_Toggle_Button

type A_Toggle_Button is access all Toggle_Button'Class;

Subprograms & Entries

Create_Toggle_Button

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