Panda3D
winStatsChartMenu.h
1 // Filename: winStatsChartMenu.h
2 // Created by: drose (08Jan04)
3 //
4 ////////////////////////////////////////////////////////////////////
5 //
6 // PANDA 3D SOFTWARE
7 // Copyright (c) Carnegie Mellon University. All rights reserved.
8 //
9 // All use of this software is subject to the terms of the revised BSD
10 // license. You should have received a copy of this license along
11 // with this source code in a file named "LICENSE."
12 //
13 ////////////////////////////////////////////////////////////////////
14 
15 #ifndef WINSTATSCHARTMENU_H
16 #define WINSTATSCHARTMENU_H
17 
18 #include "pandatoolbase.h"
19 
20 #include <windows.h>
21 
22 class WinStatsMonitor;
23 class PStatView;
24 class PStatViewLevel;
25 
26 ////////////////////////////////////////////////////////////////////
27 // Class : WinStatsChartMenu
28 // Description : A pulldown menu of charts available for a particular
29 // thread.
30 ////////////////////////////////////////////////////////////////////
32 public:
33  WinStatsChartMenu(WinStatsMonitor *monitor, int thread_index);
35 
36  HMENU get_menu_handle();
37  void add_to_menu_bar(HMENU menu_bar, int before_menu_id);
38 
39  void check_update();
40  void do_update();
41 
42 private:
43  void add_view(HMENU parent_menu, const PStatViewLevel *view_level,
44  bool show_level);
45 
46  WinStatsMonitor *_monitor;
47  int _thread_index;
48 
49  int _last_level_index;
50  HMENU _menu;
51 };
52 
53 #endif
54 
void check_update()
Checks to see if the menu needs to be updated (e.g.
This is a single level value, or band of color, within a View.
A View boils down the frame data to a linear list of times spent in a number of different Collectors...
Definition: pStatView.h:34
A pulldown menu of charts available for a particular thread.
void do_update()
Unconditionally updates the menu with the latest data from the client.
void add_to_menu_bar(HMENU menu_bar, int before_menu_id)
Adds the menu to the end of the indicated menu bar.
This class represents a connection to a PStatsClient and manages the data exchange with the client...
HMENU get_menu_handle()
Returns the Windows menu handle for this particular menu.