END_EVENT_TABLE()
// Define my frame constructor
-csFrame::csFrame(wxDocManager* manager, wxFrame *parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size,
- long style):
+csFrame::csFrame(wxDocManager* manager, wxFrame *parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style):
wxDocMDIParentFrame(manager, parent, id, title, pos, size, style, _T("frame"))
{
CreateToolBar(wxNO_BORDER|wxTB_FLAT|wxTB_HORIZONTAL);
void csFrame::OnHelp(wxCommandEvent& WXUNUSED(event))
{
- wxGetApp().GetHelpController().DisplayContents();
+ wxHelpControllerBase* help;
+ help = wxGetApp().GetHelpController();
+ if (help)
+ help->DisplayContents();
}
void csFrame::OnSettings(wxCommandEvent& WXUNUSED(event))
void csFrame::OnQuit(wxCommandEvent& WXUNUSED(event))
{
- Close(TRUE);
+ Close(true);
}
void csFrame::OnAbout(wxCommandEvent& WXUNUSED(event))
wxDocMDIParentFrame::OnCloseWindow(event);
}
-void csFrame::OnSize(wxSizeEvent& WXUNUSED(event))
+void csFrame::OnSize(wxSizeEvent& event)
{
wxLayoutAlgorithm layout;
layout.LayoutMDIFrame(this);
+ event.Skip();
}
// Make sure the correct toolbars are showing for the active view
wxSashLayoutWindow* diagramToolBarWin = wxGetApp().GetDiagramToolBarSashWindow();
if (!paletteWin || !diagramToolBarWin)
return;
- bool doLayout = FALSE;
+ bool doLayout = false;
if (GetActiveChild())
{
if (!paletteWin->IsShown() || !diagramToolBarWin->IsShown())
{
- paletteWin->Show(TRUE);
- diagramToolBarWin->Show(TRUE);
+ paletteWin->Show(true);
+ diagramToolBarWin->Show(true);
- doLayout = TRUE;
+ doLayout = true;
}
}
else
{
if (paletteWin->IsShown() || diagramToolBarWin->IsShown())
{
- paletteWin->Show(FALSE);
- diagramToolBarWin->Show(FALSE);
- doLayout = TRUE;
+ paletteWin->Show(false);
+ diagramToolBarWin->Show(false);
+ doLayout = true;
}
}
if (doLayout)
// window doesn't cause the proper refresh. Just refreshing the
// client doesn't work (presumably because it's clipping the
// children).
- // FIXED in wxWindows, by intercepting wxMDIClientWindow::DoSetSize
+ // FIXED in wxWidgets, by intercepting wxMDIClientWindow::DoSetSize
// and checking if the position has changed, before redrawing the
// child windows.
#if 0
// General handler for disabling items
void csFrame::OnUpdateDisable(wxUpdateUIEvent& event)
{
- event.Enable(FALSE);
+ event.Enable(false);
}
void csFrame::OnSaveUpdate(wxUpdateUIEvent& event)