|
FOX/ObjCryst++
1.10.X (development)
|
Inheritance diagram for ObjCryst::WXMultiGraph:
Collaboration diagram for ObjCryst::WXMultiGraph:Classes | |
| struct | GraphData |
Public Member Functions | |
| WXMultiGraph (wxFrame *frame) | |
| 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. More... | |
| void | SetGraphData (const unsigned long id, const std::valarray< float > &vx, const std::valarray< float > &vy) |
| Set data for a given graph. More... | |
| 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. More... | |
| void | OnUpdateUI (wxUpdateUIEvent &event) |
| void | OnSize (wxSizeEvent &event) |
| void | SetXLabel (const wxString &xlabel) |
| void | SetYLabel (const wxString &ylabel) |
| 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, GraphData > | mvData |
| float | mMinX |
| The current min & max values along x and y. | |
| float | mMaxX |
| float | mMinY |
| float | mMaxY |
| long | mLeft |
| The margins in pixels around the graph. | |
| long | mRight |
| long | mTop |
| long | mBottom |
| wxMenu * | mpPopUpMenu |
| Pop-up menu. | |
| bool | mIsDragging |
| Are we within a dragging event ? | |
| float | mDragX0 |
| dragging origin (in reduced coordinates) | |
| float | mDragY0 |
| CrystMutex | mMutexData |
| Mutex for the data. | |
| wxFrame * | mpParentFrame |
| parent frame | |
| wxString | mXLabel |
| X label. | |
| wxString | mYLabel |
| Y label. | |
Definition at line 53 of file wxMultiGraph.h.
| unsigned long ObjCryst::WXMultiGraph::AddGraph | ( | const std::string & | name | ) |
Add a graph.
This returns an ID identifying the graph
Definition at line 150 of file wxMultiGraph.cpp.
| 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
Definition at line 421 of file wxMultiGraph.cpp.
| 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
Definition at line 165 of file wxMultiGraph.cpp.