This is an abstract base class for several different kinds of graphs that have a few things in common, like labels and guide bars.
More...
Classes |
| class | GuideBar |
Public Types |
| 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 |
|
| PStatGraph (PStatMonitor *monitor, int xsize, int ysize) |
| int | add_user_guide_bar (float height) |
| | Creates a new user guide bar and returns its index number.
|
| 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.
|
| 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.
|
| 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.
|
| void | move_user_guide_bar (int n, float height) |
| | Adjusts the height of the nth user-defined guide bar.
|
| 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_target_frame_rate (float frame_rate) |
| | Sets the target frame rate of the application in Hz.
|
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 pvector< GuideBar > | GuideBars |
|
typedef vector_int | Labels |
Protected Member Functions |
| 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 | normal_guide_bars ()=0 |
|
| PT (PStatMonitor) _monitor |
| void | update_guide_bars (int num_bars, float scale) |
| | Resets the list of guide bars.
|
Protected Attributes |
|
int | _guide_bar_units |
|
GuideBars | _guide_bars |
|
bool | _guide_bars_changed |
|
Labels | _labels |
|
bool | _labels_changed |
|
float | _target_frame_rate |
|
string | _unit_name |
|
int | _xsize |
|
int | _ysize |
This is an abstract base class for several different kinds of graphs that have a few things in common, like labels and guide bars.
Definition at line 36 of file pStatGraph.h.