xref: /haiku/src/apps/processcontroller/KernelMemoryBarMenuItem.h (revision 02354704729d38c3b078c696adc1bbbd33cbcf72)
1 /*
2  * Copyright 2000, Georges-Edouard Berenger. All rights reserved.
3  * Distributed under the terms of the MIT License.
4  */
5 #ifndef _KERNEL_MEMORY_BAR_MENU_ITEM_H_
6 #define _KERNEL_MEMORY_BAR_MENU_ITEM_H_
7 
8 
9 #include <MenuItem.h>
10 
11 
12 class KernelMemoryBarMenuItem : public BMenuItem {
13 	public:
14 		KernelMemoryBarMenuItem(system_info& systemInfo);
15 		virtual	void	DrawContent();
16 		virtual	void	GetContentSize(float* _width, float* _height);
17 
18 		void			DrawBar(bool force);
19 		void			UpdateSituation(int64 committedMemory, int64 fCachedMemory);
20 
21 	private:
22 		int64	fCachedMemory;
23 		int64	fPhysicalMemory;
24 		int64	fCommittedMemory;
25 		double	fLastSum;
26 		double	fGrenze1;
27 		double	fGrenze2;
28 };
29 
30 #endif // _KERNEL_MEMORY_BAR_MENU_ITEM_H_
31