Hosted by
|
with Ada.Tags; use Ada.Tags;
with Font_Loaders; use Font_Loaders;
with Glyphs; use Glyphs;
with Printers; use Printers;
with Music.Notes; use Music.Notes;
with Lists;
with Boxes.Note_Heads; use Boxes.Note_Heads;
package Boxes.Chords is
package Head_Lists is new Lists(Note_Head_Box_Access);
subtype Head_List is Head_Lists.List;
subtype Head_List_Access is Head_Lists.List_Access;
subtype High is Integer range 3 .. 9;
type High_Ledger_Array is array(High) of Glyph_Access;
subtype Low is Integer range -9 .. -3;
type Low_Ledger_Array is array(Low) of Glyph_Access;
type Chord_Box is new Box with private;
Chord_Box_Tag : constant String;
type Chord_Box_Access is access all Chord_Box;
function Create
return Chord_Box_Access;
procedure Add_Note
(This : access Chord_Box;
Add : access Note;
Middle_C : in Integer);
procedure Layout_Note_Heads
(This : access Chord_Box;
Font : access Font_Loader);
procedure Layout_Stem_Down
(This : access Chord_Box;
Font : access Font_Loader);
procedure Layout_Stem_Up
(This : access Chord_Box;
Font : access Font_Loader);
procedure Layout_Dots
(This : access Chord_Box;
Font : access Font_Loader);
procedure Layout_Ledger
(This : access Chord_Box;
Font : access Font_Loader);
procedure Layout
(This : access Chord_Box;
Font : access Font_Loader);
procedure Print
(This : access Chord_Box;
To : access Printer'Class;
Center : in Vector);
private
type Chord_Box is
new Box with
record
Note_Heads : Head_List_Access;
Highest : Integer;
Lowest : Integer;
Stem : Boolean;
Stem_Down : Boolean;
Stem_Box : Rectangle;
Note_Type : Note_Type_Enum;
Flag : Glyph_Access;
Flag_Offset : Vector;
Dots : Natural;
High_Ledger : High_Ledger_Array;
Low_Ledger : Low_Ledger_Array;
end record;
Chord_Box_Tag : constant String := "boxes.chords.chord_box";
end Boxes.Chords;
|