GUIDOLib
1.7.7
Guido Engine Internal Documentation
src
engine
graphic
GRTag.h
1
#ifndef GRTag_H
2
#define GRTag_H
3
4
/*
5
GUIDO Library
6
Copyright (C) 2002 Holger Hoos, Juergen Kilian, Kai Renz
7
Copyright (C) 2002-2017 Grame
8
9
This Source Code Form is subject to the terms of the Mozilla Public
10
License, v. 2.0. If a copy of the MPL was not distributed with this
11
file, You can obtain one at http://mozilla.org/MPL/2.0/.
12
13
Grame Research Laboratory, 11, cours de Verdun Gensoul 69002 Lyon - France
14
research@grame.fr
15
16
*/
17
18
#include "NVPoint.h"
19
20
class
NVstring
;
21
22
// The StaffManager holds different hashtables for the
23
// Synchronizsation elements to detect contraditions.
24
25
class
GRPage
;
26
class
GRSystem
;
27
class
GRStaff
;
28
class
ARMusicalTag
;
29
37
class
GRTag
38
{
39
public
:
40
enum
TAGTYPE
{
VOICETAG
,
STAFFTAG
,
SYSTEMTAG
,
PAGETAG
,
VOICEANDSYSTEMTAG
};
41
42
GRTag
(
const
ARMusicalTag
* artag = 0,
float
curLSPACE = 50.0f );
43
virtual
~GRTag
();
44
45
virtual
bool
operator!=
(
const
GRTag
&tag)
const
{
return
!(this->
operator==
(tag)); }
46
47
// this is overloaded in other classes ...
48
virtual
bool
operator==
(
const
GRTag
&tag)
const
;
49
50
int
getIsAuto
()
const
;
51
bool
IsStateTag
()
const
;
52
virtual
const
NVPoint
&
getOffset
()
const
{
return
mTagOffset
; }
53
virtual
float
getSize
()
const
{
return
mTagSize
; }
54
virtual
float
getSConst
()
const
{
return
sconst
; }
55
56
// returns name of a font if present ...
57
virtual
const
char
*
getFont
()
const
{
return
fFontName
.c_str(); }
58
virtual
const
char
*
getFontAttrib
()
const
{
return
fFontAttrib
.c_str(); }
59
virtual
int
getFontSize
()
const
{
return
fFontSize
; }
60
61
virtual
const
unsigned
char
*
getColRef
()
const
{
return
mColRef
; }
62
63
virtual
void
setSConst
(
float
val) {
sconst
= val; }
64
void
setTagType
(
TAGTYPE
ntyp) { fTagType = ntyp; }
65
TAGTYPE
getTagType
()
const
{
return
fTagType; }
66
void
setError
(
int
p_error) { fError = p_error; }
67
int
getError
()
const
{
return
fError; }
68
69
virtual
void
StaffFinished
(
GRStaff
* grstaff = 0);
70
virtual
void
StaffBegin
(
GRStaff
* grstaff = 0);
71
virtual
void
RangeEnd
(
GRStaff
* grstaff = 0);
72
73
protected
:
74
int
isautotag
;
75
float
sconst
;
// ?
76
77
unsigned
char
*
mColRef
;
// for the color-parameter ... (RGBA) [0, 255]
78
79
std::string
fFontName
;
80
std::string
fFontAttrib
;
81
int
fFontSize
;
82
83
float
mTagSize
;
84
NVPoint
mTagOffset
;
85
86
private
:
87
int
fError = 0;
88
TAGTYPE
fTagType =
VOICETAG
;
89
};
90
91
#endif
GRTag::setError
void setError(int p_error)
Definition:
GRTag.h:66
GRTag::fFontName
std::string fFontName
Definition:
GRTag.h:79
GRTag::SYSTEMTAG
Definition:
GRTag.h:40
GRTag::~GRTag
virtual ~GRTag()
GRTag::getFontSize
virtual int getFontSize() const
Definition:
GRTag.h:59
GRTag::mTagOffset
NVPoint mTagOffset
Definition:
GRTag.h:84
GRPage
Graphical representation of a score page. Contains one or more instances of class GRSystem.
Definition:
GRPage.h:40
GRTag::getError
int getError() const
Definition:
GRTag.h:67
GRTag::setTagType
void setTagType(TAGTYPE ntyp)
Definition:
GRTag.h:64
GRTag::StaffFinished
virtual void StaffFinished(GRStaff *grstaff=0)
GRTag::StaffBegin
virtual void StaffBegin(GRStaff *grstaff=0)
GRTag::RangeEnd
virtual void RangeEnd(GRStaff *grstaff=0)
NVPoint
Definition:
NVPoint.h:20
GRStaff
A GRStaff represents a single line of music.
Definition:
GRStaff.h:181
GRTag::getSConst
virtual float getSConst() const
Definition:
GRTag.h:54
GRTag::operator==
virtual bool operator==(const GRTag &tag) const
GRTag::PAGETAG
Definition:
GRTag.h:40
GRTag::fFontSize
int fFontSize
Definition:
GRTag.h:81
GRTag::VOICEANDSYSTEMTAG
Definition:
GRTag.h:40
GRTag::VOICETAG
Definition:
GRTag.h:40
GRTag::sconst
float sconst
Definition:
GRTag.h:75
GRTag::isautotag
int isautotag
Definition:
GRTag.h:74
GRTag::getFontAttrib
virtual const char * getFontAttrib() const
Definition:
GRTag.h:58
GRTag::operator!=
virtual bool operator!=(const GRTag &tag) const
Definition:
GRTag.h:45
GRTag::getColRef
virtual const unsigned char * getColRef() const
Definition:
GRTag.h:61
GRTag::STAFFTAG
Definition:
GRTag.h:40
ARMusicalTag
The base class for all musical tag classes.
Definition:
ARMusicalTag.h:34
NVstring
Definition:
nvstring.h:21
GRTag::getTagType
TAGTYPE getTagType() const
Definition:
GRTag.h:65
GRTag::setSConst
virtual void setSConst(float val)
Definition:
GRTag.h:63
GRTag::getSize
virtual float getSize() const
Definition:
GRTag.h:53
GRTag
The GRTag class is the base class for all GUIDO tags.
Definition:
GRTag.h:37
GRTag::fFontAttrib
std::string fFontAttrib
Definition:
GRTag.h:80
GRSystem
Manages a number of staffs and has a given start and end timeposition. GRSystem is the grafical repre...
Definition:
GRSystem.h:52
GRTag::mTagSize
float mTagSize
Definition:
GRTag.h:83
GRTag::mColRef
unsigned char * mColRef
Definition:
GRTag.h:77
GRTag::GRTag
GRTag(const ARMusicalTag *artag=0, float curLSPACE=50.0f)
GRTag::IsStateTag
bool IsStateTag() const
GRTag::getIsAuto
int getIsAuto() const
GRTag::getFont
virtual const char * getFont() const
Definition:
GRTag.h:57
GRTag::getOffset
virtual const NVPoint & getOffset() const
Definition:
GRTag.h:52
GRTag::TAGTYPE
TAGTYPE
Definition:
GRTag.h:40
Guido Project
Copyright © 2019
Grame-CNCM