]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/gtk/timer.h
moved Write(const wxString&) to .cpp files as they're going to be changed again soon...
[wxWidgets.git] / include / wx / gtk / timer.h
index a565eefd3d46adf5507306b53417c960c7d57221..cb1d10e8c1d7790a681b2f787c6fd8f9975a0121 100644 (file)
@@ -1,40 +1,38 @@
 /////////////////////////////////////////////////////////////////////////////
-// Name:        timer.h
+// Name:        wx/gtk/timer.h
 // Purpose:
 // Author:      Robert Roebling
 // Id:          $Id$
 // Copyright:   (c) 1998 Robert Roebling
-// Licence:    wxWindows licence
+// Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
 
-
-#ifndef __GTKTIMERH__
-#define __GTKTIMERH__
-
-#ifdef __GNUG__
-    #pragma interface "timer.h"
-#endif
+#ifndef _WX_GTK_TIMER_H_
+#define _WX_GTK_TIMER_H_
 
 //-----------------------------------------------------------------------------
 // wxTimer
 //-----------------------------------------------------------------------------
 
-class wxTimer : public wxTimerBase
+class WXDLLIMPEXP_CORE wxTimer : public wxTimerBase
 {
 public:
-    wxTimer();
-    ~wxTimer();
+    wxTimer() { Init(); }
+    wxTimer(wxEvtHandler *owner, int id = -1) : wxTimerBase(owner, id)
+        { Init(); }
+    virtual ~wxTimer();
 
-    virtual bool Start( int millisecs = -1, bool oneShot = FALSE );
+    virtual bool Start(int millisecs = -1, bool oneShot = false);
     virtual void Stop();
 
-    virtual bool IsRunning() const { return m_tag != -1; }
-
-protected:
-    int  m_tag;
+    virtual bool IsRunning() const { return m_sourceId != 0; }
 
 private:
+    void Init();
+
+    unsigned m_sourceId;
+
     DECLARE_ABSTRACT_CLASS(wxTimer)
 };
 
-#endif // __GTKTIMERH__
+#endif // _WX_GTK_TIMER_H_