mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-02-06 04:00:08 +00:00
Added BLOCKS module
This commit is contained in:
parent
01380b12d6
commit
76b3689a48
219 changed files with 69419 additions and 10 deletions
53
examples/BLOCKS/BlocksMonitor/Source/Main.cpp
Normal file
53
examples/BLOCKS/BlocksMonitor/Source/Main.cpp
Normal file
|
|
@ -0,0 +1,53 @@
|
|||
|
||||
#include "../JuceLibraryCode/JuceHeader.h"
|
||||
#include "MainComponent.h"
|
||||
|
||||
|
||||
//==============================================================================
|
||||
class BlocksInfoApplication : public JUCEApplication
|
||||
{
|
||||
public:
|
||||
//==============================================================================
|
||||
BlocksInfoApplication() {}
|
||||
|
||||
const String getApplicationName() override { return ProjectInfo::projectName; }
|
||||
const String getApplicationVersion() override { return ProjectInfo::versionString; }
|
||||
|
||||
//==============================================================================
|
||||
void initialise (const String& /*commandLine*/) override { mainWindow = new MainWindow (getApplicationName()); }
|
||||
void shutdown() override { mainWindow = nullptr; }
|
||||
|
||||
//==============================================================================
|
||||
class MainWindow : public DocumentWindow
|
||||
{
|
||||
public:
|
||||
MainWindow (String name) : DocumentWindow (name,
|
||||
Colours::lightgrey,
|
||||
DocumentWindow::allButtons)
|
||||
{
|
||||
setUsingNativeTitleBar (true);
|
||||
setContentOwned (new MainComponent(), true);
|
||||
|
||||
centreWithSize (getWidth(), getHeight());
|
||||
setResizable (true, true);
|
||||
setVisible (true);
|
||||
}
|
||||
|
||||
void closeButtonPressed() override
|
||||
{
|
||||
JUCEApplication::getInstance()->systemRequestedQuit();
|
||||
}
|
||||
|
||||
private:
|
||||
TooltipWindow tooltipWindow;
|
||||
|
||||
//==============================================================================
|
||||
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (MainWindow)
|
||||
};
|
||||
|
||||
private:
|
||||
ScopedPointer<MainWindow> mainWindow;
|
||||
};
|
||||
|
||||
//==============================================================================
|
||||
START_JUCE_APPLICATION (BlocksInfoApplication)
|
||||
Loading…
Add table
Add a link
Reference in a new issue