Skip to content

Commit

Permalink
Intermediate commit
Browse files Browse the repository at this point in the history
  • Loading branch information
oleg68 committed Feb 8, 2025
1 parent b565e51 commit 6a2d905
Show file tree
Hide file tree
Showing 5 changed files with 90 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/grandorgue/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ gui/dialogs/midi-event/GOMidiEventRecvTab.cpp
gui/dialogs/midi-event/GOMidiEventSendTab.cpp
gui/dialogs/organ-settings/GOOrganSettingsButtonsProxy.cpp
gui/dialogs/organ-settings/GOOrganSettingsDialog.cpp
gui/dialogs/organ-settings/GOOrganSettingsEnclosuresTab.cpp
gui/dialogs/organ-settings/GOOrganSettingsPipesTab.cpp
gui/dialogs/settings/GOSettingsAudio.cpp
gui/dialogs/settings/GOSettingsDeviceMatchDialog.cpp
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@

#include "model/GOOrganModel.h"

#include "GOOrganSettingsEnclosuresTab.h"
#include "GOOrganSettingsPipesTab.h"

enum {
Expand Down Expand Up @@ -47,6 +48,10 @@ GOOrganSettingsDialog::GOOrganSettingsDialog(
m_PipesTab = new GOOrganSettingsPipesTab(organModel, pNoteBook, *this);
AddTab(m_PipesTab, "Pipes", _("Pipes"));

m_EnclosuresTab
= new GOOrganSettingsEnclosuresTab(organModel, pNoteBook, *this);
AddTab(m_EnclosuresTab, "Enclosures", _("Enclosures"));

// add a custom button 'Reason into the space of the standard dialog button
wxSizer *const pButtonSizer = GetButtonSizer();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,15 @@
class wxButton;

class GOOrganModel;
class GOOrganSettingsEnclosuresTab;
class GOOrganSettingsPipesTab;

class GOOrganSettingsDialog : public GOTabbedDialog,
public GOView,
private GOOrganSettingsButtonsProxy::Listener {
private:
GOOrganSettingsPipesTab *m_PipesTab;
GOOrganSettingsEnclosuresTab *m_EnclosuresTab;

wxButton *m_AudioGroupAssistant;
wxButton *m_Default;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
/*
* 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).
*/

#include "GOOrganSettingsEnclosuresTab.h"

#include <wx/gbsizer.h>
#include <wx/treectrl.h>

enum {
ID_EVENT_TREE = 200,
};

BEGIN_EVENT_TABLE(GOOrganSettingsEnclosuresTab, wxPanel)
END_EVENT_TABLE()

GOOrganSettingsEnclosuresTab::GOOrganSettingsEnclosuresTab(
GOOrganModel &organModel,
wxWindow *parent,
GOOrganSettingsButtonsProxy::Listener &listener)
: wxPanel(parent, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxWANTS_CHARS),
GOOrganSettingsButtonsProxy(listener) {
wxGridBagSizer *const mainSizer = new wxGridBagSizer(5, 5);

m_tree = new wxTreeCtrl(
this,
ID_EVENT_TREE,
wxDefaultPosition,
wxDefaultSize,
wxTR_HAS_BUTTONS | wxTR_MULTIPLE);
mainSizer->Add(
m_tree,
wxGBPosition(0, 0),
wxGBSpan(4, 1),
wxEXPAND | wxTOP | wxLEFT | wxBOTTOM,
5);
mainSizer->AddGrowableCol(0, 1);
mainSizer->AddGrowableRow(3, 1);

SetSizerAndFit(mainSizer);
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
/*
* 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 GOORGANSETTINGSENCLOSURESTAB_H
#define GOORGANSETTINGSENCLOSURESTAB_H

#include <wx/event.h>
#include <wx/panel.h>

#include "GOOrganSettingsButtonsProxy.h"

class wxTreeCtrl;

class GOOrganModel;

class GOOrganSettingsEnclosuresTab : public wxPanel,
public GOOrganSettingsButtonsProxy {
private:
wxTreeCtrl *m_tree;

public:
GOOrganSettingsEnclosuresTab(
GOOrganModel &organModel,
wxWindow *parent,
GOOrganSettingsButtonsProxy::Listener &listener);

void ResetToDefault();
void DiscardChanges();
void ApplyChanges();

DECLARE_EVENT_TABLE()
};

#endif /* GOORGANSETTINGSENCLOSURESTAB_H */

0 comments on commit 6a2d905

Please sign in to comment.