1. -- 
  2. -- Copyright (c) 2012 Kevin Wellwood 
  3. -- All rights reserved. 
  4. -- 
  5. -- This source code is distributed under the Modified BSD License. For terms and 
  6. -- conditions, see license.txt. 
  7. -- 
  8.  
  9. package Tools.Paintbrushes is 
  10.  
  11.     type Paintbrush is new Tool with private; 
  12.  
  13.     function Create_Paintbrush( tile : Natural ) return A_Tool; 
  14.     pragma Postcondition( Create_Paintbrush'Result /= null ); 
  15.  
  16.     function Get_Tile( this : not null access Paintbrush'Class ) return Natural; 
  17.  
  18. private 
  19.  
  20.     type Paintbrush is new Tool with 
  21.         record 
  22.             tile      : Natural := 0; 
  23.             overTileX, 
  24.             overTileY : Integer := -1; 
  25.             overLayer : Integer := -1; 
  26.             lastFunc  : Function_Type := Primary; 
  27.         end record; 
  28.  
  29.     procedure Construct( this : access Paintbrush; tile : Natural ); 
  30.  
  31.     procedure Apply( this : access Paintbrush; context : Tool_Context ); 
  32.  
  33.     function Get_Type( this : access Paintbrush ) return Tool_Type; 
  34.  
  35. end Tools.Paintbrushes;