-- $Date: 2004/03/08 11:35:39 $
-- $Revision: 1.13 $
-- $Author: jcrocholl $
-- $Hash: 41eebd00d1f93e79f3a95a5a5454ca3a $

-- This file was automatically created with ado.php.
-- Manual changes will be lost when it is updated.

with Real_Numbers; use Real_Numbers;
with Real_Vectors; use Real_Vectors;
with Glyph_Images; use Glyph_Images;
with Font_Loaders; use Font_Loaders;
with Printers; use Printers;

package Boxes is

   Quiet : constant Boolean := True;

   -- Public representation.
   type Box is abstract tagged limited private;

   -- Pointer to representation data.
   type Box_Access is access all Box'Class;

   -- Mutator to update the center of a box.
   procedure Set_Center
     (This   : access Box;               -- The box to be updated.
      Center : in Vector := (0.0, 0.0)); -- The new center of that box.

   -- Accessor to read the center of a box.
   function Get_Center
     (This : access Box-- The box to read from.
     return Vector;      -- The center of that box.

   -- Accessor to read the bounds of a box.
   function Get_Bounds
     (This : access Box-- The box to read from.
     return Rectangle;   -- The bounds of that box.

   -- Accessor to read the minimum width of a box.
   function Get_Minimum_Width
     (This : access Box-- The box to read from.
     return Real;        -- The minimum width of that box.

   -- Accessor to read the optimum width of a box.
   function Get_Optimum_Width
     (This : access Box-- The box to read from.
     return Real;        -- The optimum width of that box.

   procedure Layout
     (This : access Box;         -- The box object instance.
      Font : access Font_Loader-- Use this font loader.
     is abstract;

   procedure Print
     (This   : access Box;                -- The box object instance.
      To     : access Printer'Class-- Use this printer.
      Center : in Vector)                 -- Center of container.
     is abstract;

   procedure Print_Bounds
     (This   : access Box;                -- The box object instance.
      To     : access Printer'Class-- Use this printer.
      Center : in Vector);                -- Center of container.

   procedure Add_Width
     (This  : access Box;             -- The box object instance.
      Inner : access Box'Class); -- Add width from this box.

   procedure Max_Bounds
     (This  : access Box;             -- The box object instance.
      Inner : access Box'Class); -- Add width from this box.

   procedure Estimate_Width
     (This : access Box); -- The box object instance.

   function Get_Left
     (This : access Box-- The box object instance.
     return Real;        -- The horizontal minimum coordinate.

   function Get_Top
     (This : access Box-- The box object instance.
     return Real;        -- The vertical minimum coordinate.

   function Get_Right
     (This : access Box-- The box object instance.
     return Real;        -- The horizontal maximum coordinate.

   function Get_Bottom
     (This : access Box-- The box object instance.
     return Real;        -- The vertical maximum coordinate.

private

   -- Private representation.
   type Box is abstract tagged limited record
      Center        : Vector := (0.0, 0.0);         -- Origin in output.
      Bounds        : Rectangle := (others => 0.0); -- Bounding box in output.
      Minimum_Width : Real := 0.0;                  -- Minimum output display width.
      Optimum_Width : Real := 0.0;                  -- Optimum output display width.
   end record;

end Boxes;