00001 // Filename: winStatsChartMenu.h 00002 // Created by: drose (08Jan04) 00003 // 00004 //////////////////////////////////////////////////////////////////// 00005 // 00006 // PANDA 3D SOFTWARE 00007 // Copyright (c) Carnegie Mellon University. All rights reserved. 00008 // 00009 // All use of this software is subject to the terms of the revised BSD 00010 // license. You should have received a copy of this license along 00011 // with this source code in a file named "LICENSE." 00012 // 00013 //////////////////////////////////////////////////////////////////// 00014 00015 #ifndef WINSTATSCHARTMENU_H 00016 #define WINSTATSCHARTMENU_H 00017 00018 #include "pandatoolbase.h" 00019 00020 #include <windows.h> 00021 00022 class WinStatsMonitor; 00023 class PStatView; 00024 class PStatViewLevel; 00025 00026 //////////////////////////////////////////////////////////////////// 00027 // Class : WinStatsChartMenu 00028 // Description : A pulldown menu of charts available for a particular 00029 // thread. 00030 //////////////////////////////////////////////////////////////////// 00031 class WinStatsChartMenu { 00032 public: 00033 WinStatsChartMenu(WinStatsMonitor *monitor, int thread_index); 00034 ~WinStatsChartMenu(); 00035 00036 HMENU get_menu_handle(); 00037 void add_to_menu_bar(HMENU menu_bar, int before_menu_id); 00038 00039 void check_update(); 00040 void do_update(); 00041 00042 private: 00043 void add_view(HMENU parent_menu, const PStatViewLevel *view_level, 00044 bool show_level); 00045 00046 WinStatsMonitor *_monitor; 00047 int _thread_index; 00048 00049 int _last_level_index; 00050 HMENU _menu; 00051 }; 00052 00053 #endif 00054