CSL  6.0
MainMIDI.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 "juce.h"
6 
7 Component * createCSLComponent(); // extern function that creates the window
8 
9 class CSLWindow : public DocumentWindow {
10 public:
11  CSLWindow() : DocumentWindow (T("CSL 5.0 MIDI"),
12  Colours::lightgrey, DocumentWindow::allButtons, true) {
13  setContentComponent (createCSLComponent()); // create app window
14  setResizable (true, false);
15  setVisible (true);
16  setUsingNativeTitleBar(true);
17  centreWithSize (658, 354); // top window size 8 @ 24 larger than the component
18  }
19 
20  ~CSLWindow() { }
21 
23  JUCEApplication::quit();
24  }
25 };
26 
27 // This is the application object that is started up when Juce starts.
28 
29 class JUCECSLApplication : public JUCEApplication {
31 
32 public:
33  JUCECSLApplication() : mCSLWindow (0) { }
34 
36 
37  void initialise (const String& commandLine) {
38  mCSLWindow = new CSLWindow();
39  }
40 
41  void shutdown() {
42  if (mCSLWindow != 0)
43  delete mCSLWindow;
44  }
45 
46  const String getApplicationName() {
47  return T("JUCE/CSL");
48  }
49 
50  const String getApplicationVersion() {
51  return T("1.0");
52  }
53 
55  return true;
56  }
57 
58  void anotherInstanceStarted (const 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 char **argVals;
69 
70 int main (int argc, char* argv[]) {
71  argCnt = argc;
72  argVals = argv;
74 }
unsigned argCnt
char ** argVals
const String getApplicationVersion()
Definition: MainMIDI.cpp:50
bool moreThanOneInstanceAllowed()
Definition: MainMIDI.cpp:54
const String getApplicationName()
Definition: MainMIDI.cpp:46
CSLWindow * mCSLWindow
Definition: Main.cpp:30
int main(int argc, char *argv[])
Definition: MainMIDI.cpp:70
void initialise(const String &commandLine)
Definition: MainMIDI.cpp:37
void closeButtonPressed()
Definition: MainMIDI.cpp:22
Component * createCSLComponent()
~CSLWindow()
Definition: MainMIDI.cpp:20
void anotherInstanceStarted(const String &commandLine)
Definition: MainMIDI.cpp:58