X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/c5c5dad5950a43edbb9a4e7144f44b8f3bd6bf80..1c0f361be288df133c766e04cc857b3e4682b31a:/include/wx/timer.h diff --git a/include/wx/timer.h b/include/wx/timer.h index 1707d8346e..fa4e88b205 100644 --- a/include/wx/timer.h +++ b/include/wx/timer.h @@ -58,6 +58,7 @@ public: // same as ctor above void SetOwner(wxEvtHandler *owner, int timerid = -1) { m_owner = owner; m_idTimer = timerid; } + wxEvtHandler* GetOwner() const { return m_owner; } virtual ~wxTimerBase(); @@ -90,6 +91,10 @@ public: // return TRUE if the timer is one shot bool IsOneShot() const { return m_oneShot; } + // return the timer ID + int GetId() const { return m_idTimer; } + + protected: // common part of all ctors void Init() { m_oneShot = FALSE; m_milli = 0; } @@ -183,7 +188,7 @@ private: typedef void (wxEvtHandler::*wxTimerEventFunction)(wxTimerEvent&); #define EVT_TIMER(timerid, func) \ - DECLARE_EVENT_TABLE_ENTRY( wxEVT_TIMER, timerid, -1, (wxObjectEventFunction) (wxEventFunction) (wxTimerEventFunction) & func, NULL), + DECLARE_EVENT_TABLE_ENTRY( wxEVT_TIMER, timerid, -1, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxTimerEventFunction, & func ), NULL), #endif // wxUSE_GUI && wxUSE_TIMER