00001 // Filename: gtkStatsWindow.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 GTKSTATSWINDOW_H 00020 #define GTKSTATSWINDOW_H 00021 00022 #include <pandatoolbase.h> 00023 00024 #include "gtkStatsMonitor.h" 00025 00026 #include <basicGtkWindow.h> 00027 00028 #include <pointerTo.h> 00029 00030 //////////////////////////////////////////////////////////////////// 00031 // Class : GtkStatsWindow 00032 // Description : This is the base class for a family of windows that 00033 // are associated with one particular stats client. 00034 // Each window keeps a pointer back to the 00035 // GtkStatsMonitor object, which in turn knows about all 00036 // of the windows; when the last window is closed, the 00037 // monitor object goes away and ends the session. 00038 //////////////////////////////////////////////////////////////////// 00039 class GtkStatsWindow : public BasicGtkWindow { 00040 public: 00041 GtkStatsWindow(GtkStatsMonitor *monitor); 00042 virtual bool destruct(); 00043 00044 virtual void update_title(); 00045 virtual void mark_dead(); 00046 virtual void new_collector(); 00047 virtual void idle(); 00048 00049 protected: 00050 virtual void setup_menu(); 00051 00052 void menu_open_strip_chart(); 00053 void menu_open_piano_roll(); 00054 virtual void menu_new_window(); 00055 void menu_close_window(); 00056 void menu_close_all_windows(); 00057 void menu_disconnect(); 00058 00059 protected: 00060 PT(GtkStatsMonitor) _monitor; 00061 00062 Gtk::VBox *_main_box; 00063 Gtk::MenuBar *_menu; 00064 Gtk::Menu *_file_menu; 00065 }; 00066 00067 00068 #endif 00069