CSL
6.0
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
Main.cpp
Go to the documentation of this file.
1
//
2
// Stripped Juce top-level window code, based on the hello world example
3
//
4
5
#include "JuceHeader.h"
6
7
juce::Component *
createCSLComponent
();
// extern function that creates the window
8
9
class
CSLWindow
:
public
juce::DocumentWindow {
10
public
:
11
CSLWindow
() :
juce
::DocumentWindow (
"CSL 6.0 Demos"
,
12
juce
::Colours::lightgrey, DocumentWindow::allButtons, true) {
13
setContentOwned(
createCSLComponent
(),
true
);
// create app window
14
setResizable (
true
,
false
);
15
setVisible (
true
);
16
setUsingNativeTitleBar(
true
);
17
centreWithSize (1000, 700);
// top window size 8 @ 24 larger than the component
18
}
19
20
~CSLWindow
() { }
21
22
void
closeButtonPressed
() {
23
juce::JUCEApplication::quit();
24
}
25
};
26
27
// This is the application object that is started up when Juce starts.
28
29
class
JUCECSLApplication
:
public
juce::JUCEApplication {
30
CSLWindow
*
mCSLWindow
;
31
32
public
:
33
JUCECSLApplication
() : mCSLWindow (0) { }
34
35
~JUCECSLApplication
() { }
36
37
void
initialise
(
const
juce::String& commandLine) {
38
mCSLWindow =
new
CSLWindow
();
39
}
40
41
void
shutdown
() {
42
if
(mCSLWindow != 0)
43
delete
mCSLWindow
;
44
}
45
46
const
juce::String
getApplicationName
() {
47
return
"JUCE/CSL"
;
48
}
49
50
const
juce::String
getApplicationVersion
() {
51
return
"5.2"
;
52
}
53
54
bool
moreThanOneInstanceAllowed
() {
55
return
true
;
56
}
57
58
void
anotherInstanceStarted
(
const
juce::String& commandLine) { }
59
};
60
61
// This macro creates the application's main() function..
62
63
START_JUCE_APPLICATION (
JUCECSLApplication
)
64
65
// I do this by hand so that I can keep argc/argv
66
67
//extern unsigned argCnt; // globals for argc/v
68
//extern const char **argVals;
69
70
//int main (int argc, const char* argv[]) {
71
// argCnt = argc;
72
// argVals = argv;
73
// return JUCE_NAMESPACE::JUCEApplication::main (argc, argv /*, new JUCECSLApplication() */);
74
//}
juce
createCSLComponent
juce::Component * createCSLComponent()
Definition:
CSL_ServerComponent.cpp:436
JUCECSLApplication::anotherInstanceStarted
void anotherInstanceStarted(const juce::String &commandLine)
Definition:
Main.cpp:58
CSLWindow::CSLWindow
CSLWindow()
Definition:
Main.cpp:11
JUCECSLApplication::moreThanOneInstanceAllowed
bool moreThanOneInstanceAllowed()
Definition:
Main.cpp:54
JUCECSLApplication::mCSLWindow
CSLWindow * mCSLWindow
Definition:
Main.cpp:30
JUCECSLApplication::shutdown
void shutdown()
Definition:
Main.cpp:41
CSLWindow::closeButtonPressed
void closeButtonPressed()
Definition:
Main.cpp:22
JUCECSLApplication::getApplicationName
const juce::String getApplicationName()
Definition:
Main.cpp:46
CSLWindow::~CSLWindow
~CSLWindow()
Definition:
Main.cpp:20
JUCECSLApplication::~JUCECSLApplication
~JUCECSLApplication()
Definition:
Main.cpp:35
CSLWindow
Definition:
Main.cpp:9
JUCECSLApplication
Definition:
Main.cpp:29
JUCECSLApplication::initialise
void initialise(const juce::String &commandLine)
Definition:
Main.cpp:37
JUCECSLApplication::getApplicationVersion
const juce::String getApplicationVersion()
Definition:
Main.cpp:50
JUCECSLApplication::JUCECSLApplication
JUCECSLApplication()
Definition:
Main.cpp:33
Src
JUCE
Main.cpp
Generated on Fri Apr 17 2020 13:29:54 for CSL by
1.8.8