14#ifndef WINSTATSGRAPH_H
15#define WINSTATSGRAPH_H
21#ifndef WIN32_LEAN_AND_MEAN
22#define WIN32_LEAN_AND_MEAN 1
50 virtual void new_data(
int thread_index,
int frame_number);
64 void setup_label_stack();
65 void move_label_stack();
67 HBRUSH get_collector_brush(
int collector_index);
69 LONG window_proc(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam);
70 virtual LONG graph_window_proc(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam);
72 virtual void additional_window_paint(HDC hdc);
73 virtual void additional_graph_window_paint(HDC hdc);
74 virtual DragMode consider_drag_start(
int mouse_x,
int mouse_y,
75 int width,
int height);
76 virtual void set_drag_mode(DragMode drag_mode);
78 virtual void move_graph_window(
int graph_left,
int graph_top,
79 int graph_xsize,
int graph_ysize);
91 HCURSOR _sizewe_cursor;
97 int _graph_left, _graph_top;
98 int _bitmap_xsize, _bitmap_ysize;
99 int _left_margin, _right_margin;
100 int _top_margin, _bottom_margin;
102 COLORREF _dark_color;
103 COLORREF _light_color;
104 COLORREF _user_guide_bar_color;
107 HPEN _user_guide_bar_pen;
110 DragMode _potential_drag_mode;
111 int _drag_start_x, _drag_start_y;
112 double _drag_scale_start;
118 void setup_bitmap(
int xsize,
int ysize);
119 void release_bitmap();
120 void create_graph_window();
121 static void register_graph_window_class(HINSTANCE application);
123 static LONG WINAPI static_graph_window_proc(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam);
125 static bool _graph_window_class_registered;
126 static const char *
const _graph_window_class_name;
129 static DWORD graph_window_style;
This is just an abstract base class to provide a common pointer type for the various kinds of graphs ...
void set_pause(bool pause)
Changes the pause flag for the graph.
virtual 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...
virtual 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 ...
virtual void new_collector(int collector_index)
Called whenever a new Collector definition is received from the client.
virtual void clicked_label(int collector_index)
Called when the user single-clicks on a label.
void user_guide_bars_changed()
Called when the user guide bars have been changed.
virtual void new_data(int thread_index, int frame_number)
Called whenever new data arrives.
virtual void force_redraw()
Called when it is necessary to redraw the entire graph.
virtual void changed_graph_size(int graph_xsize, int graph_ysize)
Called when the user has resized the window, forcing a resize of the graph.
A window that contains a stack of labels from bottom to top.
This class represents a connection to a PStatsClient and manages the data exchange with the client.
This is our own Panda specialization on the default STL map.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.