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

@@ -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);
}