Verovio
Source code documentation
calcledgerlinesfunctor.h
1 // Name: calcledgerlinesfunctor.h
3 // Author: David Bauer
4 // Created: 2022
5 // Copyright (c) Authors and others. All rights reserved.
7 
8 #ifndef __VRV_CALCLEDGERLINESFUNCTOR_H__
9 #define __VRV_CALCLEDGERLINESFUNCTOR_H__
10 
11 #include "functor.h"
12 
13 namespace vrv {
14 
15 //----------------------------------------------------------------------------
16 // CalcLedgerLinesFunctor
17 //----------------------------------------------------------------------------
18 
23 public:
29  virtual ~CalcLedgerLinesFunctor() = default;
31 
32  /*
33  * Abstract base implementation
34  */
35  bool ImplementsEndInterface() const override { return true; }
36 
37  /*
38  * Functor interface
39  */
41  FunctorCode VisitAccid(Accid *accid) override;
42  FunctorCode VisitCursor(Cursor *cursor) override;
43  FunctorCode VisitLayer(Layer *layer) override;
44  FunctorCode VisitNote(Note *note) override;
45  FunctorCode VisitStaffEnd(Staff *staff) override;
47 
48 protected:
49  //
50 private:
54  void CalcForLayerElement(LayerElement *layerElement, int width, data_HORIZONTALALIGNMENT alignment);
58  void AdjustLedgerLines(
59  ArrayOfLedgerLines &lines, ArrayOfLedgerLines &cueLines, double cueScaling, int extension, int minExtension);
60 
61 public:
62  //
63 private:
64  //
65 };
66 
67 } // namespace vrv
68 
69 #endif // __VRV_CALCLEDGERLINESFUNCTOR_H__
This class models the MEI <accid> element.
Definition: accid.h:41
This class calculates the ledger lines.
Definition: calcledgerlinesfunctor.h:22
bool ImplementsEndInterface() const override
Return true if the functor implements the end interface.
Definition: calcledgerlinesfunctor.h:35
This class implements a curor for the editor.
Definition: cursor.h:27
This abstract class is the base class for all mutable functors that need access to the document.
Definition: functor.h:151
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
This class represents a layer in a laid-out score (Doc).
Definition: layer.h:40
This class models the MEI <note> element.
Definition: note.h:69
This class represents a staff in a laid-out score (Doc).
Definition: staff.h:110