1. package Widgets.Menu_Items.Menu_Checkboxes is 
  2.  
  3.     type Menu_Checkbox is new Menu_Item with private; 
  4.     type A_Menu_Checkbox is access all Menu_Checkbox'Class; 
  5.  
  6.     function Create_Menu_Checkbox( view    : not null access Game_Views.Game_View'Class; 
  7.                                    id      : String; 
  8.                                    text    : String := ""; 
  9.                                    enabled : Boolean := False 
  10.                                  ) return A_Menu_Checkbox; 
  11.     pragma Precondition( id'Length > 0 ); 
  12.     pragma Postcondition( Create_Menu_Checkbox'Result /= null ); 
  13.  
  14. private 
  15.  
  16.     type Menu_Checkbox is new Menu_Item with 
  17.         record 
  18.             on : Boolean := False; 
  19.         end record; 
  20.  
  21.     procedure Construct( this    : access Menu_Checkbox; 
  22.                          view    : not null access Game_Views.Game_View'Class; 
  23.                          id      : String; 
  24.                          text    : String; 
  25.                          enabled : Boolean ); 
  26.     pragma Precondition( id'Length > 0 ); 
  27.  
  28.     procedure Draw_Content( this : access Menu_Checkbox; dc : Drawing_Context ); 
  29.  
  30.     procedure Handle_Mouse_Release( this : access Menu_Checkbox; 
  31.                                     evt  : not null A_Mouse_Button_Event ); 
  32.  
  33. end Widgets.Menu_Items.Menu_Checkboxes;