X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/57b2bba406d9fd2464220281b1313652b883af89..43087da71bb21d2e9945695d6a8f5ff82844550c:/samples/popup/popup.cpp diff --git a/samples/popup/popup.cpp b/samples/popup/popup.cpp index e48e765b20..547a1bf1a0 100644 --- a/samples/popup/popup.cpp +++ b/samples/popup/popup.cpp @@ -151,10 +151,10 @@ SimpleTransientPopup::~SimpleTransientPopup() { } -void SimpleTransientPopup::Popup(wxWindow *focus) +void SimpleTransientPopup::Popup(wxWindow* WXUNUSED(focus)) { wxLogMessage( wxT("0x%lx SimpleTransientPopup::Popup"), long(this) ); - wxPopupTransientWindow::Popup(focus ? focus : m_panel); + wxPopupTransientWindow::Popup(); } void SimpleTransientPopup::OnDismiss() @@ -263,6 +263,7 @@ public: void OnTestDialog(wxCommandEvent& event); void OnStartSimplePopup(wxCommandEvent& event); void OnStartScrolledPopup(wxCommandEvent& event); + void OnActivate(wxActivateEvent& event); private: SimpleTransientPopup *m_simplePopup; @@ -314,6 +315,7 @@ BEGIN_EVENT_TABLE(MyFrame, wxFrame) EVT_MENU(Minimal_Quit, MyFrame::OnQuit) EVT_MENU(Minimal_About, MyFrame::OnAbout) EVT_MENU(Minimal_TestDialog, MyFrame::OnTestDialog) + EVT_ACTIVATE(MyFrame::OnActivate) EVT_BUTTON(Minimal_StartSimplePopup, MyFrame::OnStartSimplePopup) EVT_BUTTON(Minimal_StartScrolledPopup, MyFrame::OnStartScrolledPopup) END_EVENT_TABLE() @@ -378,6 +380,11 @@ MyFrame::~MyFrame() // event handlers +void MyFrame::OnActivate(wxActivateEvent& WXUNUSED(event)) +{ + wxLogMessage( wxT("In activate...") ); +} + void MyFrame::OnStartSimplePopup(wxCommandEvent& event) { wxLogMessage( wxT("================================================") );