package Widgets.Buttons.Checkboxes is
type Checkbox is new Button with private;
type A_Checkbox is access all Checkbox'Class;
function Create_Checkbox( view : not null access Game_Views.Game_View'Class;
id : String;
text : String := "";
icon : String := "" ) return A_Checkbox;
pragma Precondition( id'Length > 0 );
pragma Postcondition( Create_Checkbox'Result /= null );
procedure Set_Check_Icon( this : access Checkbox; icon : String );
private
BOX_SIZE : constant := 12;
type Checkbox is new Button with
record
checkIcon : Natural := 0;
end record;
procedure Draw_Content( this : access Checkbox; dc : Drawing_Context );
function Get_Min_Height( this : access Checkbox ) return Natural;
function Get_Min_Width( this : access Checkbox ) return Natural;
function Handle_Key_Press( this : access Checkbox;
evt : not null A_Key_Event ) return Boolean;
procedure Handle_Mouse_Press( this : access Checkbox;
evt : not null A_Mouse_Button_Event );
end Widgets.Buttons.Checkboxes;