Panda3D
Loading...
Searching...
No Matches
Public Member Functions | List of all members
WinStatsLabelStack Class Reference

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

#include "winStatsLabelStack.h"

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.

Constructor & Destructor Documentation

◆ WinStatsLabelStack()

WinStatsLabelStack::WinStatsLabelStack ( )

Definition at line 24 of file winStatsLabelStack.cxx.

◆ ~WinStatsLabelStack()

WinStatsLabelStack::~WinStatsLabelStack ( )

Definition at line 38 of file winStatsLabelStack.cxx.

Member Function Documentation

◆ add_label()

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 181 of file winStatsLabelStack.cxx.

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

◆ clear_labels()

void WinStatsLabelStack::clear_labels ( )

Removes the set of labels and starts a new set.

Definition at line 168 of file winStatsLabelStack.cxx.

◆ get_height()

int WinStatsLabelStack::get_height ( ) const

Returns the height of the stack as we requested it.

Definition at line 124 of file winStatsLabelStack.cxx.

◆ get_ideal_width()

int WinStatsLabelStack::get_ideal_width ( ) const

Returns the width the stack would really prefer to be.

Definition at line 132 of file winStatsLabelStack.cxx.

◆ get_label_collector_index()

int WinStatsLabelStack::get_label_collector_index ( int label_index) const

Returns the collector index associated with the indicated label.

Definition at line 159 of file winStatsLabelStack.cxx.

◆ get_label_height()

int WinStatsLabelStack::get_label_height ( int label_index) const

Returns the height of the indicated label.

Definition at line 150 of file winStatsLabelStack.cxx.

◆ get_label_y()

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 141 of file winStatsLabelStack.cxx.

References get_y().

◆ get_num_labels()

int WinStatsLabelStack::get_num_labels ( ) const

Returns the number of labels in the stack.

Definition at line 206 of file winStatsLabelStack.cxx.

◆ get_width()

int WinStatsLabelStack::get_width ( ) const

Returns the width of the stack as we requested it.

Definition at line 116 of file winStatsLabelStack.cxx.

◆ get_x()

int WinStatsLabelStack::get_x ( ) const

Returns the x position of the stack on its parent.

Definition at line 100 of file winStatsLabelStack.cxx.

◆ get_y()

int WinStatsLabelStack::get_y ( ) const

Returns the y position of the stack on its parent.

Definition at line 108 of file winStatsLabelStack.cxx.

Referenced by get_label_y().

◆ highlight_label()

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 216 of file winStatsLabelStack.cxx.

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

◆ is_setup()

bool WinStatsLabelStack::is_setup ( ) const

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

Definition at line 71 of file winStatsLabelStack.cxx.

◆ set_pos()

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 79 of file winStatsLabelStack.cxx.

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

◆ setup()

void WinStatsLabelStack::setup ( HWND parent_window)

Creates the actual window object.

Definition at line 50 of file winStatsLabelStack.cxx.

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


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