forked from GrandOrgue/grandorgue
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGOEnclosure.h
87 lines (71 loc) · 2.35 KB
/
GOEnclosure.h
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
/*
* Copyright 2006 Milan Digital Audio LLC
* Copyright 2009-2025 GrandOrgue contributors (see AUTHORS)
* License GPL-2.0 or later
* (https://www.gnu.org/licenses/old-licenses/gpl-2.0.html).
*/
#ifndef GOENCLOSURE_H_
#define GOENCLOSURE_H_
#include <wx/string.h>
#include "control/GOControl.h"
#include "midi/GOMidiReceiver.h"
#include "midi/GOMidiSender.h"
#include "midi/GOMidiShortcutReceiver.h"
#include "midi/objects/GOMidiObject.h"
#include "sound/GOSoundStateHandler.h"
#include "GOEventHandler.h"
#include "GOSaveableObject.h"
class GOConfigReader;
class GOConfigWriter;
class GOMidiEvent;
class GOMidiMap;
class GOOrganModel;
class GOEnclosure : public GOControl,
private GOEventHandler,
private GOSaveableObject,
private GOSoundStateHandler,
public GOMidiObject {
private:
GOOrganModel &r_OrganModel;
GOMidiMap &r_MidiMap;
GOMidiReceiver m_midi;
GOMidiSender m_sender;
GOMidiShortcutReceiver m_shortcut;
int m_AmpMinimumLevel;
int m_MIDIInputNumber;
int m_MIDIValue;
wxString m_Name;
bool m_Displayed1;
bool m_Displayed2;
void ProcessMidi(const GOMidiEvent &event) override;
void HandleKey(int key) override;
void Save(GOConfigWriter &cfg) override;
void AbortPlayback() override;
void PreparePlayback() override;
void PrepareRecording() override;
GOMidiReceiverBase *GetMidiReceiver() override { return &m_midi; }
GOMidiSender *GetMidiSender() override { return &m_sender; }
GOMidiShortcutReceiver *GetMidiShortcutReceiver() override {
return &m_shortcut;
}
public:
GOEnclosure(GOOrganModel &organModel);
void Init(
GOConfigReader &cfg, wxString group, wxString Name, unsigned def_value);
void Load(GOConfigReader &cfg, wxString group, int enclosure_nb);
void Set(int n);
const wxString &GetName() const { return m_Name; }
int GetValue();
int GetMIDIInputNumber();
float GetAttenuation();
void Scroll(bool scroll_up);
bool IsDisplayed(bool new_format);
void SetElementID(int id);
const wxString &GetMidiTypeCode() const override;
const wxString &GetMidiType() const override;
const wxString &GetMidiName() const override { return GetName(); }
wxString GetElementStatus() override;
std::vector<wxString> GetElementActions() override;
void TriggerElementActions(unsigned no) override;
};
#endif /* GOENCLOSURE_H_ */