xref: /haiku/headers/private/shared/IconView.h (revision 820dca4df6c7bf955c46e8f6521b9408f50b2900)
1 // Author: Michael Wilber
2 // Copyright (C) Haiku, uses the MIT license
3 #ifndef ICONVIEW_H
4 #define ICONVIEW_H
5 
6 
7 #include <Bitmap.h>
8 #include <Mime.h>
9 #include <Path.h>
10 #include <View.h>
11 
12 
13 class IconView : public BView {
14 public:
15 							IconView(icon_size iconSize = B_LARGE_ICON);
16 
17 							~IconView();
18 
19 			status_t		InitCheck() const;
20 	virtual	void			Draw(BRect area);
21 
22 			void			DrawIcon(bool draw);
23 			status_t		SetIcon(const BPath& path,
24 								icon_size iconSize = B_LARGE_ICON);
25 
26 private:
27 			void			_SetSize();
28 
29 			icon_size		fIconSize;
30 			BBitmap*		fIconBitmap;
31 			bool			fDrawIcon;
32 };
33 
34 #endif // #ifndef ICONVIEW_H
35