1
//--------------------------------------------------------------------------------------
2
// LenMus Phonascus: The teacher of music
3
// Copyright (c) 2002-2007 Cecilio Salmeron
5
// This program 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 2 of the License, or (at your option) any later version.
9
// This program 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 with this
14
// program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street,
15
// Fifth Floor, Boston, MA 02110-1301, USA.
17
// For any comment, suggestion or feature request, please contact the manager of
18
// the project at cecilios@users.sourceforge.net
20
//-------------------------------------------------------------------------------------
26
#ifndef __THOEMUSICREADINGCTROL_H__ //to avoid nested includes
27
#define __THOEMUSICREADINGCTROL_H__
29
// for (compilers that support precompilation, includes "wx/wx.h".
30
#include "wx/wxprec.h"
40
#include "wx/combobox.h"
42
#include "Constrains.h"
43
#include "../score/Score.h"
44
#include "ScoreAuxCtrol.h"
45
#include "UrlAuxCtrol.h"
46
#include "../sound/SoundEvents.h"
47
#include "ScoreConstrains.h"
50
class lmTheoMusicReadingCtrol : public wxWindow
52
DECLARE_DYNAMIC_CLASS(lmTheoMusicReadingCtrol)
56
// constructor and destructor
57
lmTheoMusicReadingCtrol(wxWindow* parent, wxWindowID id,
58
lmMusicReadingCtrolOptions* pOptions,
59
lmScoreConstrains* pConstrains,
60
const wxPoint& pos = wxDefaultPosition,
61
const wxSize& size = wxDefaultSize, int style = 0);
63
~lmTheoMusicReadingCtrol();
66
void OnClose(wxCloseEvent& event);
67
void OnSize(wxSizeEvent& event);
68
void OnPlay(wxCommandEvent& event);
69
void OnNewProblem(wxCommandEvent& event);
70
void OnSettingsButton(wxCommandEvent& event);
71
void OnGoBackButton(wxCommandEvent& event);
73
// event handlers related to debugging
74
void OnDebugShowSourceScore(wxCommandEvent& event);
75
void OnDebugDumpScore(wxCommandEvent& event);
76
void OnDebugShowMidiEvents(wxCommandEvent& event);
78
// event handlers related with playing a score
79
void OnEndOfPlay(lmEndOfPlayEvent& WXUNUSED(event));
88
lmScore* m_pScore; // the score to read
89
lmScoreAuxCtrol* m_pScoreCtrol;
90
lmScoreConstrains* m_pConstrains;
91
lmMusicReadingCtrolOptions* m_pOptions;
93
bool m_fProblemCreated; //there is a problem prepared
94
bool m_fPlayEnabled; //Play enabled
96
lmUrlAuxCtrol* m_pSettingsLink;
98
lmUrlAuxCtrol* m_pPlayLink;
99
bool m_fPlaying; //playing
100
bool m_fClosing; // waiting for play stopped to close the window
102
DECLARE_EVENT_TABLE()
107
#endif // __THOEMUSICREADINGCTROL_H__