limited with Game_Views;
private with Ada.Real_Time;
package Widgets.Buttons.Pushes.Menu_Buttons is
type Menu_Button is new Push_Button and Animated with private;
type A_Menu_Button is access all Menu_Button'Class;
function Create_Menu_Button( view : not null access Game_Views.Game_View'Class;
id : String;
text : String := "";
icon : String := "" ) return A_Button;
pragma Precondition( id'Length > 0 );
pragma Postcondition( Create_Menu_Button'Result /= null );
private
use Ada.Real_Time;
type Menu_Button is new Push_Button and Animated with
record
focusTime : Time_Span;
end record;
procedure Construct( this : access Menu_Button;
view : not null access Game_Views.Game_View'Class;
id : String;
text : String;
icon : String );
pragma Precondition( id'Length > 0 );
procedure Handle_Blur( this : access Menu_Button );
procedure Handle_Disabled( this : access Menu_Button );
procedure Handle_Enabled( this : access Menu_Button );
procedure Handle_Focus( this : access Menu_Button );
function Handle_Key_Press( this : access Menu_Button;
evt : not null A_Key_Event ) return Boolean;
procedure Tick( this : access Menu_Button; time : Tick_Time );
end Widgets.Buttons.Pushes.Menu_Buttons;