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
//-------------------------------------------------------------------------------------
21
/*! @file IdfyScalesCtrol.h
22
@brief Header file for class lmIdfyScalesCtrol
23
@ingroup html_controls
26
#ifndef __IDFYSCALESCTROL_H__ //to avoid nested includes
27
#define __IDFYSCALESCTROL_H__
29
// For compilers that support precompilation, includes "wx/wx.h".
30
#include "wx/wxprec.h"
40
#include "ScalesConstrains.h"
41
#include "../score/Score.h"
42
#include "ScoreAuxCtrol.h"
43
#include "UrlAuxCtrol.h"
44
#include "CountersCtrol.h"
48
class lmIdfyScalesCtrol : public lmIdfyExerciseCtrol
52
// constructor and destructor
53
lmIdfyScalesCtrol(wxWindow* parent, wxWindowID id,
54
lmScalesConstrains* pConstrains,
55
const wxPoint& pos = wxDefaultPosition,
56
const wxSize& size = wxDefaultSize, int style = 0);
60
//implementation of virtual methods
61
void InitializeStrings();
62
void CreateAnswerButtons();
63
void PrepareAuxScore(int nButton);
64
wxString SetNewProblem();
65
wxDialog* GetSettingsDlg();
66
void ReconfigureButtons();
69
wxString PrepareScore(EClefType nClef, EScaleType nType, lmScore** pScore);
70
int ReconfigureGroup(int iBt, int iStartC, int iEndC, wxString sRowLabel);
77
m_NUM_BUTTONS = 24, // NUM_COLS * NUM_ROWS;
80
lmScalesConstrains* m_pConstrains; //constraints for the exercise
83
EKeySignatures m_nKey;
88
wxStaticText* m_pRowLabel[m_NUM_ROWS];
89
wxButton* m_pAnswerButton[m_NUM_BUTTONS]; //buttons for the answers
90
int m_nRealScale[m_NUM_BUTTONS]; //scale that corresponds
91
// to each valid button
98
#endif // __IDFYSCALESCTROL_H__