xref: /haiku/src/apps/processcontroller/TeamBarMenuItem.h (revision 97f11716bfaa0f385eb0e28a52bf56a5023b9e99)
1ed7a3501SAxel Dörfler /*
2f6581478SAugustin Cavalier  * Copyright 2000, Georges-Edouard Berenger. All rights reserved.
3f6581478SAugustin Cavalier  * Distributed under the terms of the MIT License.
4ed7a3501SAxel Dörfler  */
5ed7a3501SAxel Dörfler #ifndef _TEAM_BAR_MENU_ITEM_H_
6ed7a3501SAxel Dörfler #define _TEAM_BAR_MENU_ITEM_H_
7ed7a3501SAxel Dörfler 
8a12827f2SAxel Dörfler 
9*33cf9d22SAugustin Cavalier #include "IconMenuItem.h"
10ed7a3501SAxel Dörfler 
11ed7a3501SAxel Dörfler 
12*33cf9d22SAugustin Cavalier class TeamBarMenuItem : public IconMenuItem {
13ed7a3501SAxel Dörfler public:
1446e13cfcSIngo Weinhold 					TeamBarMenuItem(BMenu* menu, BMessage* kill_team, team_id team,
1546e13cfcSIngo Weinhold 						BBitmap* icon, bool deleteIcon);
1646e13cfcSIngo Weinhold 
17ed7a3501SAxel Dörfler 	virtual			~TeamBarMenuItem();
18a12827f2SAxel Dörfler 
19ed7a3501SAxel Dörfler 	virtual	void	DrawContent();
20ed7a3501SAxel Dörfler 	virtual	void	GetContentSize(float* width, float* height);
21ed7a3501SAxel Dörfler 	void			DrawBar(bool force);
22ed7a3501SAxel Dörfler 	void			BarUpdate();
23ed7a3501SAxel Dörfler 	void			Init();
24a12827f2SAxel Dörfler 	void			Reset(char* name, team_id team, BBitmap* icon, bool deleteIcon);
25a12827f2SAxel Dörfler 
26ed7a3501SAxel Dörfler 	double			fUser;
27ed7a3501SAxel Dörfler 	double			fKernel;
28ed7a3501SAxel Dörfler 
29ed7a3501SAxel Dörfler private:
30ed7a3501SAxel Dörfler 	team_id			fTeamID;
31ed7a3501SAxel Dörfler 	team_usage_info	fTeamUsageInfo;
32ed7a3501SAxel Dörfler 	bigtime_t		fLastTime;
33ed7a3501SAxel Dörfler 	float			fGrenze1;
34ed7a3501SAxel Dörfler 	float			fGrenze2;
35ed7a3501SAxel Dörfler };
3698ec4e94SJohn Scipione 
37ed7a3501SAxel Dörfler 
38ed7a3501SAxel Dörfler #endif // _TEAM_BAR_MENU_ITEM_H_
39