-- $Date: 2004/03/08 10:42:42 $
-- $Revision: 1.7 $
-- $Author: jcrocholl $
-- $Hash: 9395acde670bc35fd99e6c567a99a1c1 $

-- 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 Printers; use Printers;
with Lists;
with Boxes.Measures; use Boxes.Measures;

package Boxes.Staves is

   package Measures_Lists is new Lists(Measure_Box_Access);
   subtype Measures_List is Measures_Lists.List;
   subtype Measures_List_Access is Measures_Lists.List_Access;

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

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

   -- Pointer to representation data.
   type Stave_Box_Access is access all Stave_Box;

   -- Constructor for instances.
   function Create
     return Stave_Box_Access-- The newly created stave box.

   -- Accessor to read the measures of a stave box.
   function Get_Measures
     (This : access Stave_Box)    -- The stave box to read from.
     return Measures_List_Access-- The measures of that stave box.

   procedure Add_Measure
     (This : access Stave_Box;       -- The stave box object instance.
      Add  : in Measure_Box_Access); -- Add this measure.

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

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

private

   -- Private representation.
   type Stave_Box is
     new Box with
      record
         Measures : Measures_List_Access-- The measures in this stave.
      end record;

   -- Work-around for GNAT bug.
   Stave_Box_Tag : constant String := "boxes.staves.stave_box";

end Boxes.Staves;