Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

ObjCryst::WXMultiGraph Class Reference

Inheritance diagram for ObjCryst::WXMultiGraph:

Inheritance graph
[legend]
List of all members.

Public Member Functions

 WXMultiGraph (wxFrame *frame)
virtual ~WXMultiGraph ()
void OnPaint (wxPaintEvent &event)
void OnMouse (wxMouseEvent &event)
void OnMouseWheel (wxMouseEvent &event)
void OnKeyDown (wxKeyEvent &event)
unsigned long AddGraph (const std::string &name)
 Add a graph.

void SetGraphData (const unsigned long id, const std::valarray< float > &vx, const std::valarray< float > &vy)
 Set data for a given graph.

virtual void DeleteGraph (const unsigned long id)
 Remove graph.

void AutoScale (const long id=-1, const bool xmin=true, const bool xmax=true, const bool ymin=true, const bool ymax=true)
 Auto-scale graph, i.e.

void OnUpdateUI (wxUpdateUIEvent &event)
void OnSize (wxSizeEvent &event)
virtual void UpdateDisplay ()

Private Member Functions

void Data2Screen (float &x, float &y)
 Convert data to screen (pixel) coordinates.

void Screen2Data (float &x, float &y)
 Convert screen (pixel) to data coordinates.


Private Attributes

std::map< unsigned long, GraphDatamvData
float mMinX
 The current min & max values along x and y.

float mMaxX
 The current min & max values along x and y.

float mMinY
 The current min & max values along x and y.

float mMaxY
 The current min & max values along x and y.

long mLeft
 The margins in pixels around the graph.

long mRight
 The margins in pixels around the graph.

long mTop
 The margins in pixels around the graph.

long mBottom
 The margins in pixels around the graph.

wxMenu * mpPopUpMenu
 Pop-up menu.

bool mIsDragging
 Are we within a dragging event ?

float mDragX0
 dragging origin (in reduced coordinates)

float mDragY0
 dragging origin (in reduced coordinates)

CrystMutex mMutexData
 Mutex for the data.

wxFrame * mpParentFrame
 parent frame


Constructor & Destructor Documentation

ObjCryst::WXMultiGraph::WXMultiGraph wxFrame *  frame  ) 
 

virtual ObjCryst::WXMultiGraph::~WXMultiGraph  )  [virtual]
 


Member Function Documentation

unsigned long ObjCryst::WXMultiGraph::AddGraph const std::string &  name  ) 
 

Add a graph.

This returns an ID identifying the graph

void ObjCryst::WXMultiGraph::AutoScale const long  id = -1,
const bool  xmin = true,
const bool  xmax = true,
const bool  ymin = true,
const bool  ymax = true
 

Auto-scale graph, i.e.

bring min& max along both axes to the min&max of a given graph. However

void ObjCryst::WXMultiGraph::Data2Screen float &  x,
float &  y
[private]
 

Convert data to screen (pixel) coordinates.

virtual void ObjCryst::WXMultiGraph::DeleteGraph const unsigned long  id  )  [virtual]
 

Remove graph.

Reimplemented in ObjCryst::WXTrackerGraph.

void ObjCryst::WXMultiGraph::OnKeyDown wxKeyEvent &  event  ) 
 

void ObjCryst::WXMultiGraph::OnMouse wxMouseEvent &  event  ) 
 

void ObjCryst::WXMultiGraph::OnMouseWheel wxMouseEvent &  event  ) 
 

void ObjCryst::WXMultiGraph::OnPaint wxPaintEvent &  event  ) 
 

void ObjCryst::WXMultiGraph::OnSize wxSizeEvent &  event  ) 
 

void ObjCryst::WXMultiGraph::OnUpdateUI wxUpdateUIEvent &  event  ) 
 

void ObjCryst::WXMultiGraph::Screen2Data float &  x,
float &  y
[private]
 

Convert screen (pixel) to data coordinates.

void ObjCryst::WXMultiGraph::SetGraphData const unsigned long  id,
const std::valarray< float > &  vx,
const std::valarray< float > &  vy
 

Set data for a given graph.

The two arrays must have the same number of elements

virtual void ObjCryst::WXMultiGraph::UpdateDisplay  )  [virtual]
 

Reimplemented in ObjCryst::WXTrackerGraph.


Member Data Documentation

long ObjCryst::WXMultiGraph::mBottom [private]
 

The margins in pixels around the graph.

float ObjCryst::WXMultiGraph::mDragX0 [private]
 

dragging origin (in reduced coordinates)

float ObjCryst::WXMultiGraph::mDragY0 [private]
 

dragging origin (in reduced coordinates)

bool ObjCryst::WXMultiGraph::mIsDragging [private]
 

Are we within a dragging event ?

long ObjCryst::WXMultiGraph::mLeft [private]
 

The margins in pixels around the graph.

float ObjCryst::WXMultiGraph::mMaxX [private]
 

The current min & max values along x and y.

float ObjCryst::WXMultiGraph::mMaxY [private]
 

The current min & max values along x and y.

float ObjCryst::WXMultiGraph::mMinX [private]
 

The current min & max values along x and y.

float ObjCryst::WXMultiGraph::mMinY [private]
 

The current min & max values along x and y.

CrystMutex ObjCryst::WXMultiGraph::mMutexData [private]
 

Mutex for the data.

wxFrame* ObjCryst::WXMultiGraph::mpParentFrame [private]
 

parent frame

wxMenu* ObjCryst::WXMultiGraph::mpPopUpMenu [private]
 

Pop-up menu.

long ObjCryst::WXMultiGraph::mRight [private]
 

The margins in pixels around the graph.

long ObjCryst::WXMultiGraph::mTop [private]
 

The margins in pixels around the graph.

std::map<unsigned long, GraphData> ObjCryst::WXMultiGraph::mvData [private]
 


The documentation for this class was generated from the following file:
Generated on Tue Nov 14 15:07:25 2006 for ObjCryst++ by doxygen 1.3.6