59 GuideBar(
double height,
const std::string &label, GuideBarStyle style);
71 GBU_show_units = 0x0008,
90 static std::string
format_number(
double value,
int guide_bar_units,
91 const std::string &unit_name = std::string());
94 virtual void normal_guide_bars()=0;
95 void update_guide_bars(
int num_bars,
double scale);
96 GuideBar make_guide_bar(
double value, GuideBarStyle style = GBS_normal)
const;
99 bool _guide_bars_changed;
103 double _target_frame_rate;
110 typedef vector_int Labels;
114 GuideBars _guide_bars;
115 int _guide_bar_units;
116 std::string _unit_name;
int get_xsize() const
Returns the width of the chart in pixels.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
int get_guide_bar_units() const
Returns the units that are displayed for the guide bar labels.
void set_guide_bar_units(int unit_mask)
Sets the units that are displayed for the guide bar labels.
int get_ysize() const
Returns the height of the chart in pixels.
int get_num_labels() const
Returns the number of labels to be drawn for this chart.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
std::string get_label_name(int n) const
Returns the text 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...
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...
double get_target_frame_rate() const
Returns the indicated target frame rate in Hz.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PStatMonitor * get_monitor() const
Returns the monitor associated with this chart.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
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 get_label_collector(int n) const
Returns the collector index associated with the nth label.
int get_num_guide_bars() const
Returns the number of horizontal guide bars that should be drawn, based on the indicated target frame...
const std::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...
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
void set_guide_bar_unit_name(const std::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.
int add_user_guide_bar(double height)
Creates a new user guide bar and returns its index number.
static std::string format_number(double value)
Returns a string representing the value nicely formatted for its range.
GuideBar get_user_guide_bar(int n) const
Returns the nth user-defined guide bar.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
LRGBColor get_label_color(int n) const
Returns the color associated with the nth label.
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.