1. package Widgets.Containers.Panels is 
  2.  
  3.     type Panel is new Container with private; 
  4.     type A_Panel is access all Panel'Class; 
  5.  
  6.     function Create_Panel( view  : not null access Game_Views.Game_View'Class; 
  7.                            id    : String; 
  8.                            title : String := ""; 
  9.                            icon  : String := "" ) return A_Panel; 
  10.     pragma Precondition( id'Length > 0 ); 
  11.     pragma Postcondition( Create_Panel'Result /= null ); 
  12.  
  13.     function Get_Title( this : access Panel ) return String; 
  14.  
  15.     procedure Set_Border( this : access Panel; border : Border_Type ); 
  16.  
  17.     procedure Set_Color( this    : access Panel; 
  18.                          purpose : Color_Purpose; 
  19.                          color   : Color_Type ); 
  20.  
  21.     procedure Set_Icon( this : access Panel; icon : String ); 
  22.  
  23.     procedure Set_Title( this : access Panel; title : String ); 
  24.  
  25. private 
  26.  
  27.     type Panel is new Container with 
  28.         record 
  29.             -- constant for the life of the widget 
  30.             titlePadding : Natural := 4; 
  31.  
  32.             title        : Unbounded_String; 
  33.             icon         : Natural := 0; 
  34.             contentTop   : Integer := 0;      -- top of the children content area 
  35.         end record; 
  36.  
  37.     procedure Construct( this  : access Panel; 
  38.                          view  : not null access Game_Views.Game_View'Class; 
  39.                          id    : String; 
  40.                          title : String; 
  41.                          icon  : String ); 
  42.     pragma Precondition( id'Length > 0 ); 
  43.  
  44.     procedure Draw_Content( this : access Panel; dc : Drawing_Context ); 
  45.  
  46.     -- Returns the set minimum height, or computed minimum height without 
  47.     -- accounting for child widget sizes. 
  48.     function Get_Min_Height( this : access Panel ) return Natural; 
  49.  
  50.     -- Returns the set minimum width, or computed minimum width without 
  51.     -- accounting for child widget sizes. 
  52.     function Get_Min_Width( this : access Panel ) return Natural; 
  53.  
  54. end Widgets.Containers.Panels;