Removed lots of OnClose functions; doc'ed OnCloseWindow better;

MM_... -> wxMM_...


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@1615 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Julian Smart
1999-02-05 23:55:04 +00:00
parent cd743a6f71
commit e306597309
130 changed files with 533 additions and 659 deletions

View File

@@ -167,7 +167,7 @@ BombsCanvasClass::BombsCanvasClass(wxFrame *parent, const wxPoint& pos, const wx
dc.GetTextExtent(buf, &chw, &chh);
dc.SetFont(wxNullFont);
dc.SetMapMode(MM_METRIC);
dc.SetMapMode(wxMM_METRIC);
int xcm = dc.LogicalToDeviceX(10.0);
int ycm = dc.LogicalToDeviceY(10.0);
@@ -183,7 +183,7 @@ BombsCanvasClass::BombsCanvasClass(wxFrame *parent, const wxPoint& pos, const wx
}
x_cell = (sx+3+X_UNIT)/X_UNIT;
y_cell = (sy+3+Y_UNIT)/Y_UNIT;
dc.SetMapMode(MM_TEXT);
dc.SetMapMode(wxMM_TEXT);
bmp=NULL;
UpdateFieldSize();
}

View File

@@ -154,7 +154,7 @@ void CheckListBoxFrame::OnQuit(wxCommandEvent& WXUNUSED(event))
void CheckListBoxFrame::OnAbout(wxCommandEvent& WXUNUSED(event))
{
wxMessageDialog dialog(this, "Demo of wxCheckListBox control\n"
wxMessageDialog dialog(this, "Demo of wxCheckListBox control\n",
"About wxCheckListBox", wxYES_NO | wxCANCEL);
dialog.ShowModal();
}

View File

@@ -46,7 +46,7 @@ public:
void OnQuit(wxCommandEvent& event);
void OnAbout(wxCommandEvent& event);
void OnDelete(wxCommandEvent& event);
bool OnClose() { return TRUE; }
void OnCloseWindow(wxCloseEvent& event);
private:
wxTextCtrl *m_text;
@@ -69,6 +69,7 @@ BEGIN_EVENT_TABLE(MyFrame, wxFrame)
EVT_MENU(Minimal_Quit, MyFrame::OnQuit)
EVT_MENU(Minimal_About, MyFrame::OnAbout)
EVT_MENU(Minimal_Delete, MyFrame::OnDelete)
EVT_CLOSE(MyFrame::OnCloseWindow)
END_EVENT_TABLE()
// ============================================================================
@@ -189,6 +190,11 @@ MyFrame::MyFrame()
SetClientSize(w, h);
}
void MyFrame::OnCloseWindow(wxCloseEvent& event)
{
this->Destroy();
}
void MyFrame::OnQuit(wxCommandEvent&)
{
Close(TRUE);

View File

@@ -264,7 +264,7 @@ void DatabaseDemoFrame::OnCloseWindow(wxCloseEvent& event)
// to close the program here that is not done elsewhere
this->Destroy();
} // DatabaseDemoFrame::OnClose()
} // DatabaseDemoFrame::OnCloseWindow()
void DatabaseDemoFrame::CreateDataTable()
@@ -651,21 +651,21 @@ CeditorDlg::CeditorDlg(wxWindow *parent) : wxPanel (parent, 1, 1, 460, 455)
} // CeditorDlg constructor
bool CeditorDlg::OnClose()
void CeditorDlg::OnCloseWindow(wxCloseEvent& event)
{
// Clean up time
if ((mode != mCreate) && (mode != mEdit))
{
if (Contact)
delete Contact;
return TRUE;
this->Destroy();
}
else
{
wxMessageBox("Must finish processing the current record being created/modified before exiting","Notice...",wxOK | wxICON_INFORMATION);
return FALSE;
event.Veto();
}
} // CeditorDlg::OnClose()
} // CeditorDlg::OnCloseWindow()
void CeditorDlg::OnButton( wxCommandEvent &event )
@@ -1283,6 +1283,11 @@ bool CeditorDlg::GetRec(char *whereStr)
/*
* CparameterDlg constructor
*/
BEGIN_EVENT_TABLE(CparameterDlg, wxDialog)
EVT_CLOSE(CparameterDlg::OnCloseWindow)
END_EVENT_TABLE()
CparameterDlg::CparameterDlg(wxWindow *parent) : wxDialog (parent, PARAMETER_DIALOG, "ODBC parameter settings", wxPoint(-1, -1), wxSize(400, 275))
{
// Since the ::OnCommand() function is overridden, this prevents the widget
@@ -1315,7 +1320,7 @@ CparameterDlg::CparameterDlg(wxWindow *parent) : wxDialog (parent, PARAMETER_DIA
} // CparameterDlg constructor
bool CparameterDlg::OnClose()
void CparameterDlg::OnCloseWindow(wxCloseEvent& event)
{
// Put any additional checking necessary to make certain it is alright
// to close the program here that is not done elsewhere
@@ -1324,15 +1329,19 @@ bool CparameterDlg::OnClose()
bool Ok = (wxMessageBox("No changes have been saved.\n\nAre you sure you wish exit the parameter screen?","Confirm",wxYES_NO|wxICON_QUESTION) == wxYES);
if (!Ok)
return FALSE;
{
event.Veto();
return;
}
wxGetApp().params = savedParamSettings;
}
if (GetParent() != NULL)
GetParent()->SetFocus();
return TRUE;
} // Cparameter::OnClose()
this->Destroy();
} // Cparameter::OnCloseWindow()
void CparameterDlg::OnCommand(wxWindow& win, wxCommandEvent& event)
@@ -1471,6 +1480,7 @@ void CparameterDlg::FillDataSourceList()
BEGIN_EVENT_TABLE(CqueryDlg, wxDialog)
EVT_BUTTON(-1, CqueryDlg::OnButton)
EVT_CLOSE(CqueryDlg::OnCloseWindow)
END_EVENT_TABLE()
// CqueryDlg() constructor
@@ -1800,7 +1810,7 @@ void CqueryDlg::OnCommand(wxWindow& win, wxCommandEvent& event)
} // CqueryDlg::OnCommand
bool CqueryDlg::OnClose()
void CqueryDlg::OnCloseWindow(wxCloseEvent& event)
{
// Clean up
if (colInf)
@@ -1817,9 +1827,10 @@ bool CqueryDlg::OnClose()
GetParent()->SetFocus();
wxEndBusyCursor();
return TRUE;
} // CqueryDlg::OnClose()
this->Destroy();
} // CqueryDlg::OnCloseWindow()
/*
bool CqueryDlg::SetWidgetPtrs()

View File

@@ -165,7 +165,7 @@ class CeditorDlg : public wxPanel
Ccontact *Contact; // this is the table object that will be being manipulated
CeditorDlg(wxWindow *parent);
bool OnClose(void);
void OnCloseWindow(wxCloseEvent& event);
void OnButton( wxCommandEvent &event );
void OnCommand(wxWindow& win, wxCommandEvent& event);
void OnActivate(bool) {}; // necessary for hot keys
@@ -243,7 +243,7 @@ class CparameterDlg : public wxDialog
public:
CparameterDlg(wxWindow *parent);
bool OnClose(void);
void OnCloseWindow(wxCloseEvent& event);
void OnCommand(wxWindow& win, wxCommandEvent& event);
void OnActivate(bool) {}; // necessary for hot keys
@@ -252,6 +252,7 @@ class CparameterDlg : public wxDialog
bool Save();
void FillDataSourceList();
DECLARE_EVENT_TABLE()
}; // CparameterDlg
#define PARAMETER_DIALOG 400
@@ -341,7 +342,7 @@ class CqueryDlg : public wxDialog
void OnButton( wxCommandEvent &event );
void OnCommand(wxWindow& win, wxCommandEvent& event);
bool OnClose();
void OnCloseWindow(wxCloseEvent& event);
void OnActivate(bool) {}; // necessary for hot keys
// bool SetWidgetPtrs();

View File

@@ -26,7 +26,6 @@ class MyFrame: public wxFrame
{ public:
MyFrame(wxWindow *parent, const wxString& title, const wxPoint& pos,
const wxSize& size);
bool OnClose(void) { return TRUE; }
void ChooseColour(wxCommandEvent& event);
void ChooseFont(wxCommandEvent& event);

View File

@@ -91,8 +91,6 @@ public:
void OnLeftDown(wxMouseEvent& event);
void OnRightDown(wxMouseEvent& event);
bool OnClose();
DECLARE_EVENT_TABLE()
private:
@@ -302,11 +300,6 @@ void DnDFrame::OnLogClear(wxCommandEvent& /* event */ )
m_ctrlLog->Clear();
}
bool DnDFrame::OnClose()
{
return TRUE;
}
void DnDFrame::OnLeftDown(wxMouseEvent &WXUNUSED(event) )
{
if ( !m_strText.IsEmpty() )

View File

@@ -43,7 +43,6 @@ class MyFrame: public wxFrame
public:
void OnQuit(wxCommandEvent& event);
void OnAbout(wxCommandEvent& event);
bool OnClose(void) { return TRUE; }
};
// ID for the menu commands

View File

@@ -123,13 +123,13 @@ void FortyCanvas::OnDraw(wxDC& dc)
/*
Called when the main frame is closed
*/
bool FortyCanvas::OnClose()
bool FortyCanvas::OnCloseCanvas()
{
if (m_game->InPlay() &&
wxMessageBox("Are you sure you want to\nabandon the current game?",
"Warning", wxYES_NO | wxICON_QUESTION) == wxNO)
{
return FALSE;
return FALSE;
}
return TRUE;
}

View File

@@ -25,7 +25,7 @@ public:
virtual ~FortyCanvas();
virtual void OnDraw(wxDC& dc);
bool OnClose();
bool OnCloseCanvas();
void OnMouseEvent(wxMouseEvent& event);
void SetCursorStyle(int x, int y);

View File

@@ -40,7 +40,7 @@ public:
FortyFrame(wxFrame* frame, char* title, int x, int y, int w, int h);
virtual ~FortyFrame();
bool OnClose();
void OnCloseWindow(wxCloseEvent& event);
// Menu callbacks
void NewGame(wxCommandEvent& event);
@@ -73,6 +73,7 @@ BEGIN_EVENT_TABLE(FortyFrame, wxFrame)
EVT_MENU(SCORES, FortyFrame::Scores)
EVT_MENU(RIGHT_BUTTON_UNDO, FortyFrame::ToggleRightButtonUndo)
EVT_MENU(HELPING_HAND, FortyFrame::ToggleHelpingHand)
EVT_CLOSE(FortyFrame::OnCloseWindow)
END_EVENT_TABLE()
// Create a new application object
@@ -189,9 +190,14 @@ FortyFrame::~FortyFrame()
{
}
bool FortyFrame::OnClose()
void FortyFrame::OnCloseWindow(wxCloseEvent& event)
{
return m_canvas->OnClose();
if (m_canvas->OnCloseCanvas())
{
this->Destroy();
}
else
event.Veto();
}
void
@@ -205,7 +211,7 @@ FortyFrame::Exit(wxCommandEvent&)
{
#ifdef __WXGTK__
// wxGTK doesn't call OnClose() so we do it here
if (OnClose())
// if (OnClose())
#endif
Close(TRUE);
}

View File

@@ -37,6 +37,7 @@ BEGIN_EVENT_TABLE(PlayerSelectionDialog, wxDialog)
EVT_BUTTON(wxID_OK, PlayerSelectionDialog::ButtonCallback)
EVT_BUTTON(wxID_CANCEL, PlayerSelectionDialog::ButtonCallback)
EVT_LISTBOX(ID_LISTBOX, PlayerSelectionDialog::SelectCallback)
EVT_CLOSE(PlayerSelectionDialog::OnCloseWindow)
END_EVENT_TABLE()
PlayerSelectionDialog::PlayerSelectionDialog(
@@ -142,13 +143,10 @@ const wxString& PlayerSelectionDialog::GetPlayersName()
return m_player;
}
bool PlayerSelectionDialog::OnClose()
void PlayerSelectionDialog::OnCloseWindow(wxCloseEvent& event)
{
// hide the dialog
// NB don't return TRUE otherwise delete is called
m_player = "";
Show(FALSE);
return FALSE;
EndModal(wxID_CANCEL);
}
void PlayerSelectionDialog::SelectCallback(wxCommandEvent& event)

View File

@@ -28,7 +28,7 @@ public:
protected:
friend void SelectCallback(wxListBox&, wxCommandEvent&);
bool OnClose();
void OnCloseWindow(wxCloseEvent& event);
private:
ScoreFile* m_scoreFile;

View File

@@ -137,6 +137,9 @@ void ScoreCanvas::OnDraw(wxDC& dc)
}
}
BEGIN_EVENT_TABLE(ScoreDialog, wxDialog)
EVT_CLOSE(ScoreDialog::OnCloseWindow)
END_EVENT_TABLE()
ScoreDialog::ScoreDialog(
wxWindow* parent,
@@ -183,10 +186,7 @@ void ScoreDialog::Display()
Show(TRUE);
}
bool ScoreDialog::OnClose()
void ScoreDialog::OnCloseWindow(wxCloseEvent& event)
{
// hide the dialog
// NB don't return TRUE otherwise delete is called
Show(FALSE);
return FALSE;
EndModal(wxID_OK);
}

View File

@@ -22,11 +22,13 @@ public:
void Display();
protected:
bool OnClose();
void OnCloseWindow(wxCloseEvent& event);
private:
ScoreFile* m_scoreFile;
wxButton* m_OK;
DECLARE_EVENT_TABLE()
};
#endif

View File

@@ -40,8 +40,6 @@ class MyFrame: public wxFrame
wxGrid *grid;
MyFrame(wxFrame *frame, const wxString& title, const wxPoint& pos, const wxSize& size);
bool OnClose(void) { return TRUE; }
void ToggleEditable(wxCommandEvent& event);
void ToggleRowLabel(wxCommandEvent& event);
void ToggleColLabel(wxCommandEvent& event);

View File

@@ -54,8 +54,7 @@ public:
void OnAbout(wxCommandEvent& event);
void OnPlay(wxCommandEvent& event);
void OnOpen(wxCommandEvent& event);
bool OnClose() { return TRUE; }
DECLARE_EVENT_TABLE()
};

View File

@@ -164,8 +164,3 @@ void MyFrame::OnActivate(wxActivateEvent& event)
if (event.GetActive() && canvas)
canvas->SetFocus();
}
bool MyFrame::OnClose(void)
{
return TRUE;
}

View File

@@ -40,7 +40,6 @@ class MyFrame: public wxFrame
MyCanvas *canvas;
MyFrame(wxFrame *parent, const wxString& title, const wxPoint& pos, const wxSize& size, const long style);
~MyFrame(void);
bool OnClose(void);
void OnActivate(wxActivateEvent& event);
void OnQuit(wxCommandEvent& event);

View File

@@ -244,14 +244,6 @@ void MyWindow::OnPaint(wxPaintEvent& WXUNUSED(event) )
frame->Draw(dc,TRUE);
}
// Define the behaviour for the frame closing
// - must delete all frames except for the main one.
bool MyFrame::OnClose(void)
{
Show(FALSE);
return TRUE;
}
SizerFrame::SizerFrame(wxFrame *frame, char *title, int x, int y, int w, int h):
wxFrame(frame, -1, title, wxPoint(x, y), wxSize(w, h))
@@ -346,10 +338,3 @@ void SizerFrame::OnSize(wxSizeEvent& event)
panel->Layout();
}
bool SizerFrame::OnClose(void)
{
Show(FALSE);
return TRUE;
}

View File

@@ -29,7 +29,6 @@ class MyFrame: public wxFrame
MyWindow *canvas;
MyFrame(wxFrame *frame, char *title, int x, int y, int w, int h);
void OnSize(wxSizeEvent& event);
bool OnClose(void);
void Draw(wxDC& dc, bool draw_bitmaps = TRUE);
void LoadFile(wxCommandEvent& event);
@@ -68,7 +67,6 @@ class SizerFrame: public wxFrame
wxPanel *panel;
SizerFrame(wxFrame *frame, char *title, int x, int y, int w, int h);
void OnSize(wxSizeEvent& event);
bool OnClose(void);
DECLARE_EVENT_TABLE()
};

View File

@@ -60,7 +60,6 @@ class MyFrame: public wxFrame
void OnIconTextView(wxCommandEvent& event);
void OnSmallIconView(wxCommandEvent& event);
void OnSmallIconTextView(wxCommandEvent& event);
bool OnClose(void) { return TRUE; }
void OnDeselectAll(wxCommandEvent& event);
void OnSelectAll(wxCommandEvent& event);

View File

@@ -237,23 +237,6 @@ void MyCanvas::OnEvent(wxMouseEvent& event)
ypos = pt.y;
}
// Define the behaviour for the frame closing
// - must delete all frames except for the main one.
bool MyFrame::OnClose(void)
{
// Must delete children
wxNode *node = my_children.First();
while (node)
{
MyChild *child = (MyChild *)node->Data();
wxNode *next = node->Next();
child->OnClose();
delete child;
node = next;
}
return TRUE;
}
void MyFrame::OnSize(wxSizeEvent& WXUNUSED(event) )
{
int w, h;
@@ -295,11 +278,6 @@ void MyChild::OnActivate(wxActivateEvent& event)
canvas->SetFocus();
}
bool MyChild::OnClose(void)
{
return TRUE;
}
void MyFrame::InitToolBar(wxToolBar* toolBar)
{
wxBitmap* bitmaps[8];

View File

@@ -38,7 +38,6 @@ class MyFrame: public wxMDIParentFrame
void InitToolBar(wxToolBar* toolBar);
bool OnClose(void);
void OnSize(wxSizeEvent& event);
void OnAbout(wxCommandEvent& event);
void OnNewWindow(wxCommandEvent& event);
@@ -53,7 +52,6 @@ class MyChild: public wxMDIChildFrame
MyCanvas *canvas;
MyChild(wxMDIParentFrame *parent, const wxString& title, const wxPoint& pos, const wxSize& size, const long style);
~MyChild(void);
bool OnClose(void);
void OnActivate(wxActivateEvent& event);
void OnQuit(wxCommandEvent& event);

View File

@@ -93,7 +93,6 @@ class MyChild: public wxFrame
MyCanvas *canvas;
MyChild(wxFrame *frame, const wxString& title, const wxPoint& pos, const wxSize& size, const long style);
~MyChild(void);
bool OnClose(void);
void OnQuit(wxCommandEvent& event);
void OnNew(wxCommandEvent& event);
@@ -376,12 +375,6 @@ void MyChild::OnActivate(wxActivateEvent& event)
canvas->SetFocus();
}
bool MyChild::OnClose(void)
{
return TRUE;
}
// Dummy MFC window for specifying a valid main window to MFC, using
// a wxWindows HWND.
CDummyWindow::CDummyWindow(HWND hWnd):CWnd()

View File

@@ -108,13 +108,6 @@ void MyFrame::OnTest1(wxCommandEvent& event)
dialog->Close(TRUE);
}
bool MyFrame::OnClose(void)
{
Show(FALSE);
return TRUE;
}
BEGIN_EVENT_TABLE(MyDialog, wxDialog)
EVT_BUTTON(wxID_OK, MyDialog::OnOk)
EVT_BUTTON(wxID_CANCEL, MyDialog::OnCancel)

View File

@@ -26,7 +26,6 @@ class MyFrame: public wxFrame
public:
wxWindow *panel;
MyFrame(wxWindow *parent, const wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size);
bool OnClose(void);
void OnQuit(wxCommandEvent& event);
void OnTest1(wxCommandEvent& event);

View File

@@ -263,7 +263,8 @@ void OwnerDrawnFrame::OnQuit(wxCommandEvent& event)
void OwnerDrawnFrame::OnAbout(wxCommandEvent& event)
{
wxMessageDialog dialog(this, "Demo of owner-drawn controls\n"
wxMessageDialog dialog(this,
"Demo of owner-drawn controls\n",
"About wxOwnerDrawn", wxYES_NO | wxCANCEL);
dialog.ShowModal();
}

View File

@@ -207,12 +207,4 @@ void MyCanvas::OnPaint(wxPaintEvent& WXUNUSED(event))
}
}
// Define the behaviour for the frame closing
// - must delete all frames except for the main one.
bool MyFrame::OnClose(void)
{
Show(FALSE);
return TRUE;
}

View File

@@ -32,7 +32,6 @@ class MyFrame: public wxFrame
MyCanvas *canvas;
MyFrame(wxFrame *parent, const wxString& title, const wxPoint& pos, const wxSize& size);
bool OnClose(void);
void OnActivate(bool) {}
void OnLoadFile(wxCommandEvent& event);
void OnSaveFile(wxCommandEvent& event);

View File

@@ -131,6 +131,12 @@ bool MyApp::OnInit(void)
return TRUE;
}
int MyApp::OnExit()
{
delete wxGetApp().m_testFont;
return 1;
}
BEGIN_EVENT_TABLE(MyFrame, wxFrame)
EVT_MENU(WXPRINT_QUIT, MyFrame::OnExit)
EVT_MENU(WXPRINT_PRINT, MyFrame::OnPrint)
@@ -317,14 +323,6 @@ void MyCanvas::OnEvent(wxMouseEvent& WXUNUSED(event))
{
}
bool MyFrame::OnClose(void)
{
Show(FALSE);
delete wxGetApp().m_testFont;
return TRUE;
}
bool MyPrintout::OnPrintPage(int page)
{
wxDC *dc = GetDC();

View File

@@ -17,8 +17,9 @@
class MyApp: public wxApp
{
public:
MyApp(void) ;
bool OnInit(void);
MyApp() ;
bool OnInit();
int OnExit();
wxFont* m_testFont;
};
@@ -34,8 +35,6 @@ class MyFrame: public wxFrame
MyCanvas *canvas;
MyFrame(wxFrame *frame, const wxString& title, const wxPoint& pos, const wxSize& size);
bool OnClose(void);
void Draw(wxDC& dc);
void OnSize(wxSizeEvent& event);

View File

@@ -173,13 +173,6 @@ void MyFrame::OnTestDialog(wxCommandEvent& WXUNUSED(event) )
dialog->Close(TRUE);
}
bool MyFrame::OnClose(void)
{
Show(FALSE);
return TRUE;
}
BEGIN_EVENT_TABLE(MyDialog, wxDialog)
// EVT_BUTTON(RESOURCE_OK, MyDialog::OnOk)
EVT_BUTTON(ID_BUTTON109, MyDialog::OnCancel)

View File

@@ -40,7 +40,6 @@ class MyFrame: public wxFrame
public:
MyFrame(wxWindow *parent, const wxWindowID id, const wxString& title,
const wxPoint& pos, const wxSize& size);
bool OnClose();
void OnQuit(wxCommandEvent& event);
void OnAbout(wxCommandEvent& event);
void OnTestDialog(wxCommandEvent& event);

View File

@@ -312,23 +312,6 @@ void MyCanvas::OnEvent(wxMouseEvent& event)
ypos = pt.y;
}
// Define the behaviour for the frame closing
// - must delete all frames except for the main one.
bool MyFrame::OnClose(void)
{
// Must delete children
wxNode *node = my_children.First();
while (node)
{
MyChild *child = (MyChild *)node->Data();
wxNode *next = node->Next();
child->OnClose();
delete child;
node = next;
}
return TRUE;
}
void MyFrame::OnSize(wxSizeEvent& WXUNUSED(event))
{
wxLayoutAlgorithm layout;
@@ -367,9 +350,3 @@ void MyChild::OnActivate(wxActivateEvent& event)
canvas->SetFocus();
}
bool MyChild::OnClose(void)
{
return TRUE;
}

View File

@@ -35,7 +35,6 @@ class MyFrame: public wxMDIParentFrame
MyFrame(wxWindow *parent, const wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, const long style);
bool OnClose(void);
void OnSize(wxSizeEvent& event);
void OnAbout(wxCommandEvent& event);
void OnNewWindow(wxCommandEvent& event);
@@ -58,7 +57,6 @@ class MyChild: public wxMDIChildFrame
MyCanvas *canvas;
MyChild(wxMDIParentFrame *parent, const wxString& title, const wxPoint& pos, const wxSize& size, const long style);
~MyChild(void);
bool OnClose(void);
void OnActivate(wxActivateEvent& event);
void OnQuit(wxCommandEvent& event);

View File

@@ -62,8 +62,6 @@ public:
MyFrame(wxFrame* frame, const wxString& title, const wxPoint& pos, const wxSize& size);
virtual ~MyFrame();
bool OnClose();
// Menu commands
void SplitHorizontal(wxCommandEvent& event);
void SplitVertical(wxCommandEvent& event);
@@ -185,11 +183,6 @@ MyFrame::~MyFrame()
{
}
bool MyFrame::OnClose()
{
return TRUE;
}
void MyFrame::Quit(wxCommandEvent& WXUNUSED(event) )
{
Close(TRUE);

View File

@@ -73,7 +73,6 @@ public:
void OnResumeThread(wxCommandEvent& event);
void OnIdle(wxIdleEvent &event);
bool OnClose() { return TRUE; }
// called by dying thread _in_that_thread_context_
void OnThreadExit(wxThread *thread);

View File

@@ -47,7 +47,6 @@ public:
public:
void OnQuit(wxCommandEvent& event);
void OnAbout(wxCommandEvent& event);
bool OnClose(void) { return TRUE; }
DECLARE_EVENT_TABLE()

View File

@@ -27,7 +27,6 @@ class MyFrame: public wxFrame
public:
void OnQuit(wxCommandEvent& event);
void OnTestDialog(wxCommandEvent& event);
bool OnClose(void) { return TRUE; }
DECLARE_EVENT_TABLE()

View File

@@ -47,6 +47,13 @@
#include <string.h>
#include <time.h>
#ifdef __WINDOWS__
#include <windows.h>
#ifdef DrawText
#undef DrawText
#endif
#endif
#define buf_size 10000
#define DEFAULT_POETRY_DAT "wxpoem"
#define DEFAULT_POETRY_IND "wxpoem"