]> git.saurik.com Git - wxWidgets.git/blob - include/wx/cocoa/private/timer.h
changed wxDC::GetTextExtent() and related methods to take const wxFont pointer, for...
[wxWidgets.git] / include / wx / cocoa / private / timer.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/cocoa/private/timer.h
3 // Purpose: Cocoa wxTimer class
4 // Author: Ryan Norton
5 // Id: $Id$
6 // Copyright: (c) Ryan Norton
7 // Licence: wxWindows licence
8 /////////////////////////////////////////////////////////////////////////////
9
10 #ifndef _WX_COCOA_PRIVATE_TIMER_H_
11 #define _WX_COCOA_PRIVATE_TIMER_H_
12
13 #include "wx/private/timer.h"
14
15 #include "wx/cocoa/ObjcRef.h"
16
17 //-----------------------------------------------------------------------------
18 // wxTimer
19 //-----------------------------------------------------------------------------
20
21 DECLARE_WXCOCOA_OBJC_CLASS(NSTimer);
22
23 class WXDLLEXPORT wxCocoaTimerImpl : public wxTimerImpl
24 {
25 public:
26 wxCocoaTimerImpl(wxTimer* timer) : wxTimerImpl(timer) { Init(); }
27 virtual ~wxCocoaTimerImpl();
28
29 virtual bool Start(int millisecs = -1, bool oneShot = false);
30 virtual void Stop();
31
32 virtual bool IsRunning() const;
33
34 WX_NSTimer GetNSTimer() { return m_cocoaNSTimer; }
35
36 protected:
37 void Init();
38
39 private:
40 WX_NSTimer m_cocoaNSTimer;
41 };
42
43 #endif // _WX_COCOA_PRIVATE_TIMER_H_