extracted common initialization/cleanup functions in common/init.cpp; standardized wxEntry()

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@21518 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2003-06-30 18:43:09 +00:00
parent 041973c55e
commit 9482617091
34 changed files with 1087 additions and 1626 deletions

View File

@@ -36,6 +36,9 @@
#include "wx/apptrait.h"
#include "wx/cmdline.h"
#include "wx/confbase.h"
#if wxUSE_FILENAME
#include "wx/filename.h"
#endif // wxUSE_FILENAME
#if wxUSE_FONTMAP
#include "wx/fontmap.h"
#endif // wxUSE_FONTMAP
@@ -114,6 +117,33 @@ wxAppConsole::~wxAppConsole()
delete m_traits;
}
// ----------------------------------------------------------------------------
// initilization/cleanup
// ----------------------------------------------------------------------------
bool wxAppConsole::Initialize(int argc, wxChar **argv)
{
// remember the command line arguments
this->argc = argc;
this->argv = argv;
if ( m_appName.empty() )
{
// the application name is, by default, the name of its executable file
#if wxUSE_FILENAME
wxFileName::SplitPath(argv[0], NULL, &m_appName, NULL);
#else // !wxUSE_FILENAME
m_appName = argv[0];
#endif // wxUSE_FILENAME/!wxUSE_FILENAME
}
return true;
}
void wxAppConsole::CleanUp()
{
}
// ----------------------------------------------------------------------------
// OnXXX() callbacks
// ----------------------------------------------------------------------------