3Depict
|
#include <mathglPane.h>
Public Member Functions | |
MathGLPane (wxWindow *parent, int id) | |
virtual | ~MathGLPane () |
void | setVisibleItems (std::vector< bool > &newVisible) |
void | setPlotWrapper (PlotWrapper *plots, bool takeOwnPtr=true) |
std::string | getErrString (unsigned int code) |
void | enableRegionSelfUpdate (bool enable) |
unsigned int | saveSVG (const std::string &filename) |
unsigned int | savePNG (const std::string &filename, unsigned int width, unsigned int height) |
unsigned int | getNumVisible () const |
bool | getRegionUnderCursor (const wxPoint &mousePos, unsigned int &plotId, unsigned int ®ionId) const |
Get the region under the cursor. Returns region num [0->...) or. More... | |
void | getLastEdited (size_t &lastPlot, size_t &lastRegion) const |
void | registerUpdateHandler (wxWindow *w, UpdateHandler handler) |
void | resized (wxSizeEvent &evt) |
void | render (wxPaintEvent &evt) |
void | mouseMoved (wxMouseEvent &event) |
wx Event that triggers on mouse movement on grah More... | |
void | middleMouseDown (wxMouseEvent &event) |
void | leftMouseDown (wxMouseEvent &event) |
void | mouseDoubleLeftClick (wxMouseEvent &event) |
void | mouseDoubleMiddleClick (wxMouseEvent &event) |
void | mouseWheelMoved (wxMouseEvent &event) |
void | leftMouseReleased (wxMouseEvent &event) |
void | middleMouseReleased (wxMouseEvent &event) |
Middle mouse button has been let go. More... | |
void | rightClick (wxMouseEvent &event) |
void | mouseLeftWindow (wxMouseEvent &event) |
void | keyPressed (wxKeyEvent &event) |
void | keyReleased (wxKeyEvent &event) |
void | setPlotVisible (unsigned int plotID, bool visible) |
void | setLegendVisible (bool visible) |
void | limitInteraction (bool doLimit=true) |
MathGLPane::MathGLPane | ( | wxWindow * | parent, |
int | id | ||
) |
References COMPILE_ASSERT, MOUSE_MODE_ENUM_END, PLOT_TEXTURE_ENUM_END, and THREEDEP_ARRAYSIZE.
|
virtual |
|
inline |
References savePNG(), and saveSVG().
Referenced by RangeEditorDialog::RangeEditorDialog().
std::string MathGLPane::getErrString | ( | unsigned int | code | ) |
References ASSERT, AXIS_POSITION_INTERIOR, AXIS_POSITION_LOW_X, AXIS_POSITION_LOW_Y, PlotRegion::bounds, PlotWrapper::findRegionLimit(), PlotRegion::getName(), PlotWrapper::getPlotMode(), PlotWrapper::getRegion(), getRegionUnderCursor(), locateDataFile(), MGLPANE_ERR_BADALLOC, MGLPANE_ERR_MGLWARN, MGLPANE_FILE_REOPEN_FAIL, MGLPANE_FILE_UNSIZED_FAIL, PLOT_MODE_1D, PLOT_TEXTURE_ENUM_END, PLOT_TEXTURE_SLIDE_X, PLOT_TEXTURE_ZOOM_RESET, PLOT_TEXTURE_ZOOM_X, PLOT_TEXTURE_ZOOM_Y, pow10, REGION_MOVE_EXTEND_XMINUS, REGION_MOVE_EXTEND_XPLUS, REGION_MOVE_TRANSLATE_X, stream_cast(), TRANS, and WARN.
|
inline |
|
inline |
References PlotWrapper::getNumVisible(), and getRegionUnderCursor().
Referenced by RangeEditorDialog::setPlotWrapper().
bool MathGLPane::getRegionUnderCursor | ( | const wxPoint & | mousePos, |
unsigned int & | plotId, | ||
unsigned int & | regionId | ||
) | const |
Get the region under the cursor. Returns region num [0->...) or.
References ASSERT, and PlotWrapper::getRegionIdAtPosition().
Referenced by getErrString(), getNumVisible(), and mouseDoubleMiddleClick().
void MathGLPane::keyPressed | ( | wxKeyEvent & | event | ) |
void MathGLPane::keyReleased | ( | wxKeyEvent & | event | ) |
void MathGLPane::leftMouseDown | ( | wxMouseEvent & | event | ) |
References ASSERT, PlotWrapper::getVisibleMode(), PLOT_MODE_1D, PLOT_MODE_2D, and PLOT_MODE_ENUM_END.
Referenced by registerUpdateHandler().
void MathGLPane::leftMouseReleased | ( | wxMouseEvent & | event | ) |
Do we have region updates?
References MOUSE_MODE_DRAG, MOUSE_MODE_DRAG_REGION, MOUSE_MODE_ENUM_END, and PlotWrapper::moveRegion().
Referenced by registerUpdateHandler().
|
inline |
void MathGLPane::middleMouseDown | ( | wxMouseEvent & | event | ) |
References ASSERT, PlotWrapper::getVisibleMode(), PLOT_MODE_1D, and PLOT_MODE_ENUM_END.
Referenced by registerUpdateHandler().
void MathGLPane::middleMouseReleased | ( | wxMouseEvent & | event | ) |
Middle mouse button has been let go.
References ASSERT, MGL_ZOOM_LIMIT, MOUSE_MODE_DRAG, MOUSE_MODE_DRAG_PAN, MOUSE_MODE_ENUM_END, and PlotWrapper::setBounds().
Referenced by registerUpdateHandler().
void MathGLPane::mouseDoubleLeftClick | ( | wxMouseEvent & | event | ) |
References AXIS_POSITION_INTERIOR, AXIS_POSITION_LOW_X, AXIS_POSITION_LOW_Y, PlotWrapper::disableUserAxisBounds(), PlotWrapper::disableUserBounds(), and MOUSE_MODE_ENUM_END.
Referenced by mouseDoubleMiddleClick(), and registerUpdateHandler().
void MathGLPane::mouseDoubleMiddleClick | ( | wxMouseEvent & | event | ) |
References ASSERT, AXIS_POSITION_LOW_X, AXIS_POSITION_LOW_Y, PlotWrapper::getBounds(), PlotWrapper::getNumVisible(), PlotWrapper::getPlotMode(), PlotWrapper::getRegion(), getRegionUnderCursor(), MOUSE_MODE_DRAG, MOUSE_MODE_DRAG_PAN, MOUSE_MODE_DRAG_REGION, mouseDoubleLeftClick(), and PLOT_MODE_1D.
Referenced by registerUpdateHandler().
void MathGLPane::mouseLeftWindow | ( | wxMouseEvent & | event | ) |
void MathGLPane::mouseMoved | ( | wxMouseEvent & | event | ) |
wx Event that triggers on mouse movement on grah
References MOUSE_MODE_DRAG, MOUSE_MODE_DRAG_PAN, and MOUSE_MODE_ENUM_END.
Referenced by registerUpdateHandler().
void MathGLPane::mouseWheelMoved | ( | wxMouseEvent & | event | ) |
References ASSERT, AXIS_POSITION_INTERIOR, AXIS_POSITION_LOW_X, AXIS_POSITION_LOW_Y, PlotWrapper::getBounds(), MGL_ZOOM_LIMIT, MOUSE_MODE_ENUM_END, PlotWrapper::scanBounds(), PlotWrapper::setBounds(), and zoomBounds().
Referenced by registerUpdateHandler().
|
inline |
References keyPressed(), keyReleased(), leftMouseDown(), leftMouseReleased(), middleMouseDown(), middleMouseReleased(), mouseDoubleLeftClick(), mouseDoubleMiddleClick(), mouseLeftWindow(), mouseMoved(), mouseWheelMoved(), plotID(), render(), resized(), rightClick(), and setPlotVisible().
Referenced by MainWindowFrame::MainWindowFrame(), and RangeEditorDialog::RangeEditorDialog().
void MathGLPane::render | ( | wxPaintEvent & | evt | ) |
References ASSERT, AXIS_POSITION_LOW_X, AXIS_POSITION_LOW_Y, PlotWrapper::drawPlot(), PlotWrapper::getNumVisible(), PlotWrapper::hasChanged(), PlotWrapper::isInteractionLocked(), MOUSE_MODE_DRAG, MOUSE_MODE_DRAG_PAN, MOUSE_MODE_DRAG_REGION, MOUSE_MODE_ENUM_END, PlotWrapper::resetChange(), TRANS, and trapfpe().
Referenced by registerUpdateHandler().
void MathGLPane::resized | ( | wxSizeEvent & | evt | ) |
References AXIS_POSITION_INTERIOR, AXIS_POSITION_LOW_X, AXIS_POSITION_LOW_Y, and PlotWrapper::getBounds().
Referenced by registerUpdateHandler().
void MathGLPane::rightClick | ( | wxMouseEvent & | event | ) |
unsigned int MathGLPane::savePNG | ( | const std::string & | filename, |
unsigned int | width, | ||
unsigned int | height | ||
) |
References ASSERT, PlotWrapper::drawPlot(), MGLPANE_ERR_BADALLOC, MGLPANE_ERR_MGLWARN, MGLPANE_FILE_REOPEN_FAIL, and MGLPANE_FILE_UNSIZED_FAIL.
Referenced by enableRegionSelfUpdate().
unsigned int MathGLPane::saveSVG | ( | const std::string & | filename | ) |
References ASSERT, PlotWrapper::drawPlot(), MGLPANE_ERR_MGLWARN, MGLPANE_FILE_REOPEN_FAIL, MGLPANE_FILE_UNSIZED_FAIL, popLocale(), and pushLocale().
Referenced by enableRegionSelfUpdate().
|
inline |
References PlotWrapper::setLegendVisible().
void MathGLPane::setPlotVisible | ( | unsigned int | plotID, |
bool | visible | ||
) |
References PlotWrapper::setVisible().
Referenced by registerUpdateHandler().
void MathGLPane::setPlotWrapper | ( | PlotWrapper * | plots, |
bool | takeOwnPtr = true |
||
) |
void MathGLPane::setVisibleItems | ( | std::vector< bool > & | newVisible | ) |