Verovio
Source code documentation
div.h
1
// Name: div.h
3
// Author: Laurent Pugin
4
// Created: 2023
5
// Copyright (c) Authors and others. All rights reserved.
7
8
#ifndef __VRV_DIV_H__
9
#define __VRV_DIV_H__
10
11
#include "textlayoutelement.h"
12
13
namespace
vrv {
14
15
//----------------------------------------------------------------------------
16
// Div
17
//----------------------------------------------------------------------------
18
24
class
Div
:
public
TextLayoutElement
{
25
public
:
30
Div
();
32
virtual
~
Div
();
33
void
Reset
()
override
;
34
std::string GetClassName()
const override
{
return
"div"
; }
36
40
bool
GetDrawingInline()
const
{
return
m_drawingInline; }
42
void
SetDrawingInline(
bool
drawingInline) { m_drawingInline = drawingInline; }
44
48
int
GetDrawingX()
const override
;
50
int
GetDrawingY()
const override
;
52
56
int
GetDrawingXRel()
const
{
return
m_drawingXRel; }
58
virtual
void
SetDrawingXRel(
int
drawingXRel);
59
void
CacheXRel(
bool
restore =
false
);
60
int
GetDrawingYRel()
const
{
return
m_drawingYRel; }
61
virtual
void
SetDrawingYRel(
int
drawingYRel);
62
void
CacheYRel(
bool
restore =
false
);
64
68
int
GetTotalHeight
(
const
Doc
*doc)
const override
;
69
70
int
GetTotalWidth(
const
Doc
*doc)
const override
;
71
72
//----------//
73
// Functors //
74
//----------//
75
79
FunctorCode
Accept
(
Functor
&functor)
override
;
81
FunctorCode
Accept
(
ConstFunctor
&functor)
const override
;
82
FunctorCode AcceptEnd(
Functor
&functor)
override
;
83
FunctorCode AcceptEnd(
ConstFunctor
&functor)
const override
;
85
86
private
:
87
//
88
public
:
89
//
90
private
:
95
int
m_drawingYRel;
96
101
int
m_drawingXRel;
102
106
bool
m_drawingInline;
107
};
108
109
}
// namespace vrv
110
111
#endif
vrv::Doc
This class is a hold the data and corresponds to the model of a MVC design pattern.
Definition:
doc.h:41
vrv::Div
This class represents an MEI Div.
Definition:
div.h:24
vrv::Div::GetTotalHeight
int GetTotalHeight(const Doc *doc) const override
Overriden to get the appropriate margin.
vrv::Div::Accept
FunctorCode Accept(Functor &functor) override
Interface for class functor visitation.
vrv::Functor
This abstract class is the base class for all mutable functors.
Definition:
functor.h:101
vrv::ConstFunctor
This abstract class is the base class for all const functors.
Definition:
functor.h:126
vrv::Div::Reset
void Reset() override
Reset the object, that is 1) removing all children and 2) resetting all attributes.
vrv::TextLayoutElement
This class represents a text element featuring horizontal and vertical layout.
Definition:
textlayoutelement.h:24
include
vrv
div.h
Generated on Fri Apr 4 2025 06:58:35 for Verovio by
1.8.17