- virtual ~ComplexTransientPopup();
-
- virtual void Popup(wxWindow *focus = NULL);
- virtual void Dismiss();
- virtual bool ProcessLeftDown(wxMouseEvent& event);
-
-protected:
-
- // safely push and pop the event handler of the child
- void PushPopupHandler(wxWindow* child);
- void PopPopupHandler(wxWindow* child);
-
- void OnMouse( wxMouseEvent& event );
- void OnKeyDown( wxKeyEvent &event );
-
-#if USE_TIMER_TO_PUSHPOP
- // start/stop timer that pushes and pops handler when the mouse goes over
- // the scrollbars (if any) of the child window
- void StartTimer();
- void StopTimer();
- void OnTimer( wxTimerEvent& event );
- wxTimer *m_timer; // timer for tracking mouse position
-#else // !USE_TIMER_TO_PUSHPOP
- void OnIdle( wxIdleEvent& event );
-#endif // USE_TIMER_TO_PUSHPOP
-
- wxPoint m_mouse; // last/current mouse position
- bool m_popped_handler; // state of the event handler
-
-private:
- void Init();
- DECLARE_EVENT_TABLE()
-};
-
-//----------------------------------------------------------------------------
-// ComplexTransientPopup
-//----------------------------------------------------------------------------
-BEGIN_EVENT_TABLE(ComplexTransientPopup, SimpleTransientPopup)
- EVT_KEY_DOWN(ComplexTransientPopup::OnKeyDown)
- EVT_MOUSE_EVENTS(ComplexTransientPopup::OnMouse)
-#if USE_TIMER_TO_PUSHPOP
- EVT_TIMER( wxID_ANY, ComplexTransientPopup::OnTimer )
-#endif // USE_TIMER_TO_PUSHPOP
-END_EVENT_TABLE()
-
-void ComplexTransientPopup::Init()
-{
-#if USE_TIMER_TO_PUSHPOP
- m_timer = NULL;
-#endif // USE_TIMER_TO_PUSHPOP
- m_popped_handler = false;
-}
-
-ComplexTransientPopup::~ComplexTransientPopup()
-{
-#if USE_TIMER_TO_PUSHPOP
- StopTimer();
-#endif // USE_TIMER_TO_PUSHPOP
-}