Hosted by
|
with Ada.Tags; use Ada.Tags;
with Font_Loaders; use Font_Loaders;
with Choices; use Choices;
with Glyphs; use Glyphs;
with Keys; use Keys;
package Boxes.Keys is
subtype Accidentals is Positive range 1 .. 7;
type Glyph_Array is array(Accidentals) of Glyph_Access;
type Integer_Array is array(Accidentals) of Integer;
type Key_Box is new Box with private;
Key_Box_Tag : constant String;
type Key_Box_Access is access all Key_Box;
function Create
(Key : in Key_Access;
Middle_C : in Integer)
return Key_Box_Access;
function Get_Key
(This : access Key_Box)
return Key_Access;
function Get_Middle_C
(This : access Key_Box)
return Integer;
function Get_Center
(This : access Key_Box;
Index : in Accidentals)
return Vector;
procedure Layout
(This : access Key_Box;
Font : access Font_Loader);
procedure Print
(This : access Key_Box;
To : access Printer'Class;
Center : in Vector);
private
type Key_Box is
new Box with
record
Key : Key_Access;
Middle_C : Integer;
Glyphs : Glyph_Array;
Offsets : Integer_Array;
end record;
Key_Box_Tag : constant String := "boxes.keys.key_box";
end Boxes.Keys;
|