GUIDOLib  1.7.7
Guido Engine Internal Documentation
ARText.h
1 #ifndef ARText_H
2 #define ARText_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 <string>
19 
20 #include "ARPositionTag.h"
21 #include "ARFontAble.h"
22 
23 class ARLyrics;
24 
25 /*@mkdoc
26 
27 @group:Text
28 
29 @tagname:\text
30 @tagalias:\label <br/> \t
31 @tagtype:RP
32 @tagnotation:textual elements
33 @tagdesc
34 The **\text** tag is both a range and a position tag. When a range is specified, the text doesn't take place: it is placed over the range.
35 With no range, the text is inserted at its position.
36 @tagend
37 
38 @params:
39 @param:text:string:the text:*none*:false
40 @fontparams:
41 @paramdesc
42 See the [Notes](@EXAMPLES/notes/) example.
43 @paramend
44 
45 */
46 
49 class ARText : public ARFontAble, public ARPositionTag
50 {
51 public:
52  ARText(const std::string& p_txt, float p_offsety, bool isLyric=false);
53  ARText();
54  virtual ~ARText() {}
55 
56  virtual void setTagParameters (const TagParameterMap& params);
57  virtual const char* getText() const { return fText.c_str(); }
58  virtual void copyLyricsParams(const ARLyrics * lyrics);
59 
60  virtual const char* getParamsStr() const { return kARTextParams; };
61  virtual const char* getTagName () const { return "ARText"; };
62  virtual std::string getGMNName () const { return "\\text"; };
63 
64  void setAutoPos(bool state) { fIsAutoPos = state; }
65  bool isLyric() const { return fIsLyric; }
66  bool isAutoPos() const { return fIsAutoPos; }
67 
68 protected:
69  std::string fText; // the corresponding text ...
70  bool fIsLyric;
71  bool fIsAutoPos;
72 };
73 
74 #endif
ARText::setTagParameters
virtual void setTagParameters(const TagParameterMap &params)
ARText::ARText
ARText()
ARText::~ARText
virtual ~ARText()
Definition: ARText.h:54
ARText::getGMNName
virtual std::string getGMNName() const
Definition: ARText.h:62
ARFontAble
Definition: ARFontAble.h:21
ARText::fText
std::string fText
Definition: ARText.h:69
ARText::getParamsStr
virtual const char * getParamsStr() const
Definition: ARText.h:60
ARText::getTagName
virtual const char * getTagName() const
Definition: ARText.h:61
ARText::getText
virtual const char * getText() const
Definition: ARText.h:57
ARText::isAutoPos
bool isAutoPos() const
Definition: ARText.h:66
ARText::copyLyricsParams
virtual void copyLyricsParams(const ARLyrics *lyrics)
ARText::setAutoPos
void setAutoPos(bool state)
Definition: ARText.h:64
ARLyrics
Implement the lyrics Tag.
Definition: ARLyrics.h:56
ARText::isLyric
bool isLyric() const
Definition: ARText.h:65
ARText::fIsAutoPos
bool fIsAutoPos
Definition: ARText.h:71
ARPositionTag
The base class for all range tags.
Definition: ARPositionTag.h:26
TagParameterMap
A list of tag parameters represented as a map.
Definition: TagParameterMap.h:31
ARText
The text tag.
Definition: ARText.h:49
ARText::fIsLyric
bool fIsLyric
Definition: ARText.h:70

Guido Project Copyright © 2019 Grame-CNCM