private with Ada.Strings.Unbounded;
private with Widgets.Buttons;
private with Widgets.Buttons.Groups;
package Game_Views.Ked is
type Dialog_Action is ( DA_None, DA_New, DA_Open, DA_Import, DA_Quit, DA_Save );
type Ked_View is new Game_View with private;
type A_Ked_View is access all Ked_View'Class;
procedure Do_Dialog_Action( this : access Ked_View;
action : Dialog_Action;
saveChanges : Boolean );
procedure Do_Dialog_Action( this : access Ked_View;
saveChanges : Boolean );
function Get_Filename( this : not null access Ked_View'Class ) return String;
procedure Save_World( this : access Ked_View; filename : String );
pragma Precondition( filename'Length > 0 );
private
use Ada.Strings.Unbounded;
use Widgets.Buttons;
use Widgets.Buttons.Groups;
type Ked_View is new Game_View with
record
initialized : Boolean := False;
loaded : Boolean := False;
modified : Boolean := False;
filename : Unbounded_String;
gridsnap : Boolean := True;
toolGrp,
layerGrp : A_Button_Group := null;
nextAction : Dialog_Action := DA_None;
end record;
procedure Delete( this : in out Ked_View );
procedure Handle_Close_Request( this : access Ked_View );
procedure Handle_Event( this : access Ked_View;
evt : in out A_Event;
resp : out Response_Type );
pragma Precondition( evt /= null );
procedure Handle_Paused( this : access Ked_View; paused : Boolean );
function Is_Modified( this : not null access Ked_View'Class ) return Boolean;
function Is_World_Loaded( this : not null access Ked_View'Class ) return Boolean;
procedure Populate_View( this : not null access Ked_View'Class;
xres,
yres,
scale : Integer );
procedure Set_Filename( this : access Ked_View; filename : String );
procedure Set_Gridsnap( this : access Ked_View; enabled : Boolean );
procedure Set_Modified( this : access Ked_View; modified : Boolean );
procedure Start( this : access Ked_View );
procedure Stop( this : access Ked_View );
procedure Tick( this : access Ked_View; upTime, dt : Time_Span );
procedure Update_Win_Title( this : access Ked_View );
end Game_Views.Ked;