-void ScreenshotFrame::OnCaptureRect(wxCommandEvent& WXUNUSED(event))
-{
- capturingRect = true;
- wxMenuBar * menubar = this->GetMenuBar();
- menubar->FindItem(idMenuCapRect)->Enable(false);
- menubar->FindItem(idMenuEndCapRect)->Enable(true);
-
- wxWindow * thePage = m_notebook1->GetPage(m_notebook1->GetSelection());
-
- thePage->Connect( wxEVT_LEFT_DOWN, wxMouseEventHandler( CtrlMaskOut::OnLeftButtonDown ), NULL, m_maskout);
- thePage->Connect( wxEVT_LEFT_UP, wxMouseEventHandler( CtrlMaskOut::OnLeftButtonUp ), NULL, m_maskout);
- thePage->Connect( wxEVT_MOTION, wxMouseEventHandler( CtrlMaskOut::OnMouseMoving ), NULL, m_maskout);
-}
-
-void ScreenshotFrame::OnEndCaptureRect(wxCommandEvent& WXUNUSED(event))
-{
- capturingRect = false;
- wxMenuBar * menubar = this->GetMenuBar();
- menubar->FindItem(idMenuCapRect)->Enable(true);
- menubar->FindItem(idMenuEndCapRect)->Enable(false);
-
- wxWindow * thePage = m_notebook1->GetPage(m_notebook1->GetSelection());
-
- thePage->Disconnect( wxEVT_LEFT_DOWN, wxMouseEventHandler( CtrlMaskOut::OnLeftButtonDown ), NULL, m_maskout);
- thePage->Disconnect( wxEVT_LEFT_UP, wxMouseEventHandler( CtrlMaskOut::OnLeftButtonUp ), NULL, m_maskout);
- thePage->Disconnect( wxEVT_MOTION, wxMouseEventHandler( CtrlMaskOut::OnMouseMoving ), NULL, m_maskout);
-}
-
-void ScreenshotFrame::OnNotebookPageChanging(
-#if SCREENSHOTGEN_USE_AUI
-wxAuiNotebookEvent& event
-#else
-wxNotebookEvent& event
-#endif
-)
-{
- if (!capturingRect)
- {
- event.Skip();
- return;
- }
-
- wxWindow * thePage = m_notebook1->GetPage(event.GetOldSelection());
-
- thePage->Disconnect( wxEVT_LEFT_DOWN, wxMouseEventHandler( CtrlMaskOut::OnLeftButtonDown ), NULL, m_maskout);
- thePage->Disconnect( wxEVT_LEFT_UP, wxMouseEventHandler( CtrlMaskOut::OnLeftButtonUp ), NULL, m_maskout);
- thePage->Disconnect( wxEVT_MOTION, wxMouseEventHandler( CtrlMaskOut::OnMouseMoving ), NULL, m_maskout);
-
- event.Skip();
-}
-
-void ScreenshotFrame::OnNotebookPageChanged(
-#if SCREENSHOTGEN_USE_AUI
-wxAuiNotebookEvent& event
-#else
-wxNotebookEvent& event
-#endif
-)
-{
- if (!capturingRect)
- {
- event.Skip();
- return;
- }
-
- wxWindow *thePage = m_notebook1->GetPage(event.GetSelection());
-
- thePage->Connect( wxEVT_LEFT_DOWN, wxMouseEventHandler( CtrlMaskOut::OnLeftButtonDown ), NULL, m_maskout);
- thePage->Connect( wxEVT_LEFT_UP, wxMouseEventHandler( CtrlMaskOut::OnLeftButtonUp ), NULL, m_maskout);
- thePage->Connect( wxEVT_MOTION, wxMouseEventHandler( CtrlMaskOut::OnMouseMoving ), NULL, m_maskout);
-
- event.Skip();