winStatsChartMenu.h 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. /**
  2. * PANDA 3D SOFTWARE
  3. * Copyright (c) Carnegie Mellon University. All rights reserved.
  4. *
  5. * All use of this software is subject to the terms of the revised BSD
  6. * license. You should have received a copy of this license along
  7. * with this source code in a file named "LICENSE."
  8. *
  9. * @file winStatsChartMenu.h
  10. * @author drose
  11. * @date 2004-01-08
  12. */
  13. #ifndef WINSTATSCHARTMENU_H
  14. #define WINSTATSCHARTMENU_H
  15. #include "pandatoolbase.h"
  16. #ifndef WIN32_LEAN_AND_MEAN
  17. #define WIN32_LEAN_AND_MEAN 1
  18. #endif
  19. #include <windows.h>
  20. class WinStatsMonitor;
  21. class PStatView;
  22. class PStatViewLevel;
  23. /**
  24. * A pulldown menu of charts available for a particular thread.
  25. */
  26. class WinStatsChartMenu {
  27. public:
  28. WinStatsChartMenu(WinStatsMonitor *monitor, int thread_index);
  29. ~WinStatsChartMenu();
  30. HMENU get_menu_handle();
  31. void add_to_menu_bar(HMENU menu_bar, int before_menu_id);
  32. void check_update();
  33. void do_update();
  34. private:
  35. void add_view(HMENU parent_menu, const PStatViewLevel *view_level,
  36. bool show_level);
  37. WinStatsMonitor *_monitor;
  38. int _thread_index;
  39. int _last_level_index;
  40. HMENU _menu;
  41. };
  42. #endif