with Widgets.Menu_Items; use Widgets.Menu_Items;
package Widgets.Containers.Panels.Popups is
type Popup is new Panel and Menu_Listener with private;
type A_Popup is access all Popup'Class;
function Create_Popup( view : not null access Game_Views.Game_View'Class;
id : String;
title : String := "";
icon : String := "" ) return A_Popup;
pragma Precondition( id'Length > 0 );
pragma Postcondition( Create_Popup'Result /= null );
procedure Add( this : access Popup;
child : in out A_Widget;
consume : Boolean := True );
pragma Precondition( child /= null );
pragma Postcondition( consume xor child /= null );
private
type Popup is new Panel and Menu_Listener with null record;
procedure Construct( this : access Popup;
view : not null access Game_Views.Game_View'Class;
id : String;
title : String;
icon : String );
pragma Precondition( id'Length > 0 );
function Get_Min_Height( this : access Popup ) return Natural;
function Get_Min_Width( this : access Popup ) return Natural;
procedure Handle_Action( this : access Popup;
action : A_Menu_Action );
procedure Pack( this : access Popup );
end Widgets.Containers.Panels.Popups;