8 #ifndef __VRV_SCOREDEF_H__
9 #define __VRV_SCOREDEF_H__
11 #include "atts_gestural.h"
13 #include "atts_shared.h"
14 #include "customtuning.h"
15 #include "drawinginterface.h"
17 #include "scoredefinterface.h"
59 ScoreDefInterface *GetScoreDefInterface()
override {
return vrv_cast<ScoreDefInterface *>(
this); }
60 const ScoreDefInterface *GetScoreDefInterface()
const override {
return vrv_cast<const ScoreDefInterface *>(
this); }
67 bool HasClefInfo(
int depth = 1)
const;
68 bool HasKeySigInfo(
int depth = 1)
const;
69 bool HasMensurInfo(
int depth = 1)
const;
70 bool HasMeterSigInfo(
int depth = 1)
const;
71 bool HasMeterSigGrpInfo(
int depth = 1)
const;
84 const Clef *GetClef()
const;
85 Clef *GetClefCopy()
const;
87 const KeySig *GetKeySig()
const;
88 KeySig *GetKeySigCopy()
const;
90 const Mensur *GetMensur()
const;
91 Mensur *GetMensurCopy()
const;
92 MeterSig *GetMeterSig();
93 const MeterSig *GetMeterSig()
const;
94 MeterSig *GetMeterSigCopy()
const;
95 MeterSigGrp *GetMeterSigGrp();
96 const MeterSigGrp *GetMeterSigGrp()
const;
97 MeterSigGrp *GetMeterSigGrpCopy()
const;
110 FunctorCode AcceptEnd(
Functor &functor)
override;
111 FunctorCode AcceptEnd(
ConstFunctor &functor)
const override;
134 public AttOptimization,
147 std::string GetClassName()
const override {
return "scoreDef"; }
220 bool DrawLabels()
const {
return m_drawLabels; }
221 void SetDrawLabels(
bool drawLabels) { m_drawLabels = drawLabels; }
228 int GetDrawingWidth()
const {
return m_drawingWidth; }
229 void SetDrawingWidth(
int drawingWidth);
236 int GetDrawingLabelsWidth()
const {
return m_drawingLabelsWidth; }
237 void SetDrawingLabelsWidth(
int width);
238 void ResetDrawingLabelsWidth() { m_drawingLabelsWidth = 0; }
245 PgFoot *GetPgFoot(data_PGFUNC func);
246 const PgFoot *GetPgFoot(data_PGFUNC func)
const;
247 PgHead *GetPgHead(data_PGFUNC func);
248 const PgHead *GetPgHead(data_PGFUNC func)
const;
255 CustomTuning &GetCustomTuning() {
return m_customTuning; }
256 const CustomTuning &GetCustomTuning()
const {
return m_customTuning; }
257 void SetCustomTuning(
const CustomTuning &customTuning) { m_customTuning = customTuning; }
265 bool IsSectionRestart()
const;
275 void AddOssias(
int staffN,
const std::list<int>,
bool above);
287 FunctorCode AcceptEnd(
Functor &functor)
override;
288 FunctorCode AcceptEnd(
ConstFunctor &functor)
const override;
295 void FilterList(ListOfConstObjects &childList)
const override;
301 bool m_insertScoreDef;
309 int m_drawingLabelsWidth;
This abstract class is the base class for all const functors.
Definition: functor.h:126
Definition: customtuning.h:28
This abstract class is the base class for all mutable functors.
Definition: functor.h:101
This class represents a basic object.
Definition: object.h:64
This class is an pseudo interface for elements maintaining a flat list of children LayerElement for p...
Definition: object.h:916
This class is a base class for MEI scoreDef or staffDef elements.
Definition: scoredef.h:43
FunctorCode Accept(Functor &functor) override
Interface for class functor visitation.
void Reset() override
Reset the object, that is 1) removing all children and 2) resetting all attributes.
This class represents a MEI scoreDef.
Definition: scoredef.h:136
FunctorCode Accept(Functor &functor) override
Interface for class functor visitation.
bool HasSystemStartLine() const
void SetRedrawFlags(int redrawFlags)
Set the redraw flag to all staffDefs.
void ResetFromDrawingValues()
Replace the staffDef score attributes with the ones currently set as drawing values.
void Reset() override
Reset the object, that is 1) removing all children and 2) resetting all attributes.
int GetMaxStaffSize() const
Return the maximum staff size in the scoreDef (100 if empty)
void ReplaceDrawingValues(const ScoreDef *newScoreDef)
Replace the scoreDef with the content of the newScoreDef.
void ReplaceDrawingLabels(const StaffGrp *newStaffGrp)
Replace the corresponding staffGrp with the labels of the newStaffGrp.
void AddOssias(int staffN, const std::list< int >, bool above)
Add ossia staffDefs to the staffN staffDef (above or below)
int GetInsertOrderFor(ClassId classId) const override
Return an order for the given ClassId.
std::vector< int > GetStaffNs() const
Return all the @n values of the staffDef in a scoreDef.
void FilterList(ListOfConstObjects &childList) const override
Filter the flat list and keep only StaffDef elements.
bool IsSupportedChild(ClassId classId) override
Check if a object is allowed as child.
void ReplaceDrawingValues(const StaffDef *newStaffDef)
Replace the corresponding staffDef with the content of the newStaffDef.
bool AddChildAdditionalCheck(Object *child) override
Additional check when adding a child.
StaffGrp * GetStaffGrp(const std::string &n)
Get the staffGrp with number n (NULL if not found).
Object * Clone() const override
Method call for copying child classes.
Definition: scoredef.h:145
StaffDef * GetStaffDef(int n)
Get the staffDef with number n (NULL if not found).
This class is an interface for elements implementing score attributes, such as <scoreDef>,...
Definition: scoredefinterface.h:42
This class represents a MEI staffDef.
Definition: staffdef.h:37
This class represents a MEI staffGrp.
Definition: staffgrp.h:39