Index

Package: Popups

Description

package Widgets.Containers.Panels.Popups is
Copyright (c) 2012 Kevin Wellwood All rights reserved. This source code is distributed under the Modified BSD License. For terms and conditions, see license.txt.

Classes

Popup

type Popup is new Panel and Menu_Listener with private;

Ancestors:

Primitive operations:

Add_Menu_Item
Construct (overriding Widgets.Containers.Panels.Construct)
Get_Min_Height (overriding Widgets.Containers.Panels.Get_Min_Height)
Get_Min_Width (overriding Widgets.Containers.Panels.Get_Min_Width)
Handle_Action (overriding Widgets.Menu_Items.Handle_Action)
Objects.Construct (Inherited)
Pack (overriding Widgets.Containers.Pack)
Widgets.Activate_Popup (Inherited)
Widgets.Bring_To_Front (Inherited)
Widgets.Construct (Inherited)
Widgets.Containers.Add_Child (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.Draw_Content_Foreground (Inherited)
Widgets.Containers.Find_Widget_At (Inherited)
Widgets.Containers.Give_Focus (Inherited)
Widgets.Containers.Handle_Rooted (Inherited)
Widgets.Containers.Handle_Shown (Inherited)
Widgets.Containers.Panels.Add_Widget (Inherited)
Widgets.Containers.Panels.Clear_Widgets (Inherited)
Widgets.Containers.Panels.Draw_Content (Inherited)
Widgets.Containers.Panels.Get_Title (Inherited)
Widgets.Containers.Panels.Set_Border (Inherited)
Widgets.Containers.Panels.Set_Color (Inherited)
Widgets.Containers.Panels.Set_Icon (Inherited)
Widgets.Containers.Panels.Set_Title (Inherited)
Widgets.Containers.Remove_Child (Inherited)
Widgets.Get_Color (Inherited)
Widgets.Get_Process_Name (Inherited)
Widgets.Get_View (Inherited)
Widgets.Get_Window (Inherited)
Widgets.Is_Rooted (Inherited)
Widgets.Is_Showing (Inherited)
Widgets.On_Blur (Inherited)
Widgets.On_Click (Inherited)
Widgets.On_Descendant_Shown (Inherited)
Widgets.On_Disabled (Inherited)
Widgets.On_Enabled (Inherited)
Widgets.On_Enter (Inherited)
Widgets.On_Exit (Inherited)
Widgets.On_Focus (Inherited)
Widgets.On_Key_Press (Inherited)
Widgets.On_Key_Release (Inherited)
Widgets.On_Key_Typed (Inherited)
Widgets.On_Mouse_Held (Inherited)
Widgets.On_Mouse_Move (Inherited)
Widgets.On_Mouse_Press (Inherited)
Widgets.On_Mouse_Release (Inherited)
Widgets.On_Mouse_Scroll (Inherited)
Widgets.On_Resize (Inherited)
Widgets.On_Rooted (Inherited)
Widgets.On_Shown (Inherited)
Widgets.Set_Parent (Inherited)
Widgets.Set_Zoom (Inherited)
Widgets.To_String (Inherited)
Widgets.Translate_To_Content (Inherited)
Widgets.Translate_To_Window (Inherited)
A Popup widget is a context-sensitive menu widget that contains a single column of Menu_Items. It allows widgets to register for notifications when the widget loses visibility. It's minimum size is calculated from the minimum size of its children, so its size can be computed automatically. The popup widget registers itself as a listener for menu items added to it, and hides automatically when one is activated.

Types

A_Popup

type A_Popup is access all Popup'Class;

Subprograms & Entries

Create_Popup

function Create_Popup
( view: not null access Game_Views.Game_View'Class;
id: String;
title: String := "";
icon: String := "" ) return A_Popup;
Creates a new Popup menu within 'view' with id 'id'. If 'title' or 'icon' are given a value, the menu will have a title bar like a standard panel, displaying the popup menu's title text and/or icon. 'icon' is the filename of the icon in the theme's tile library.

Add_Menu_Item

procedure Add_Menu_Item
( this: access Popup;
item: in out A_Menu_Item );
Appends an item to the menu. Note that a Constraint_Error will be raised if 'child' is not a Menu_Item. Otherwise, if 'consume' is True then 'child' will be consumed. Regardless of the value of 'consume', 'child' will belong to the Popup widget.