forked from GrandOrgue/grandorgue
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGOLabelControl.h
60 lines (48 loc) · 1.65 KB
/
GOLabelControl.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
/*
* 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 GOLABELCONTROL_H
#define GOLABELCONTROL_H
#include <wx/string.h>
#include "midi/GOMidiSender.h"
#include "midi/objects/GOMidiObject.h"
#include "sound/GOSoundStateHandler.h"
#include "GOControl.h"
#include "GOSaveableObject.h"
class GOConfigReader;
class GOConfigWriter;
class GOOrganModel;
class GOLabelControl : public GOControl,
private GOSaveableObject,
private GOSoundStateHandler,
public GOMidiObject {
protected:
GOOrganModel &r_OrganModel;
wxString m_Name;
wxString m_Content;
wxString m_group;
GOMidiSender m_sender;
void Save(GOConfigWriter &cfg) override;
void AbortPlayback() override;
void PreparePlayback() override;
void PrepareRecording() override;
public:
GOLabelControl(GOOrganModel &organModel);
virtual ~GOLabelControl();
void Init(GOConfigReader &cfg, wxString group, wxString name);
void Load(GOConfigReader &cfg, wxString group, wxString name);
const wxString &GetName() const { return m_Name; }
const wxString &GetContent();
void SetContent(wxString name);
const wxString &GetMidiTypeCode() const override;
const wxString &GetMidiType() const override;
const wxString &GetMidiName() const override { return GetName(); }
GOMidiSender *GetMidiSender() override { return &m_sender; }
wxString GetElementStatus() override;
std::vector<wxString> GetElementActions() override;
void TriggerElementActions(unsigned no) override;
};
#endif