Verovio
Source code documentation
verse.h
1 // Name: verse.h
3 // Author: Laurent Pugin
4 // Created: 2014
5 // Copyright (c) Authors and others. All rights reserved.
7 
8 #ifndef __VRV_VERSE_H__
9 #define __VRV_VERSE_H__
10 
11 #include "atts_shared.h"
12 #include "layerelement.h"
13 
14 namespace vrv {
15 
16 class LabelAbbr;
17 class Syl;
18 
19 //----------------------------------------------------------------------------
20 // Verse
21 //----------------------------------------------------------------------------
22 
23 class Verse : public LayerElement,
24  public AttColor,
25  public AttLang,
26  public AttNInteger,
27  public AttPlacementRelStaff,
28  public AttTypography {
29 public:
34  Verse();
36  virtual ~Verse();
37  Object *Clone() const override { return new Verse(*this); }
38  void Reset() override;
39  std::string GetClassName() const override { return "verse"; }
41 
46  bool IsSupportedChild(ClassId classId) override;
47 
51  LabelAbbr *GetDrawingLabelAbbr() { return m_drawingLabelAbbr; }
53  const LabelAbbr *GetDrawingLabelAbbr() const { return m_drawingLabelAbbr; }
54  void SetDrawingLabelAbbr(LabelAbbr *labelAbbr) { m_drawingLabelAbbr = labelAbbr; }
56 
62  int AdjustPosition(int &overlap, int freeSpace, const Doc *doc);
63 
64  //----------//
65  // Functors //
66  //----------//
67 
71  FunctorCode Accept(Functor &functor) override;
73  FunctorCode Accept(ConstFunctor &functor) const override;
74  FunctorCode AcceptEnd(Functor &functor) override;
75  FunctorCode AcceptEnd(ConstFunctor &functor) const override;
77 
78 private:
79  //
80 public:
81  //
82 private:
86  LabelAbbr *m_drawingLabelAbbr;
87 };
88 
89 } // namespace vrv
90 
91 #endif
vrv::Verse::AdjustPosition
int AdjustPosition(int &overlap, int freeSpace, const Doc *doc)
Calculate the adjustment according to the overlap and the free space available before.
vrv::Verse
Definition: verse.h:23
vrv::Verse::Reset
void Reset() override
Virtual reset method.
vrv::Object
This class represents a basic object.
Definition: object.h:59
vrv::Verse::IsSupportedChild
bool IsSupportedChild(ClassId classId) override
Add an element (a syl) to a verse.
vrv::Verse::Accept
FunctorCode Accept(Functor &functor) override
Interface for class functor visitation.
vrv::LayerElement
This class is a base class for the Layer (<layer>) content.
Definition: layerelement.h:46
vrv::Verse::Clone
Object * Clone() const override
Method call for copying child classes.
Definition: verse.h:37