8 #ifndef __VRV_VERTICAL_ALIGNER_H__
9 #define __VRV_VERTICAL_ALIGNER_H__
112 int GetOverflowBelow(
const Doc *doc,
bool scoreDefClef =
false)
const;
134 FunctorCode AcceptEnd(
Functor &functor)
override;
135 FunctorCode AcceptEnd(
ConstFunctor &functor)
const override;
159 std::map<int, SpacingType> m_spacingTypes;
187 void SetYRel(
int yRel);
188 int GetYRel()
const {
return m_yRel; }
200 void AddVerseN(
int verseN, data_STAFFREL place,
int lineCount = 1);
201 int GetVerseCount(
bool collapse)
const;
202 int GetVerseCountAbove(
bool collapse)
const;
203 int GetVerseCountBelow(
bool collapse)
const;
204 int GetVersePositionAbove(
int verseN,
bool collapse,
int lineN = 1)
const;
205 int GetVersePositionBelow(
int verseN,
bool collapse,
int lineN = 1)
const;
246 Staff *GetStaff() {
return m_staff; }
247 const Staff *GetStaff()
const {
return m_staff; }
255 System *GetParentSystem() {
return m_system; }
256 const System *GetParentSystem()
const {
return m_system; }
257 void SetParentSystem(System *system);
276 int CalcOverflowAbove(
const BoundingBox *box)
const;
277 int CalcOverflowBelow(
const BoundingBox *box)
const;
284 int GetMinimumSpacing(
const Doc *doc)
const;
285 int CalcMinimumRequiredSpacing(
const Doc *doc)
const;
293 void SetOverflowAbove(
int overflowAbove);
294 int GetOverflowAbove()
const {
return m_overflowAbove; }
295 void SetOverflowBelow(
int overflowBottom);
296 int GetOverflowBelow()
const {
return m_overflowBelow; }
297 void SetOverlap(
int overlap);
298 int GetOverlap()
const {
return m_overlap; }
299 void SetRequestedSpaceAbove(
int space);
300 int GetRequestedSpaceAbove()
const {
return m_requestedSpaceAbove; }
301 void SetRequestedSpaceBelow(
int space);
302 int GetRequestedSpaceBelow()
const {
return m_requestedSpaceBelow; }
303 void SetRequestedSpacing(
int spacing) { m_requestedSpacing = spacing; }
304 int GetRequestedSpacing()
const {
return m_requestedSpacing; }
305 int GetStaffHeight()
const {
return m_staffHeight; }
306 void SetScoreDefClefOverflowAbove(
int overflowAbove) { m_scoreDefClefOverflowAbove = overflowAbove; }
307 int GetScoreDefClefOverflowAbove()
const {
return m_scoreDefClefOverflowAbove; }
308 void SetScoreDefClefOverflowBelow(
int overflowBelow) { m_scoreDefClefOverflowBelow = overflowBelow; }
309 int GetScoreDefClefOverflowBelow()
const {
return m_scoreDefClefOverflowBelow; }
316 double GetJustificationFactor(
const Doc *doc)
const;
323 void AddBBoxAbove(BoundingBox *box) { m_overflowAboveBBoxes.push_back(box); }
324 void AddBBoxBelow(BoundingBox *box) { m_overflowBelowBBoxes.push_back(box); }
325 void ClearBBoxesAbove() { m_overflowAboveBBoxes.clear(); }
326 void ClearBBoxesBelow() { m_overflowBelowBBoxes.clear(); }
327 ArrayOfBoundingBoxes &GetBBoxesAboveForModification() {
return m_overflowAboveBBoxes; }
328 ArrayOfBoundingBoxes &GetBBoxesBelowForModification() {
return m_overflowBelowBBoxes; }
329 const ArrayOfBoundingBoxes &GetBBoxesAbove() {
return m_overflowAboveBBoxes; }
330 const ArrayOfBoundingBoxes &GetBBoxesBelow() {
return m_overflowBelowBBoxes; }
364 FunctorCode AcceptEnd(
Functor &functor)
override;
365 FunctorCode AcceptEnd(
ConstFunctor &functor)
const override;
372 int GetMinimumStaffSpacing(
const Doc *doc,
const AttSpacing *attSpacing)
const;
377 bool IsInBracketGroup(
bool isFirst)
const;
390 ArrayOfFloatingPositioners m_floatingPositioners;
394 bool m_floatingPositionersSorted;
412 std::map<int, int> m_verseAboveNs;
413 std::map<int, int> m_verseBelowNs;
422 int m_requestedSpaceAbove;
423 int m_requestedSpaceBelow;
424 int m_requestedSpacing;
426 int m_scoreDefClefOverflowAbove;
427 int m_scoreDefClefOverflowBelow;
433 ArrayOfBoundingBoxes m_overflowAboveBBoxes;
434 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:173
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:216
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:32
SpacingType
Declares different spacing types between staves.
Definition: verticalaligner.h:37
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)
StaffAlignment * GetBottomAlignment()
Get bottom StaffAlignment for the system.
Definition: verticalaligner.h:63
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:51
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