1
//---------------------------------------------------------------------------------------
2
// LenMus Phonascus: The teacher of music
3
// Copyright (c) 2002-2012 LenMus project
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 3 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, 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 __LENMUS_PROBLEM_DISPLAYER_H__
22
#define __LENMUS_PROBLEM_DISPLAYER_H__
26
#include "lenmus_standard_header.h"
29
//#include <wx/wxprec.h>
31
//#include <wx/event.h>
34
#include <lomse_internal_model.h>
35
#include <lomse_document.h>
36
using namespace lomse;
42
// forward declarations
43
class ExerciseOptions;
48
//---------------------------------------------------------------------------------------
49
// ProblemDisplayer: responsible for displaying a problem score and associated texts
50
class ProblemDisplayer
53
DocumentWindow* m_pCanvas;
54
ImoContent* m_pWrapper;
56
ImoScore* m_pDisplayedScore;
57
ImoScore* m_pScoreToPlay;
58
ImoParagraph* m_pProblemPara;
59
ImoParagraph* m_pSolutionPara;
63
// constructor and destructor
64
ProblemDisplayer(DocumentWindow* pCanvas, ImoContent* pWrapper, Document* pDoc,
65
LUnits minHeight, ImoStyle* pStyle=NULL);
68
void set_score(ImoScore* pScore);
69
inline bool is_score_displayed() { return m_pDisplayedScore != NULL; }
70
void set_problem_text(const string& msg);
71
void set_solution_text(const string& msg);
73
inline bool is_displayed(ImoScore* pScore) { return pScore == m_pDisplayedScore; }
74
inline ImoScore* get_score() { return m_pDisplayedScore; }
77
void debug_show_source_score();
78
void debug_show_midi_events();
81
void remove_current_score();
82
void remove_problem_text();
83
void remove_solution_text();
90
#endif // __LENMUS_PROBLEM_DISPLAYER_H__