Verovio
Source code documentation
divline.h
1 // Name: divline.h
3 // Author: Yinan Zhou
4 // Created: 2021
5 // Copyright (c) Authors and others. All rights reserved.
7 
8 #ifndef __VRV_DIVLINE_H__
9 #define __VRV_DIVLINE_H__
10 
11 #include "atts_externalsymbols.h"
12 #include "atts_neumes.h"
13 #include "atts_shared.h"
14 #include "layerelement.h"
15 #include "offsetinterface.h"
16 
17 namespace vrv {
18 
19 //----------------------------------------------------------------------------
20 // DivLine
21 //----------------------------------------------------------------------------
22 
26 class DivLine : public LayerElement,
27  public OffsetInterface,
28  public AttColor,
29  public AttDivLineLog,
30  public AttExtSymAuth,
31  public AttExtSymNames,
32  public AttNNumberLike,
33  public AttVisibility {
34 public:
40  DivLine();
41  virtual ~DivLine();
42  Object *Clone() const override { return new DivLine(*this); }
43  void Reset() override;
44  std::string GetClassName() const override { return "divLine"; }
46 
51  OffsetInterface *GetOffsetInterface() override { return vrv_cast<OffsetInterface *>(this); }
52  const OffsetInterface *GetOffsetInterface() const override { return vrv_cast<const OffsetInterface *>(this); }
54 
56  bool HasToBeAligned() const override { return true; }
57 
62  bool SetAlignment(Alignment *alignment);
63 
67  std::wstring GetSymbolStr() const;
68 
72  static wchar_t GetDivLineGlyph(divLineLog_FORM);
73 
74 private:
75  //
76 public:
77  //
78 private:
79 };
80 
81 //----------------------------------------------------------------------------
82 // DivLineAttr
83 //----------------------------------------------------------------------------
84 
88 class DivLineAttr : public DivLine {
89 public:
95  DivLineAttr();
96  virtual ~DivLineAttr();
97  Object *Clone() const override { return new DivLineAttr(*this); }
98  std::string GetClassName() const override { return "divLineAttr"; }
100 
101  // void SetLeft() { m_isLeft = true; }
102 
103 private:
104  //
105 public:
106  //
107 private:
109  // bool m_isLeft;
110 };
111 
112 } // namespace vrv
113 
114 #endif
This class stores an alignment position elements will point to.
Definition: horizontalaligner.h:73
This class models the divLine related attributes of a MEI measure.
Definition: divline.h:88
Object * Clone() const override
Method call for copying child classes.
Definition: divline.h:97
This class models the MEI <divLine> element.
Definition: divline.h:33
Object * Clone() const override
Method call for copying child classes.
Definition: divline.h:42
void Reset() override
Virtual reset method.
bool HasToBeAligned() const override
Override the method since alignment is required.
Definition: divline.h:56
bool SetAlignment(Alignment *alignment)
Use to set the alignment for the Measure BarLine members.
std::wstring GetSymbolStr() const
Retrieve SMuFL string for the divLine.
This class is a base class for the Layer (<layer>) content.
Definition: layerelement.h:51
This class represents a basic object.
Definition: object.h:64
This class is an interface for elements having a single visual offset, such as arpeg,...
Definition: offsetinterface.h:28