Panda3D
|
A window that draws a piano-roll style chart, which shows the collectors explicitly stopping and starting, one frame at a time. More...
#include "gtkStatsPianoRoll.h"
Public Member Functions | |
GtkStatsPianoRoll (GtkStatsMonitor *monitor, int thread_index) | |
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. | |
virtual void | clicked_label (int collector_index) |
Called when the user single-clicks on a label. | |
virtual void | force_redraw () |
Called when it is necessary to redraw the entire graph. | |
virtual void | new_data (int thread_index, int frame_number) |
Called as each frame's data is made available. | |
void | set_horizontal_scale (double time_width) |
Changes the amount of time the width of the horizontal axis represents. | |
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 units for the graph to the indicated mask if it is a time-based graph. | |
Protected Member Functions | |
virtual void | additional_graph_window_paint () |
This is called during the servicing of expose_event; it gives a derived class opportunity to do some further painting into the graph window. | |
virtual void | begin_draw () |
Erases the chart area in preparation for drawing a bunch of bars. | |
void | clear_region () |
Erases the chart area. | |
virtual DragMode | consider_drag_start (int graph_x, int graph_y) |
Based on the mouse position within the graph window, look for draggable things the mouse might be hovering over and return the appropriate DragMode enum or DM_none if nothing is indicated. | |
virtual void | draw_bar (int row, int from_x, int to_x) |
Draws a single bar on the chart. | |
virtual void | end_draw () |
Called after all the bars have been drawn, this triggers a refresh event to draw it to the window. | |
virtual gboolean | handle_button_press (GtkWidget *widget, int graph_x, int graph_y, bool double_click) |
Called when the mouse button is depressed within the graph window. | |
virtual gboolean | handle_button_release (GtkWidget *widget, int graph_x, int graph_y) |
Called when the mouse button is released within the graph window. | |
virtual gboolean | handle_motion (GtkWidget *widget, int graph_x, int graph_y) |
Called when the mouse is moved within the graph window. | |
virtual void | idle () |
Called at the end of the draw cycle. |
A window that draws a piano-roll style chart, which shows the collectors explicitly stopping and starting, one frame at a time.
Definition at line 34 of file gtkStatsPianoRoll.h.
void GtkStatsPianoRoll::additional_graph_window_paint | ( | ) | [protected, virtual] |
This is called during the servicing of expose_event; it gives a derived class opportunity to do some further painting into the graph window.
Reimplemented from GtkStatsGraph.
Definition at line 240 of file gtkStatsPianoRoll.cxx.
void GtkStatsPianoRoll::begin_draw | ( | ) | [protected, virtual] |
Erases the chart area in preparation for drawing a bunch of bars.
Reimplemented from PStatPianoRoll.
Definition at line 179 of file gtkStatsPianoRoll.cxx.
void GtkStatsPianoRoll::changed_graph_size | ( | int | graph_xsize, |
int | graph_ysize | ||
) | [virtual] |
Called when the user has resized the window, forcing a resize of the graph.
Reimplemented from GtkStatsGraph.
Definition at line 110 of file gtkStatsPianoRoll.cxx.
References PStatPianoRoll::changed_size().
void GtkStatsPianoRoll::clear_region | ( | ) | [protected] |
Erases the chart area.
Definition at line 166 of file gtkStatsPianoRoll.cxx.
void GtkStatsPianoRoll::clicked_label | ( | int | collector_index | ) | [virtual] |
Called when the user single-clicks on a label.
Reimplemented from GtkStatsGraph.
Definition at line 140 of file gtkStatsPianoRoll.cxx.
References GtkStatsMonitor::open_strip_chart().
GtkStatsGraph::DragMode GtkStatsPianoRoll::consider_drag_start | ( | int | graph_x, |
int | graph_y | ||
) | [protected, virtual] |
Based on the mouse position within the graph window, look for draggable things the mouse might be hovering over and return the appropriate DragMode enum or DM_none if nothing is indicated.
Reimplemented from GtkStatsGraph.
Definition at line 256 of file gtkStatsPianoRoll.cxx.
References GtkStatsGraph::consider_drag_start().
void GtkStatsPianoRoll::draw_bar | ( | int | row, |
int | from_x, | ||
int | to_x | ||
) | [protected, virtual] |
Draws a single bar on the chart.
Reimplemented from PStatPianoRoll.
Definition at line 195 of file gtkStatsPianoRoll.cxx.
References GtkStatsGraph::get_collector_gc().
void GtkStatsPianoRoll::end_draw | ( | ) | [protected, virtual] |
Called after all the bars have been drawn, this triggers a refresh event to draw it to the window.
Reimplemented from PStatPianoRoll.
Definition at line 216 of file gtkStatsPianoRoll.cxx.
void GtkStatsPianoRoll::force_redraw | ( | ) | [virtual] |
Called when it is necessary to redraw the entire graph.
Reimplemented from GtkStatsGraph.
Definition at line 99 of file gtkStatsPianoRoll.cxx.
References GtkStatsGraph::force_redraw().
gboolean GtkStatsPianoRoll::handle_button_press | ( | GtkWidget * | widget, |
int | graph_x, | ||
int | graph_y, | ||
bool | double_click | ||
) | [protected, virtual] |
Called when the mouse button is depressed within the graph window.
Reimplemented from GtkStatsGraph.
Definition at line 285 of file gtkStatsPianoRoll.cxx.
References GtkStatsGraph::clicked_label(), GtkStatsGraph::handle_button_press(), and GtkStatsGraph::set_drag_mode().
gboolean GtkStatsPianoRoll::handle_button_release | ( | GtkWidget * | widget, |
int | graph_x, | ||
int | graph_y | ||
) | [protected, virtual] |
Called when the mouse button is released within the graph window.
Reimplemented from GtkStatsGraph.
Definition at line 318 of file gtkStatsPianoRoll.cxx.
References GtkStatsGraph::handle_button_release(), GtkStatsGraph::handle_motion(), and GtkStatsGraph::set_drag_mode().
gboolean GtkStatsPianoRoll::handle_motion | ( | GtkWidget * | widget, |
int | graph_x, | ||
int | graph_y | ||
) | [protected, virtual] |
Called when the mouse is moved within the graph window.
Reimplemented from GtkStatsGraph.
Definition at line 345 of file gtkStatsPianoRoll.cxx.
References GtkStatsGraph::handle_motion(), and GtkStatsGraph::set_drag_mode().
void GtkStatsPianoRoll::idle | ( | ) | [protected, virtual] |
Called at the end of the draw cycle.
Reimplemented from PStatPianoRoll.
Definition at line 226 of file gtkStatsPianoRoll.cxx.
void GtkStatsPianoRoll::new_data | ( | int | thread_index, |
int | frame_number | ||
) | [virtual] |
Called as each frame's data is made available.
There is no gurantee the frames will arrive in order, or that all of them will arrive at all. The monitor should be prepared to accept frames received out-of-order or missing.
Reimplemented from GtkStatsGraph.
Definition at line 87 of file gtkStatsPianoRoll.cxx.
void GtkStatsPianoRoll::set_horizontal_scale | ( | double | time_width | ) |
Changes the amount of time the width of the horizontal axis represents.
This may force a redraw.
Reimplemented from PStatPianoRoll.
Definition at line 153 of file gtkStatsPianoRoll.cxx.
References PStatPianoRoll::set_horizontal_scale().
void GtkStatsPianoRoll::set_time_units | ( | int | unit_mask | ) | [virtual] |
Called when the user selects a new time units from the monitor pulldown menu, this should adjust the units for the graph to the indicated mask if it is a time-based graph.
Reimplemented from GtkStatsGraph.
Definition at line 123 of file gtkStatsPianoRoll.cxx.
Referenced by GtkStatsMonitor::open_piano_roll().