Panda3D
Public Member Functions

WinStatsLabelStack Class Reference

A window that contains a stack of labels from bottom to top. More...

#include "winStatsLabelStack.h"

List of all members.

Public Member Functions

int add_label (WinStatsMonitor *monitor, WinStatsGraph *graph, int thread_index, int collector_index, bool use_fullname)
 Adds a new label to the top of the stack; returns the new label index.
void clear_labels ()
 Removes the set of labels and starts a new set.
int get_height () const
 Returns the height of the stack as we requested it.
int get_ideal_width () const
 Returns the width the stack would really prefer to be.
int get_label_collector_index (int label_index) const
 Returns the collector index associated with the indicated label.
int get_label_height (int label_index) const
 Returns the height of the indicated label.
int get_label_y (int label_index) const
 Returns the y position of the indicated label's bottom edge, relative to the label stack's parent window.
int get_num_labels () const
 Returns the number of labels in the stack.
int get_width () const
 Returns the width of the stack as we requested it.
int get_x () const
 Returns the x position of the stack on its parent.
int get_y () const
 Returns the y position of the stack on its parent.
void highlight_label (int collector_index)
 Draws a highlight around the label representing the indicated collector, and removes the highlight from any other label.
bool is_setup () const
 Returns true if the label stack has been set up, false otherwise.
void set_pos (int x, int y, int width, int height)
 Sets the position and size of the label stack on its parent.
void setup (HWND parent_window)
 Creates the actual window object.

Detailed Description

A window that contains a stack of labels from bottom to top.

Definition at line 32 of file winStatsLabelStack.h.


Member Function Documentation

int WinStatsLabelStack::add_label ( WinStatsMonitor monitor,
WinStatsGraph graph,
int  thread_index,
int  collector_index,
bool  use_fullname 
)

Adds a new label to the top of the stack; returns the new label index.

Definition at line 216 of file winStatsLabelStack.cxx.

References WinStatsLabel::get_height(), WinStatsLabel::get_ideal_width(), WinStatsLabel::get_y(), WinStatsLabel::set_pos(), and WinStatsLabel::setup().

Referenced by WinStatsStripChart::update_labels().

void WinStatsLabelStack::clear_labels ( )

Removes the set of labels and starts a new set.

Definition at line 200 of file winStatsLabelStack.cxx.

Referenced by WinStatsStripChart::update_labels().

int WinStatsLabelStack::get_height ( ) const

Returns the height of the stack as we requested it.

Definition at line 145 of file winStatsLabelStack.cxx.

int WinStatsLabelStack::get_ideal_width ( ) const

Returns the width the stack would really prefer to be.

Definition at line 155 of file winStatsLabelStack.cxx.

int WinStatsLabelStack::get_label_collector_index ( int  label_index) const

Returns the collector index associated with the indicated label.

Definition at line 189 of file winStatsLabelStack.cxx.

int WinStatsLabelStack::get_label_height ( int  label_index) const

Returns the height of the indicated label.

Definition at line 177 of file winStatsLabelStack.cxx.

int WinStatsLabelStack::get_label_y ( int  label_index) const

Returns the y position of the indicated label's bottom edge, relative to the label stack's parent window.

Definition at line 166 of file winStatsLabelStack.cxx.

References get_y().

int WinStatsLabelStack::get_num_labels ( ) const

Returns the number of labels in the stack.

Definition at line 243 of file winStatsLabelStack.cxx.

int WinStatsLabelStack::get_width ( ) const

Returns the width of the stack as we requested it.

Definition at line 135 of file winStatsLabelStack.cxx.

int WinStatsLabelStack::get_x ( ) const

Returns the x position of the stack on its parent.

Definition at line 115 of file winStatsLabelStack.cxx.

int WinStatsLabelStack::get_y ( ) const

Returns the y position of the stack on its parent.

Definition at line 125 of file winStatsLabelStack.cxx.

Referenced by get_label_y().

void WinStatsLabelStack::highlight_label ( int  collector_index)

Draws a highlight around the label representing the indicated collector, and removes the highlight from any other label.

Specify -1 to remove the highlight from all labels.

Definition at line 256 of file winStatsLabelStack.cxx.

References WinStatsLabel::get_collector_index(), and WinStatsLabel::set_highlight().

bool WinStatsLabelStack::is_setup ( ) const

Returns true if the label stack has been set up, false otherwise.

Definition at line 82 of file winStatsLabelStack.cxx.

Referenced by WinStatsGraph::move_label_stack().

void WinStatsLabelStack::set_pos ( int  x,
int  y,
int  width,
int  height 
)

Sets the position and size of the label stack on its parent.

Definition at line 92 of file winStatsLabelStack.cxx.

References WinStatsLabel::get_height(), and WinStatsLabel::set_pos().

Referenced by WinStatsGraph::move_label_stack().

void WinStatsLabelStack::setup ( HWND  parent_window)

Creates the actual window object.

Definition at line 58 of file winStatsLabelStack.cxx.

References WinStatsLabel::get_ideal_width(), and WinStatsLabel::setup().

Referenced by WinStatsGraph::setup_label_stack().


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