Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

GtkStatsLabel Class Reference

A text label that will draw in color appropriate for a particular collector, instead of referring to some dumb Gtk::Style. More...

#include <gtkStatsLabel.h>

List of all members.

Public Member Functions

 GtkStatsLabel (PStatMonitor *monitor, int collector_index, Gdk_Font font)
 This constructor automatically figures out the appropriate name and color for the label.

int get_width () const
 Returns the width of the widget as we requested it.

int get_height () const
 Returns the height of the widget as we requested it.


Public Attributes

SigC::Signal1< void, intcollector_picked

Private Member Functions

virtual gint configure_event_impl (GdkEventConfigure *event)
 Creates a new backing pixmap of the appropriate size.

virtual gint expose_event_impl (GdkEventExpose *event)
 Redraw the text.

virtual gint button_press_event_impl (GdkEventButton *button)

Private Attributes

int _collector_index
string _text
Gdk_Font _font
Gdk_Color _fg_color
Gdk_Color _bg_color
int _width
int _height
Gdk_GC _gc
Gdk_GC _reverse_gc


Detailed Description

A text label that will draw in color appropriate for a particular collector, instead of referring to some dumb Gtk::Style.

It also throws a signal when the user double-clicks on it, passing in the collector index. This is handy for putting colored labels on strip charts.

Definition at line 48 of file gtkStatsLabel.h.


Constructor & Destructor Documentation

GtkStatsLabel::GtkStatsLabel PStatMonitor monitor,
int  collector_index,
Gdk_Font  font
 

This constructor automatically figures out the appropriate name and color for the label.

Definition at line 39 of file gtkStatsLabel.cxx.

References RGBColorf.


Member Function Documentation

gint GtkStatsLabel::button_press_event_impl GdkEventButton *  button  )  [private, virtual]
 

Definition at line 159 of file gtkStatsLabel.cxx.

gint GtkStatsLabel::configure_event_impl GdkEventConfigure *  event  )  [private, virtual]
 

Creates a new backing pixmap of the appropriate size.

Definition at line 109 of file gtkStatsLabel.cxx.

References _font, _gc, _reverse_gc, _text, height, and width.

gint GtkStatsLabel::expose_event_impl GdkEventExpose *  event  )  [private, virtual]
 

Redraw the text.

We don't bother with clipping regions here, but just draw the whole text every time.

Definition at line 138 of file gtkStatsLabel.cxx.

int GtkStatsLabel::get_height  )  const
 

Returns the height of the widget as we requested it.

Definition at line 96 of file gtkStatsLabel.cxx.

References _gc, and _reverse_gc.

int GtkStatsLabel::get_width void   )  const
 

Returns the width of the widget as we requested it.

Definition at line 83 of file gtkStatsLabel.cxx.

References _height.


Member Data Documentation

Gdk_Color GtkStatsLabel::_bg_color [private]
 

Definition at line 69 of file gtkStatsLabel.h.

int GtkStatsLabel::_collector_index [private]
 

Definition at line 64 of file gtkStatsLabel.h.

Gdk_Color GtkStatsLabel::_fg_color [private]
 

Definition at line 68 of file gtkStatsLabel.h.

Gdk_Font GtkStatsLabel::_font [private]
 

Definition at line 67 of file gtkStatsLabel.h.

Referenced by configure_event_impl().

Gdk_GC GtkStatsLabel::_gc [private]
 

Definition at line 74 of file gtkStatsLabel.h.

Referenced by configure_event_impl(), and get_height().

int GtkStatsLabel::_height [private]
 

Definition at line 72 of file gtkStatsLabel.h.

Referenced by get_width().

Gdk_GC GtkStatsLabel::_reverse_gc [private]
 

Definition at line 75 of file gtkStatsLabel.h.

Referenced by configure_event_impl(), and get_height().

string GtkStatsLabel::_text [private]
 

Definition at line 66 of file gtkStatsLabel.h.

Referenced by configure_event_impl().

int GtkStatsLabel::_width [private]
 

Definition at line 71 of file gtkStatsLabel.h.

SigC::Signal1<void, int> GtkStatsLabel::collector_picked
 

Definition at line 56 of file gtkStatsLabel.h.


The documentation for this class was generated from the following files:
Generated on Fri May 2 03:27:10 2003 for Panda-Tool by doxygen1.3