Hosted by
|
with Ada.Tags; use Ada.Tags;
with Font_Loaders; use Font_Loaders;
with Printers; use Printers;
with Lists;
with Boxes.Clefs; use Boxes.Clefs;
with Boxes.Keys; use Boxes.Keys;
with Boxes.Times; use Boxes.Times;
with Boxes.Arcs; use Boxes.Arcs;
with Boxes.Chords; use Boxes.Chords;
with Music.Barlines; use Music.Barlines;
package Boxes.Measures is
package Time_Lists is new Lists(Time_Box_Access);
subtype Time_List is Time_Lists.List;
subtype Time_List_Access is Time_Lists.List_Access;
package Chord_Lists is new Lists(Chord_Box_Access);
subtype Chord_List is Chord_Lists.List;
subtype Chord_List_Access is Chord_Lists.List_Access;
Bar_Line_Width : constant := 12.0;
Min_Measure_Width : constant := 600.0;
type Measure_Box is new Box with private;
Measure_Box_Tag : constant String;
type Measure_Box_Access is access all Measure_Box;
function Create
return Measure_Box_Access;
procedure Set_Clef
(This : access Measure_Box;
Clef : in Clef_Box_Access);
function Get_Clef
(This : access Measure_Box)
return Clef_Box_Access;
procedure Set_Key
(This : access Measure_Box;
Key : in Key_Box_Access);
function Get_Key
(This : access Measure_Box)
return Key_Box_Access;
function Get_Times
(This : access Measure_Box)
return Time_List_Access;
procedure Set_Arc
(This : access Measure_Box;
Arc : in Arc_Box_Access);
function Get_Arc
(This : access Measure_Box)
return Arc_Box_Access;
function Get_Chords
(This : access Measure_Box)
return Chord_List_Access;
procedure Set_Barline
(This : access Measure_Box;
Barline : in Bar_Style_Enum);
function Get_Barline
(This : access Measure_Box)
return Bar_Style_Enum;
procedure Add_Time
(This : access Measure_Box;
Add : access Time_Box);
procedure Add_Chord
(This : access Measure_Box;
Add : access Chord_Box);
procedure Layout
(This : access Measure_Box;
Font : access Font_Loader);
procedure Print
(This : access Measure_Box;
To : access Printer'Class;
Center : in Vector);
private
type Measure_Box is
new Box with
record
Clef : Clef_Box_Access;
Key : Key_Box_Access;
Times : Time_List_Access;
Arc : Arc_Box_Access;
Chords : Chord_List_Access;
Barline : Bar_Style_Enum;
end record;
Measure_Box_Tag : constant String := "boxes.measures.measure_box";
end Boxes.Measures;
|