- project name is first argument on command line
git-svn-id: http://moon:8086/svn/software/trunk/projects/Rbm@658 b431acfa-c32f-4a4a-93f1-934dc6c82436
This commit is contained in:
@@ -39,7 +39,7 @@ void mylog(const char* format, ...)
|
||||
//[/MiscUserDefs]
|
||||
|
||||
//==============================================================================
|
||||
MainComponent::MainComponent ()
|
||||
MainComponent::MainComponent (const String prjname)
|
||||
: Thread("RBM")
|
||||
, m_stack(nullptr)
|
||||
, m_pLayer(nullptr)
|
||||
@@ -116,7 +116,7 @@ MainComponent::MainComponent ()
|
||||
createButton->addListener (this);
|
||||
|
||||
addAndMakeVisible (projectNameLabel = new Label ("Project Name label",
|
||||
TRANS("test")));
|
||||
prjname));
|
||||
projectNameLabel->setFont (Font (15.00f, Font::plain));
|
||||
projectNameLabel->setJustificationType (Justification::centred);
|
||||
projectNameLabel->setEditable (true, true, false);
|
||||
|
||||
@@ -50,7 +50,7 @@ class MainComponent
|
||||
{
|
||||
public:
|
||||
//==============================================================================
|
||||
MainComponent ();
|
||||
MainComponent (const String prjname);
|
||||
~MainComponent();
|
||||
|
||||
//==============================================================================
|
||||
|
||||
+12
-3
@@ -30,7 +30,7 @@ public:
|
||||
void initialise (const String& commandLine) override
|
||||
{
|
||||
// Add your application's initialisation code here..
|
||||
mainWindow = new MainWindow;
|
||||
mainWindow = new MainWindow(commandLine);
|
||||
}
|
||||
|
||||
void shutdown() override
|
||||
@@ -62,11 +62,20 @@ public:
|
||||
class MainWindow : public DocumentWindow
|
||||
{
|
||||
public:
|
||||
MainWindow() : DocumentWindow ("RBM Gui",
|
||||
MainWindow(const String& commandLine) : DocumentWindow ("RBM Gui",
|
||||
Colours::lightgrey,
|
||||
DocumentWindow::allButtons)
|
||||
{
|
||||
setContentOwned (new MainComponent(), true);
|
||||
StringArray token;
|
||||
token.addTokens(commandLine, " ");
|
||||
std::cout << token[0] << std::endl;
|
||||
|
||||
String name = token[0];
|
||||
if (name.isEmpty())
|
||||
{
|
||||
name = "test";
|
||||
}
|
||||
setContentOwned (new MainComponent(name), true);
|
||||
|
||||
centreWithSize (getWidth(), getHeight());
|
||||
setVisible (true);
|
||||
|
||||
Reference in New Issue
Block a user