Panda3D
Public Member Functions | Protected Member Functions

WinStatsPianoRoll Class Reference

A window that draws a piano-roll style chart, which shows the collectors explicitly stopping and starting, one frame at a time. More...

#include "winStatsPianoRoll.h"

Inheritance diagram for WinStatsPianoRoll:
PStatPianoRoll WinStatsGraph PStatGraph

List of all members.

Public Member Functions

 WinStatsPianoRoll (WinStatsMonitor *monitor, int thread_index)
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.
virtual void clicked_label (int collector_index)
 Called when the user single-clicks on a label.
virtual void force_redraw ()
 Called when it is necessary to redraw the entire graph.
virtual void new_data (int thread_index, int frame_number)
 Called as each frame's data is made available.
void set_horizontal_scale (double time_width)
 Changes the amount of time the width of the horizontal axis represents.
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.

Protected Member Functions

virtual void additional_graph_window_paint (HDC hdc)
 This is called during the servicing of WM_PAINT; it gives a derived class opportunity to do some further painting into the window (the outer window, not the graph window).
virtual void additional_window_paint (HDC hdc)
 This is called during the servicing of WM_PAINT; it gives a derived class opportunity to do some further painting into the window (the outer window, not the graph window).
virtual void begin_draw ()
 Erases the chart area in preparation for drawing a bunch of bars.
void clear_region ()
 Erases the chart area.
virtual DragMode consider_drag_start (int mouse_x, int mouse_y, int width, int height)
 Based on the mouse position within the window's client area, look for draggable things the mouse might be hovering over and return the apprioprate DragMode enum or DM_none if nothing is indicated.
virtual void draw_bar (int row, int from_x, int to_x)
 Draws a single bar on the chart.
virtual void end_draw ()
 Called after all the bars have been drawn, this triggers a refresh event to draw it to the window.
virtual LONG graph_window_proc (HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam)
virtual void idle ()
 Called at the end of the draw cycle.
LONG window_proc (HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam)
 This window_proc should be called up to by the derived classes for any messages that are not specifically handled by the derived class.

Detailed Description

A window that draws a piano-roll style chart, which shows the collectors explicitly stopping and starting, one frame at a time.

Definition at line 34 of file winStatsPianoRoll.h.


Member Function Documentation

void WinStatsPianoRoll::additional_graph_window_paint ( HDC  hdc) [protected, virtual]

This is called during the servicing of WM_PAINT; it gives a derived class opportunity to do some further painting into the window (the outer window, not the graph window).

Reimplemented from WinStatsGraph.

Definition at line 394 of file winStatsPianoRoll.cxx.

void WinStatsPianoRoll::additional_window_paint ( HDC  hdc) [protected, virtual]

This is called during the servicing of WM_PAINT; it gives a derived class opportunity to do some further painting into the window (the outer window, not the graph window).

Reimplemented from WinStatsGraph.

Definition at line 364 of file winStatsPianoRoll.cxx.

void WinStatsPianoRoll::begin_draw ( ) [protected, virtual]

Erases the chart area in preparation for drawing a bunch of bars.

Reimplemented from PStatPianoRoll.

Definition at line 164 of file winStatsPianoRoll.cxx.

void WinStatsPianoRoll::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 from WinStatsGraph.

Definition at line 91 of file winStatsPianoRoll.cxx.

References PStatPianoRoll::changed_size().

void WinStatsPianoRoll::clear_region ( ) [protected]

Erases the chart area.

Definition at line 152 of file winStatsPianoRoll.cxx.

void WinStatsPianoRoll::clicked_label ( int  collector_index) [virtual]

Called when the user single-clicks on a label.

Reimplemented from WinStatsGraph.

Definition at line 124 of file winStatsPianoRoll.cxx.

References WinStatsMonitor::open_strip_chart().

WinStatsGraph::DragMode WinStatsPianoRoll::consider_drag_start ( int  mouse_x,
int  mouse_y,
int  width,
int  height 
) [protected, virtual]

Based on the mouse position within the window's client area, look for draggable things the mouse might be hovering over and return the apprioprate DragMode enum or DM_none if nothing is indicated.

Reimplemented from WinStatsGraph.

Definition at line 410 of file winStatsPianoRoll.cxx.

References WinStatsGraph::consider_drag_start().

void WinStatsPianoRoll::draw_bar ( int  row,
int  from_x,
int  to_x 
) [protected, virtual]

Draws a single bar on the chart.

Reimplemented from PStatPianoRoll.

Definition at line 180 of file winStatsPianoRoll.cxx.

References WinStatsGraph::get_collector_brush().

void WinStatsPianoRoll::end_draw ( ) [protected, virtual]

Called after all the bars have been drawn, this triggers a refresh event to draw it to the window.

Reimplemented from PStatPianoRoll.

Definition at line 202 of file winStatsPianoRoll.cxx.

void WinStatsPianoRoll::force_redraw ( ) [virtual]

Called when it is necessary to redraw the entire graph.

Reimplemented from PStatPianoRoll.

Definition at line 80 of file winStatsPianoRoll.cxx.

References WinStatsGraph::force_redraw().

void WinStatsPianoRoll::idle ( ) [protected, virtual]

Called at the end of the draw cycle.

Reimplemented from PStatPianoRoll.

Definition at line 212 of file winStatsPianoRoll.cxx.

void WinStatsPianoRoll::new_data ( int  thread_index,
int  frame_number 
) [virtual]

Called as each frame's data is made available.

There is no gurantee the frames will arrive in order, or that all of them will arrive at all. The monitor should be prepared to accept frames received out-of-order or missing.

Reimplemented from WinStatsGraph.

Definition at line 68 of file winStatsPianoRoll.cxx.

void WinStatsPianoRoll::set_horizontal_scale ( double  time_width)

Changes the amount of time the width of the horizontal axis represents.

This may force a redraw.

Reimplemented from PStatPianoRoll.

Definition at line 137 of file winStatsPianoRoll.cxx.

References PStatPianoRoll::set_horizontal_scale().

void WinStatsPianoRoll::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 from WinStatsGraph.

Definition at line 104 of file winStatsPianoRoll.cxx.

Referenced by WinStatsMonitor::open_piano_roll().

LONG WinStatsPianoRoll::window_proc ( HWND  hwnd,
UINT  msg,
WPARAM  wparam,
LPARAM  lparam 
) [protected]

This window_proc should be called up to by the derived classes for any messages that are not specifically handled by the derived class.

Reimplemented from WinStatsGraph.

Definition at line 224 of file winStatsPianoRoll.cxx.

References WinStatsGraph::set_drag_mode(), and WinStatsGraph::window_proc().


The documentation for this class was generated from the following files:
 All Classes Functions Variables Enumerations