8 #ifndef __VRV_VERTICAL_ALIGNER_H__
9 #define __VRV_VERTICAL_ALIGNER_H__
119 int GetOverflowBelow(
const Doc *doc,
bool scoreDefClef =
false)
const;
141 FunctorCode AcceptEnd(
Functor &functor)
override;
142 FunctorCode AcceptEnd(
ConstFunctor &functor)
const override;
166 std::map<int, SpacingType> m_spacingTypes;
194 void SetYRel(
int yRel);
195 int GetYRel()
const {
return m_yRel; }
207 void AddVerseN(
int verseN, data_STAFFREL place,
int lineCount = 1);
208 int GetVerseCount(
bool collapse)
const;
209 int GetVerseCountAbove(
bool collapse)
const;
210 int GetVerseCountBelow(
bool collapse)
const;
211 int GetVersePositionAbove(
int verseN,
bool collapse,
int lineN = 1)
const;
212 int GetVersePositionBelow(
int verseN,
bool collapse,
int lineN = 1)
const;
221 const StaffAlignment *GetSharedLyricsAlignment()
const {
return m_sharedLyricsAlignment; }
262 Staff *GetStaff() {
return m_staff; }
263 const Staff *GetStaff()
const {
return m_staff; }
271 System *GetParentSystem() {
return m_system; }
272 const System *GetParentSystem()
const {
return m_system; }
273 void SetParentSystem(System *system);
292 int CalcOverflowAbove(
const BoundingBox *box)
const;
293 int CalcOverflowBelow(
const BoundingBox *box)
const;
300 int GetMinimumSpacing(
const Doc *doc)
const;
301 int CalcMinimumRequiredSpacing(
const Doc *doc)
const;
309 void SetOverflowAbove(
int overflowAbove);
310 int GetOverflowAbove()
const {
return m_overflowAbove; }
311 void SetOverflowBelow(
int overflowBottom);
312 int GetOverflowBelow()
const {
return m_overflowBelow; }
313 void SetOverlap(
int overlap);
314 int GetOverlap()
const {
return m_overlap; }
315 void SetRequestedSpaceAbove(
int space);
316 int GetRequestedSpaceAbove()
const {
return m_requestedSpaceAbove; }
317 void SetRequestedSpaceBelow(
int space);
318 int GetRequestedSpaceBelow()
const {
return m_requestedSpaceBelow; }
319 void SetRequestedSpacing(
int spacing) { m_requestedSpacing = spacing; }
320 int GetRequestedSpacing()
const {
return m_requestedSpacing; }
321 int GetStaffHeight()
const {
return m_staffHeight; }
322 void SetScoreDefClefOverflowAbove(
int overflowAbove) { m_scoreDefClefOverflowAbove = overflowAbove; }
323 int GetScoreDefClefOverflowAbove()
const {
return m_scoreDefClefOverflowAbove; }
324 void SetScoreDefClefOverflowBelow(
int overflowBelow) { m_scoreDefClefOverflowBelow = overflowBelow; }
325 int GetScoreDefClefOverflowBelow()
const {
return m_scoreDefClefOverflowBelow; }
332 double GetJustificationFactor(
const Doc *doc)
const;
339 void AddBBoxAbove(BoundingBox *box) { m_overflowAboveBBoxes.push_back(box); }
340 void AddBBoxBelow(BoundingBox *box) { m_overflowBelowBBoxes.push_back(box); }
341 void ClearBBoxesAbove() { m_overflowAboveBBoxes.clear(); }
342 void ClearBBoxesBelow() { m_overflowBelowBBoxes.clear(); }
343 ArrayOfBoundingBoxes &GetBBoxesAboveForModification() {
return m_overflowAboveBBoxes; }
344 ArrayOfBoundingBoxes &GetBBoxesBelowForModification() {
return m_overflowBelowBBoxes; }
345 const ArrayOfBoundingBoxes &GetBBoxesAbove() {
return m_overflowAboveBBoxes; }
346 const ArrayOfBoundingBoxes &GetBBoxesBelow() {
return m_overflowBelowBBoxes; }
380 FunctorCode AcceptEnd(
Functor &functor)
override;
381 FunctorCode AcceptEnd(
ConstFunctor &functor)
const override;
388 int GetMinimumStaffSpacing(
const Doc *doc,
const AttSpacing *attSpacing)
const;
393 bool IsInBracketGroup(
bool isFirst)
const;
406 ArrayOfFloatingPositioners m_floatingPositioners;
410 bool m_floatingPositionersSorted;
428 std::map<int, int> m_verseAboveNs;
429 std::map<int, int> m_verseBelowNs;
433 std::vector<std::pair<int, const Alignment *>> m_lyricPositionsAbove;
434 std::vector<std::pair<int, const Alignment *>> m_lyricPositionsBelow;
447 int m_requestedSpaceAbove;
448 int m_requestedSpaceBelow;
449 int m_requestedSpacing;
451 int m_scoreDefClefOverflowAbove;
452 int m_scoreDefClefOverflowBelow;
458 ArrayOfBoundingBoxes m_overflowAboveBBoxes;
459 ArrayOfBoundingBoxes m_overflowBelowBBoxes;
This class represents a basic object in the layout domain.
Definition: boundingbox.h:32
This abstract class is the base class for all const functors.
Definition: functor.h:126
This class is a hold the data and corresponds to the model of a MVC design pattern.
Definition: doc.h:41
This class represents elements appearing within a measure.
Definition: floatingobject.h:28
This class represents a basic object in the layout domain.
Definition: floatingobject.h:165
This abstract class is the base class for all mutable functors.
Definition: functor.h:101
Shared implementation for note-attached verse and refrain lyrics.
Definition: lyricelement.h:33
This class represents a basic object.
Definition: object.h:66
This class represents an ossia.
Definition: ossia.h:28
This class represents a MEI scoreDef.
Definition: scoredef.h:136
Definition: boundingbox.h:340
This class stores an alignement position staves will point to.
Definition: verticalaligner.h:180
void SetCurrentFloatingPositioner(FloatingObject *object, Object *objectX, Object *objectY, char spanningType)
Retrieves or creates the FloatingPositioner for the FloatingObject on this staff.
ArrayOfFloatingPositioners FindAllFloatingPositioners(ClassId classId)
Find all FloatingPositioner corresponding to a FloatingObject with given ClassId.
FunctorCode Accept(Functor &functor) override
Interface for class functor visitation.
int GetStaffSize() const
Returns the staff size (100 if no staff object is refered to)
const AttSpacing * GetAttSpacing() const
Returns the spacing attribute object of correspond ScoreDef.
void ClearPositioners()
Deletes all the FloatingPositioner objects.
void FindAllIntersectionPoints(SegmentedLine &line, const BoundingBox &boundingBox, const std::vector< ClassId > &classIds, int margin) const
Find all the intersection points with a vertical line (top to bottom)
FloatingPositioner * GetCorrespFloatingPositioner(const FloatingObject *object)
Look for the FloatingPositioner corresponding to the FloatingObject.
const ArrayOfFloatingPositioners & GetFloatingPositioners()
Retrieve all FloatingPositioner.
Definition: verticalaligner.h:232
void AdjustBracketGroupSpacing(const Doc *doc, const StaffAlignment *previous, int spacing)
Find overflow for the alignments taking bracket group elements into account.
void SortPositioners()
Sort the FloatingPositioner objects.
FloatingPositioner * FindFirstFloatingPositioner(ClassId classId)
Look for the first FloatingPositioner corresponding to the FloatingObject of the ClassId.
This class represents a MEI staffDef.
Definition: staffdef.h:37
This class represents a staff in a laid-out score (Doc).
Definition: staff.h:110
This class aligns the content of a system It contains a vector of StaffAlignment.
Definition: verticalaligner.h:33
SpacingType
Declares different spacing types between staves.
Definition: verticalaligner.h:38
void SetSpacing(const ScoreDef *scoreDef)
Calculates and sets spacing for specified ScoreDef.
FunctorCode Accept(Functor &functor) override
Interface for class functor visitation.
double GetJustificationSum(const Doc *doc) const
Get justification sum.
void ReorderBy(const std::vector< int > &staffNs)
Reorder the staff alignment as given in the staffNs.
StaffAlignment * GetStaffAlignmentForStaffN(int staffN)
Get the StaffAlignment for the staffN.
System * GetSystem()
Get pointer to the parent system.
StaffAlignment * GetStaffAlignment(int idx, Staff *staff, const Doc *doc)
Get the StaffAlignment at index idx.
void Reset() override
Reset the aligner (clear the content) and creates the end (bottom) alignement.
int GetOverflowAbove(const Doc *doc, bool scoreDefClef=false) const
Get System Overflows.
void FindAllIntersectionPoints(SegmentedLine &line, const BoundingBox &boundingBox, const std::vector< ClassId > &classIds, int margin) const
Find all the intersection points with a vertical line (top to bottom)
void ShareLyricLines()
Merge the verses above a staff into the verses below the previous staff when both have lyrics.
StaffAlignment * GetBottomAlignment()
Get bottom StaffAlignment for the system.
Definition: verticalaligner.h:64
void FindAllPositionerPointingTo(ArrayOfFloatingPositioners *positioners, const FloatingObject *object)
Find all the positioners pointing to an object;.
bool CopyChildren() const override
Do not copy children for HorizontalAligner.
Definition: verticalaligner.h:52
bool IsSupportedChild(ClassId classId) override
Override the method of adding AlignmentReference children.
This class represents a system in a laid-out score (Doc).
Definition: system.h:36