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

GtkStatsStripWindow Class Reference

A window that contains your basic one-thread, one-level strip chart. More...

#include <gtkStatsStripWindow.h>

Inheritance diagram for GtkStatsStripWindow:

GtkStatsWindow BasicGtkWindow List of all members.

Public Member Functions

 GtkStatsStripWindow (GtkStatsMonitor *monitor, int thread_index, int collector_index, bool show_level, int chart_xsize, int chart_ysize)
virtual void mark_dead ()
 Called when the client's connection has been lost, this should update the window in some obvious way to indicate that the window is no longer live.

virtual void new_collector ()
 Called when a new collector has become known.

virtual void idle ()
virtual bool destruct ()
 Call this to remove the window, etc.

virtual void update_title ()
 Sets the title bar appropriately, once the client's information is known.

void setup ()
 Call this after initializing the window.


Protected Member Functions

virtual void setup_menu ()
void setup_scale_menu ()
 Sets up the options on the scale menu.

virtual void menu_new_window ()
void menu_hscale (float wpm)
 Selects a new horizontal scale for the strip chart.

void menu_vscale (float max_height)
 Selects a new vertical scale for the strip chart.

void menu_auto_vscale ()
 Selects a suitable vertical scale based on the data already visible in the chart.

void menu_show_levels (int collector_index)
 Shows the level values known for the indicated collector.

void open_subchart (int collector_index)
 This is called in response to the collector_picked signal from the strip chart, which is generated when the user double-clicks on a band of color or a label.

void menu_open_strip_chart ()
 Open up a new strip-chart style window for the main thread.

void menu_open_piano_roll ()
 Open up a new piano-roll style window for the main thread.

void menu_close_window ()
void menu_close_all_windows ()
void menu_disconnect ()
void delete_self ()

Static Protected Member Functions

gint static_delete (BasicGtkWindow *window)

Protected Attributes

PointerTo< GtkStatsMonitor_monitor
Gtk::VBox * _main_box
Gtk::MenuBar * _menu
Gtk::Menu * _file_menu

Private Member Functions

void layout_window (int chart_xsize, int chart_ysize)
string get_title_text ()
 Returns the text suitable for the title label on the top line.


Private Attributes

int _thread_index
int _collector_index
bool _show_level
bool _title_unknown
bool _setup_scale_menu
Gtk::Label * _title_label
Gtk::Label * _frame_rate_label
GtkStatsStripChart_chart
Gtk::Menu * _scale_menu
Gtk::Menu * _levels_menu

Detailed Description

A window that contains your basic one-thread, one-level strip chart.

Definition at line 41 of file gtkStatsStripWindow.h.


Constructor & Destructor Documentation

GtkStatsStripWindow::GtkStatsStripWindow GtkStatsMonitor monitor,
int  thread_index,
int  collector_index,
bool  show_level,
int  chart_xsize,
int  chart_ysize
 

Definition at line 43 of file gtkStatsStripWindow.cxx.

References _setup_scale_menu, _title_unknown, layout_window(), new_collector(), and setup_menu().

Referenced by menu_hscale().


Member Function Documentation

void BasicGtkWindow::delete_self  )  [protected, inherited]
 

Definition at line 133 of file basicGtkWindow.cxx.

References BasicGtkWindow::_state, and BasicGtkWindow::S_ready.

bool GtkStatsWindow::destruct  )  [virtual, inherited]
 

Call this to remove the window, etc.

It's not tied directly to the real destructor because that seems to just lead to trouble. This returns true if it actually destructed, or false if it had already destructed previously and did nothing this time.

Reimplemented from BasicGtkWindow.

Definition at line 58 of file gtkStatsWindow.cxx.

Referenced by GtkStatsMonitor::GtkStatsMonitor(), and GtkStatsWindow::menu_open_strip_chart().

string GtkStatsStripWindow::get_title_text  )  [private]
 

Returns the text suitable for the title label on the top line.

Definition at line 476 of file gtkStatsStripWindow.cxx.

void GtkStatsStripWindow::idle  )  [virtual]
 

Reimplemented from GtkStatsWindow.

Definition at line 149 of file gtkStatsStripWindow.cxx.

References menu_hscale(), and GtkStatsWindow::setup_menu().

void GtkStatsStripWindow::layout_window int  chart_xsize,
int  chart_ysize
[private]
 

Definition at line 407 of file gtkStatsStripWindow.cxx.

References _collector_index, PStatCollectorDef::_level_units, GtkStatsWindow::_monitor, PStatCollectorDef::_name, _thread_index, _title_unknown, PStatClientData::get_collector_def(), PStatClientData::get_thread_name(), PStatClientData::has_collector(), and PStatClientData::has_thread().

Referenced by GtkStatsStripWindow().

void GtkStatsStripWindow::mark_dead  )  [virtual]
 

Called when the client's connection has been lost, this should update the window in some obvious way to indicate that the window is no longer live.

Reimplemented from GtkStatsWindow.

Definition at line 75 of file gtkStatsStripWindow.cxx.

References GtkStatsWindow::_monitor, PStatClientData::get_collector_def(), PStatClientData::get_collector_has_level(), PStatClientData::get_num_collectors(), and PStatClientData::has_collector().

void GtkStatsStripWindow::menu_auto_vscale  )  [protected]
 

Selects a suitable vertical scale based on the data already visible in the chart.

Definition at line 353 of file gtkStatsStripWindow.cxx.

References _collector_index, _thread_index, and _title_label.

void GtkStatsWindow::menu_close_all_windows  )  [protected, inherited]
 

Definition at line 236 of file gtkStatsWindow.cxx.

void GtkStatsWindow::menu_close_window  )  [protected, inherited]
 

Definition at line 224 of file gtkStatsWindow.cxx.

void GtkStatsWindow::menu_disconnect  )  [protected, inherited]
 

Definition at line 248 of file gtkStatsWindow.cxx.

void GtkStatsStripWindow::menu_hscale float  wpm  )  [protected]
 

Selects a new horizontal scale for the strip chart.

This is done from the menu called "Speed", since changing the horizontal scale most obviously affects the scrolling speed.

The units is in chart width per minute.

Definition at line 317 of file gtkStatsStripWindow.cxx.

References _chart, GtkStatsWindow::_monitor, _thread_index, PStatGraph::get_xsize(), PStatGraph::get_ysize(), and GtkStatsStripWindow().

Referenced by idle().

void GtkStatsStripWindow::menu_new_window  )  [protected, virtual]
 

Reimplemented from GtkStatsWindow.

Definition at line 292 of file gtkStatsStripWindow.cxx.

References _chart, and PStatStripChart::set_vertical_scale().

void GtkStatsWindow::menu_open_piano_roll  )  [protected, inherited]
 

Open up a new piano-roll style window for the main thread.

Definition at line 201 of file gtkStatsWindow.cxx.

References GtkStatsWindow::_monitor.

Referenced by GtkStatsWindow::new_collector().

void GtkStatsWindow::menu_open_strip_chart  )  [protected, inherited]
 

Open up a new strip-chart style window for the main thread.

Definition at line 186 of file gtkStatsWindow.cxx.

References GtkStatsWindow::destruct().

Referenced by GtkStatsWindow::new_collector().

void GtkStatsStripWindow::menu_show_levels int  collector_index  )  [protected]
 

Shows the level values known for the indicated collector.

Definition at line 368 of file gtkStatsStripWindow.cxx.

References _collector_index, and _frame_rate_label.

void GtkStatsStripWindow::menu_vscale float  max_height  )  [protected]
 

Selects a new vertical scale for the strip chart.

This is done from the menu called "Scale".

The units is in seconds, or whatever the units of choice are.

Definition at line 338 of file gtkStatsStripWindow.cxx.

void GtkStatsStripWindow::new_collector  )  [virtual]
 

Called when a new collector has become known.

For the GtkStatsStripWindow, this forces a rebuild of the menu that selects the collectors available for picking levels.

Reimplemented from GtkStatsWindow.

Definition at line 97 of file gtkStatsStripWindow.cxx.

References PStatCollectorDef::_parent_index, and PStatClientData::get_collector_def().

Referenced by GtkStatsStripWindow().

void GtkStatsStripWindow::open_subchart int  collector_index  )  [protected]
 

This is called in response to the collector_picked signal from the strip chart, which is generated when the user double-clicks on a band of color or a label.

This opens up a new window focusing just on the indicated collector.

Definition at line 393 of file gtkStatsStripWindow.cxx.

References _chart.

void BasicGtkWindow::setup  )  [inherited]
 

Call this after initializing the window.

Definition at line 69 of file basicGtkWindow.cxx.

References BasicGtkWindow::_destroyed, GtkBase::_gtk, BasicGtkWindow::_state, BasicGtkWindow::S_gone, and BasicGtkWindow::S_virgin.

void GtkStatsStripWindow::setup_menu  )  [protected, virtual]
 

Reimplemented from GtkStatsWindow.

Definition at line 174 of file gtkStatsStripWindow.cxx.

References _levels_menu, GtkStatsWindow::_menu, and _scale_menu.

Referenced by GtkStatsStripWindow().

void GtkStatsStripWindow::setup_scale_menu  )  [protected]
 

Sets up the options on the scale menu.

We can't do this until we have initialized the _chart member and we have gotten our first collector_index.

Definition at line 223 of file gtkStatsStripWindow.cxx.

gint BasicGtkWindow::static_delete BasicGtkWindow window  )  [static, protected, inherited]
 

void GtkStatsWindow::update_title  )  [virtual, inherited]
 

Sets the title bar appropriately, once the client's information is known.

Definition at line 78 of file gtkStatsWindow.cxx.


Member Data Documentation

GtkStatsStripChart* GtkStatsStripWindow::_chart [private]
 

Definition at line 74 of file gtkStatsStripWindow.h.

Referenced by menu_hscale(), menu_new_window(), and open_subchart().

int GtkStatsStripWindow::_collector_index [private]
 

Definition at line 67 of file gtkStatsStripWindow.h.

Referenced by layout_window(), menu_auto_vscale(), and menu_show_levels().

Gtk::Menu* GtkStatsWindow::_file_menu [protected, inherited]
 

Definition at line 75 of file gtkStatsWindow.h.

Referenced by GtkStatsWindow::idle(), GtkStatsWindow::new_collector(), and GtkStatsWindow::setup_menu().

Gtk::Label* GtkStatsStripWindow::_frame_rate_label [private]
 

Definition at line 73 of file gtkStatsStripWindow.h.

Referenced by menu_show_levels().

Gtk::Menu* GtkStatsStripWindow::_levels_menu [private]
 

Definition at line 77 of file gtkStatsStripWindow.h.

Referenced by setup_menu().

Gtk::VBox* GtkStatsWindow::_main_box [protected, inherited]
 

Definition at line 73 of file gtkStatsWindow.h.

Referenced by GtkStatsWindow::GtkStatsWindow(), and GtkStatsWindow::setup_menu().

Gtk::MenuBar* GtkStatsWindow::_menu [protected, inherited]
 

Definition at line 74 of file gtkStatsWindow.h.

Referenced by GtkStatsWindow::GtkStatsWindow(), GtkStatsWindow::setup_menu(), setup_menu(), and GtkStatsPianoWindow::setup_menu().

PointerTo< GtkStatsMonitor > GtkStatsWindow::_monitor [protected, inherited]
 

Definition at line 71 of file gtkStatsWindow.h.

Referenced by layout_window(), GtkStatsWindow::mark_dead(), mark_dead(), menu_hscale(), and GtkStatsWindow::menu_open_piano_roll().

Gtk::Menu* GtkStatsStripWindow::_scale_menu [private]
 

Definition at line 76 of file gtkStatsStripWindow.h.

Referenced by setup_menu().

bool GtkStatsStripWindow::_setup_scale_menu [private]
 

Definition at line 70 of file gtkStatsStripWindow.h.

Referenced by GtkStatsStripWindow().

bool GtkStatsStripWindow::_show_level [private]
 

Definition at line 68 of file gtkStatsStripWindow.h.

int GtkStatsStripWindow::_thread_index [private]
 

Definition at line 66 of file gtkStatsStripWindow.h.

Referenced by layout_window(), menu_auto_vscale(), and menu_hscale().

Gtk::Label* GtkStatsStripWindow::_title_label [private]
 

Definition at line 72 of file gtkStatsStripWindow.h.

Referenced by menu_auto_vscale().

bool GtkStatsStripWindow::_title_unknown [private]
 

Definition at line 69 of file gtkStatsStripWindow.h.

Referenced by GtkStatsStripWindow(), and layout_window().


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