1
1
/*
2
2
* Copyright 2006 Milan Digital Audio LLC
3
- * Copyright 2009-2023 GrandOrgue contributors (see AUTHORS)
3
+ * Copyright 2009-2025 GrandOrgue contributors (see AUTHORS)
4
4
* License GPL-2.0 or later
5
5
* (https://www.gnu.org/licenses/old-licenses/gpl-2.0.html).
6
6
*/
11
11
#include < wx/listctrl.h>
12
12
#include < wx/sizer.h>
13
13
14
- #include " midi/GOMidiConfigurator .h"
14
+ #include " midi/objects/GOMidiObject .h"
15
15
16
16
#include " GOEvent.h"
17
17
@@ -28,7 +28,7 @@ GOMidiListDialog::GOMidiListDialog(
28
28
GODocumentBase *doc,
29
29
wxWindow *parent,
30
30
GODialogSizeSet &dialogSizes,
31
- const std::vector<GOMidiConfigurator *> &midi_elements)
31
+ const std::vector<GOMidiObject *> &midi_elements)
32
32
: GOSimpleDialog(
33
33
parent,
34
34
wxT (" MIDI Objects" ),
@@ -70,7 +70,7 @@ GOMidiListDialog::GOMidiListDialog(
70
70
topSizer->Add (buttons, 0 , wxALIGN_RIGHT | wxALL, 1 );
71
71
72
72
for (unsigned i = 0 ; i < midi_elements.size (); i++) {
73
- GOMidiConfigurator *obj = midi_elements[i];
73
+ GOMidiObject *obj = midi_elements[i];
74
74
75
75
m_Objects->InsertItem (i, obj->GetMidiType ());
76
76
m_Objects->SetItemPtrData (i, (wxUIntPtr)obj);
@@ -87,14 +87,14 @@ GOMidiListDialog::GOMidiListDialog(
87
87
GOMidiListDialog::~GOMidiListDialog () {}
88
88
89
89
void GOMidiListDialog::OnButton (wxCommandEvent &event) {
90
- GOMidiConfigurator *obj = (GOMidiConfigurator *)m_Objects-> GetItemData (
91
- m_Objects->GetFirstSelected ());
90
+ GOMidiObject *obj
91
+ = (GOMidiObject *)m_Objects-> GetItemData ( m_Objects->GetFirstSelected ());
92
92
obj->TriggerElementActions (event.GetId () - ID_BUTTON);
93
93
}
94
94
95
95
void GOMidiListDialog::OnStatus (wxCommandEvent &event) {
96
- GOMidiConfigurator *obj = (GOMidiConfigurator *)m_Objects-> GetItemData (
97
- m_Objects->GetFirstSelected ());
96
+ GOMidiObject *obj
97
+ = (GOMidiObject *)m_Objects-> GetItemData ( m_Objects->GetFirstSelected ());
98
98
wxString status = obj->GetElementStatus ();
99
99
GOMessageBox (
100
100
wxString::Format (_ (" Status: %s" ), status),
@@ -105,8 +105,8 @@ void GOMidiListDialog::OnStatus(wxCommandEvent &event) {
105
105
void GOMidiListDialog::OnObjectClick (wxListEvent &event) {
106
106
m_Edit->Enable ();
107
107
m_Status->Enable ();
108
- GOMidiConfigurator *obj = (GOMidiConfigurator *)m_Objects-> GetItemData (
109
- m_Objects->GetFirstSelected ());
108
+ GOMidiObject *obj
109
+ = (GOMidiObject *)m_Objects-> GetItemData ( m_Objects->GetFirstSelected ());
110
110
std::vector<wxString> actions = obj->GetElementActions ();
111
111
for (unsigned i = 0 ; i < m_Buttons.size (); i++)
112
112
if (i < actions.size ()) {
@@ -118,8 +118,8 @@ void GOMidiListDialog::OnObjectClick(wxListEvent &event) {
118
118
}
119
119
120
120
void GOMidiListDialog::OnObjectDoubleClick (wxListEvent &event) {
121
- GOMidiConfigurator *obj = (GOMidiConfigurator *)m_Objects-> GetItemData (
122
- m_Objects->GetFirstSelected ());
121
+ GOMidiObject *obj
122
+ = (GOMidiObject *)m_Objects-> GetItemData ( m_Objects->GetFirstSelected ());
123
123
obj->ShowConfigDialog ();
124
124
}
125
125
0 commit comments