1
// RCS-ID: $Id: ScoreAuxCtrol.h,v 1.4 2006/02/23 19:19:53 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 ScoreAuxCtrol.h
23
@brief Header file for class lmScoreAuxCtrol
24
@ingroup html_controls
30
#ifndef __SCOREAUXCTROL_H__ //to avoid nested includes
31
#define __SCOREAUXCTROL_H__
33
#include "../app/Paper.h"
34
#include "../app/global.h"
35
#include "../sound/SoundEvents.h"
37
// ----------------------------------------------------------------------------
38
// lmScoreAuxCtrol: a control which shows a music score
39
// ----------------------------------------------------------------------------
43
eSIMPLE_BORDER = wxSIMPLE_BORDER,
46
class lmScoreAuxCtrol : public wxWindow
51
// constructor and destructor
52
lmScoreAuxCtrol(wxWindow* parent, wxWindowID id, lmScore* pScore,
53
const wxPoint& pos = wxDefaultPosition,
54
const wxSize& size = wxDefaultSize, EScoreStyles style = eNO_BORDER);
59
void OnPaint(wxPaintEvent& WXUNUSED(event));
60
void OnSize(wxSizeEvent& WXUNUSED(event));
61
void OnVisualHighlight(lmScoreHighlightEvent& event);
63
void DisplayMessage(wxString sMsg, lmMicrons posMsg, bool fClearScore = true);
64
void DisplayScore(lmScore* pScore, bool fClearMessage = true);
67
void SetMargins(lmMicrons nLeft, lmMicrons nRight, lmMicrons nTop);
68
void SetScale(float rScale);
69
void SetScore(lmScore* pScore, bool fHidden = false);
70
void HideScore(bool fHide);
73
void PlayScore(bool fVisualTracking = lmVISUAL_TRACKING,
74
bool fMarcarCompasPrevio = NO_MARCAR_COMPAS_PREVIO,
75
EPlayMode nPlayMode = ePM_NormalInstrument,
77
void PlayMeasure(int nMeasure,
78
bool fVisualTracking = lmNO_VISUAL_TRACKING,
79
EPlayMode nPlayMode = ePM_NormalInstrument,
88
void DumpMidiEvents();
96
lmScore* m_pScore; //the score to display
97
bool m_fHidden; //the score is hidden, that is, it must not be displayed
98
// but can be played back
99
double m_rScale; //presentation scale (default 1.0)
100
lmPaper m_Paper; //the lmPaper object to use
103
wxString m_sMsg; // message to display
104
bool m_fDisplayMessage;
105
lmMicrons m_yMsg; // message position (microns)
106
float m_yScalingFactor; // pixels per micron
109
float m_rZoom; //zooming factor (default 1.0)
110
lmMicrons m_nTopMargin;
111
lmMicrons m_nLeftMargin;
112
lmMicrons m_nRightMargin;
114
DECLARE_EVENT_TABLE()
119
#endif // __SCOREAUXCTROL_H__