14 #ifndef WINSTATSMONITOR_H
15 #define WINSTATSMONITOR_H
26 #ifndef WIN32_LEAN_AND_MEAN
27 #define WIN32_LEAN_AND_MEAN 1
42 INLINE
MenuDef(
int thread_index,
int collector_index,
bool show_level);
43 INLINE
bool operator < (
const MenuDef &other)
const;
58 int server_major,
int server_minor);
61 virtual void new_data(
int thread_index,
int frame_number);
69 void open_strip_chart(
int thread_index,
int collector_index,
bool show_level);
84 void setup_options_menu();
85 void setup_speed_menu();
86 void setup_frame_rate_label();
87 static void register_window_class(HINSTANCE application);
89 static LONG WINAPI static_window_proc(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam);
90 LONG window_proc(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam);
91 void handle_menu_command(
int menu_id);
108 std::string _window_title;
110 double _scroll_speed;
113 static bool _window_class_registered;
114 static const char *
const _window_class_name;
This is an abstract class that presents the interface to any number of different front-ends for the s...
This is just an abstract base class to provide a common pointer type for the various kinds of graphs ...
This class represents a connection to a PStatsClient and manages the data exchange with the client.
virtual bool has_idle()
Should be redefined to return true if you want to redefine idle() and expect it to be called.
void open_strip_chart(int thread_index, int collector_index, bool show_level)
Opens a new strip chart showing the indicated data.
int get_menu_id(const MenuDef &menu_def)
Returns the menu ID that is reserved for the indicated MenuDef properties.
void set_pause(bool pause)
Called when the user selects a pause on or pause off option from the menu.
virtual void got_hello()
Called when the "hello" message has been received from the client.
virtual void idle()
If has_idle() returns true, this will be called periodically to allow the monitor to update its displ...
virtual void user_guide_bars_changed()
Called when the user guide bars have been changed.
virtual std::string get_monitor_name()
Should be redefined to return a descriptive name for the type of PStatsMonitor this is.
HWND get_window() const
Returns the window handle to the monitor's window.
virtual void got_bad_version(int client_major, int client_minor, int server_major, int server_minor)
Like got_hello(), this is called when the "hello" message has been received from the client.
virtual void new_data(int thread_index, int frame_number)
Called as each frame's data is made available.
virtual void initialized()
Called after the monitor has been fully set up.
virtual void new_collector(int collector_index)
Called whenever a new Collector definition is received from the client.
virtual void new_thread(int thread_index)
Called whenever a new Thread definition is received from the client.
void set_time_units(int unit_mask)
Called when the user selects a new time units from the monitor pulldown menu, this should adjust the ...
void set_scroll_speed(double scroll_speed)
Called when the user selects a new scroll speed from the monitor pulldown menu, this should adjust th...
void open_piano_roll(int thread_index)
Opens a new piano roll showing the indicated data.
const MenuDef & lookup_menu(int menu_id) const
Returns the MenuDef properties associated with the indicated menu ID.
virtual void lost_connection()
Called whenever the connection to the client has been lost.
The class that owns the main loop, waiting for client connections.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.