15 #ifndef GTKSTATSGRAPH_H
16 #define GTKSTATSGRAPH_H
18 #include "pandatoolbase.h"
19 #include "gtkStatsLabelStack.h"
48 virtual void new_data(
int thread_index,
int frame_number);
61 GdkGC *get_collector_gc(
int collector_index);
63 virtual void additional_graph_window_paint();
64 virtual DragMode consider_drag_start(
int graph_x,
int graph_y);
65 virtual void set_drag_mode(DragMode drag_mode);
67 virtual gboolean handle_button_press(GtkWidget *widget,
int graph_x,
int graph_y,
69 virtual gboolean handle_button_release(GtkWidget *widget,
int graph_x,
int graph_y);
70 virtual gboolean handle_motion(GtkWidget *widget,
int graph_x,
int graph_y);
78 GtkWidget *_parent_window;
80 GtkWidget *_graph_window;
81 GtkWidget *_graph_hbox;
82 GtkWidget *_graph_vbox;
84 GtkWidget *_scale_area;
87 GdkCursor *_hand_cursor;
91 int _pixmap_xsize, _pixmap_ysize;
103 DragMode _potential_drag_mode;
104 int _drag_start_x, _drag_start_y;
105 double _drag_scale_start;
110 static const GdkColor rgb_white;
111 static const GdkColor rgb_light_gray;
112 static const GdkColor rgb_dark_gray;
113 static const GdkColor rgb_black;
114 static const GdkColor rgb_user_guide_bar;
117 void setup_pixmap(
int xsize,
int ysize);
118 void release_pixmap();
120 static gboolean window_delete_event(GtkWidget *widget, GdkEvent *event,
122 static void window_destroy(GtkWidget *widget, gpointer data);
123 static gboolean graph_expose_callback(GtkWidget *widget,
124 GdkEventExpose *event, gpointer data);
125 static gboolean configure_graph_callback(GtkWidget *widget,
126 GdkEventConfigure *event, gpointer data);
129 static gboolean button_press_event_callback(GtkWidget *widget,
130 GdkEventButton *event,
132 static gboolean button_release_event_callback(GtkWidget *widget,
133 GdkEventButton *event,
135 static gboolean motion_notify_event_callback(GtkWidget *widget,
136 GdkEventMotion *event,
virtual void new_data(int thread_index, int frame_number)
Called whenever new data arrives.
void user_guide_bars_changed()
Called when the user guide bars have been changed.
void set_pause(bool pause)
Changes the pause flag for the graph.
virtual void new_collector(int collector_index)
Called whenever a new Collector definition is received from the client.
virtual void force_redraw()
Called when it is necessary to redraw the entire graph.
virtual void clicked_label(int collector_index)
Called when the user single-clicks on a label.
A widget that contains a stack of labels from bottom to top.
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...
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 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 changed_graph_size(int graph_xsize, int graph_ysize)
Called when the user has resized the window, forcing a resize of the graph.