Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

PStatGraph Class Reference

#include <pStatGraph.h>

Inheritance diagram for PStatGraph:

PStatPianoRoll PStatStripChart GtkStatsPianoRoll GtkStatsStripChart List of all members.

Public Types

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)
virtual ~PStatGraph ()
INLINE PStatMonitorget_monitor () const
INLINE int get_num_labels () const
INLINE int get_label_collector (int n) const
INLINE string get_label_name (int n) const
INLINE RGBColorf get_label_color (int n) const
INLINE void set_target_frame_rate (float frame_rate)
INLINE float get_target_frame_rate () const
INLINE int get_xsize () const
INLINE int get_ysize () const
int get_num_guide_bars () const
const GuideBarget_guide_bar (int n) const
INLINE void set_guide_bar_units (int unit_mask)
INLINE int get_guide_bar_units () const
INLINE void set_guide_bar_unit_name (const string &unit_name)
INLINE const string & get_guide_bar_unit_name () const

Static Public Member Functions

string format_number (float value)
string format_number (float value, int guide_bar_units, const string &unit_name=string())

Protected Types

typedef vector_int Labels
typedef pvector< GuideBarGuideBars

Protected Member Functions

virtual void normal_guide_bars ()=0
void update_guide_bars (int num_bars, float scale)
GuideBar make_guide_bar (float value) const
 PT (PStatMonitor) _monitor

Protected Attributes

bool _labels_changed
bool _guide_bars_changed
float _target_frame_rate
int _xsize
int _ysize
Labels _labels
GuideBars _guide_bars
int _guide_bar_units
string _unit_name

Member Typedef Documentation

typedef pvector<GuideBar> PStatGraph::GuideBars [protected]
 

Definition at line 107 of file pStatGraph.h.

typedef vector_int PStatGraph::Labels [protected]
 

Definition at line 104 of file pStatGraph.h.


Member Enumeration Documentation

enum PStatGraph::GuideBarUnits
 

Enumeration values:
GBU_hz 
GBU_ms 
GBU_named 
GBU_show_units 

Definition at line 68 of file pStatGraph.h.


Constructor & Destructor Documentation

PStatGraph::PStatGraph PStatMonitor monitor,
int  xsize,
int  ysize
 

Definition at line 60 of file pStatGraph.cxx.

References _guide_bar_units, _guide_bars_changed, _labels_changed, _target_frame_rate, _xsize, _ysize, GBU_ms, and pstats_target_frame_rate.

PStatGraph::~PStatGraph  )  [virtual]
 

Definition at line 77 of file pStatGraph.cxx.


Member Function Documentation

string PStatGraph::format_number float  value,
int  guide_bar_units,
const string &  unit_name = string()
[static]
 

Definition at line 147 of file pStatGraph.cxx.

References format_number(), GBU_hz, GBU_ms, GBU_named, and GBU_show_units.

string PStatGraph::format_number float  value  )  [static]
 

Definition at line 121 of file pStatGraph.cxx.

References buffer.

Referenced by format_number(), make_guide_bar(), and GtkStatsStripWindow::setup_scale_menu().

const PStatGraph::GuideBar & PStatGraph::get_guide_bar int  n  )  const
 

Definition at line 105 of file pStatGraph.cxx.

References _guide_bars, n, and nassertr.

Referenced by GtkStatsPianoRoll::begin_draw(), GtkStatsStripChart::end_draw(), GtkStatsPianoRoll::end_draw(), and GtkStatsGuide::expose_event_impl().

INLINE const string& PStatGraph::get_guide_bar_unit_name  )  const
 

INLINE int PStatGraph::get_guide_bar_units  )  const
 

INLINE int PStatGraph::get_label_collector int  n  )  const
 

Referenced by GtkStatsPianoRoll::draw_bar(), GtkStatsStripChart::pack_labels(), and GtkStatsPianoRoll::pack_labels().

INLINE RGBColorf PStatGraph::get_label_color int  n  )  const
 

INLINE string PStatGraph::get_label_name int  n  )  const
 

INLINE PStatMonitor* PStatGraph::get_monitor  )  const
 

Referenced by GtkStatsStripChart::get_collector_gc(), GtkStatsPianoRoll::get_collector_gc(), GtkStatsStripChart::pack_labels(), GtkStatsPianoRoll::pack_labels(), PStatStripChart::update(), and PStatStripChart::update_labels().

int PStatGraph::get_num_guide_bars  )  const
 

Definition at line 90 of file pStatGraph.cxx.

References _guide_bars.

Referenced by GtkStatsPianoRoll::begin_draw(), GtkStatsStripChart::end_draw(), GtkStatsPianoRoll::end_draw(), and GtkStatsGuide::expose_event_impl().

INLINE int PStatGraph::get_num_labels  )  const
 

Referenced by GtkStatsStripChart::pack_labels(), and GtkStatsPianoRoll::pack_labels().

INLINE float PStatGraph::get_target_frame_rate  )  const
 

Referenced by PStatStripChart::set_default_vertical_scale(), and GtkStatsStripWindow::setup_scale_menu().

INLINE int PStatGraph::get_xsize  )  const
 

Referenced by GtkStatsPianoRoll::begin_draw(), GtkStatsStripChart::clear_region(), GtkStatsStripChart::configure_event_impl(), GtkStatsPianoRoll::configure_event_impl(), GtkStatsPianoRoll::end_draw(), GtkStatsPianoRoll::GtkStatsPianoRoll(), GtkStatsStripChart::GtkStatsStripChart(), GtkStatsStripWindow::menu_new_window(), GtkStatsPianoWindow::menu_new_window(), GtkStatsStripWindow::menu_show_levels(), PStatPianoRoll::normal_guide_bars(), and GtkStatsStripWindow::open_subchart().

INLINE int PStatGraph::get_ysize  )  const
 

Referenced by GtkStatsPianoRoll::begin_draw(), GtkStatsStripChart::clear_region(), GtkStatsStripChart::configure_event_impl(), GtkStatsPianoRoll::configure_event_impl(), GtkStatsStripChart::copy_region(), GtkStatsStripChart::draw_cursor(), GtkStatsStripChart::draw_empty(), GtkStatsStripChart::draw_slice(), GtkStatsStripChart::end_draw(), GtkStatsPianoRoll::end_draw(), PStatStripChart::get_collector_under_pixel(), GtkStatsPianoRoll::GtkStatsPianoRoll(), GtkStatsStripChart::GtkStatsStripChart(), GtkStatsStripWindow::menu_new_window(), GtkStatsPianoWindow::menu_new_window(), GtkStatsStripWindow::menu_show_levels(), and GtkStatsStripWindow::open_subchart().

PStatGraph::GuideBar PStatGraph::make_guide_bar float  value  )  const [protected]
 

Definition at line 247 of file pStatGraph.cxx.

References _guide_bar_units, _target_frame_rate, _unit_name, format_number(), GBU_named, and IS_NEARLY_EQUAL.

Referenced by update_guide_bars().

virtual void PStatGraph::normal_guide_bars  )  [protected, pure virtual]
 

Implemented in PStatPianoRoll, and PStatStripChart.

PStatGraph::PT PStatMonitor   )  [protected]
 

INLINE void PStatGraph::set_guide_bar_unit_name const string &  unit_name  ) 
 

Referenced by GtkStatsStripWindow::setup_scale_menu().

INLINE void PStatGraph::set_guide_bar_units int  unit_mask  ) 
 

Referenced by GtkStatsStripWindow::setup_scale_menu().

INLINE void PStatGraph::set_target_frame_rate float  frame_rate  ) 
 

void PStatGraph::update_guide_bars int  num_bars,
float  scale
[protected]
 

Definition at line 209 of file pStatGraph.cxx.

References _guide_bars, _guide_bars_changed, _target_frame_rate, make_guide_bar(), and scale.

Referenced by PStatStripChart::normal_guide_bars(), and PStatPianoRoll::normal_guide_bars().


Member Data Documentation

int PStatGraph::_guide_bar_units [protected]
 

Definition at line 109 of file pStatGraph.h.

Referenced by make_guide_bar(), PStatGraph(), PStatPianoRoll::PStatPianoRoll(), and PStatStripChart::PStatStripChart().

GuideBars PStatGraph::_guide_bars [protected]
 

Definition at line 108 of file pStatGraph.h.

Referenced by get_guide_bar(), get_num_guide_bars(), and update_guide_bars().

bool PStatGraph::_guide_bars_changed [protected]
 

Definition at line 93 of file pStatGraph.h.

Referenced by GtkStatsStripChart::idle(), PStatGraph(), and update_guide_bars().

Labels PStatGraph::_labels [protected]
 

Definition at line 105 of file pStatGraph.h.

Referenced by PStatPianoRoll::compute_page(), PStatPianoRoll::force_redraw(), and PStatStripChart::update_labels().

bool PStatGraph::_labels_changed [protected]
 

Definition at line 92 of file pStatGraph.h.

Referenced by PStatPianoRoll::compute_page(), GtkStatsStripChart::pack_labels(), GtkStatsPianoRoll::pack_labels(), PStatGraph(), and PStatStripChart::update_labels().

float PStatGraph::_target_frame_rate [protected]
 

Definition at line 97 of file pStatGraph.h.

Referenced by make_guide_bar(), PStatGraph(), and update_guide_bars().

string PStatGraph::_unit_name [protected]
 

Definition at line 110 of file pStatGraph.h.

Referenced by make_guide_bar(), and PStatStripChart::PStatStripChart().

int PStatGraph::_xsize [protected]
 

Definition at line 99 of file pStatGraph.h.

Referenced by PStatStripChart::changed_size(), PStatPianoRoll::changed_size(), PStatStripChart::draw_frames(), PStatStripChart::force_redraw(), PStatGraph(), and PStatStripChart::set_auto_vertical_scale().

int PStatGraph::_ysize [protected]
 

Definition at line 100 of file pStatGraph.h.

Referenced by PStatStripChart::changed_size(), PStatPianoRoll::changed_size(), and PStatGraph().


The documentation for this class was generated from the following files:
Generated on Fri Apr 18 01:01:22 2003 for Panda-Tool by doxygen1.3