~s-cecilio/lenmus/v5.1.x

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
//---------------------------------------------------------------------------------------
//    LenMus Phonascus: The teacher of music
//    Copyright (c) 2002-2012 LenMus project
//
//    This program is free software; you can redistribute it and/or modify it under the
//    terms of the GNU General Public License as published by the Free Software Foundation,
//    either version 3 of the License, or (at your option) any later version.
//
//    This program is distributed in the hope that it will be useful, but WITHOUT ANY
//    WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
//    PARTICULAR PURPOSE.  See the GNU General Public License for more details.
//
//    You should have received a copy of the GNU General Public License along with this
//    program. If not, see <http://www.gnu.org/licenses/>.
//
//    For any comment, suggestion or feature request, please contact the manager of
//    the project at cecilios@users.sourceforge.net
//
//---------------------------------------------------------------------------------------

#ifndef __LENMUS_DLG_CFG_IDFY_TONALITY_H__        //to avoid nested includes
#define __LENMUS_DLG_CFG_IDFY_TONALITY_H__

//wxWidgets
#include <wx/wxprec.h>
#include <wx/wx.h>
#include <wx/intl.h>
#include <wx/string.h>
#include <wx/checkbox.h>
#include <wx/gdicmn.h>
#include <wx/font.h>
#include <wx/colour.h>
#include <wx/settings.h>
#include <wx/sizer.h>
#include <wx/button.h>
#include <wx/bitmap.h>
#include <wx/image.h>
#include <wx/icon.h>
#include <wx/statbmp.h>
#include <wx/stattext.h>
#include <wx/statbox.h>
#include <wx/panel.h>
#include <wx/radiobox.h>
#include <wx/notebook.h>
#include <wx/dialog.h>

//lenmus
#include "lenmus_standard_header.h"

//lomse
#include <lomse_internal_model.h>
using namespace lomse;

namespace lenmus
{

class TonalityConstrains;

//---------------------------------------------------------------------------------------
class DlgCfgIdfyTonality : public wxDialog
{
public:
    DlgCfgIdfyTonality(wxWindow* parent, TonalityConstrains* pConstrains);
    virtual ~DlgCfgIdfyTonality();

    // event handlers
    void OnAcceptClicked(wxCommandEvent& WXUNUSED(event));
    void OnCancelClicked(wxCommandEvent& WXUNUSED(event)) { EndDialog(wxID_CANCEL); }
    void OnDataChanged(wxCommandEvent& WXUNUSED(event));
    void OnCheckAllMajor(wxCommandEvent& WXUNUSED(event));
    void OnCheckAllMinor(wxCommandEvent& WXUNUSED(event));

protected:
    bool VerifyData();
    void create_controls();


    TonalityConstrains*   m_pConstrains;      // the constraints to set up

    //controls
    wxCheckBox*     m_pChkKeySign[k_max_key+1];         // Allowed key signatures check boxes

		wxNotebook* m_pNoteBook;
		wxPanel* m_pPanelKeySignatures;
		wxCheckBox* m_pChkKeyC;
		wxCheckBox* m_pChkKeyG;
		wxCheckBox* m_pChkKeyD;
		wxCheckBox* m_pChkKeyA;
		wxCheckBox* m_pChkKeyE;
		wxCheckBox* m_pChkKeyB;
		wxCheckBox* m_pChkKeyFSharp;
		wxCheckBox* m_pChkKeyCSharp;
		wxCheckBox* m_pChkKeyCFlat;
		wxCheckBox* m_pChkKeyGFlat;
		wxCheckBox* m_pChkKeyDFlat;
		wxCheckBox* m_pChkKeyAFlat;
		wxCheckBox* m_pChkKeyEFlat;
		wxCheckBox* m_pChkKeyBFlat;
		wxCheckBox* m_pChkKeyF;
		wxCheckBox* m_pChkKeyAMinor;
		wxCheckBox* m_pChkKeyEMinor;
		wxCheckBox* m_pChkKeyBMinor;
		wxCheckBox* m_pChkKeyFSharpMinor;
		wxCheckBox* m_pChkKeyCSharpMinor;
		wxCheckBox* m_pChkKeyGSharpMinor;
		wxCheckBox* m_pChkKeyDSharpMinor;
		wxCheckBox* m_pChkKeyASharpMinor;
		wxCheckBox* m_pChkKeyAFlatMinor;
		wxCheckBox* m_pChkKeyEFlatMinor;
		wxCheckBox* m_pChkKeyBFlatMinor;
		wxCheckBox* m_pChkKeyFMinor;
		wxCheckBox* m_pChkKeyCMinor;
		wxCheckBox* m_pChkKeyGMinor;
		wxCheckBox* m_pChkKeyDMinor;

		wxButton* m_pBtCheckAllMajor;
		wxButton* m_pBtCheckAllMinor;

		wxStaticBitmap* m_pBmpKeySignError;
		wxStaticText* m_pKSErrorSpaces;
		wxStaticText* m_pLblKeySignError;

		wxPanel* m_pPanelOther;
		wxRadioBox* m_pRadAnswerType;

		wxStaticBitmap* m_pBmpGlobalError;
		wxStaticText* m_pSpace1;
		wxStaticText* m_pLblGlobalError;

		wxButton* m_pBtAccept;
		wxButton* m_pBtCancel;


    DECLARE_EVENT_TABLE()
};


}   //namespace lenmus

#endif    // __LENMUS_DLG_CFG_IDFY_TONALITY_H__