xref: /haiku/src/add-ons/screen_savers/icons/IconDisplay.h (revision 17889a8c70dbb3d59c1412f6431968753c767bab)
1 /*
2  * Copyright 2009 Vincent Duvert, vincent.duvert@free.fr
3  * Copyright 2014 Haiku, Inc. All rights reserved.
4  *
5  * Distributed under the terms of the MIT License.
6  *
7  * Authors:
8  *		Vincent Duvert, vincent.duvert@free.fr
9  *		John Scipione, jscipione@gmail.com
10  */
11 #ifndef ICON_DISPLAY_H
12 #define ICON_DISPLAY_H
13 
14 
15 #include <Rect.h>
16 
17 
18 struct vector_icon;
19 
20 
21 class BBitmap;
22 class BView;
23 
24 
25 class IconDisplay {
26 public:
27 								IconDisplay();
28 								~IconDisplay();
29 
30 			void				Run(vector_icon* icon, BRect frame);
31 	inline	bool				IsRunning() const { return fIsRunning; };
32 	inline	BRect				GetFrame() const { return fFrame; };
33 
34 			void				ClearOn(BView* view);
35 			void				DrawOn(BView* view, uint32 delta);
36 
37 private:
38 			bool				fIsRunning;
39 			uint8				fState;
40 
41 			int32				fTicks;
42 			int32				fDelay;
43 
44 			BBitmap*			fBitmap;
45 			BRect				fFrame;
46 };
47 
48 
49 #endif	// ICON_DISPLAY_H
50