1#ifndef _ACTIVITY_H_
2#define _ACTIVITY_H_
3
4#include <stdlib.h>
5
6#include <Box.h>
7#include <Bitmap.h>
8#include <Polygon.h>
9#include <View.h>
10#include <Window.h>
11
12
13class Activity : public BView
14{
15public:
16							Activity(const char* name);
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			void			SetColors(const rgb_color* colors,
28								uint32 numColors);
29
30private:
31			void			_CreateBitmap();
32			void			_DrawOnBitmap(bool running);
33			void			_ActiveColors();
34			void			_InactiveColors();
35
36			bool			fIsRunning;
37			pattern			fPattern;
38			BBitmap*		fBitmap;
39			BView*			fBitmapView;
40
41			float				fSpinSpeed;
42			const rgb_color*	fColors;
43			uint32				fNumColors;
44
45			float				fScrollOffset;
46			BPolygon			fStripe;
47			float				fStripeWidth;
48			uint32				fNumStripes;
49};
50
51#endif	// _ACTIVITY_H_
52
53