agpl_1.0.0_b5da3320/src/agpl-gdk/agpl-gdk-drawer_action.ads

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
--  Proxy for drawing in a GdkDrawable, adding capabilities like autoscale,
--  zoom, axis flipping...

with Ada.Containers.Indefinite_Doubly_Linked_Lists;

with Gdk.Drawable; use Gdk.Drawable;

package Agpl.Gdk.Drawer_Action is

   type Object is abstract tagged null record;
   --  This type is used to encapsulate drawing primitives, so anyone can
   --  provide new ones.

   procedure Prepare  (This   : in out Object;
                       Transf : in     Float_Matrix;
                       Min_X,
                       Max_X,
                       Min_Y,
                       Max_Y  :    out Float) is abstract;
   --  Pre-transform the figure and say enclosing box.

   procedure Perform (This   : in out Object;
                      Transf : in     Float_Matrix; -- Scaling transformation.
                      Draw   :        Gdk_Drawable) is abstract;
   --  Do the real drawing.

   package Action_Lists is new
     Ada.Containers.Indefinite_Doubly_Linked_Lists
       (Drawer_Action.Object'Class, Drawer_Action."=");

   subtype Action_List is Action_Lists.List;

end Agpl.Gdk.Drawer_Action;