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(const char* name); 16 ~Activity(); 17 18 void Start(); 19 void Pause(); 20 void Stop(); 21 bool IsRunning(); 22 virtual void AllAttached(); 23 virtual void Pulse(); 24 virtual void Draw(BRect draw); 25 virtual void FrameResized(float width, float height); 26 27 private: 28 void _CreateBitmap(); 29 void _LightenBitmapHighColor(rgb_color* color); 30 void _DrawOnBitmap(bool running); 31 32 bool fIsRunning; 33 pattern fPattern; 34 BBitmap* fBitmap; 35 BView* fBitmapView; 36 }; 37 38 #endif // _ACTIVITY_H_ 39 40