-
Notifications
You must be signed in to change notification settings - Fork 1
/
GandrGUIApp.cpp
54 lines (42 loc) · 1.17 KB
/
GandrGUIApp.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
/*************************************************************
* Name: GandrguiApp.cpp
* Purpose: Code for Application Class
* Author: Jan ([email protected])
* Created: 2018-09-12
* License: GPL-3
**************************************************************/
#include "wx/wxprec.h"
/*
#ifdef WX_PRECOMP
#include "wx_pch.h"
#endif
*/
#ifdef __BORLANDC__
#pragma hdrstop
#endif //__BORLANDC__
#ifndef WXUSINGDLL
#define WXUSINGDLL
#endif
#include "GandrGUIApp.h"
#include "GandrGUIMain.h"
IMPLEMENT_APP(GandrguiApp);
bool GandrguiApp::OnInit() {
auto frame = new GandrguiFrame(0L, _("GANDR Graphical User Interface"));
frame->Show();
return true;
}
void GandrguiApp::OnInitCmdLine(wxCmdLineParser& parser) {
parser.SetDesc(g_cmdLineDesc);
// must refuse '/' as parameter starter or cannot use "/path" style paths
parser.SetSwitchChars("-");
}
bool GandrguiApp::OnCmdLineParsed(wxCmdLineParser& parser) {
silent_mode = parser.Found("s");
// to get at your unnamed parameters use
wxArrayString files;
for (int i = 0; i < parser.GetParamCount(); i++)
{
files.Add(parser.GetParam(i));
}
return true;
}