-
Notifications
You must be signed in to change notification settings - Fork 1
/
wxMidiSettingsDlg.h
73 lines (68 loc) · 3.12 KB
/
wxMidiSettingsDlg.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
#ifndef _wxMidiSettingsDlg_H_
#define _wxMidiSettingsDlg_H_
// wxWidgets dialog used for changing MIDI settings.
#include "wx/wx.h"
#include "wx/spinctrl.h"
#include "wxKeylessChoice.h"
#include "wxBitmapSpinButton.h"
#include "MidiSettingsInterface.h"
#include "wxSwitch.h"
#define ID_MIDISETTINGS_DLG 14000
#define SYMBOL_wxMidiSettingsDlg_STYLE wxCAPTION|wxSYSTEM_MENU|wxCLOSE_BOX
#define SYMBOL_wxMidiSettingsDlg_TITLE _("MIDI Settings")
#define SYMBOL_wxMidiSettingsDlg_IDNAME ID_MIDISETTINGS_DLG
#define SYMBOL_wxMidiSettingsDlg_SIZE wxSize(400, 300)
#define SYMBOL_wxMidiSettingsDlg_POSITION wxDefaultPosition
#define ID_BUTTON_CLOSE 14001
#define ID_CHK_MIDIOUT 14002
#define ID_MIDI_IN_DEVICE 14003
#define ID_MIDI_OUT_DEVICE 14004
#define ID_INPUTCHANNELSPIN 14005
#define ID_OUTPUTCHANNELSPIN 14006
#define ID_INPUTCHANNELTEXT 14008
#define ID_OUTPUTCHANNELTEXT 14009
class wxMidiSettingsDlg : public wxDialog
{
DECLARE_DYNAMIC_CLASS( wxMidiSettingsDlg )
DECLARE_EVENT_TABLE()
public:
wxMidiSettingsDlg();
~wxMidiSettingsDlg();
wxMidiSettingsDlg( wxWindow* parent, MidiSettingsInterface* callback, wxWindowID id = SYMBOL_wxMidiSettingsDlg_IDNAME, const wxString& caption = SYMBOL_wxMidiSettingsDlg_TITLE, const wxPoint& pos = SYMBOL_wxMidiSettingsDlg_POSITION, const wxSize& size = SYMBOL_wxMidiSettingsDlg_SIZE, long style = SYMBOL_wxMidiSettingsDlg_STYLE );
bool Create( wxWindow* parent, MidiSettingsInterface* callback, wxWindowID id = SYMBOL_wxMidiSettingsDlg_IDNAME, const wxString& caption = SYMBOL_wxMidiSettingsDlg_TITLE, const wxPoint& pos = SYMBOL_wxMidiSettingsDlg_POSITION, const wxSize& size = SYMBOL_wxMidiSettingsDlg_SIZE, long style = SYMBOL_wxMidiSettingsDlg_STYLE );
void CreateControls();
void OnClose( wxCloseEvent& event );
void OnCloseButton( wxCommandEvent& event );
void OnInputChannelSpinUp( wxSpinEvent& event );
void OnInputChannelSpinDown( wxSpinEvent& event );
void OnOutputChannelSpinUp( wxSpinEvent& event );
void OnOutputChannelSpinDown( wxSpinEvent& event );
void OnChangeMidiOutDevice( wxCommandEvent& event );
void OnChangeMidiInDevice( wxCommandEvent& event );
bool SetForegroundColour(const wxColour &colour);
bool SetBackgroundColour(const wxColour &colour);
void SetMidiOutputCheckbox(bool enabled);
void OnMidiOutputEnabledCheck( wxCommandEvent& event);
void SetMidiInputDeviceIndex(unsigned int index);
void SetMidiOutputDeviceIndex(unsigned int index);
void SetMidiInputChannel(int channel);
void SetMidiOutputChannel(int channel);
private:
wxKeylessChoice* _outDevice;
wxKeylessChoice* _inDevice;
wxBitmapSpinButton* _inputChannelSpin;
wxBitmapSpinButton* _outputChannelSpin;
wxButton* _btnClose;
wxColour _backgroundColour;
wxColour _textColour;
wxSwitch* _chkMidiOutEnabled;
MidiSettingsInterface* _callback;
wxStaticText* _inputChannelText;
wxStaticText* _outputChannelText;
wxStaticText* _txtMidiOutputEnabled;
wxStaticText* _txtMidiOutputDevice;
wxStaticText* _txtMidiOutputChannel;
wxStaticText* _txtMidiInputChannel;
wxStaticText* _txtMidiInputDevice;
};
#endif