1
//---------------------------------------------------------------------------------------
2
// This file is part of the Lomse library.
3
// Copyright (c) 2010 Lomse project
5
// Lomse is free software; you can redistribute it and/or modify it under the
6
// terms of the GNU General Public License as published by the Free Software Foundation,
7
// either version 3 of the License, or (at your option) any later version.
9
// Lomse is distributed in the hope that it will be useful, but WITHOUT ANY
10
// WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
11
// PARTICULAR PURPOSE. See the GNU General Public License for more details.
13
// You should have received a copy of the GNU General Public License along
14
// with Lomse; if not, see <http://www.gnu.org/licenses/>.
16
// For any comment, suggestion or feature request, please contact the manager of
17
// the project at cecilios@users.sourceforge.net
19
//---------------------------------------------------------------------------------------
21
#ifndef __LOMSE_INSTRUMENT_ENGRAVER_H__ //to avoid nested includes
22
#define __LOMSE_INSTRUMENT_ENGRAVER_H__
24
#include "lomse_basic.h"
31
//forward declarations
37
//---------------------------------------------------------------------------------------
38
class InstrumentEngraver
41
ImoInstrument* m_pInstr;
42
TextMeter* m_pTextMeter;
43
LUnits m_uIndentFirst;
44
LUnits m_uIndentOther;
45
LUnits m_uBracketWidth;
47
//int m_bracketSymbol;
54
InstrumentEngraver(ImoInstrument* pInstr, TextMeter* pMeter);
55
~InstrumentEngraver();
58
void measure_indents();
59
LUnits get_indent_first() { return m_uIndentFirst; }
60
LUnits get_indent_other() { return m_uIndentOther; }
63
void add_staff_lines(GmoBoxSystem* pBox, LUnits x, LUnits y, LUnits indent);
64
void add_name_abbrev(GmoBox* pBox, int nSystem);
65
void add_brace_bracket(GmoBox* pBox);
66
LUnits get_staff_bottom() { return m_staffBottom; }
69
LUnits tenths_to_logical(Tenths value, int iStaff=0);
72
void measure_name_abbrev();
73
void measure_brace_or_bracket();
74
bool has_brace_or_bracket();
75
void add_text_shape(GmoBox* pBox, const std::string& text);
82
#endif // __LOMSE_INSTRUMENT_ENGRAVER_H__