xref: /haiku/src/apps/processcontroller/IconMenuItem.h (revision ae0a10cad3999b13cbfa47a3d947a5219d2d90f4)
1 /*
2  * Copyright 2000, Georges-Edouard Berenger. All rights reserved.
3  * Distributed under the terms of the MIT License.
4  */
5 #ifndef _ICON_MENU_ITEM_H_
6 #define _ICON_MENU_ITEM_H_
7 
8 #include <MenuItem.h>
9 
10 
11 class BBitmap;
12 
13 
14 class IconMenuItem : public BMenuItem {
15 	public:
16 		IconMenuItem(BBitmap*, const char* title,
17 			BMessage*, bool drawText = true, bool purge = false);
18 
19 		IconMenuItem(BBitmap*, BMenu*, bool drawText = true,
20 			bool purge = false);
21 
22 		IconMenuItem(const char* mime, const char* title, BMessage*,
23 			bool drawText = true);
24 
25 		virtual ~IconMenuItem();
26 		virtual	void DrawContent();
27 		virtual	void Highlight(bool isHighlighted);
28 		virtual	void GetContentSize(float* width, float* height);
29 
30 		static	int	MinHeight();
31 
32 	private:
33 		void DefaultIcon(const char* mime);
34 		void DrawIcon();
35 
36 		BBitmap*	fIcon;
37 		bool		fDrawText;
38 		bool		fPurge;
39 };
40 
41 #endif // _ICON_MENU_ITEM_H_
42