#ifndef _MIDI_PLAYER_WINDOW_H
#define _MIDI_PLAYER_WINDOW_H
#include <InterfaceKit.h>
#include <MidiSynthFile.h>
#define SETTINGS_FILE "/boot/home/config/settings/MidiPlayerSettings"
enum
{
MSG_PLAY_STOP = 1000,
MSG_SHOW_SCOPE,
MSG_INPUT_CHANGED,
MSG_REVERB_NONE,
MSG_REVERB_CLOSET,
MSG_REVERB_GARAGE,
MSG_REVERB_IGOR,
MSG_REVERB_CAVERN,
MSG_REVERB_DUNGEON,
MSG_VOLUME,
};
class ScopeView;
class SynthBridge;
class MidiPlayerWindow : public BWindow {
public:
MidiPlayerWindow();
virtual ~MidiPlayerWindow();
virtual bool QuitRequested();
virtual void MessageReceived(BMessage* message);
virtual void FrameMoved(BPoint origin);
virtual void MenusBeginning();
private:
typedef BWindow super;
void CreateInputMenu();
void CreateReverbMenu();
void CreateViews();
void InitControls();
void LoadSettings();
void SaveSettings();
void LoadFile(entry_ref* ref);
void StartSynth();
void StopSynth();
static void _StopHook(int32 arg);
void StopHook();
void OnPlayStop();
void OnShowScope();
void OnInputChanged(BMessage* message);
void OnReverb(reverb_mode mode);
void OnVolume();
void OnDrop(BMessage* message);
ScopeView* fScopeView;
BCheckBox* fShowScopeCheckBox;
BMenuField* fInputMenuField;
BPopUpMenu* fInputPopUpMenu;
BMenuItem* fInputOffMenuItem;
BMenuField* fReverbMenuField;
BMenuItem* fReverbNoneMenuItem;
BMenuItem* fReverbClosetMenuItem;
BMenuItem* fReverbGarageMenuItem;
BMenuItem* fReverbIgorMenuItem;
BMenuItem* fReverbCavern;
BMenuItem* fReverbDungeon;
BSlider* fVolumeSlider;
BButton* fPlayButton;
bool fIsPlaying;
bool fScopeEnabled;
int32 fInputId;
reverb_mode fReverbMode;
int32 fVolume;
float fWindowX;
float fWindowY;
BMidiSynthFile fMidiSynthFile;
SynthBridge* fSynthBridge;
bool fInstrumentLoaded;
};
#endif