18 #include "pandatoolbase.h"
20 #include "pStatMonitor.h"
21 #include "pStatClientData.h"
24 #include "vector_int.h"
62 GuideBar(
double height,
const string &label, GuideBarStyle style);
74 GBU_show_units = 0x0008,
93 static string format_number(
double value,
int guide_bar_units,
94 const string &unit_name =
string());
97 virtual void normal_guide_bars()=0;
98 void update_guide_bars(
int num_bars,
double scale);
99 GuideBar make_guide_bar(
double value, GuideBarStyle style = GBS_normal)
const;
101 bool _labels_changed;
102 bool _guide_bars_changed;
106 double _target_frame_rate;
113 typedef vector_int Labels;
116 typedef
pvector<GuideBar> GuideBars;
117 GuideBars _guide_bars;
118 int _guide_bar_units;
122 #include "pStatGraph.I"
This is the base class for all three-component vectors and points.
int get_ysize() const
Returns the height of the chart in pixels.
void set_guide_bar_units(int unit_mask)
Sets 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.
void move_user_guide_bar(int n, double height)
Adjusts the height of the nth user-defined guide bar.
This is an abstract base class for several different kinds of graphs that have a few things in common...
double get_target_frame_rate() const
Returns the indicated target frame rate in Hz.
int get_num_guide_bars() const
Returns the number of horizontal guide bars that should be drawn, based on the indicated target frame...
This is our own Panda specialization on the default STL vector.
This is an abstract class that presents the interface to any number of different front-ends for the s...
const GuideBar & get_guide_bar(int n) const
Returns the nth horizontal guide bar.
A View boils down the frame data to a linear list of times spent in a number of different Collectors...
int find_user_guide_bar(double from_height, double to_height) const
Returns the index number of the first user guide bar found whose height is within the indicated range...
GuideBar get_user_guide_bar(int n) const
Returns the nth user-defined guide bar.
int get_num_labels() const
Returns the number of labels to be drawn for this chart.
PStatMonitor * get_monitor() const
Returns the monitor associated with this chart.
int get_xsize() const
Returns the width of the chart in pixels.
int get_guide_bar_units() const
Returns the units that are displayed for the guide bar labels.
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 | G...
string get_label_name(int n) const
Returns the text associated with the nth label.
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_...
void set_target_frame_rate(double frame_rate)
Sets the target frame rate of the application in Hz.
LRGBColor get_label_color(int n) const
Returns the color associated with the nth label.
int add_user_guide_bar(double height)
Creates a new user guide bar and returns its index number.
static string format_number(double value)
Returns a string representing the value nicely formatted for its range.
int get_num_user_guide_bars() const
Returns the current number of user-defined guide bars.
void remove_user_guide_bar(int n)
Removes the user guide bar with the indicated index number.