Mercurial > hg > touchkeys
view Source/GUI/PreferencesWindow.h @ 44:73576f49ad1c
Trying out a new method for parsing OSC emulation strings which may be more Windows-friendly. Also added basic support for keyboard divisions on the display.
author | Andrew McPherson <andrewm@eecs.qmul.ac.uk> |
---|---|
date | Sat, 23 Aug 2014 23:46:38 +0100 |
parents | 85577160a0d4 |
children | 518027b4a3eb |
line wrap: on
line source
/* ============================================================================== PreferencesWindow.h Created: 17 Jun 2014 11:22:44pm Author: Andrew McPherson ============================================================================== */ #ifndef PREFERENCESWINDOW_H_INCLUDED #define PREFERENCESWINDOW_H_INCLUDED #include "../../JuceLibraryCode/JuceHeader.h" #include "PreferencesComponent.h" #include "../MainApplicationController.h" //============================================================================== /* */ class PreferencesWindow : public DocumentWindow, public Timer { public: PreferencesWindow(MainApplicationController& controller) : DocumentWindow("Preferences", Colours::lightgrey, DocumentWindow::allButtons) { // Make a new preferences component preferencesComponent_ = new PreferencesComponent(); preferencesComponent_->setMainApplicationController(&controller); // Set properties setContentOwned(preferencesComponent_, true); setUsingNativeTitleBar(true); setResizable(false, false); // Don't show window yet setVisible(false); // Start a timer that will keep the interface in sync with the application startTimer(50); } ~PreferencesWindow() { } // Method used by Juce timer which we will use for periodic UI updates // from the underlying system state void timerCallback() { preferencesComponent_->synchronize(); } void closeButtonPressed() { setVisible(false); } private: PreferencesComponent *preferencesComponent_; JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (PreferencesWindow) }; #endif // PREFERENCESWINDOW_H_INCLUDED