00001 // Filename: gtkStatsMonitor.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 GTKSTATSMONITOR_H 00020 #define GTKSTATSMONITOR_H 00021 00022 #include <pandatoolbase.h> 00023 00024 #include <pStatMonitor.h> 00025 #include <pointerTo.h> 00026 00027 #include "pset.h" 00028 00029 00030 class GtkStatsWindow; 00031 class Gdk_Color; 00032 00033 //////////////////////////////////////////////////////////////////// 00034 // Class : GtkStatsMonitor 00035 // Description : 00036 //////////////////////////////////////////////////////////////////// 00037 class GtkStatsMonitor : public PStatMonitor { 00038 public: 00039 GtkStatsMonitor(); 00040 ~GtkStatsMonitor(); 00041 00042 PT(PStatMonitor) close_all_windows(); 00043 00044 virtual string get_monitor_name(); 00045 00046 virtual void initialized(); 00047 virtual void got_hello(); 00048 virtual void got_bad_version(int client_major, int client_minor, 00049 int server_major, int server_minor); 00050 virtual void new_collector(int collector_index); 00051 virtual void new_data(int thread_index, int frame_number); 00052 virtual void lost_connection(); 00053 virtual void idle(); 00054 virtual bool has_idle(); 00055 virtual bool is_thread_safe(); 00056 00057 public: 00058 void add_window(GtkStatsWindow *window); 00059 void remove_window(GtkStatsWindow *window); 00060 00061 typedef pset<GtkStatsWindow *> Windows; 00062 Windows _windows; 00063 00064 bool _destructing; 00065 bool _new_collector; 00066 }; 00067 00068 #endif