package Widgets.Containers.Panels is
type Panel is new Container with private;
type A_Panel is access all Panel'Class;
function Create_Panel( view : not null access Game_Views.Game_View'Class;
id : String;
title : String := "";
icon : String := "" ) return A_Panel;
pragma Precondition( id'Length > 0 );
pragma Postcondition( Create_Panel'Result /= null );
function Get_Title( this : access Panel ) return String;
procedure Set_Border( this : access Panel; border : Border_Type );
procedure Set_Color( this : access Panel;
purpose : Color_Purpose;
color : Color_Type );
procedure Set_Icon( this : access Panel; icon : String );
procedure Set_Title( this : access Panel; title : String );
private
type Panel is new Container with
record
titlePadding : Natural := 4;
title : Unbounded_String;
icon : Natural := 0;
contentTop : Integer := 0;
end record;
procedure Construct( this : access Panel;
view : not null access Game_Views.Game_View'Class;
id : String;
title : String;
icon : String );
pragma Precondition( id'Length > 0 );
procedure Draw_Content( this : access Panel; dc : Drawing_Context );
function Get_Min_Height( this : access Panel ) return Natural;
function Get_Min_Width( this : access Panel ) return Natural;
end Widgets.Containers.Panels;