-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMain.cpp
More file actions
63 lines (50 loc) · 1.68 KB
/
Main.cpp
File metadata and controls
63 lines (50 loc) · 1.68 KB
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
// Super Timecode Converter
// Copyright (c) 2026 Fiverecords — MIT License
// https://github.com/fiverecords/SuperTimecodeConverter
#include <JuceHeader.h>
#include "MainComponent.h"
class SuperTimecodeConverterApplication : public juce::JUCEApplication
{
public:
SuperTimecodeConverterApplication() {}
const juce::String getApplicationName() override { return "Super Timecode Converter"; }
const juce::String getApplicationVersion() override { return "1.4"; }
bool moreThanOneInstanceAllowed() override { return false; }
void initialise(const juce::String&) override
{
mainWindow.reset(new MainWindow(getApplicationName()));
}
void shutdown() override
{
mainWindow = nullptr;
}
void systemRequestedQuit() override
{
quit();
}
class MainWindow : public juce::DocumentWindow
{
public:
MainWindow(juce::String name)
: DocumentWindow(name,
juce::Colour(0xFF12141A), // Dark background
DocumentWindow::allButtons)
{
setUsingNativeTitleBar(true);
setContentOwned(new MainComponent(), true);
setResizable(true, true);
setResizeLimits(800, 550, 1920, 1080);
centreWithSize(getWidth(), getHeight());
setVisible(true);
}
void closeButtonPressed() override
{
JUCEApplication::getInstance()->systemRequestedQuit();
}
private:
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(MainWindow)
};
private:
std::unique_ptr<MainWindow> mainWindow;
};
START_JUCE_APPLICATION(SuperTimecodeConverterApplication)