8 #ifndef __VRV_LAYER_H__
9 #define __VRV_LAYER_H__
11 #include "atts_shared.h"
12 #include "drawinginterface.h"
39 public AttVisibility {
49 void Reset()
override;
50 std::string GetClassName()
const override {
return "layer"; }
112 void SetDrawingStemDir(data_STEMDIRECTION stemDirection) { m_drawingStemDir = stemDirection; }
114 data_STEMDIRECTION GetDrawingStemDir(
const LayerElement *element)
const;
115 data_STEMDIRECTION GetDrawingStemDir(
const ArrayOfBeamElementCoords *coords)
const;
116 data_STEMDIRECTION GetDrawingStemDir()
const {
return m_drawingStemDir; }
123 std::set<int> GetLayersNForTimeSpanOf(
const LayerElement *element)
const;
125 int GetLayerCountForTimeSpanOf(
const LayerElement *element)
const;
132 std::set<int> GetLayersNInTimeSpan(
134 const Fraction &time,
const Fraction &duration,
const Measure *measure,
int staff)
const;
135 int GetLayerCountInTimeSpan(
136 const Fraction &time,
const Fraction &duration,
const Measure *measure,
int staff)
const;
155 const Fraction &time,
const Fraction &duration,
const Measure *measure,
int staff,
bool excludeCurrent);
157 const Fraction &time,
const Fraction &duration,
const Measure *measure,
int staff,
bool excludeCurrent)
const;
166 KeySig *GetCurrentKeySig();
167 const KeySig *GetCurrentKeySig()
const;
168 Mensur *GetCurrentMensur();
169 const Mensur *GetCurrentMensur()
const;
170 MeterSig *GetCurrentMeterSig();
171 const MeterSig *GetCurrentMeterSig()
const;
172 Proport *GetCurrentProport();
173 const Proport *GetCurrentProport()
const;
176 void ResetStaffDefObjects();
184 bool DrawKeySigCancellation()
const {
return m_drawKeySigCancellation; }
185 void SetDrawKeySigCancellation(
bool drawKeySigCancellation) { m_drawKeySigCancellation = drawKeySigCancellation; }
187 Clef *GetStaffDefClef() {
return m_staffDefClef; }
188 const Clef *GetStaffDefClef()
const {
return m_staffDefClef; }
189 KeySig *GetStaffDefKeySig() {
return m_staffDefKeySig; }
190 const KeySig *GetStaffDefKeySig()
const {
return m_staffDefKeySig; }
191 Mensur *GetStaffDefMensur() {
return m_staffDefMensur; }
192 const Mensur *GetStaffDefMensur()
const {
return m_staffDefMensur; }
193 MeterSig *GetStaffDefMeterSig() {
return m_staffDefMeterSig; }
194 const MeterSig *GetStaffDefMeterSig()
const {
return m_staffDefMeterSig; }
195 MeterSigGrp *GetStaffDefMeterSigGrp() {
return m_staffDefMeterSigGrp; }
196 const MeterSigGrp *GetStaffDefMeterSigGrp()
const {
return m_staffDefMeterSigGrp; }
198 bool HasStaffDef()
const
200 return (m_staffDefClef || m_staffDefKeySig || m_staffDefMensur || m_staffDefMeterSig || m_staffDefMeterSigGrp);
210 bool DrawCautionKeySigCancel()
const {
return m_drawCautionKeySigCancel; }
211 void SetDrawCautionKeySigCancel(
bool drawCautionKeySig) { m_drawCautionKeySigCancel = drawCautionKeySig; }
213 Clef *GetCautionStaffDefClef() {
return m_cautionStaffDefClef; }
214 const Clef *GetCautionStaffDefClef()
const {
return m_cautionStaffDefClef; }
215 KeySig *GetCautionStaffDefKeySig() {
return m_cautionStaffDefKeySig; }
216 const KeySig *GetCautionStaffDefKeySig()
const {
return m_cautionStaffDefKeySig; }
217 Mensur *GetCautionStaffDefMensur() {
return m_cautionStaffDefMensur; }
218 const Mensur *GetCautionStaffDefMensur()
const {
return m_cautionStaffDefMensur; }
219 MeterSig *GetCautionStaffDefMeterSig() {
return m_cautionStaffDefMeterSig; }
220 const MeterSig *GetCautionStaffDefMeterSig()
const {
return m_cautionStaffDefMeterSig; }
222 bool HasCautionStaffDef()
const
225 m_cautionStaffDefClef || m_cautionStaffDefKeySig || m_cautionStaffDefMensur || m_cautionStaffDefMeterSig);
233 void SetCrossStaffFromAbove(
bool crossStaff) { m_crossStaffFromAbove = crossStaff; }
234 bool HasCrossStaffFromAbove()
const {
return m_crossStaffFromAbove; }
235 void SetCrossStaffFromBelow(
bool crossStaff) { m_crossStaffFromBelow = crossStaff; }
236 bool HasCrossStaffFromBelow()
const {
return m_crossStaffFromBelow; }
246 FunctorCode
Accept(Functor &functor)
override;
248 FunctorCode
Accept(ConstFunctor &functor)
const override;
249 FunctorCode AcceptEnd(Functor &functor)
override;
250 FunctorCode AcceptEnd(ConstFunctor &functor)
const override;
261 data_STEMDIRECTION m_drawingStemDir;
266 bool m_crossStaffFromBelow;
267 bool m_crossStaffFromAbove;
270 Clef *m_staffDefClef;
271 KeySig *m_staffDefKeySig;
272 Mensur *m_staffDefMensur;
273 MeterSig *m_staffDefMeterSig;
274 MeterSigGrp *m_staffDefMeterSigGrp;
275 bool m_drawKeySigCancellation;
278 Clef *m_cautionStaffDefClef;
279 KeySig *m_cautionStaffDefKeySig;
280 Mensur *m_cautionStaffDefMensur;
281 MeterSig *m_cautionStaffDefMeterSig;
282 bool m_drawCautionKeySigCancel;