- 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]
|
//[/MiscUserDefs]
|
||||||
|
|
||||||
//==============================================================================
|
//==============================================================================
|
||||||
MainComponent::MainComponent ()
|
MainComponent::MainComponent (const String prjname)
|
||||||
: Thread("RBM")
|
: Thread("RBM")
|
||||||
, m_stack(nullptr)
|
, m_stack(nullptr)
|
||||||
, m_pLayer(nullptr)
|
, m_pLayer(nullptr)
|
||||||
@@ -116,7 +116,7 @@ MainComponent::MainComponent ()
|
|||||||
createButton->addListener (this);
|
createButton->addListener (this);
|
||||||
|
|
||||||
addAndMakeVisible (projectNameLabel = new Label ("Project Name label",
|
addAndMakeVisible (projectNameLabel = new Label ("Project Name label",
|
||||||
TRANS("test")));
|
prjname));
|
||||||
projectNameLabel->setFont (Font (15.00f, Font::plain));
|
projectNameLabel->setFont (Font (15.00f, Font::plain));
|
||||||
projectNameLabel->setJustificationType (Justification::centred);
|
projectNameLabel->setJustificationType (Justification::centred);
|
||||||
projectNameLabel->setEditable (true, true, false);
|
projectNameLabel->setEditable (true, true, false);
|
||||||
|
|||||||
@@ -50,7 +50,7 @@ class MainComponent
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
//==============================================================================
|
//==============================================================================
|
||||||
MainComponent ();
|
MainComponent (const String prjname);
|
||||||
~MainComponent();
|
~MainComponent();
|
||||||
|
|
||||||
//==============================================================================
|
//==============================================================================
|
||||||
|
|||||||
+12
-3
@@ -30,7 +30,7 @@ public:
|
|||||||
void initialise (const String& commandLine) override
|
void initialise (const String& commandLine) override
|
||||||
{
|
{
|
||||||
// Add your application's initialisation code here..
|
// Add your application's initialisation code here..
|
||||||
mainWindow = new MainWindow;
|
mainWindow = new MainWindow(commandLine);
|
||||||
}
|
}
|
||||||
|
|
||||||
void shutdown() override
|
void shutdown() override
|
||||||
@@ -62,11 +62,20 @@ public:
|
|||||||
class MainWindow : public DocumentWindow
|
class MainWindow : public DocumentWindow
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
MainWindow() : DocumentWindow ("RBM Gui",
|
MainWindow(const String& commandLine) : DocumentWindow ("RBM Gui",
|
||||||
Colours::lightgrey,
|
Colours::lightgrey,
|
||||||
DocumentWindow::allButtons)
|
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());
|
centreWithSize (getWidth(), getHeight());
|
||||||
setVisible (true);
|
setVisible (true);
|
||||||
|
|||||||
Reference in New Issue
Block a user