1. package Widgets.Buttons.Checkboxes is 
  2.  
  3.     type Checkbox is new Button with private; 
  4.     type A_Checkbox is access all Checkbox'Class; 
  5.  
  6.     function Create_Checkbox( view : not null access Game_Views.Game_View'Class; 
  7.                               id   : String; 
  8.                               text : String := ""; 
  9.                               icon : String := "" ) return A_Checkbox; 
  10.     pragma Precondition( id'Length > 0 ); 
  11.     pragma Postcondition( Create_Checkbox'Result /= null ); 
  12.  
  13.     procedure Set_Check_Icon( this : access Checkbox; icon : String ); 
  14.  
  15. private 
  16.  
  17.     BOX_SIZE : constant := 12; 
  18.  
  19.     ---------------------------------------------------------------------------- 
  20.  
  21.     type Checkbox is new Button with 
  22.         record 
  23.             checkIcon : Natural := 0; 
  24.         end record; 
  25.  
  26.     procedure Draw_Content( this : access Checkbox; dc : Drawing_Context ); 
  27.  
  28.     function Get_Min_Height( this : access Checkbox ) return Natural; 
  29.  
  30.     function Get_Min_Width( this : access Checkbox ) return Natural; 
  31.  
  32.     function Handle_Key_Press( this : access Checkbox; 
  33.                                evt  : not null A_Key_Event ) return Boolean; 
  34.  
  35.     procedure Handle_Mouse_Press( this : access Checkbox; 
  36.                                   evt  : not null A_Mouse_Button_Event ); 
  37.  
  38. end Widgets.Buttons.Checkboxes;