- 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:
2019-11-11 19:17:13 +00:00
parent c800033993
commit 2d91e67704
3 changed files with 15 additions and 6 deletions
+2 -2
View File
@@ -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);
+1 -1
View File
@@ -50,7 +50,7 @@ class MainComponent
{
public:
//==============================================================================
MainComponent ();
MainComponent (const String prjname);
~MainComponent();
//==============================================================================
+12 -3
View File
@@ -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);