Add a possibility to show a progress dialog on dialog sample startup.

Add a command line option to the dialogs sample to allow testing of different
wxProgressDialog styles more easily. This also tests for showing them before
the main event loop is started (see r65499).

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65502 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2010-09-10 17:25:35 +00:00
parent e77570de2e
commit f434800ca3
3 changed files with 70 additions and 0 deletions

View File

@@ -115,12 +115,26 @@ public:
class MyApp: public wxApp
{
public:
MyApp() { m_startupProgressStyle = -1; }
virtual bool OnInit();
#if wxUSE_CMDLINE_PARSER
virtual void OnInitCmdLine(wxCmdLineParser& parser);
virtual bool OnCmdLineParsed(wxCmdLineParser& parser);
#endif // wxUSE_CMDLINE_PARSER
protected:
#if wxUSE_LOG
virtual wxAppTraits *CreateTraits() { 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;
};
#if USE_MODAL_PRESENTATION