Panda3D
gtkStatsChartMenu.h
Go to the documentation of this file.
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 gtkStatsChartMenu.h
10  * @author drose
11  * @date 2006-01-16
12  */
13 
14 #ifndef GTKSTATSCHARTMENU_H
15 #define GTKSTATSCHARTMENU_H
16 
17 #include "pandatoolbase.h"
18 
19 #include <gtk/gtk.h>
20 
21 class GtkStatsMonitor;
22 class PStatView;
23 class PStatViewLevel;
24 
25 /**
26  * A pulldown menu of charts available for a particular thread.
27  */
29 public:
30  GtkStatsChartMenu(GtkStatsMonitor *monitor, int thread_index);
32 
33  GtkWidget *get_menu_widget();
34  void add_to_menu_bar(GtkWidget *menu_bar, int position);
35 
36  void check_update();
37  void do_update();
38 
39 private:
40  void add_view(GtkWidget *parent_menu, const PStatViewLevel *view_level,
41  bool show_level);
42 
43  static void handle_menu(gpointer data);
44  static void remove_menu_child(GtkWidget *widget, gpointer data);
45 
46  GtkStatsMonitor *_monitor;
47  int _thread_index;
48 
49  int _last_level_index;
50  GtkWidget *_menu;
51 };
52 
53 #endif
void check_update()
Checks to see if the menu needs to be updated (e.g.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
void do_update()
Unconditionally updates the menu with the latest data from the client.
This is a single level value, or band of color, within a View.
GtkWidget * get_menu_widget()
Returns the gtk widget for this particular menu.
A View boils down the frame data to a linear list of times spent in a number of different Collectors,...
Definition: pStatView.h:31
A pulldown menu of charts available for a particular thread.
void add_to_menu_bar(GtkWidget *menu_bar, int position)
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.