1
// RCS-ID: $Id: NoteRestObj.h,v 1.3 2006/02/23 19:23:54 cecilios Exp $
2
//--------------------------------------------------------------------------------------
3
// LenMus Phonascus: The teacher of music
4
// Copyright (c) 2002-2006 Cecilio Salmeron
6
// This program is free software; you can redistribute it and/or modify it under the
7
// terms of the GNU General Public License as published by the Free Software Foundation;
8
// either version 2 of the License, or (at your option) any later version.
10
// This program is distributed in the hope that it will be useful, but WITHOUT ANY
11
// WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
12
// PARTICULAR PURPOSE. See the GNU General Public License for more details.
14
// You should have received a copy of the GNU General Public License along with this
15
// program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street,
16
// Fifth Floor, Boston, MA 02110-1301, USA.
18
// For any comment, suggestion or feature request, please contact the manager of
19
// the project at cecilios@users.sourceforge.net
21
//-------------------------------------------------------------------------------------
22
/*! @file NoteRestObj.h
23
@brief Header file for class lmNoteRestObj
30
#ifndef __NOTERESTOBJ_H__ //to avoid nested includes
31
#define __NOTERESTOBJ_H__
34
eST_Fermata = 0, // ESP: calder�n
36
eST_Accidental // ESP: alteraci�n
37
//Public Enum EGrafObjs
38
// eGO_Espacio = 1 'espaciado fijo
39
// eGO_Respiracion 'marca de respiraci�n
51
class lmNoteRestObj : public lmAuxObj
54
lmNoteRestObj(ESymbolType nType, lmNoteRest* pOwner);
57
// overrides for pure virtual methods of base classes
59
virtual void SetFont(lmPaper* pPaper) {}
60
virtual void DrawObject(bool fMeasuring, lmPaper* pPaper, wxColour colorC)=0;
61
virtual wxBitmap* GetBitmap(double rScale) { return (wxBitmap*)NULL; }
62
virtual wxString Dump() { return _T(""); }
64
// specific methods of this class
65
ESymbolType GetSymbolType() { return m_nSymbolType; }
66
virtual void SetSizePosition(lmPaper* pPaper, lmVStaff* pVStaff, wxInt32 nStaffNum,
67
lmMicrons xPos, lmMicrons yPos)=0;
68
virtual void UpdateMeasurements();
70
virtual void SetOwner(lmNoteRest* pOwner) { m_pOwner = pOwner; }
74
ESymbolType m_nSymbolType;
75
lmNoteRest* m_pOwner; // lmNoteRest to which this lmNoteRestObj is associated
77
// specific data for lmFermata symbol
81
class lmFermata : public lmNoteRestObj
84
lmFermata(lmNoteRest* pOwner, bool fOverNote);
87
// overrides for pure virtual methods of base class lmNoteRestObj
88
void DrawObject(bool fMeasuring, lmPaper* pPaper, wxColour colorC);
89
void SetSizePosition(lmPaper* pPaper, lmVStaff* pVStaff, wxInt32 nStaffNum,
90
lmMicrons xPos, lmMicrons yPos);
100
class lmLyric : public lmNoteRestObj, public lmBasicText
103
lmLyric(lmNoteRest* pOwner, wxString sText, ESyllabicTypes nSyllabic = eSyllabicSingle,
104
int nNumLine=1, wxString sLanguage=_T("it") );
107
// definitions for pure virtual methods of base class lmNoteRestObj
108
void DrawObject(bool fMeasuring, lmPaper* pPaper, wxColour colorC);
109
void SetSizePosition(lmPaper* pPaper, lmVStaff* pVStaff, wxInt32 nStaffNum,
110
lmMicrons xPos, lmMicrons yPos);
112
// overrides for virtual methods of base class lmNoteRestObj
113
void SetOwner(lmNoteRest* pOwner);
115
// overrides for virtual methods of base class lmScoreObj
116
void SetFont(lmPaper* pPaper);
122
lmVStaff* m_pVStaff; // lmVStaff to which the owner NoterRest belongs
123
wxInt32 m_nStaffNum; // Staff (1..n) on which owner NoterRest is located
127
#endif // __NOTERESTOBJ_H__