1 // main.cpp - Main subroutine (application start).
3 // (c) 2012-2015 Xestia Software Development.
5 // This file is part of Xestia Calendar.
7 // Xestia Address Book is free software: you can redistribute it and/or modify
8 // it under the terms of the GNU General Public License as published by the
9 // Free Software Foundation, version 3 of the license.
11 // Xestia Address Book is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 // GNU General Public License for more details.
16 // You should have received a copy of the GNU General Public License along
17 // with Xestia Address Book. If not, see <http://www.gnu.org/licenses/>
23 #include <wx/mstream.h>
24 #include <wx/cmdline.h>
25 #include <wx/wxprec.h>
26 #include <wx/filename.h>
27 #include <curl/curl.h>
30 #include "forms/main/frmMain.h"
32 class XestiaCALApp: public wxApp
34 virtual bool OnInit();
37 IMPLEMENT_APP(XestiaCALApp);
39 bool XestiaCALApp::OnInit()
42 static const wxCmdLineEntryDesc g_cmdLineDesc [] =
44 { wxCMD_LINE_SWITCH, "h", "help", "Displays help on command line parameters",
45 wxCMD_LINE_VAL_NONE, wxCMD_LINE_OPTION_HELP },
46 { wxCMD_LINE_SWITCH, "v", "version", "Displays version number",
47 wxCMD_LINE_VAL_NONE, wxCMD_LINE_PARAM_OPTIONAL },
54 locale.Init(wxLANGUAGE_DEFAULT, wxLOCALE_LOAD_DEFAULT);
56 wxCmdLineParser XCALArgs (g_cmdLineDesc, argc, argv);
59 if (XCALArgs.Found(wxT("v"))){
61 // Print out the version number.
63 wxPuts(XSDCAL_VERSION);
68 frmMain *frame = new frmMain( NULL );
70 //frmActivityMgr *frameActMgr = new frmActivityMgr ( frame );
71 //frame->SetupPointers(frameActMgr);
73 //frame->SetIcon(appicon);