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 "winStatsPianoRoll.h"
Public Types | |
enum | DragMode { DM_none, DM_scale, DM_left_margin, DM_right_margin, DM_guide_bar, DM_new_guide_bar, DM_sizing } |
enum | GuideBarStyle { GBS_normal, GBS_target, GBS_user } |
enum | GuideBarUnits { GBU_hz = 0x0001, GBU_ms = 0x0002, GBU_named = 0x0004, GBU_show_units = 0x0008 } |
Public Member Functions | |
WinStatsPianoRoll (WinStatsMonitor *monitor, int thread_index) | |
int | add_user_guide_bar (float height) |
Creates a new user guide bar and returns its index number. | |
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. | |
int | find_user_guide_bar (float from_height, float to_height) const |
Returns the index number of the first user guide bar found whose height is within the indicated range, or -1 if no user guide bars fall within the range. | |
virtual void | force_redraw () |
Called when it is necessary to redraw the entire graph. | |
const GuideBar & | get_guide_bar (int n) const |
Returns the nth horizontal guide bar. | |
const string & | get_guide_bar_unit_name () const |
Returns the name of the units to be used for the guide bars if the units type is set to GBU_named | GBU_show_units. | |
int | get_guide_bar_units () const |
Returns the units that are displayed for the guide bar labels. | |
float | get_horizontal_scale () const |
Returns the amount of total time the width of the horizontal axis represents. | |
int | get_label_collector (int n) const |
Returns the collector index associated with the nth label. | |
RGBColorf | get_label_color (int n) const |
Returns the color associated with the nth label. | |
string | get_label_name (int n) const |
Returns the text associated with the nth label. | |
PStatMonitor * | get_monitor () const |
Returns the monitor associated with this chart. | |
int | get_num_guide_bars () const |
Returns the number of horizontal guide bars that should be drawn, based on the indicated target frame rate. | |
int | get_num_labels () const |
Returns the number of labels to be drawn for this chart. | |
int | get_num_user_guide_bars () const |
Returns the current number of user-defined guide bars. | |
float | get_target_frame_rate () const |
Returns the indicated target frame rate in Hz. | |
GuideBar | get_user_guide_bar (int n) const |
Returns the nth user-defined guide bar. | |
int | get_xsize () const |
Returns the width of the chart in pixels. | |
int | get_ysize () const |
Returns the height of the chart in pixels. | |
int | height_to_pixel (float value) const |
Converts a value (i.e. | |
void | move_user_guide_bar (int n, float height) |
Adjusts the height of the nth user-defined guide bar. | |
virtual void | new_collector (int collector_index) |
Called whenever a new Collector definition is received from the client. | |
virtual void | new_data (int thread_index, int frame_number) |
Called as each frame's data is made available. | |
float | pixel_to_height (int y) const |
Converts a horizontal pixel offset to a value (a "height" in the strip chart). | |
float | pixel_to_timestamp (int x) const |
Converts a horizontal pixel offset to a timestamp. | |
void | remove_user_guide_bar (int n) |
Removes the user guide bar with the indicated index number. | |
void | set_guide_bar_unit_name (const string &unit_name) |
Sets the name of the units to be used for the guide bars if the units type is set to GBU_named | GBU_show_units. | |
void | set_guide_bar_units (int unit_mask) |
Sets the units that are displayed for the guide bar labels. | |
void | set_horizontal_scale (float time_width) |
Changes the amount of time the width of the horizontal axis represents. | |
void | set_pause (bool pause) |
Changes the pause flag for the graph. | |
virtual void | set_scroll_speed (float scroll_speed) |
Called when the user selects a new scroll speed from the monitor pulldown menu, this should adjust the speed for the graph to the indicated value. | |
void | set_target_frame_rate (float frame_rate) |
Sets the target frame rate of the application in Hz. | |
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. | |
int | timestamp_to_pixel (float time) const |
Converts a timestamp to a horizontal pixel offset. | |
void | update () |
Updates the chart with the latest data. | |
void | user_guide_bars_changed () |
Called when the user guide bars have been changed. | |
Static Public Member Functions | |
static string | format_number (float value) |
Returns a string representing the value nicely formatted for its range. | |
static string | format_number (float value, int guide_bar_units, const string &unit_name=string()) |
Returns a string representing the value nicely formatted for its range, including the units as indicated. | |
Protected Types | |
typedef pmap< int, HBRUSH > | Brushes |
typedef pvector< GuideBar > | GuideBars |
typedef vector_int | Labels |
Protected Member Functions | |
virtual void | additional_graph_window_paint (HDC hdc) |
This is called during the servicing of WM_PAINT; it gives a derived class opportunity to do some further painting into the window (the outer window, not the graph window). | |
virtual void | additional_window_paint (HDC hdc) |
This is called during the servicing of WM_PAINT; it gives a derived class opportunity to do some further painting into the window (the outer window, not the graph window). | |
virtual void | begin_draw () |
Erases the chart area in preparation for drawing a bunch of bars. | |
virtual void | begin_row (int row) |
Should be overridden by the user class. | |
void | changed_size (int xsize, int ysize) |
To be called by the user class when the widget size has changed. | |
void | clear_region () |
Erases the chart area. | |
void | close () |
Should be called when the user closes the associated window. | |
virtual DragMode | consider_drag_start (int mouse_x, int mouse_y, int width, int height) |
Based on the mouse position within the window's client area, look for draggable things the mouse might be hovering over and return the apprioprate 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 void | end_row (int row) |
Should be overridden by the user class. | |
HBRUSH | get_collector_brush (int collector_index) |
Returns a brush suitable for drawing in the indicated collector's color. | |
virtual LONG | graph_window_proc (HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam) |
virtual void | idle () |
Called at the end of the draw cycle. | |
GuideBar | make_guide_bar (float value, GuideBarStyle style=GBS_normal) const |
Makes a guide bar for the indicated elapsed time or level units. | |
virtual void | move_graph_window (int graph_left, int graph_top, int graph_xsize, int graph_ysize) |
Repositions the graph child window within the parent window according to the _margin variables. | |
void | move_label_stack () |
Repositions the label stack if its coordinates or size have changed. | |
virtual void | normal_guide_bars () |
Calls update_guide_bars with parameters suitable to this kind of graph. | |
PT (PStatMonitor) _monitor | |
virtual void | set_drag_mode (DragMode drag_mode) |
This should be called whenever the drag mode needs to change state. | |
void | setup_label_stack () |
Sets up the label stack on the left edge of the frame. | |
void | update_guide_bars (int num_bars, float scale) |
Resets the list of guide bars. | |
LONG | window_proc (HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam) |
This window_proc should be called up to by the derived classes for any messages that are not specifically handled by the derived class. | |
Protected Attributes | |
HBITMAP | _bitmap |
HDC | _bitmap_dc |
int | _bitmap_xsize |
int | _bitmap_ysize |
int | _bottom_margin |
Brushes | _brushes |
COLORREF | _dark_color |
HPEN | _dark_pen |
int | _drag_guide_bar |
DragMode | _drag_mode |
float | _drag_scale_start |
int | _drag_start_x |
int | _drag_start_y |
int | _graph_left |
int | _graph_top |
HWND | _graph_window |
int | _guide_bar_units |
GuideBars | _guide_bars |
bool | _guide_bars_changed |
HCURSOR | _hand_cursor |
WinStatsLabelStack | _label_stack |
Labels | _labels |
bool | _labels_changed |
int | _left_margin |
COLORREF | _light_color |
HPEN | _light_pen |
WinStatsMonitor * | _monitor |
bool | _pause |
DragMode | _potential_drag_mode |
int | _right_margin |
HCURSOR | _sizewe_cursor |
float | _target_frame_rate |
int | _thread_index |
int | _top_margin |
string | _unit_name |
COLORREF | _user_guide_bar_color |
HPEN | _user_guide_bar_pen |
HWND | _window |
int | _xsize |
int | _ysize |
Static Protected Attributes | |
static DWORD | graph_window_style |
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 winStatsPianoRoll.h.
int PStatGraph::add_user_guide_bar | ( | float | height | ) | [inherited] |
Creates a new user guide bar and returns its index number.
Definition at line 148 of file pStatGraph.cxx.
Referenced by GtkStatsStripChart::handle_motion().
void WinStatsPianoRoll::additional_graph_window_paint | ( | HDC | hdc | ) | [protected, virtual] |
This is called during the servicing of WM_PAINT; it gives a derived class opportunity to do some further painting into the window (the outer window, not the graph window).
Reimplemented from WinStatsGraph.
Definition at line 394 of file winStatsPianoRoll.cxx.
void WinStatsPianoRoll::additional_window_paint | ( | HDC | hdc | ) | [protected, virtual] |
This is called during the servicing of WM_PAINT; it gives a derived class opportunity to do some further painting into the window (the outer window, not the graph window).
Reimplemented from WinStatsGraph.
Definition at line 364 of file winStatsPianoRoll.cxx.
void WinStatsPianoRoll::begin_draw | ( | ) | [protected, virtual] |
Erases the chart area in preparation for drawing a bunch of bars.
Reimplemented from PStatPianoRoll.
Definition at line 164 of file winStatsPianoRoll.cxx.
void PStatPianoRoll::begin_row | ( | int | row | ) | [protected, virtual, inherited] |
Should be overridden by the user class.
This hook will be called before drawing any one row of bars. These bars correspond to the collector whose index is get_row_collector(row), and in the color get_row_color(row).
Definition at line 225 of file pStatPianoRoll.cxx.
Referenced by PStatPianoRoll::force_redraw().
void WinStatsPianoRoll::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 WinStatsGraph.
Definition at line 91 of file winStatsPianoRoll.cxx.
References PStatPianoRoll::changed_size().
void PStatPianoRoll::changed_size | ( | int | xsize, |
int | ysize | ||
) | [protected, inherited] |
To be called by the user class when the widget size has changed.
This updates the chart's internal data and causes it to issue redraw commands to reflect the new size.
Definition at line 157 of file pStatPianoRoll.cxx.
References PStatPianoRoll::force_redraw(), and PStatPianoRoll::normal_guide_bars().
Referenced by changed_graph_size(), and GtkStatsPianoRoll::changed_graph_size().
void WinStatsPianoRoll::clear_region | ( | ) | [protected] |
Erases the chart area.
Definition at line 152 of file winStatsPianoRoll.cxx.
void WinStatsPianoRoll::clicked_label | ( | int | collector_index | ) | [virtual] |
Called when the user single-clicks on a label.
Reimplemented from WinStatsGraph.
Definition at line 124 of file winStatsPianoRoll.cxx.
References WinStatsMonitor::open_strip_chart().
void WinStatsGraph::close | ( | ) | [protected, inherited] |
Should be called when the user closes the associated window.
This tells the monitor to remove the graph.
Definition at line 191 of file winStatsGraph.cxx.
Referenced by WinStatsGraph::window_proc().
WinStatsGraph::DragMode WinStatsPianoRoll::consider_drag_start | ( | int | mouse_x, |
int | mouse_y, | ||
int | width, | ||
int | height | ||
) | [protected, virtual] |
Based on the mouse position within the window's client area, look for draggable things the mouse might be hovering over and return the apprioprate DragMode enum or DM_none if nothing is indicated.
Reimplemented from WinStatsGraph.
Definition at line 410 of file winStatsPianoRoll.cxx.
References WinStatsGraph::consider_drag_start().
void WinStatsPianoRoll::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 180 of file winStatsPianoRoll.cxx.
References WinStatsGraph::get_collector_brush().
void WinStatsPianoRoll::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 202 of file winStatsPianoRoll.cxx.
void PStatPianoRoll::end_row | ( | int | row | ) | [protected, virtual, inherited] |
Should be overridden by the user class.
This hook will be called after drawing a series of color bars for a single row.
Definition at line 247 of file pStatPianoRoll.cxx.
Referenced by PStatPianoRoll::force_redraw().
int PStatGraph::find_user_guide_bar | ( | float | from_height, |
float | to_height | ||
) | const [inherited] |
Returns the index number of the first user guide bar found whose height is within the indicated range, or -1 if no user guide bars fall within the range.
Definition at line 172 of file pStatGraph.cxx.
Referenced by WinStatsStripChart::consider_drag_start(), and GtkStatsStripChart::consider_drag_start().
void WinStatsPianoRoll::force_redraw | ( | ) | [virtual] |
Called when it is necessary to redraw the entire graph.
Reimplemented from PStatPianoRoll.
Definition at line 80 of file winStatsPianoRoll.cxx.
References WinStatsGraph::force_redraw().
string PStatGraph::format_number | ( | float | value | ) | [static, inherited] |
Returns a string representing the value nicely formatted for its range.
Definition at line 184 of file pStatGraph.cxx.
Referenced by PStatGraph::format_number(), PStatGraph::make_guide_bar(), WinStatsStripChart::new_data(), and GtkStatsStripChart::new_data().
string PStatGraph::format_number | ( | float | value, |
int | guide_bar_units, | ||
const string & | unit_name = string() |
||
) | [static, inherited] |
Returns a string representing the value nicely formatted for its range, including the units as indicated.
Definition at line 210 of file pStatGraph.cxx.
References PStatGraph::format_number().
HBRUSH WinStatsGraph::get_collector_brush | ( | int | collector_index | ) | [protected, inherited] |
Returns a brush suitable for drawing in the indicated collector's color.
Definition at line 239 of file winStatsGraph.cxx.
References PStatMonitor::get_collector_color().
Referenced by draw_bar(), and WinStatsStripChart::draw_slice().
const PStatGraph::GuideBar & PStatGraph::get_guide_bar | ( | int | n | ) | const [inherited] |
Returns the nth horizontal guide bar.
This should be drawn as a horizontal line across the chart at the y pixel location determined by height_to_pixel(bar._height).
It is possible that this bar will be off the top of the chart.
Definition at line 101 of file pStatGraph.cxx.
Referenced by WinStatsStripChart::additional_window_paint(), WinStatsStripChart::end_draw(), and GtkStatsStripChart::end_draw().
const string & PStatGraph::get_guide_bar_unit_name | ( | ) | const [inline, inherited] |
Returns the name of the units to be used for the guide bars if the units type is set to GBU_named | GBU_show_units.
Definition at line 164 of file pStatGraph.I.
Referenced by WinStatsStripChart::new_data(), and GtkStatsStripChart::new_data().
int PStatGraph::get_guide_bar_units | ( | ) | const [inline, inherited] |
Returns the units that are displayed for the guide bar labels.
This may be a union of one or more members of the GuideBarUnits enum.
Definition at line 140 of file pStatGraph.I.
Referenced by WinStatsStripChart::new_data(), GtkStatsStripChart::new_data(), WinStatsStripChart::set_time_units(), and GtkStatsStripChart::set_time_units().
float PStatPianoRoll::get_horizontal_scale | ( | ) | const [inline, inherited] |
Returns the amount of total time the width of the horizontal axis represents.
Definition at line 37 of file pStatPianoRoll.I.
int PStatGraph::get_label_collector | ( | int | n | ) | const [inline, inherited] |
Returns the collector index associated with the nth label.
Definition at line 44 of file pStatGraph.I.
Referenced by WinStatsStripChart::update_labels(), and GtkStatsStripChart::update_labels().
RGBColorf PStatGraph::get_label_color | ( | int | n | ) | const [inline, inherited] |
Returns the color associated with the nth label.
Definition at line 66 of file pStatGraph.I.
string PStatGraph::get_label_name | ( | int | n | ) | const [inline, inherited] |
Returns the text associated with the nth label.
Definition at line 55 of file pStatGraph.I.
PStatMonitor * PStatGraph::get_monitor | ( | ) | const [inline, inherited] |
Returns the monitor associated with this chart.
Definition at line 22 of file pStatGraph.I.
Referenced by PStatStripChart::update(), and PStatStripChart::update_labels().
int PStatGraph::get_num_guide_bars | ( | ) | const [inherited] |
Returns the number of horizontal guide bars that should be drawn, based on the indicated target frame rate.
Not all of these may be visible; some may be off the top of the chart because of the vertical scale.
Definition at line 86 of file pStatGraph.cxx.
Referenced by WinStatsStripChart::additional_window_paint(), WinStatsStripChart::end_draw(), and GtkStatsStripChart::end_draw().
int PStatGraph::get_num_labels | ( | ) | const [inline, inherited] |
Returns the number of labels to be drawn for this chart.
Definition at line 33 of file pStatGraph.I.
Referenced by WinStatsStripChart::update_labels(), and GtkStatsStripChart::update_labels().
int PStatGraph::get_num_user_guide_bars | ( | ) | const [inherited] |
Returns the current number of user-defined guide bars.
Not all of these may be visible.
Definition at line 116 of file pStatGraph.cxx.
Referenced by WinStatsStripChart::additional_graph_window_paint(), GtkStatsStripChart::additional_graph_window_paint(), and WinStatsStripChart::additional_window_paint().
float PStatGraph::get_target_frame_rate | ( | ) | const [inline, inherited] |
Returns the indicated target frame rate in Hz.
Definition at line 93 of file pStatGraph.I.
Referenced by PStatStripChart::set_default_vertical_scale().
PStatGraph::GuideBar PStatGraph::get_user_guide_bar | ( | int | n | ) | const [inherited] |
Returns the nth user-defined guide bar.
Definition at line 126 of file pStatGraph.cxx.
References PStatGraph::make_guide_bar().
Referenced by WinStatsStripChart::additional_graph_window_paint(), GtkStatsStripChart::additional_graph_window_paint(), and WinStatsStripChart::additional_window_paint().
int PStatGraph::get_xsize | ( | ) | const [inline, inherited] |
Returns the width of the chart in pixels.
Definition at line 103 of file pStatGraph.I.
Referenced by WinStatsStripChart::additional_graph_window_paint(), GtkStatsStripChart::additional_graph_window_paint(), WinStatsStripChart::clear_region(), GtkStatsStripChart::clear_region(), WinStatsStripChart::consider_drag_start(), GtkStatsStripChart::consider_drag_start(), PStatPianoRoll::normal_guide_bars(), PStatStripChart::pixel_to_timestamp(), and PStatStripChart::timestamp_to_pixel().
int PStatGraph::get_ysize | ( | ) | const [inline, inherited] |
Returns the height of the chart in pixels.
Definition at line 113 of file pStatGraph.I.
Referenced by WinStatsStripChart::clear_region(), GtkStatsStripChart::clear_region(), WinStatsStripChart::consider_drag_start(), GtkStatsStripChart::consider_drag_start(), WinStatsStripChart::copy_region(), GtkStatsStripChart::copy_region(), WinStatsStripChart::draw_cursor(), GtkStatsStripChart::draw_cursor(), WinStatsStripChart::draw_empty(), GtkStatsStripChart::draw_empty(), WinStatsStripChart::draw_slice(), GtkStatsStripChart::draw_slice(), WinStatsStripChart::end_draw(), GtkStatsStripChart::end_draw(), PStatStripChart::get_collector_under_pixel(), GtkStatsStripChart::handle_button_release(), GtkStatsStripChart::handle_motion(), PStatStripChart::height_to_pixel(), and PStatStripChart::pixel_to_height().
int PStatPianoRoll::height_to_pixel | ( | float | value | ) | const [inline, inherited] |
Converts a value (i.e.
a "height" in the strip chart) to a horizontal pixel offset.
Definition at line 68 of file pStatPianoRoll.I.
void WinStatsPianoRoll::idle | ( | ) | [protected, virtual] |
Called at the end of the draw cycle.
Reimplemented from PStatPianoRoll.
Definition at line 212 of file winStatsPianoRoll.cxx.
PStatGraph::GuideBar PStatGraph::make_guide_bar | ( | float | value, |
PStatGraph::GuideBarStyle | style = GBS_normal |
||
) | const [protected, inherited] |
Makes a guide bar for the indicated elapsed time or level units.
Definition at line 295 of file pStatGraph.cxx.
References PStatGraph::format_number().
Referenced by WinStatsStripChart::additional_window_paint(), PStatGraph::get_user_guide_bar(), and PStatGraph::update_guide_bars().
void WinStatsGraph::move_graph_window | ( | int | graph_left, |
int | graph_top, | ||
int | graph_xsize, | ||
int | graph_ysize | ||
) | [protected, virtual, inherited] |
Repositions the graph child window within the parent window according to the _margin variables.
Reimplemented in WinStatsStripChart.
Definition at line 504 of file winStatsGraph.cxx.
Referenced by WinStatsGraph::window_proc().
void WinStatsGraph::move_label_stack | ( | ) | [protected, inherited] |
Repositions the label stack if its coordinates or size have changed.
Definition at line 218 of file winStatsGraph.cxx.
References WinStatsLabelStack::is_setup(), and WinStatsLabelStack::set_pos().
Referenced by WinStatsGraph::setup_label_stack(), and WinStatsGraph::window_proc().
void PStatGraph::move_user_guide_bar | ( | int | n, |
float | height | ||
) | [inherited] |
Adjusts the height of the nth user-defined guide bar.
Definition at line 137 of file pStatGraph.cxx.
Referenced by GtkStatsStripChart::handle_button_release(), and GtkStatsStripChart::handle_motion().
void WinStatsGraph::new_collector | ( | int | collector_index | ) | [virtual, inherited] |
Called whenever a new Collector definition is received from the client.
Reimplemented in WinStatsStripChart.
Definition at line 98 of file winStatsGraph.cxx.
Referenced by WinStatsMonitor::new_collector().
void WinStatsPianoRoll::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 WinStatsGraph.
Definition at line 68 of file winStatsPianoRoll.cxx.
void PStatPianoRoll::normal_guide_bars | ( | ) | [protected, virtual, inherited] |
Calls update_guide_bars with parameters suitable to this kind of graph.
Implements PStatGraph.
Definition at line 200 of file pStatPianoRoll.cxx.
References PStatGraph::get_xsize(), and PStatGraph::update_guide_bars().
Referenced by PStatPianoRoll::changed_size(), and PStatPianoRoll::set_horizontal_scale().
float PStatPianoRoll::pixel_to_height | ( | int | y | ) | const [inline, inherited] |
Converts a horizontal pixel offset to a value (a "height" in the strip chart).
Definition at line 79 of file pStatPianoRoll.I.
float PStatPianoRoll::pixel_to_timestamp | ( | int | x | ) | const [inline, inherited] |
Converts a horizontal pixel offset to a timestamp.
Definition at line 57 of file pStatPianoRoll.I.
void PStatGraph::remove_user_guide_bar | ( | int | n | ) | [inherited] |
Removes the user guide bar with the indicated index number.
All subsequent index numbers are adjusted down one.
Definition at line 160 of file pStatGraph.cxx.
Referenced by GtkStatsStripChart::handle_button_release().
void WinStatsGraph::set_drag_mode | ( | WinStatsGraph::DragMode | drag_mode | ) | [protected, virtual, inherited] |
This should be called whenever the drag mode needs to change state.
It provides hooks for a derived class to do something special.
Reimplemented in WinStatsStripChart.
Definition at line 493 of file winStatsGraph.cxx.
Referenced by window_proc(), and WinStatsGraph::window_proc().
void PStatGraph::set_guide_bar_unit_name | ( | const string & | unit_name | ) | [inline, inherited] |
Sets the name of the units to be used for the guide bars if the units type is set to GBU_named | GBU_show_units.
Definition at line 152 of file pStatGraph.I.
void PStatGraph::set_guide_bar_units | ( | int | guide_bar_units | ) | [inline, inherited] |
Sets the units that are displayed for the guide bar labels.
This may be a union of one or more members of the GuideBarUnits enum.
Definition at line 125 of file pStatGraph.I.
Referenced by WinStatsStripChart::set_time_units(), and GtkStatsStripChart::set_time_units().
void WinStatsPianoRoll::set_horizontal_scale | ( | float | 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 137 of file winStatsPianoRoll.cxx.
References PStatPianoRoll::set_horizontal_scale().
void WinStatsGraph::set_pause | ( | bool | pause | ) | [inherited] |
Changes the pause flag for the graph.
When this flag is true, the graph does not update in response to new data.
Definition at line 160 of file winStatsGraph.cxx.
Referenced by WinStatsMonitor::open_piano_roll(), WinStatsMonitor::open_strip_chart(), and WinStatsMonitor::set_pause().
void WinStatsGraph::set_scroll_speed | ( | float | scroll_speed | ) | [virtual, inherited] |
Called when the user selects a new scroll speed from the monitor pulldown menu, this should adjust the speed for the graph to the indicated value.
Reimplemented in WinStatsStripChart.
Definition at line 149 of file winStatsGraph.cxx.
Referenced by WinStatsMonitor::open_piano_roll(), and WinStatsMonitor::set_scroll_speed().
void PStatGraph::set_target_frame_rate | ( | float | frame_rate | ) | [inline, inherited] |
Sets the target frame rate of the application in Hz.
This only affects the choice of initial scale and the placement of guide bars.
Definition at line 79 of file pStatGraph.I.
void WinStatsPianoRoll::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 WinStatsGraph.
Definition at line 104 of file winStatsPianoRoll.cxx.
Referenced by WinStatsMonitor::open_piano_roll().
void WinStatsGraph::setup_label_stack | ( | ) | [protected, inherited] |
Sets up the label stack on the left edge of the frame.
Definition at line 206 of file winStatsGraph.cxx.
References WinStatsGraph::move_label_stack(), and WinStatsLabelStack::setup().
int PStatPianoRoll::timestamp_to_pixel | ( | float | time | ) | const [inline, inherited] |
Converts a timestamp to a horizontal pixel offset.
Definition at line 47 of file pStatPianoRoll.I.
Referenced by PStatPianoRoll::force_redraw().
void PStatPianoRoll::update | ( | ) | [inherited] |
Updates the chart with the latest data.
Definition at line 126 of file pStatPianoRoll.cxx.
References PStatPianoRoll::force_redraw(), PStatThreadData::get_frame(), PStatThreadData::get_latest_frame_number(), PStatClientData::get_num_collectors(), PStatClientData::get_num_threads(), PStatClientData::get_thread_data(), PStatPianoRoll::idle(), and PStatThreadData::is_empty().
void PStatGraph::update_guide_bars | ( | int | num_bars, |
float | scale | ||
) | [protected, inherited] |
Resets the list of guide bars.
Definition at line 257 of file pStatGraph.cxx.
References PStatGraph::make_guide_bar().
Referenced by PStatStripChart::normal_guide_bars(), and PStatPianoRoll::normal_guide_bars().
void WinStatsGraph::user_guide_bars_changed | ( | ) | [inherited] |
Called when the user guide bars have been changed.
Definition at line 170 of file winStatsGraph.cxx.
Referenced by WinStatsMonitor::user_guide_bars_changed().
LONG WinStatsPianoRoll::window_proc | ( | HWND | hwnd, |
UINT | msg, | ||
WPARAM | wparam, | ||
LPARAM | lparam | ||
) | [protected] |
This window_proc should be called up to by the derived classes for any messages that are not specifically handled by the derived class.
Reimplemented from WinStatsGraph.
Definition at line 224 of file winStatsPianoRoll.cxx.
References WinStatsGraph::set_drag_mode(), and WinStatsGraph::window_proc().
DWORD WinStatsGraph::graph_window_style [static, protected, inherited] |
WS_CHILD | WS_CLIPCHILDREN | WS_CLIPSIBLINGS | WS_OVERLAPPEDWINDOW | WS_VISIBLE
Definition at line 129 of file winStatsGraph.h.