1 #ifndef _ACTIVITY_H_ 2 #define _ACTIVITY_H_ 3 4 #include <stdlib.h> 5 6 #include <Box.h> 7 #include <Bitmap.h> 8 #include <View.h> 9 #include <Window.h> 10 11 12 class Activity : public BView 13 { 14 public: 15 Activity(BRect frame, const char* name, 16 uint32 resizing_mode, uint32 flags); 17 ~Activity(); 18 19 void Start(); 20 void Pause(); 21 void Stop(); 22 bool IsRunning(); 23 virtual void AllAttached(); 24 virtual void Pulse(); 25 virtual void Draw(BRect draw); 26 virtual void FrameResized(float width, float height); 27 28 private: 29 void _CreateBitmap(); 30 void _LightenBitmapHighColor(rgb_color* color); 31 void _DrawOnBitmap(bool running); 32 33 bool fIsRunning; 34 pattern fPattern; 35 BBitmap* fBitmap; 36 BView* fBitmapView; 37 }; 38 39 #endif // _ACTIVITY_H_ 40 41