package Widgets.Menu_Items.Menu_Checkboxes is
type Menu_Checkbox is new Menu_Item with private;
type A_Menu_Checkbox is access all Menu_Checkbox'Class;
function Create_Menu_Checkbox( view : not null access Game_Views.Game_View'Class;
id : String;
text : String := "";
checked : Boolean := False
) return A_Menu_Checkbox;
pragma Precondition( id'Length > 0 );
pragma Postcondition( Create_Menu_Checkbox'Result /= null );
private
type Menu_Checkbox is new Menu_Item with
record
checked : Boolean := False;
end record;
procedure Construct( this : access Menu_Checkbox;
view : not null access Game_Views.Game_View'Class;
id : String;
text : String;
checked : Boolean );
pragma Precondition( id'Length > 0 );
procedure Draw_Content( this : access Menu_Checkbox; dc : Drawing_Context );
procedure Handle_Mouse_Release( this : access Menu_Checkbox;
evt : not null A_Mouse_Button_Event );
end Widgets.Menu_Items.Menu_Checkboxes;