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_H 6 #define MEMORY_BAR_MENU_H 7 8 9 #include "Utilities.h" 10 11 #include <Menu.h> 12 13 14 class MemoryBarMenuItem; 15 16 17 typedef struct { 18 MemoryBarMenuItem* item; 19 int index; 20 } MRecycleItem; 21 22 23 class MemoryBarMenu : public BMenu { 24 public: 25 MemoryBarMenu(const char* name, info_pack* infos, system_info& systemInfo); 26 virtual ~MemoryBarMenu(); 27 28 virtual void Draw(BRect updateRect); 29 virtual void Pulse(); 30 31 private: 32 team_id* fTeamList; 33 unsigned int fTeamCount; 34 MRecycleItem* fRecycleList; 35 int fRecycleCount; 36 bigtime_t fLastTotalTime; 37 bool fFirstShow; 38 }; 39 40 extern float gMemoryTextWidth; 41 42 #endif // MEMORY_BAR_MENU_H 43