with Keyboard; use Keyboard;
with Objects; use Objects;
with Worlds; use Worlds;
package Tools is
type Tool_Type is (
Pointer_Tool,
Paint_Tool,
Matrix_Tool,
Entity_Tool,
Trigger_Tool
);
type Function_Type is ( Primary, Secondary, Tertiary );
type Tool_Context is
record
func : Function_Type;
modifiers : Modifiers_Array;
first : Boolean;
world : A_World;
worldX,
worldY,
layer : Integer;
end record;
type Tool is abstract new Object with private;
type A_Tool is access all Tool'Class;
procedure Apply( this : access Tool;
context : Tool_Context ) is abstract;
function Get_Type( this : access Tool ) return Tool_Type is abstract;
function Copy( src : A_Tool ) return A_Tool;
pragma Postcondition( Copy'Result /= src or else src = null );
procedure Delete( this : in out A_Tool );
private
type Tool is abstract new Object with null record;
end Tools;