-// log frame class
-// ---------------
-class wxLogFrame : public wxFrame
-{
-public:
- // ctor & dtor
- wxLogFrame(wxFrame *pParent, wxLogWindow *log, const char *szTitle);
- virtual ~wxLogFrame();
-
- // menu callbacks
- void OnClose(wxCommandEvent& event);
- void OnCloseWindow(wxCloseEvent& event);
- void OnSave (wxCommandEvent& event);
- void OnClear(wxCommandEvent& event);
-
- void OnIdle(wxIdleEvent&);
-
- // accessors
- wxTextCtrl *TextCtrl() const { return m_pTextCtrl; }
-
-private:
- enum
- {
- Menu_Close = 100,
- Menu_Save,
- Menu_Clear
- };
-
- // instead of closing just hide the window to be able to Show() it later
- void DoClose() { Show(FALSE); }
-
- wxTextCtrl *m_pTextCtrl;
- wxLogWindow *m_log;
-
- DECLARE_EVENT_TABLE()
-};
-
-BEGIN_EVENT_TABLE(wxLogFrame, wxFrame)
- // wxLogWindow menu events
- EVT_MENU(Menu_Close, wxLogFrame::OnClose)
- EVT_MENU(Menu_Save, wxLogFrame::OnSave)
- EVT_MENU(Menu_Clear, wxLogFrame::OnClear)
-
- EVT_CLOSE(wxLogFrame::OnCloseWindow)
-END_EVENT_TABLE()
-
-wxLogFrame::wxLogFrame(wxFrame *pParent, wxLogWindow *log, const char *szTitle)
- : wxFrame(pParent, -1, szTitle)