Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Class Members | File Members

TGraphDisplay Class Reference

The display class, containing graphs and scales; essentially, a "tab". More...

#include <TGraph.h>

List of all members.

Public Member Functions

 TGraphDisplay (wxWindow *parent, int id=-1)
 Constructor.
 ~TGraphDisplay ()
 Destructor.
void init ()
 Initialization.
stringField readTextfile (wxString filename)
 Converts a CSV file into s stringField.
unsigned char * readRawData (wxString filename, long &l)
 Reads raw binary data.
void setupPhotometerGraph (const stringField &sf)
 Reads CSV-based photometer data.
void setupFluorimeterGraph (const stringField &sf)
 Reads CSV-based fluorimeter data.
void setupXYpair (const stringField &sf)
 Reads plain XY-pair CSV data.
void setupIPCfile (wxString filename)
 Reads IPC data.
void setupRawFPLC (wxString filenamebase)
 EXPERIMENTAL Reads raw BioRad FPLC data.
void setupBioFormat (wxString filenamebase)
 EXPERIMENTAL Reads BIO FPLC format.
void setupBioCSVFormat (const stringField &sf)
 EXPERIMENTAL Reads BIO CSV FPLC format.
void setupDUF (wxString filenamebase)
 Reads Beckman DUF format.
void addNewGraph (const stringField &sf, wxString title, TGraphScale *sx, TGraphScale *sy, int startrow=0)
 Adds a TGraphData.
void addRawData (unsigned char *d, long l, wxString title)
void addRawData2 (unsigned char *d, long l, wxString title)
wxString tryall (wxString filename)
 Tries all formats, pre-selects the "best fit".
void SetupDummy ()
 For testing only.
bool SetupFromFile (wxString filename)
 Calls tryall, display dialog, eventually opens file.
void SetZoom (int _zx, int _zy)
 Sets the zoom factor.
void UpdateDisplay ()
 Refresh.
void AutoScale ()
 Adjusts the scales to fit the graphs.
void drawit (wxDC &dc, int mode=GRAPH_DRAW_ALL)
 Draws the graphs and scales in the device context.
void showLegend (wxDC &dc)
 Draws the legend.
void showMiniature (wxDC &dc)
 Draws the miniature preview (in zoomed mode).
void showDraggingRect (wxDC &dc)
virtual void OnCharHook (wxKeyEvent &event)
 Key event handler.
virtual void OnPaint (wxPaintEvent &event)
 Paint event handler.
virtual void OnEvent (wxMouseEvent &event)
 Mouse event handler.
virtual void OnSwapSides (wxCommandEvent &event)
 "Switch scales left/right or top/bottom" event handler
virtual void OnCopyAsImage (wxCommandEvent &event)
 "Copy as image" event handler
virtual void OnSaveAsImage (wxCommandEvent &event)
 "Save as image" event handler

Public Attributes

vector< TGraphScale * > scales
 The scales.
vector< TGraphData * > data
 The graphs (data).
TGraphg
 The calling TGraph.
wxArrayString scaleTypes
wxArrayString colors
wxArrayString styles

Static Public Attributes

static wxColour prettyColor = wxColour ( 0x99 , 0xCC , 0xFF )
 A pretty blue.

Private Member Functions

bool IsSetupComplete ()
 Don't draw before setup is complete (divsion by zero and other ugliness).
void DrawIntoBitmap (wxBitmap &bmp)
 Draws the current display into a wxBitmap instead of the display (for copying and saving).

Private Attributes

bool setupCompleted
 Is setup complete?
TGraphScaleold_scale
 The last scale.
TGraphDataold_data
 The last graph.
wxRect inner
 The place where the data is drawn.
wxRect lr
 The legend rectangle.
int zx
int zy
wxPoint mouse_pos
wxRect draggingRect


Detailed Description

The display class, containing graphs and scales; essentially, a "tab".


Constructor & Destructor Documentation

TGraphDisplay::TGraphDisplay wxWindow *  parent,
int  id = -1
 

Constructor.

TGraphDisplay::~TGraphDisplay  ) 
 

Destructor.


Member Function Documentation

void TGraphDisplay::addNewGraph const stringField sf,
wxString  title,
TGraphScale sx,
TGraphScale sy,
int  startrow = 0
 

Adds a TGraphData.

void TGraphDisplay::addRawData unsigned char *  d,
long  l,
wxString  title
 

void TGraphDisplay::addRawData2 unsigned char *  d,
long  l,
wxString  title
 

void TGraphDisplay::AutoScale  ) 
 

Adjusts the scales to fit the graphs.

void TGraphDisplay::DrawIntoBitmap wxBitmap &  bmp  )  [private]
 

Draws the current display into a wxBitmap instead of the display (for copying and saving).

void TGraphDisplay::drawit wxDC &  dc,
int  mode = GRAPH_DRAW_ALL
 

Draws the graphs and scales in the device context.

void TGraphDisplay::init  ) 
 

Initialization.

bool TGraphDisplay::IsSetupComplete  )  [private]
 

Don't draw before setup is complete (divsion by zero and other ugliness).

void TGraphDisplay::OnCharHook wxKeyEvent &  event  )  [virtual]
 

Key event handler.

void TGraphDisplay::OnCopyAsImage wxCommandEvent &  event  )  [virtual]
 

"Copy as image" event handler

void TGraphDisplay::OnEvent wxMouseEvent &  event  )  [virtual]
 

Mouse event handler.

void TGraphDisplay::OnPaint wxPaintEvent &  event  )  [virtual]
 

Paint event handler.

void TGraphDisplay::OnSaveAsImage wxCommandEvent &  event  )  [virtual]
 

"Save as image" event handler

void TGraphDisplay::OnSwapSides wxCommandEvent &  event  )  [virtual]
 

"Switch scales left/right or top/bottom" event handler

unsigned char * TGraphDisplay::readRawData wxString  filename,
long &  l
 

Reads raw binary data.

stringField TGraphDisplay::readTextfile wxString  filename  ) 
 

Converts a CSV file into s stringField.

void TGraphDisplay::setupBioCSVFormat const stringField sf  ) 
 

EXPERIMENTAL Reads BIO CSV FPLC format.

void TGraphDisplay::setupBioFormat wxString  filenamebase  ) 
 

EXPERIMENTAL Reads BIO FPLC format.

void TGraphDisplay::setupDUF wxString  filenamebase  ) 
 

Reads Beckman DUF format.

void TGraphDisplay::SetupDummy  ) 
 

For testing only.

void TGraphDisplay::setupFluorimeterGraph const stringField sf  ) 
 

Reads CSV-based fluorimeter data.

bool TGraphDisplay::SetupFromFile wxString  filename  ) 
 

Calls tryall, display dialog, eventually opens file.

void TGraphDisplay::setupIPCfile wxString  filename  ) 
 

Reads IPC data.

void TGraphDisplay::setupPhotometerGraph const stringField sf  ) 
 

Reads CSV-based photometer data.

void TGraphDisplay::setupRawFPLC wxString  filenamebase  ) 
 

EXPERIMENTAL Reads raw BioRad FPLC data.

void TGraphDisplay::setupXYpair const stringField sf  ) 
 

Reads plain XY-pair CSV data.

void TGraphDisplay::SetZoom int  _zx,
int  _zy
 

Sets the zoom factor.

void TGraphDisplay::showDraggingRect wxDC &  dc  ) 
 

void TGraphDisplay::showLegend wxDC &  dc  ) 
 

Draws the legend.

void TGraphDisplay::showMiniature wxDC &  dc  ) 
 

Draws the miniature preview (in zoomed mode).

wxString TGraphDisplay::tryall wxString  filename  ) 
 

Tries all formats, pre-selects the "best fit".

void TGraphDisplay::UpdateDisplay  ) 
 

Refresh.


Member Data Documentation

wxArrayString TGraphDisplay::colors
 

vector<TGraphData*> TGraphDisplay::data
 

The graphs (data).

wxRect TGraphDisplay::draggingRect [private]
 

TGraph* TGraphDisplay::g
 

The calling TGraph.

wxRect TGraphDisplay::inner [private]
 

The place where the data is drawn.

wxRect TGraphDisplay::lr [private]
 

The legend rectangle.

wxPoint TGraphDisplay::mouse_pos [private]
 

TGraphData* TGraphDisplay::old_data [private]
 

The last graph.

TGraphScale* TGraphDisplay::old_scale [private]
 

The last scale.

wxColour TGraphDisplay::prettyColor = wxColour ( 0x99 , 0xCC , 0xFF ) [static]
 

A pretty blue.

vector<TGraphScale*> TGraphDisplay::scales
 

The scales.

wxArrayString TGraphDisplay::scaleTypes
 

bool TGraphDisplay::setupCompleted [private]
 

Is setup complete?

wxArrayString TGraphDisplay::styles
 

int TGraphDisplay::zx [private]
 

int TGraphDisplay::zy [private]
 


The documentation for this class was generated from the following files:
Generated on Fri Aug 11 16:19:46 2006 for GENtle by  doxygen 1.4.1