1 /* 2 * Copyright 2004-2007, Haiku, Inc. All Rights Reserved. 3 * Distributed under the terms of the MIT License. 4 * 5 * Authors: 6 * Mike Berg <mike@berg-net.us> 7 * Julun <host.haiku@gmx.de> 8 */ 9 #ifndef ANALOG_CLOCK_H 10 #define ANALOG_CLOCK_H 11 12 13 #include <View.h> 14 15 16 class BBitmap; 17 class OffscreenClock; 18 19 20 class TAnalogClock : public BView { 21 public: 22 TAnalogClock(BRect frame, const char *name); 23 virtual ~TAnalogClock(); 24 25 virtual void AttachedToWindow(); 26 virtual void Draw(BRect updateRect); 27 virtual void MessageReceived(BMessage *message); 28 29 void SetTime(int32 hour, int32 minute, int32 second); 30 31 private: 32 void _InitView(BRect frame); 33 34 BBitmap *fBitmap; 35 OffscreenClock *fClock; 36 }; 37 38 #endif // ANALOG_CLOCK_H 39 40