39 lines
1.0 KiB
C
39 lines
1.0 KiB
C
|
#pragma once
|
|||
|
|
|||
|
#if wxUSE_LOG
|
|||
|
// Custom application traits class which we use to override the default log
|
|||
|
// target creation
|
|||
|
class MyAppTraits : public wxGUIAppTraits
|
|||
|
{
|
|||
|
public:
|
|||
|
virtual wxLog* CreateLogTarget() wxOVERRIDE;
|
|||
|
};
|
|||
|
|
|||
|
#endif // wxUSE_LOG
|
|||
|
|
|||
|
// Define a new application type
|
|||
|
class MyApp : public wxApp
|
|||
|
{
|
|||
|
public:
|
|||
|
MyApp() { m_startupProgressStyle = -1; }
|
|||
|
|
|||
|
virtual bool OnInit() wxOVERRIDE;
|
|||
|
|
|||
|
#if wxUSE_CMDLINE_PARSER
|
|||
|
virtual void OnInitCmdLine(wxCmdLineParser& parser) wxOVERRIDE;
|
|||
|
virtual bool OnCmdLineParsed(wxCmdLineParser& parser) wxOVERRIDE;
|
|||
|
#endif // wxUSE_CMDLINE_PARSER
|
|||
|
|
|||
|
protected:
|
|||
|
#if wxUSE_LOG
|
|||
|
virtual wxAppTraits* CreateTraits() wxOVERRIDE { return new MyAppTraits; }
|
|||
|
#endif // wxUSE_LOG
|
|||
|
|
|||
|
private:
|
|||
|
// Flag set to a valid value if command line option "progress" is used,
|
|||
|
// this allows testing of wxProgressDialog before the main event loop is
|
|||
|
// started. If this option is not specified it is set to -1 by default
|
|||
|
// meaning that progress dialog shouldn't be shown at all.
|
|||
|
long m_startupProgressStyle;
|
|||
|
};
|