-- $Date: 2004/03/08 10:42:42 $
-- $Revision: 1.6 $
-- $Author: jcrocholl $
-- $Hash: 989b2c5bc471ffbe2020677d35467d37 $

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

with Ada.Tags; use Ada.Tags;
with Font_Loaders; use Font_Loaders;
with Glyphs; use Glyphs;
with Printers; use Printers;
with Times; use Times;

package Boxes.Times is

   -- Public representation.
   type Time_Box is new Box with private;

   -- Work-around for GNAT bug.
   Time_Box_Tag : constant String;

   -- Pointer to representation data.
   type Time_Box_Access is access all Time_Box;

   -- Constructor for instances.
   function Create
     (Time : in Time_Access-- The initial time.
     return Time_Box_Access-- The newly created time box.

   -- Accessor to read the time of a time box.
   function Get_Time
     (This : access Time_Box-- The time box to read from.
     return Time_Access;      -- The time of that time box.

   procedure Layout
     (This : access Time_Box;     -- The time box object instance.
      Font : access Font_Loader); -- Use this font loader.

   procedure Print
     (This   : access Time_Box;           -- The time box object instance.
      To     : access Printer'Class-- Render to this printer.
      Center : in Vector);                -- Center of container.

private

   -- Private representation.
   type Time_Box is
     new Box with
      record
         Time         : Time_Access;  -- The time signature in this box.
         Upper        : Glyph_Access-- The glyph for upper number or big C.
         Lower        : Glyph_Access-- The glyph for lower number or slash.
         Upper_Center : Vector;       -- Horizontal offset for beats.
         Lower_Center : Vector;       -- Horizontal offset for beat-type.
      end record;

   -- Work-around for GNAT bug.
   Time_Box_Tag : constant String := "boxes.times.time_box";

end Boxes.Times;