1 /* 2 * Copyright 2000, Georges-Edouard Berenger. All rights reserved. 3 * Distributed under the terms of the MIT License. 4 */ 5 #ifndef _MEMORY_BAR_MENU_ITEM_H_ 6 #define _MEMORY_BAR_MENU_ITEM_H_ 7 8 9 #include "IconMenuItem.h" 10 11 12 class MemoryBarMenuItem : public IconMenuItem { 13 public: 14 MemoryBarMenuItem(const char *label, team_id team, 15 BBitmap* icon, bool deleteIcon, BMessage* message); 16 virtual ~MemoryBarMenuItem(); 17 18 virtual void DrawContent(); 19 virtual void GetContentSize(float* _width, float* _height); 20 21 void DrawBar(bool force); 22 int UpdateSituation(int64 committedMemory); 23 void BarUpdate(); 24 void Init(); 25 void Reset(char* name, team_id team, BBitmap* icon, bool deleteIcon); 26 27 private: 28 int64 fPhysicalMemory; 29 int64 fCommittedMemory; 30 int64 fWriteMemory; 31 int64 fAllMemory; 32 int64 fLastCommitted; 33 int64 fLastWrite; 34 int64 fLastAll; 35 team_id fTeamID; 36 double fGrenze1; 37 double fGrenze2; 38 }; 39 40 #endif // _MEMORY_BAR_MENU_ITEM_H_ 41