Verovio
Source code documentation
pages.h
1 // Name: pages.h
3 // Author: Laurent Pugin
4 // Created: 2018/02/15
5 // Copyright (c) Authors and others. All rights reserved.
7 
8 #ifndef __VRV_PAGES_H__
9 #define __VRV_PAGES_H__
10 
11 #include "atts_shared.h"
12 #include "object.h"
13 
14 namespace vrv {
15 
16 class Page;
17 class Score;
18 class System;
19 
20 //----------------------------------------------------------------------------
21 // Pages
22 //----------------------------------------------------------------------------
23 
27 class Pages : public Object, public AttLabelled, public AttNNumberLike {
28 
29 public:
35  Pages();
36  virtual ~Pages();
37  void Reset() override;
38  std::string GetClassName() const override { return "pages"; }
40 
45  bool IsSupportedChild(ClassId classId) override;
47 
51  void ConvertFrom(Score *score);
52 
56  void LayOutAll();
57 
58  //----------//
59  // Functors //
60  //----------//
61 
66  FunctorCode Accept(Functor &functor) override;
67  FunctorCode Accept(ConstFunctor &functor) const override;
68  FunctorCode AcceptEnd(Functor &functor) override;
69  FunctorCode AcceptEnd(ConstFunctor &functor) const override;
71 
72 private:
73  //
74 public:
75  //
76 private:
77  //
78 };
79 
80 //----------------------------------------------------------------------------
81 // PageRange
82 //----------------------------------------------------------------------------
83 
87 class PageRange : public Pages {
88 
89 public:
95  PageRange(Doc *doc);
96  virtual ~PageRange();
97  void Reset() override;
99 
103  void SetAsFocus(Page *page);
104 
105 private:
106  void Evaluate(const Object *object);
107 
108  void EvaluateSpanningElementsIn(const Object *measure);
109 
110 public:
111  //
112 private:
114  Doc *m_doc;
116  Page *m_focusPage;
117 
118  std::list<Page *> m_pageBefore;
119  std::list<Page *> m_pageAfter;
120 };
121 
122 } // namespace vrv
123 
124 #endif
This abstract class is the base class for all const functors.
Definition: functor.h:126
This class is a hold the data and corresponds to the model of a MVC design pattern.
Definition: doc.h:41
This abstract class is the base class for all mutable functors.
Definition: functor.h:101
This class represents a basic object.
Definition: object.h:61
This class represents a page in a laid-out score (Doc).
Definition: page.h:31
This class represent a page range not owning child pages.
Definition: pages.h:87
void SetAsFocus(Page *page)
The the specified page as focus page in the range.
void Reset() override
Reset the object, that is 1) removing all children and 2) resetting all attributes.
This class represent a <pages> in page-based MEI.
Definition: pages.h:27
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.
bool IsSupportedChild(ClassId classId) override
Base method for checking if a child can be added.
void LayOutAll()
Refresh the layout of all the child pages.
This class represent a <score> in MEI.
Definition: score.h:30