xref: /haiku/src/apps/processcontroller/TeamBarMenuItem.h (revision 46e13cfc0c1dddfb1d1d5d66b0cd134ddb9aa08e)
1ed7a3501SAxel Dörfler /*
2a12827f2SAxel Dörfler 	ProcessController © 2000, Georges-Edouard Berenger, All Rights Reserved.
3ed7a3501SAxel Dörfler 	Copyright (C) 2004 beunited.org
4ed7a3501SAxel Dörfler 
5ed7a3501SAxel Dörfler 	This library is free software; you can redistribute it and/or
6ed7a3501SAxel Dörfler 	modify it under the terms of the GNU Lesser General Public
7ed7a3501SAxel Dörfler 	License as published by the Free Software Foundation; either
8ed7a3501SAxel Dörfler 	version 2.1 of the License, or (at your option) any later version.
9ed7a3501SAxel Dörfler 
10ed7a3501SAxel Dörfler 	This library is distributed in the hope that it will be useful,
11ed7a3501SAxel Dörfler 	but WITHOUT ANY WARRANTY; without even the implied warranty of
12ed7a3501SAxel Dörfler 	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13ed7a3501SAxel Dörfler 	Lesser General Public License for more details.
14ed7a3501SAxel Dörfler 
15ed7a3501SAxel Dörfler 	You should have received a copy of the GNU Lesser General Public
16ed7a3501SAxel Dörfler 	License along with this library; if not, write to the Free Software
17ed7a3501SAxel Dörfler 	Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
18ed7a3501SAxel Dörfler */
19ed7a3501SAxel Dörfler #ifndef _TEAM_BAR_MENU_ITEM_H_
20ed7a3501SAxel Dörfler #define _TEAM_BAR_MENU_ITEM_H_
21ed7a3501SAxel Dörfler 
22a12827f2SAxel Dörfler 
23ed7a3501SAxel Dörfler #include <MenuItem.h>
24ed7a3501SAxel Dörfler 
25ed7a3501SAxel Dörfler class BBitmap;
26ed7a3501SAxel Dörfler 
27ed7a3501SAxel Dörfler 
28ed7a3501SAxel Dörfler class TeamBarMenuItem : public BMenuItem {
29ed7a3501SAxel Dörfler 	public:
30*46e13cfcSIngo Weinhold 		TeamBarMenuItem(BMenu* menu, BMessage* kill_team, team_id team,
31*46e13cfcSIngo Weinhold 			BBitmap* icon, bool deleteIcon);
32*46e13cfcSIngo Weinhold 
33ed7a3501SAxel Dörfler 		virtual			~TeamBarMenuItem();
34a12827f2SAxel Dörfler 
35ed7a3501SAxel Dörfler 		virtual	void	DrawContent();
36ed7a3501SAxel Dörfler 		virtual	void	GetContentSize(float* width, float* height);
37ed7a3501SAxel Dörfler 		void			DrawIcon();
38ed7a3501SAxel Dörfler 		void			DrawBar(bool force);
39ed7a3501SAxel Dörfler 		void			BarUpdate();
40ed7a3501SAxel Dörfler 		void			Init();
41a12827f2SAxel Dörfler 		void			Reset(char* name, team_id team, BBitmap* icon, bool deleteIcon);
42a12827f2SAxel Dörfler 
43ed7a3501SAxel Dörfler 		double			fUser;
44ed7a3501SAxel Dörfler 		double			fKernel;
45ed7a3501SAxel Dörfler 
46ed7a3501SAxel Dörfler 	private:
47ed7a3501SAxel Dörfler 		team_id			fTeamID;
48ed7a3501SAxel Dörfler 		BBitmap*		fIcon;
49ed7a3501SAxel Dörfler 		team_usage_info	fTeamUsageInfo;
50ed7a3501SAxel Dörfler 		bigtime_t		fLastTime;
51ed7a3501SAxel Dörfler 		float			fGrenze1;
52ed7a3501SAxel Dörfler 		float			fGrenze2;
53ed7a3501SAxel Dörfler 		bool			fDeleteIcon;
54ed7a3501SAxel Dörfler };
55ed7a3501SAxel Dörfler 
56ed7a3501SAxel Dörfler #endif // _TEAM_BAR_MENU_ITEM_H_
57