X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/c5c5dad5950a43edbb9a4e7144f44b8f3bd6bf80..d6d6a882d4d8ea0d7ef706a45fa92b96f34c94c7:/include/wx/timer.h diff --git a/include/wx/timer.h b/include/wx/timer.h index 1707d8346e..faa3133c39 100644 --- a/include/wx/timer.h +++ b/include/wx/timer.h @@ -6,7 +6,7 @@ // Guillermo Rodriguez (global clean up) // Created: 04/01/98 // RCS-ID: $Id$ -// Copyright: (c) wxWindows team +// Copyright: (c) wxWidgets team // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -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