+private:
+ bool m_uploadReport;
+
+ wxDECLARE_NO_COPY_CLASS(MyApp);
+};
+
+IMPLEMENT_APP(MyApp)
+
+// ============================================================================
+// implementation
+// ============================================================================
+
+// ----------------------------------------------------------------------------
+// MyFrame
+// ----------------------------------------------------------------------------
+
+BEGIN_EVENT_TABLE(MyFrame, wxFrame)
+ EVT_MENU(DebugRpt_Quit, MyFrame::OnQuit)
+ EVT_MENU(DebugRpt_Crash, MyFrame::OnReportForCrash)
+ EVT_MENU(DebugRpt_Current, MyFrame::OnReportForCurrent)
+ EVT_MENU(DebugRpt_Paint, MyFrame::OnReportPaint)
+ EVT_MENU(DebugRpt_Upload, MyFrame::OnReportUpload)
+ EVT_MENU(DebugRpt_About, MyFrame::OnAbout)
+
+ EVT_PAINT(MyFrame::OnPaint)
+END_EVENT_TABLE()
+
+MyFrame::MyFrame()
+ : wxFrame(NULL, wxID_ANY, wxT("wxWidgets Debug Report Sample"),
+ wxDefaultPosition, wxDefaultSize, wxFULL_REPAINT_ON_RESIZE|wxDEFAULT_FRAME_STYLE)
+{
+ m_numLines = 10;
+
+ SetIcon(wxICON(sample));
+
+ wxMenu *menuFile = new wxMenu;
+ menuFile->Append(DebugRpt_Quit, wxT("E&xit\tAlt-X"));
+
+ wxMenu *menuReport = new wxMenu;
+ menuReport->Append(DebugRpt_Crash, wxT("Report for &crash\tCtrl-C"),
+ wxT("Provoke a crash inside the program and create report for it"));
+ menuReport->Append(DebugRpt_Current, wxT("Report for c&urrent context\tCtrl-U"),
+ wxT("Create report for the current program context"));
+ menuReport->Append(DebugRpt_Paint, wxT("Report for &paint handler\tCtrl-P"),
+ wxT("Provoke a repeatable crash in wxEVT_PAINT handler"));
+ menuReport->AppendSeparator();
+ menuReport->AppendCheckItem(DebugRpt_Upload, wxT("Up&load debug report"),
+ wxT("You need to configure a web server accepting debug report uploads to use this function"));
+
+ wxMenu *menuHelp = new wxMenu;
+ menuHelp->Append(DebugRpt_About, wxT("&About\tF1"));
+
+ wxMenuBar *mbar = new wxMenuBar();
+ mbar->Append(menuFile, wxT("&File"));
+ mbar->Append(menuReport, wxT("&Report"));
+ mbar->Append(menuHelp, wxT("&Help"));
+ SetMenuBar(mbar);
+
+ CreateStatusBar();