Panda3D
Public Types | Public Member Functions | List of all members
WinStatsGraph Class Reference

This is just an abstract base class to provide a common pointer type for the various kinds of graphs that may be created for a WinStatsMonitor. More...

#include "winStatsGraph.h"

Inheritance diagram for WinStatsGraph:
WinStatsPianoRoll WinStatsStripChart

Public Types

enum  DragMode {
  DM_none, DM_scale, DM_left_margin, DM_right_margin,
  DM_guide_bar, DM_new_guide_bar, DM_sizing
}
 

Public Member Functions

 WinStatsGraph (WinStatsMonitor *monitor)
 
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. More...
 
virtual void clicked_label (int collector_index)
 Called when the user single-clicks on a label. More...
 
virtual void force_redraw ()
 Called when it is necessary to redraw the entire graph. More...
 
virtual void new_collector (int collector_index)
 Called whenever a new Collector definition is received from the client. More...
 
virtual void new_data (int thread_index, int frame_number)
 Called whenever new data arrives. More...
 
void set_pause (bool pause)
 Changes the pause flag for the graph. More...
 
virtual void set_scroll_speed (double 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. More...
 
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. More...
 
void user_guide_bars_changed ()
 Called when the user guide bars have been changed. More...
 

Detailed Description

This is just an abstract base class to provide a common pointer type for the various kinds of graphs that may be created for a WinStatsMonitor.

Definition at line 32 of file winStatsGraph.h.

Member Function Documentation

◆ changed_graph_size()

void WinStatsGraph::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 in WinStatsPianoRoll, and WinStatsStripChart.

Definition at line 126 of file winStatsGraph.cxx.

References set_time_units().

Referenced by force_redraw().

◆ clicked_label()

void WinStatsGraph::clicked_label ( int  collector_index)
virtual

Called when the user single-clicks on a label.

Reimplemented in WinStatsStripChart, and WinStatsPianoRoll.

Definition at line 181 of file winStatsGraph.cxx.

References PStatMonitor::get_collector_color().

Referenced by WinStatsPianoRoll::set_horizontal_scale(), and user_guide_bars_changed().

◆ force_redraw()

void WinStatsGraph::force_redraw ( )
virtual

Called when it is necessary to redraw the entire graph.

Reimplemented in WinStatsPianoRoll, and WinStatsStripChart.

Definition at line 116 of file winStatsGraph.cxx.

References changed_graph_size().

Referenced by new_data().

◆ new_collector()

void WinStatsGraph::new_collector ( int  collector_index)
virtual

Called whenever a new Collector definition is received from the client.

Reimplemented in WinStatsStripChart.

Definition at line 98 of file winStatsGraph.cxx.

References new_data().

Referenced by WinStatsStripChart::new_collector(), and WinStatsMonitor::new_collector().

◆ new_data()

void WinStatsGraph::new_data ( int  thread_index,
int  frame_number 
)
virtual

Called whenever new data arrives.

Reimplemented in WinStatsPianoRoll, and WinStatsStripChart.

Definition at line 107 of file winStatsGraph.cxx.

References force_redraw().

Referenced by new_collector(), and WinStatsMonitor::new_data().

◆ set_pause()

void WinStatsGraph::set_pause ( bool  pause)

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.

References user_guide_bars_changed().

Referenced by WinStatsMonitor::open_piano_roll(), WinStatsMonitor::open_strip_chart(), WinStatsMonitor::set_pause(), and set_scroll_speed().

◆ set_scroll_speed()

void WinStatsGraph::set_scroll_speed ( double  scroll_speed)
virtual

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.

References set_pause().

Referenced by WinStatsMonitor::open_piano_roll(), WinStatsMonitor::set_scroll_speed(), and set_time_units().

◆ set_time_units()

void WinStatsGraph::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 in WinStatsPianoRoll, and WinStatsStripChart.

Definition at line 138 of file winStatsGraph.cxx.

References set_scroll_speed().

Referenced by changed_graph_size(), and WinStatsMonitor::set_time_units().

◆ user_guide_bars_changed()

void WinStatsGraph::user_guide_bars_changed ( )

Called when the user guide bars have been changed.

Definition at line 170 of file winStatsGraph.cxx.

References clicked_label().

Referenced by set_pause(), and WinStatsMonitor::user_guide_bars_changed().


The documentation for this class was generated from the following files: