7 #ifndef __VRV_LYRICELEMENT_H__
8 #define __VRV_LYRICELEMENT_H__
10 #include "atts_shared.h"
11 #include "layerelement.h"
12 #include "offsetinterface.h"
31 public AttPlacementRelStaff,
33 public AttVoltaGroupingSym {
41 OffsetInterface *GetOffsetInterface()
override {
return vrv_cast<OffsetInterface *>(
this); }
42 const OffsetInterface *GetOffsetInterface()
const override {
return vrv_cast<const OffsetInterface *>(
this); }
52 void SetDrawingDirectSylTrack()
const { m_drawingDirectSylTrack =
true; }
53 void ResetDrawingDirectSylTrack() { m_drawingDirectSylTrack =
false; }
61 void SetDrawingVerseN(
int verseN)
const { m_drawingVerseN = std::max(verseN, 1); }
64 void SetDrawingLyricGroupN(
int groupN)
const { m_drawingLyricGroupN = std::max(groupN, 1); }
65 void ResetDrawingLyricGroup()
68 m_drawingLyricGroupN = 1;
69 m_drawingDirectSylTrack =
false;
79 mutable int m_drawingVerseN;
80 mutable int m_drawingLyricGroupN;
81 mutable bool m_drawingDirectSylTrack;
This class is a hold the data and corresponds to the model of a MVC design pattern.
Definition: doc.h:41
This class is a base class for the Layer (<layer>) content.
Definition: layerelement.h:51
Shared implementation for note-attached verse and refrain lyrics.
Definition: lyricelement.h:33
std::pair< int, int > GetVoltaDrawingRange() const
Return the lowest and highest document-wide drawing tracks used by this container's volta children.
int GetVoltaLineN(const Volta *volta) const
Return the one-based lyric row occupied by a volta alternative.
void Reset() override
Virtual reset method.
bool HasDrawingDirectSylTrack() const
Return whether the document-wide lyric group has a direct-syllable track.
Definition: lyricelement.h:51
bool IsSupportedChild(ClassId classId) override
Add sung text or an editorial wrapper to a lyric container.
int AdjustPosition(int &overlap, int freeSpace, const Doc *doc)
Calculate and apply a horizontal lyric-overlap adjustment.
int GetLyricLineCount() const
Return the total number of lyric rows, including a separate direct-syllable row.
int GetDrawingLyricGroupN() const
Stable processing group used to isolate connectors and horizontal spacing.
Definition: lyricelement.h:63
int GetDrawingVerseN() const
Drawing slot used for vertical lyric alignment.
Definition: lyricelement.h:60
bool HasDirectSyl() const
Return whether the container also has syllables outside volta containers.
int GetVoltaCount() const
Return the number of alternative lyric rows represented by volta children.
This class is an interface for elements having a single visual offset, such as arpeg,...
Definition: offsetinterface.h:28
Sung text for a specific iteration of a repeated section of music.
Definition: volta.h:26