Panda3D
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. More...
 
void clear_labels ()
 Removes the set of labels and starts a new set. More...
 
int get_height () const
 Returns the height of the stack as we requested it. More...
 
int get_ideal_width () const
 Returns the width the stack would really prefer to be. More...
 
int get_label_collector_index (int label_index) const
 Returns the collector index associated with the indicated label. More...
 
int get_label_height (int label_index) const
 Returns the height of the indicated label. More...
 
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. More...
 
int get_num_labels () const
 Returns the number of labels in the stack. More...
 
int get_width () const
 Returns the width of the stack as we requested it. More...
 
int get_x () const
 Returns the x position of the stack on its parent. More...
 
int get_y () const
 Returns the y position of the stack on its parent. More...
 
void highlight_label (int collector_index)
 Draws a highlight around the label representing the indicated collector, and removes the highlight from any other label. More...
 
bool is_setup () const
 Returns true if the label stack has been set up, false otherwise. More...
 
void set_pos (int x, int y, int width, int height)
 Sets the position and size of the label stack on its parent. More...
 
void setup (HWND parent_window)
 Creates the actual window object. More...
 

Detailed Description

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

Definition at line 29 of file winStatsLabelStack.h.

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

◆ get_height()

int WinStatsLabelStack::get_height ( ) const

Returns the height of the stack as we requested it.

Definition at line 125 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 133 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 160 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 151 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 142 of file winStatsLabelStack.cxx.

◆ get_num_labels()

int WinStatsLabelStack::get_num_labels ( ) const

Returns the number of labels in the stack.

Definition at line 207 of file winStatsLabelStack.cxx.

◆ get_width()

int WinStatsLabelStack::get_width ( ) const

Returns the width of the stack as we requested it.

Definition at line 117 of file winStatsLabelStack.cxx.

◆ get_x()

int WinStatsLabelStack::get_x ( ) const

Returns the x position of the stack on its parent.

Definition at line 101 of file winStatsLabelStack.cxx.

◆ get_y()

int WinStatsLabelStack::get_y ( ) const

Returns the y position of the stack on its parent.

Definition at line 109 of file winStatsLabelStack.cxx.

◆ 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 217 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 72 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 80 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 51 of file winStatsLabelStack.cxx.

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


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