xref: /haiku/src/preferences/time/AnalogClock.h (revision 9ecf9d1c1d4888d341a6eac72112c72d1ae3a4cb)
1 /*
2  * Copyright 2004-2006, Haiku, Inc. All Rights Reserved.
3  * Distributed under the terms of the MIT License.
4  *
5  * Authors:
6  *		Mike Berg (inseculous)
7  */
8 #ifndef ANALOG_CLOCK_H
9 #define ANALOG_CLOCK_H
10 
11 #include <Message.h>
12 #include <View.h>
13 
14 class OffscreenClock;
15 
16 class TAnalogClock: public BView {
17 	public:
18 		TAnalogClock(BRect frame, const char *name, uint32 resizingmode, uint32 flags);
19 		virtual ~TAnalogClock();
20 
21 		virtual void AttachedToWindow();
22 		virtual void Draw(BRect updaterect);
23 		virtual void MessageReceived(BMessage *);
24 
25 		void SetTo(int32 hour, int32 minute, int32 second);
26 
27 	private:
28 		void _InitView(BRect frame);
29 
30 		BBitmap *fBitmap;
31 		OffscreenClock *fClock;
32 };
33 
34 #endif	// ANALOG_CLOCK_H
35