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_NOTES_CONSTRAINS_H__ //to avoid nested includes
22
#define __LENMUS_NOTES_CONSTRAINS_H__
25
#include "lenmus_standard_header.h"
26
#include "lenmus_generators.h"
27
#include "lenmus_constrains.h"
28
#include "lenmus_injectors.h"
31
#include <wx/wxprec.h>
38
class NotesConstrains : public ExerciseOptions
41
NotesConstrains(wxString sSection, ApplicationScope& appScope);
44
int GetRandomNoteIndex();
45
inline bool IsValidNote(int n) { return m_fValidNotes[n]; }
46
inline void SetValidNote(int n, bool fValue) { m_fValidNotes[n] = fValue; }
47
inline bool SelectNotesFromKeySignature() { return m_fFromKeySignature; }
48
inline void SetSelectNotesFromKeySignature(bool value) { m_fFromKeySignature = value; }
49
inline EKeySignature GetKeySignature() { return m_nKeySignature; }
50
inline void SetKeySignature(EKeySignature key) { m_nKeySignature = key; }
52
inline EClefExercise GetClef() { return m_nClef; }
53
inline void SetClef(EClefExercise nClef) { m_nClef = nClef; }
55
inline int GetOctaves() { return m_nOctaves; }
56
inline void SetOctaves(int nOctaves) { m_nOctaves = nOctaves; }
58
void SetSection(wxString sSection) {
59
m_sSection = sSection;
71
bool m_fValidNotes[12];
72
bool m_fFromKeySignature;
73
EKeySignature m_nKeySignature;
74
EClefExercise m_nClef;
82
#endif // __LENMUS_NOTES_CONSTRAINS_H__