00001 // Filename: gtkStatsStripWindow.h 00002 // Created by: drose (14Jul00) 00003 // 00004 //////////////////////////////////////////////////////////////////// 00005 // 00006 // PANDA 3D SOFTWARE 00007 // Copyright (c) 2001, Disney Enterprises, Inc. All rights reserved 00008 // 00009 // All use of this software is subject to the terms of the Panda 3d 00010 // Software license. You should have received a copy of this license 00011 // along with this source code; you will also find a current copy of 00012 // the license at http://www.panda3d.org/license.txt . 00013 // 00014 // To contact the maintainers of this program write to 00015 // panda3d@yahoogroups.com . 00016 // 00017 //////////////////////////////////////////////////////////////////// 00018 00019 #ifndef GTKSTATSSTRIPWINDOW_H 00020 #define GTKSTATSSTRIPWINDOW_H 00021 00022 #include <pandatoolbase.h> 00023 00024 #include "gtkStatsMonitor.h" 00025 #include "gtkStatsWindow.h" 00026 00027 class GtkStatsStripChart; 00028 00029 //////////////////////////////////////////////////////////////////// 00030 // Class : GtkStatsStripWindow 00031 // Description : A window that contains your basic one-thread, 00032 // one-level strip chart. 00033 //////////////////////////////////////////////////////////////////// 00034 class GtkStatsStripWindow : public GtkStatsWindow { 00035 public: 00036 GtkStatsStripWindow(GtkStatsMonitor *monitor, int thread_index, 00037 int collector_index, bool show_level, 00038 int chart_xsize, int chart_ysize); 00039 00040 virtual void mark_dead(); 00041 virtual void new_collector(); 00042 virtual void idle(); 00043 00044 protected: 00045 virtual void setup_menu(); 00046 void setup_scale_menu(); 00047 virtual void menu_new_window(); 00048 void menu_hscale(float wpm); 00049 void menu_vscale(float max_height); 00050 void menu_auto_vscale(); 00051 void menu_show_levels(int collector_index); 00052 void open_subchart(int collector_index); 00053 00054 private: 00055 void layout_window(int chart_xsize, int chart_ysize); 00056 string get_title_text(); 00057 00058 private: 00059 int _thread_index; 00060 int _collector_index; 00061 bool _show_level; 00062 bool _title_unknown; 00063 bool _setup_scale_menu; 00064 00065 Gtk::Label *_title_label; 00066 Gtk::Label *_frame_rate_label; 00067 GtkStatsStripChart *_chart; 00068 00069 Gtk::Menu *_scale_menu; 00070 Gtk::Menu *_levels_menu; 00071 }; 00072 00073 00074 #endif 00075