|
KiCad PCB EDA Suite
|
A single stacked plot area within a SIM_PLOT_TAB. More...
#include <sim_plot_tab.h>
Public Types | |
| enum class | MouseWheelAction { NONE , PAN_LEFT_RIGHT , PAN_RIGHT_LEFT , PAN_UP_DOWN , ZOOM , ZOOM_HORIZONTALLY , ZOOM_VERTICALLY , COUNT } |
| Enumerates the possible mouse wheel actions that can be performed on the plot. More... | |
Public Member Functions | |
| SIM_VIEW (SIM_PLOT_TAB *aPlotTab, wxWindow *aParent) | |
| Mirrors this view's X range onto every other view of the same tab. | |
| void | OnXViewChanged () override |
| Directly set this view's X range (used to mirror another view's zoom/pan onto this one). | |
| void | SetXRange (double aPos, double aDesiredMax, double aDesiredMin) |
| SIM_PLOT_TAB * | GetPlotTab () const |
| wxString | GetLabelX () const |
| wxString | GetLabelY1 () const |
| wxString | GetLabelY2 () const |
| wxString | GetLabelY3 () const |
| bool | GetY1Scale (double *aMin, double *aMax) const |
| bool | GetY2Scale (double *aMin, double *aMax) const |
| bool | GetY3Scale (double *aMin, double *aMax) const |
| void | SetY1Scale (bool aLock, double aMin, double aMax) |
| void | SetY2Scale (bool aLock, double aMin, double aMax) |
| void | SetY3Scale (bool aLock, double aMin, double aMax) |
| wxString | GetUnitsX () const |
| wxString | GetUnitsY1 () const |
| wxString | GetUnitsY2 () const |
| wxString | GetUnitsY3 () const |
| Get the display units (e.g. "V", "A", "dB") for a given trace plotted on this view. | |
| wxString | GetUnitsForTrace (TRACE *aTrace) const |
| Get the Y-axis slot (1, 2 or 3) a trace of this type is plotted on. | |
| int | GetAxisSlot (TRACE *aTrace) const |
| Get the Y-axis scale object for a given slot (1, 2 or 3), or nullptr if not created yet. | |
| mpScaleY * | GetAxisBySlot (int aSlot) const |
| void | ShowGrid (bool aEnable) |
| bool | IsGridShown () const |
| void | ShowLegend (bool aEnable) |
| bool | IsLegendShown () const |
| wxPoint | GetLegendPosition () const |
| void | SetLegendPosition (const wxPoint &aPosition) |
| Reset the Y (and, if requested, X) scale ranges to fit this view's own traces. | |
| void | ResetScales (bool aIncludeX) |
| Create/Ensure axes are available for plotting. | |
| void | updateAxes (int aNewTraceType=SIM_TRACE_TYPE::SPT_UNKNOWN) |
| void | UpdateAxisVisibility () |
| void | EnsureThirdYAxisExists () |
| void | SetSmithChart (bool aEnable) |
| < Show/hide this view's Smith chart overlay. | |
| bool | IsSmithChart () const |
| Refresh the grid z0 from the Smith traces shown on this view. | |
| void | UpdateSmithReferenceImpedance () |
| Re-read the Smith grid pen from the tab's color theme. | |
| void | UpdateSmithGridColor () |
| double | GetSmithZoom () const |
| const wxRealPoint & | GetSmithPan () const |
| void | ResetSmithView () |
| void | SetSmithView (double aZoom, double aPanX, double aPanY) |
| void | SmithZoomAt (const wxPoint &aPos, double aFactor) |
| void | SmithPanBy (const wxPoint &aDelta) |
| wxMenu * | GetPopupMenu () |
| Get reference to context menu of the plot canvas. | |
| bool | AddLayer (mpLayer *layer, bool refreshDisplay=true) |
| Add a plot layer to the canvas. | |
| bool | DelLayer (mpLayer *layer, bool alsoDeleteObject=false, bool refreshDisplay=true) |
| Remove a plot layer from the canvas. | |
| void | DelAllLayers (bool alsoDeleteObject, bool refreshDisplay=true) |
| Remove all layers from the plot. | |
| mpLayer * | GetLayer (int position) const |
| const mpLayer * | GetLayerByName (const wxString &name) const |
| mpLayer * | GetLayerByName (const wxString &name) |
| double | GetScaleX () const |
| Get current view's X scale. | |
| double | GetScaleY () const |
| Get current view's Y scale. | |
| double | GetPosX () const |
| Get current view's X position. | |
| double | GetPosY () const |
| Get current view's Y position. | |
| int | GetScrX () const |
| Get current view's X dimension in device context units. | |
| int | GetXScreen () const |
| int | GetScrY () const |
| Get current view's Y dimension in device context units. | |
| int | GetYScreen () const |
| void | SetScaleX (double scaleX) |
| Set current view's X scale and refresh display. | |
| void | SetScaleY (double scaleY) |
| Set current view's Y scale and refresh display. | |
| void | SetPosX (double posX) |
| Set current view's X position and refresh display. | |
| void | SetPosY (double posY) |
| Set current view's Y position and refresh display. | |
| void | SetPos (double posX, double posY) |
| Set current view's X and Y position and refresh display. | |
| void | SetScr (int scrX, int scrY) |
| Set current view's dimensions in device context units. | |
| double | p2x (wxCoord pixelCoordX) |
| Converts mpWindow (screen) pixel coordinates into graph (floating point) coordinates, using current mpWindow position and scale. | |
| double | p2y (wxCoord pixelCoordY) |
| Converts mpWindow (screen) pixel coordinates into graph (floating point) coordinates, using current mpWindow position and scale. | |
| wxCoord | x2p (double x) |
| Converts graph (floating point) coordinates into mpWindow (screen) pixel coordinates, using current mpWindow position and scale. | |
| wxCoord | y2p (double y) |
| Converts graph (floating point) coordinates into mpWindow (screen) pixel coordinates, using current mpWindow position and scale. | |
| void | EnableDoubleBuffer (bool enabled) |
| Enable/disable the double-buffering of the window, eliminating the flicker (default=disabled). | |
| void | EnableMousePanZoom (bool enabled) |
| Enable/disable the feature of pan/zoom with the mouse (default=enabled) | |
| void | SetMouseWheelActions (const MouseWheelActionSet &s) |
| Set the pan/zoom actions corresponding to mousewheel/trackpad events. | |
| void | Fit () override |
| Set view to fit global bounding box of all plot layers and refresh display. | |
| void | Fit (double xMin, double xMax, double yMin, double yMax, const wxCoord *printSizeX=nullptr, const wxCoord *printSizeY=nullptr, wxOrientation directions=wxBOTH) |
| Set view to fit a given bounding box and refresh display. | |
| void | ZoomIn (const wxPoint ¢erPoint=wxDefaultPosition) |
| Zoom into current view and refresh display. | |
| void | ZoomIn (const wxPoint ¢erPoint, double zoomFactor, wxOrientation directions=wxBOTH) |
| void | ZoomOut (const wxPoint ¢erPoint=wxDefaultPosition) |
| Zoom out current view and refresh display. | |
| void | ZoomOut (const wxPoint ¢erPoint, double zoomFactor, wxOrientation directions=wxBOTH) |
| void | ZoomRect (wxPoint p0, wxPoint p1) |
| Zoom view fitting given coordinates to the window (p0 and p1 do not need to be in any specific order) | |
| void | UpdateAll () |
| Refresh display. | |
| unsigned int | CountAllLayers () const |
| Counts the number of plot layers, whether or not they have a bounding box. | |
| double | GetDesiredXmin () const |
| Returns the left-border layer coordinate that the user wants the mpWindow to show (it may be not exactly the actual shown coordinate in the case of locked aspect ratio). | |
| double | GetDesiredXmax () const |
| Returns the right-border layer coordinate that the user wants the mpWindow to show (it may be not exactly the actual shown coordinate in the case of locked aspect ratio). | |
| double | GetDesiredYmin () const |
| Returns the bottom-border layer coordinate that the user wants the mpWindow to show (it may be not exactly the actual shown coordinate in the case of locked aspect ratio). | |
| double | GetDesiredYmax () const |
| Returns the top layer-border coordinate that the user wants the mpWindow to show (it may be not exactly the actual shown coordinate in the case of locked aspect ratio). | |
| void | GetBoundingBox (double *bbox) const |
| Returns the bounding box coordinates. | |
| bool | SaveScreenshot (wxImage &aImage, wxSize aImageSize=wxDefaultSize, bool aFit=false) |
| Draw the window on a wxBitmap, then save it to a file. | |
| void | SetMargins (int top, int right, int bottom, int left) |
| Set window margins, creating a blank area where some kinds of layers cannot draw. | |
| void | SetMarginTop (int top) |
| Set the top margin. | |
| void | SetMarginRight (int right) |
| Set the right margin. | |
| void | SetMarginBottom (int bottom) |
| Set the bottom margin. | |
| void | SetMarginLeft (int left) |
| Set the left margin. | |
| int | GetMarginTop () const |
| int | GetMarginRight () const |
| int | GetMarginBottom () const |
| int | GetMarginLeft () const |
| mpInfoLayer * | IsInsideInfoLayer (wxPoint &point) |
| Check if a given point is inside the area of a mpInfoLayer and eventually returns its pointer. | |
| void | SetLayerVisible (const wxString &name, bool viewable) |
| Sets the visibility of a layer by its name. | |
| void | SetLayerVisible (const unsigned int position, bool viewable) |
| Sets the visibility of a layer by its position in layer list. | |
| bool | IsLayerVisible (const wxString &name) const |
| Check whether a layer with given name is visible. | |
| bool | IsLayerVisible (unsigned int position) const |
| Check whether the layer at given position is visible. | |
| void | SetColourTheme (const wxColour &bgColour, const wxColour &drawColour, const wxColour &axesColour) |
| Set Color theme. | |
| const wxColour & | GetAxesColour () |
| Get axes draw colour. | |
| void | LimitView (bool aEnable) |
| Enable limiting of zooming & panning to the area used by the plots. | |
| void | LockY (bool aLock) |
| bool | GetYLocked () const |
| void | ZoomUndo () |
| void | ZoomRedo () |
| int | UndoZoomStackSize () const |
| int | RedoZoomStackSize () const |
| void | AdjustLimitedView (wxOrientation directions=wxBOTH) |
| Limits the zoomed or panned view to the area used by the plots. | |
| void | OnFit (wxCommandEvent &event) |
| void | OnCenter (wxCommandEvent &event) |
Public Attributes | |
| wxPoint | m_lastLegendPosition |
| mpScaleXBase * | m_axis_x |
| mpScaleY * | m_axis_y1 |
| mpScaleY * | m_axis_y2 |
| mpScaleY * | m_axis_y3 |
| mpInfoLegend * | m_legend |
Static Public Attributes | |
| static double | zoomIncrementalFactor = 1.1 |
| This value sets the zoom steps whenever the user clicks "Zoom in/out" or performs zoom with the mouse wheel. | |
Protected Member Functions | |
| void | pushZoomUndo (const std::array< double, 4 > &aZoom) |
| void | OnPaint (wxPaintEvent &event) |
| void | OnSize (wxSizeEvent &event) |
| void | OnShowPopupMenu (wxMouseEvent &event) |
| void | OnMouseMiddleDown (wxMouseEvent &event) |
| void | onZoomIn (wxCommandEvent &event) |
| void | onZoomOut (wxCommandEvent &event) |
| void | onZoomUndo (wxCommandEvent &event) |
| void | onZoomRedo (wxCommandEvent &event) |
| void | onMouseWheel (wxMouseEvent &event) |
| void | onMagnify (wxMouseEvent &event) |
| void | onMouseMove (wxMouseEvent &event) |
| void | onMouseLeftDown (wxMouseEvent &event) |
| void | onMouseLeftDClick (wxMouseEvent &event) |
| void | onMouseLeftRelease (wxMouseEvent &event) |
| void | DoZoom (const wxPoint ¢erPoint, double zoomFactor, wxOrientation directions) |
| void | RecomputeDesiredX (double &min, double &max) |
| void | RecomputeDesiredY (double &min, double &max) |
| wxOrientation | ViewNeedsRefitting (wxOrientation directions) const |
| void | PerformMouseWheelAction (wxMouseEvent &event, MouseWheelAction action) |
| virtual bool | UpdateBBox () |
| Recalculate global layer bounding box, and save it in m_minX,... | |
| virtual bool | SetXView (double pos, double desiredMax, double desiredMin) |
| Applies new X view coordinates depending on the settings. | |
| virtual bool | SetYView (double pos, double desiredMax, double desiredMin) |
| Applies new Y view coordinates depending on the settings. | |
Static Protected Member Functions | |
| static MouseWheelActionSet | defaultMouseWheelActions () |
Protected Attributes | |
| wxLayerList | m_layers |
| wxMenu | m_popmenu |
| wxColour | m_bgColour |
| wxColour | m_fgColour |
| wxColour | m_axColour |
| double | m_minX |
| double | m_maxX |
| double | m_minY |
| double | m_maxY |
| double | m_scaleX |
| double | m_scaleY |
| double | m_posX |
| double | m_posY |
| int | m_scrX |
| int | m_scrY |
| int | m_clickedX |
| int | m_clickedY |
| bool | m_yLocked |
| double | m_desiredXmin |
| These are updated in Fit, ZoomIn, ZoomOut, ZoomRect, SetXView, SetYView and may be different from the real borders (layer coordinates) only if lock aspect ratio is true. | |
| double | m_desiredXmax |
| double | m_desiredYmin |
| double | m_desiredYmax |
| double | m_topBottomPlotGapFactor |
| double | m_leftRightPlotGapFactor |
| int | m_marginTop |
| int | m_marginRight |
| int | m_marginBottom |
| int | m_marginLeft |
| int | m_last_lx |
| int | m_last_ly |
| wxMemoryDC | m_buff_dc |
| wxBitmap * | m_buff_bmp |
| bool | m_enableDoubleBuffer |
| bool | m_enableMouseNavigation |
| bool | m_enableLimitedView |
| MouseWheelActionSet | m_mouseWheelActions |
| wxPoint | m_mouseMClick |
| wxPoint | m_mouseLClick |
| mpInfoLayer * | m_movingInfoLayer |
| bool | m_zooming |
| wxRect | m_zoomRect |
| std::stack< std::array< double, 4 > > | m_undoZoomStack |
| std::stack< std::array< double, 4 > > | m_redoZoomStack |
Private Member Functions | |
| void | prepareDCAxes (int aNewTraceType) |
| < | |
| void | onSmithMouseWheel (wxMouseEvent &aEvent) |
| void | onSmithMagnify (wxMouseEvent &aEvent) |
| void | onSmithMiddleDown (wxMouseEvent &aEvent) |
| void | onSmithLeftDown (wxMouseEvent &aEvent) |
| void | onSmithMotion (wxMouseEvent &aEvent) |
| void | onSmithLeftUp (wxMouseEvent &aEvent) |
| void | onSmithDClick (wxMouseEvent &aEvent) |
| void | onSmithRightDown (wxMouseEvent &aEvent) |
| void | onSmithRightUp (wxMouseEvent &aEvent) |
| void | onSmithMenuCommand (wxCommandEvent &aEvent) |
| bool | getSmithView (SMITH_VIEW &aView) const |
| void | initializeGraphicsContext () |
Private Attributes | |
| SIM_PLOT_TAB * | m_plotTab |
| SMITH_GRID * | m_smithGrid |
| bool | m_smithChart |
| double | m_smithZoom |
| wxRealPoint | m_smithPan |
| bool | m_smithPanning |
| bool | m_smithLeftSkipped |
| wxPoint | m_smithPanLast |
| wxPoint | m_smithMenuPos |
A single stacked plot area within a SIM_PLOT_TAB.
All the SIM_VIEWs of a tab share the same (synchronized) X axis range, but each has its own independent set of Y axes (voltage/current/power), legend, and grid/data-range state.
Definition at line 356 of file sim_plot_tab.h.
|
stronginherited |
Enumerates the possible mouse wheel actions that can be performed on the plot.
| Enumerator | |
|---|---|
| NONE | |
| PAN_LEFT_RIGHT | |
| PAN_RIGHT_LEFT | |
| PAN_UP_DOWN | |
| ZOOM | |
| ZOOM_HORIZONTALLY | |
| ZOOM_VERTICALLY | |
| COUNT | |
Definition at line 958 of file mathplot.h.
| SIM_VIEW::SIM_VIEW | ( | SIM_PLOT_TAB * | aPlotTab, |
| wxWindow * | aParent ) |
Mirrors this view's X range onto every other view of the same tab.
Definition at line 1328 of file sim_plot_tab.cpp.
References m_axis_x, m_axis_y1, m_axis_y2, m_axis_y3, m_legend, m_plotTab, m_smithChart, m_smithGrid, m_smithLeftSkipped, m_smithPanning, m_smithZoom, mpID_CENTER, mpID_FIT, mpID_ZOOM_IN, mpID_ZOOM_OUT, mpWindow::mpWindow(), onSmithDClick(), onSmithLeftDown(), onSmithLeftUp(), onSmithMagnify(), onSmithMenuCommand(), onSmithMiddleDown(), onSmithMotion(), onSmithMouseWheel(), onSmithRightDown(), and onSmithRightUp().
Referenced by getSmithView().
|
inherited |
Add a plot layer to the canvas.
| layer | Pointer to layer. The mpLayer object will get under control of mpWindow, i.e. it will be delete'd on mpWindow destruction |
| refreshDisplay | States whether to refresh the display (UpdateAll) after adding the layer. |
| true | Success |
| false | Failure due to out of memory. |
Definition at line 2109 of file mathplot.cpp.
References m_layers, and UpdateAll().
Referenced by SIM_PLOT_TAB::AddView(), SIM_PLOT_TAB::EnableCursor(), SIM_VIEW::EnsureThirdYAxisExists(), SIM_PLOT_TAB::GetOrAddTrace(), onMouseLeftDown(), SIM_VIEW::prepareDCAxes(), SIM_VIEW::SetSmithChart(), and SIM_VIEW::updateAxes().
|
inherited |
Limits the zoomed or panned view to the area used by the plots.
Definition at line 1845 of file mathplot.cpp.
References m_desiredXmax, m_desiredXmin, m_desiredYmax, m_desiredYmin, m_enableLimitedView, m_maxX, m_maxY, m_minX, m_minY, m_posX, and m_posY.
Referenced by DoZoom(), SetXView(), SetYView(), ZoomRect(), ZoomRedo(), and ZoomUndo().
|
inlineinherited |
Counts the number of plot layers, whether or not they have a bounding box.
Definition at line 1195 of file mathplot.h.
References m_layers.
Referenced by mpInfoLegend::Plot().
|
staticprotectedinherited |
Definition at line 2066 of file mathplot.cpp.
References mpWindow::MouseWheelActionSet::horizontal, NONE, PAN_LEFT_RIGHT, PAN_UP_DOWN, mpWindow::MouseWheelActionSet::verticalUnmodified, mpWindow::MouseWheelActionSet::verticalWithAlt, mpWindow::MouseWheelActionSet::verticalWithCtrl, mpWindow::MouseWheelActionSet::verticalWithShift, and ZOOM.
Referenced by mpWindow().
|
inherited |
Remove all layers from the plot.
| alsoDeleteObject | If set to true, the mpLayer objects will be also "deleted", not just removed from the internal list. |
| refreshDisplay | States whether to refresh the display (UpdateAll) after removing the layers. |
Definition at line 2150 of file mathplot.cpp.
References m_layers, and UpdateAll().
Referenced by ~mpWindow().
|
inherited |
Remove a plot layer from the canvas.
| layer | Pointer to layer. The mpLayer object will be destructed using delete. |
| alsoDeleteObject | If set to true, the mpLayer object will be also "deleted", not just removed from the internal list. |
| refreshDisplay | States whether to refresh the display (UpdateAll) after removing the layer. |
N.B. Only the layer reference in the mpWindow is deleted, the layer object still exists!
Definition at line 2125 of file mathplot.cpp.
References m_layers, and UpdateAll().
Referenced by onMouseLeftDown().
|
protectedinherited |
Definition at line 2235 of file mathplot.cpp.
References AdjustLimitedView(), Fit(), m_desiredXmax, m_desiredXmin, m_desiredYmax, m_desiredYmin, m_marginBottom, m_marginLeft, m_marginRight, m_marginTop, m_maxX, m_maxY, m_minX, m_minY, m_posX, m_posY, m_scaleX, m_scaleY, m_scrX, m_scrY, m_yLocked, MAX_SCALE, OnXViewChanged(), p2x(), p2y(), pushZoomUndo(), RecomputeDesiredX(), RecomputeDesiredY(), UpdateAll(), and ViewNeedsRefitting().
|
inlineinherited |
Enable/disable the double-buffering of the window, eliminating the flicker (default=disabled).
Definition at line 1144 of file mathplot.h.
References m_enableDoubleBuffer.
Referenced by SIM_PLOT_TAB::AddView().
|
inlineinherited |
Enable/disable the feature of pan/zoom with the mouse (default=enabled)
Definition at line 1148 of file mathplot.h.
References m_enableMouseNavigation.
| void SIM_VIEW::EnsureThirdYAxisExists | ( | ) |
Definition at line 1747 of file sim_plot_tab.cpp.
References mpWindow::AddLayer(), m_axis_y1, m_axis_y2, m_axis_y3, mpALIGN_BORDER_RIGHT, and mpWindow::SetMargins().
Referenced by prepareDCAxes(), and updateAxes().
|
overrideinherited |
Set view to fit global bounding box of all plot layers and refresh display.
Scale and position will be set to show all attached mpLayers. The X/Y scale aspect lock is taken into account.
Definition at line 1744 of file mathplot.cpp.
References Fit(), m_maxX, m_maxY, m_minX, m_minY, and UpdateBBox().
Referenced by DoZoom(), Fit(), OnFit(), OnSize(), SaveScreenshot(), ZoomRect(), ZoomRedo(), and ZoomUndo().
|
inherited |
Set view to fit a given bounding box and refresh display.
The X/Y scale aspect lock is taken into account. If provided, the parameters printSizeX and printSizeY are taken as the DC size, and the pixel scales are computed accordingly. Also, in this case the passed borders are not saved as the "desired borders", since this use will be invoked only when printing.
Definition at line 1752 of file mathplot.cpp.
References m_desiredXmax, m_desiredXmin, m_desiredYmax, m_desiredYmin, m_leftRightPlotGapFactor, m_marginBottom, m_marginLeft, m_marginRight, m_marginTop, m_posX, m_posY, m_scaleX, m_scaleY, m_scrX, m_scrY, m_topBottomPlotGapFactor, OnXViewChanged(), and UpdateAll().
|
inlineinherited |
Get axes draw colour.
Definition at line 1300 of file mathplot.h.
References m_axColour.
| mpScaleY * SIM_VIEW::GetAxisBySlot | ( | int | aSlot | ) | const |
Definition at line 1473 of file sim_plot_tab.cpp.
| int SIM_VIEW::GetAxisSlot | ( | TRACE * | aTrace | ) | const |
Get the Y-axis scale object for a given slot (1, 2 or 3), or nullptr if not created yet.
Definition at line 1455 of file sim_plot_tab.cpp.
References TRACE::GetType(), m_plotTab, SPT_AC_PHASE, SPT_CURRENT, SPT_POWER, and ST_AC.
|
inherited |
|
inlineinherited |
Returns the right-border layer coordinate that the user wants the mpWindow to show (it may be not exactly the actual shown coordinate in the case of locked aspect ratio).
Definition at line 1207 of file mathplot.h.
References m_desiredXmax.
Referenced by SIM_PLOT_TAB::SyncXView().
|
inlineinherited |
Returns the left-border layer coordinate that the user wants the mpWindow to show (it may be not exactly the actual shown coordinate in the case of locked aspect ratio).
Definition at line 1201 of file mathplot.h.
References m_desiredXmin.
Referenced by SIM_PLOT_TAB::SyncXView().
|
inlineinherited |
Returns the top layer-border coordinate that the user wants the mpWindow to show (it may be not exactly the actual shown coordinate in the case of locked aspect ratio).
Definition at line 1219 of file mathplot.h.
References m_desiredYmax.
|
inlineinherited |
Returns the bottom-border layer coordinate that the user wants the mpWindow to show (it may be not exactly the actual shown coordinate in the case of locked aspect ratio).
Definition at line 1213 of file mathplot.h.
References m_desiredYmin.
|
inline |
Definition at line 372 of file sim_plot_tab.h.
References m_axis_x.
Referenced by SIM_PLOT_TAB::GetLabelX().
|
inline |
Definition at line 374 of file sim_plot_tab.h.
References m_axis_y1.
Referenced by SIM_PLOT_TAB::GetLabelY1().
|
inline |
Definition at line 376 of file sim_plot_tab.h.
References m_axis_y2.
Referenced by SIM_PLOT_TAB::GetLabelY2().
|
inline |
Definition at line 378 of file sim_plot_tab.h.
References m_axis_y3.
Referenced by SIM_PLOT_TAB::GetLabelY3().
|
inherited |
Get the layer in list position indicated. N.B. You must know the index of the layer inside the list!
| position | position of the layer in the layers list |
Definition at line 2464 of file mathplot.cpp.
References m_layers.
Referenced by IsLayerVisible(), mpInfoLegend::Plot(), and SetLayerVisible().
|
inlineinherited |
Definition at line 1039 of file mathplot.h.
References mpWindow(), and name.
|
inherited |
Get the layer by its name (case sensitive).
| name | The name of the layer to retrieve |
Definition at line 2473 of file mathplot.cpp.
References m_layers, and name.
Referenced by IsLayerVisible(), and SetLayerVisible().
|
inline |
Definition at line 455 of file sim_plot_tab.h.
References m_legend.
Referenced by SIM_PLOT_TAB::GetLegendPosition().
|
inlineinherited |
Definition at line 1262 of file mathplot.h.
References m_marginBottom.
Referenced by SMITH_GRID::GetChartView(), mpScaleY::getVisibleDataRange(), CURSOR::Plot(), mpFX::Plot(), mpFXY::Plot(), mpFY::Plot(), mpScaleXBase::Plot(), mpScaleY::Plot(), and SIMULATOR_FRAME_UI::SaveWorkbook().
|
inlineinherited |
Definition at line 1264 of file mathplot.h.
References m_marginLeft.
Referenced by SIM_PLOT_TAB::EnableCursor(), SMITH_GRID::GetChartView(), mpScaleXBase::getVisibleDataRange(), CURSOR::Plot(), mpFX::Plot(), mpFXY::Plot(), mpFY::Plot(), mpScaleXBase::Plot(), mpScaleY::Plot(), and SIMULATOR_FRAME_UI::SaveWorkbook().
|
inlineinherited |
Definition at line 1260 of file mathplot.h.
References m_marginRight.
Referenced by SIM_PLOT_TAB::EnableCursor(), SMITH_GRID::GetChartView(), mpScaleXBase::getVisibleDataRange(), CURSOR::Plot(), mpFX::Plot(), mpFXY::Plot(), mpFY::Plot(), mpScaleXBase::Plot(), mpScaleY::Plot(), and SIMULATOR_FRAME_UI::SaveWorkbook().
|
inlineinherited |
Definition at line 1258 of file mathplot.h.
References m_marginTop.
Referenced by SMITH_GRID::GetChartView(), mpScaleY::getVisibleDataRange(), CURSOR::Plot(), mpFX::Plot(), mpFXY::Plot(), mpFY::Plot(), mpScaleXBase::Plot(), mpScaleY::Plot(), and SIMULATOR_FRAME_UI::SaveWorkbook().
|
inline |
Definition at line 370 of file sim_plot_tab.h.
References m_plotTab.
|
inlineinherited |
Get reference to context menu of the plot canvas.
Definition at line 994 of file mathplot.h.
References m_popmenu.
Referenced by SIM_VIEW::onSmithRightUp().
|
inlineinherited |
Get current view's X position.
See rules for coordinate transformation
Definition at line 1060 of file mathplot.h.
References m_posX.
Referenced by mpScaleXBase::Plot(), and SIM_PLOT_TAB::SyncXView().
|
inlineinherited |
Get current view's Y position.
See rules for coordinate transformation
Definition at line 1066 of file mathplot.h.
References m_posY.
Referenced by mpScaleY::Plot().
|
inlineinherited |
Get current view's X scale.
See rules for coordinate transformation
Definition at line 1048 of file mathplot.h.
References m_scaleX.
Referenced by mpScaleXBase::Plot(), and SIM_PLOT_TAB::SyncXView().
|
inlineinherited |
Get current view's Y scale.
See rules for coordinate transformation
Definition at line 1054 of file mathplot.h.
References m_scaleY.
Referenced by mpScaleY::Plot().
|
inlineinherited |
Get current view's X dimension in device context units.
Usually this is equal to wxDC::GetSize, but it might differ thus mpLayer implementations should rely on the value returned by the function. See rules for coordinate transformation
Definition at line 1074 of file mathplot.h.
References m_scrX.
Referenced by SMITH_GRID::GetChartView(), mpScaleXBase::getVisibleDataRange(), CURSOR::Plot(), mpFX::Plot(), mpFXY::Plot(), mpFY::Plot(), mpInfoLayer::Plot(), mpInfoLegend::Plot(), mpScaleXBase::Plot(), mpScaleY::Plot(), SMITH_CURSOR::Plot(), and SIMULATOR_CONTROL::Zoom().
|
inlineinherited |
Get current view's Y dimension in device context units.
Usually this is equal to wxDC::GetSize, but it might differ thus mpLayer implementations should rely on the value returned by the function. See rules for coordinate transformation
Definition at line 1083 of file mathplot.h.
References m_scrY.
Referenced by SMITH_GRID::GetChartView(), mpScaleY::getVisibleDataRange(), CURSOR::Plot(), mpFX::Plot(), mpFXY::Plot(), mpFY::Plot(), mpInfoLayer::Plot(), mpInfoLegend::Plot(), mpScaleXBase::Plot(), mpScaleY::Plot(), SMITH_CURSOR::Plot(), and SIMULATOR_CONTROL::Zoom().
|
inline |
Definition at line 489 of file sim_plot_tab.h.
References m_smithPan.
Referenced by SIM_PLOT_TAB::GetSmithPan(), and smithView().
|
private |
Definition at line 1947 of file sim_plot_tab.cpp.
References SMITH_GRID::GetChartView(), m_smithPan, m_smithZoom, and SIM_VIEW().
Referenced by onSmithMenuCommand(), SmithPanBy(), and SmithZoomAt().
|
inline |
Definition at line 488 of file sim_plot_tab.h.
References m_smithZoom.
Referenced by SIM_PLOT_TAB::GetSmithZoom(), and smithView().
| wxString SIM_VIEW::GetUnitsForTrace | ( | TRACE * | aTrace | ) | const |
Get the Y-axis slot (1, 2 or 3) a trace of this type is plotted on.
Definition at line 1434 of file sim_plot_tab.cpp.
References TRACE::GetType(), GetUnitsY1(), GetUnitsY2(), GetUnitsY3(), m_plotTab, SPT_AC_PHASE, SPT_CURRENT, SPT_POWER, and ST_AC.
Referenced by SIM_PLOT_TAB::GetUnitsForTrace().
| wxString SIM_VIEW::GetUnitsX | ( | ) | const |
Definition at line 1387 of file sim_plot_tab.cpp.
References LOG_SCALE< T_PARENT >::GetUnits(), and m_axis_x.
Referenced by SIM_PLOT_TAB::GetUnitsX().
| wxString SIM_VIEW::GetUnitsY1 | ( | ) | const |
Definition at line 1401 of file sim_plot_tab.cpp.
References LIN_SCALE< T_PARENT >::GetUnits(), and m_axis_y1.
Referenced by GetUnitsForTrace(), and SIM_PLOT_TAB::GetUnitsY1().
| wxString SIM_VIEW::GetUnitsY2 | ( | ) | const |
Definition at line 1412 of file sim_plot_tab.cpp.
References LIN_SCALE< T_PARENT >::GetUnits(), and m_axis_y2.
Referenced by GetUnitsForTrace(), and SIM_PLOT_TAB::GetUnitsY2().
| wxString SIM_VIEW::GetUnitsY3 | ( | ) | const |
Get the display units (e.g. "V", "A", "dB") for a given trace plotted on this view.
Definition at line 1423 of file sim_plot_tab.cpp.
References LIN_SCALE< T_PARENT >::GetUnits(), and m_axis_y3.
Referenced by GetUnitsForTrace(), and SIM_PLOT_TAB::GetUnitsY3().
|
inlineinherited |
Definition at line 1075 of file mathplot.h.
References m_scrX.
Referenced by SIM_PLOT_TAB::EnableCursor(), mpScaleX::recalculateTicks(), and mpScaleXLog::recalculateTicks().
|
inline |
Definition at line 380 of file sim_plot_tab.h.
References m_axis_y1.
Referenced by SIM_PLOT_TAB::GetY1Scale().
|
inline |
Definition at line 388 of file sim_plot_tab.h.
References m_axis_y2.
Referenced by SIM_PLOT_TAB::GetY2Scale().
|
inline |
Definition at line 396 of file sim_plot_tab.h.
References m_axis_y3.
Referenced by SIM_PLOT_TAB::GetY3Scale().
|
inlineinherited |
Definition at line 1309 of file mathplot.h.
References m_yLocked.
|
inlineinherited |
Definition at line 1084 of file mathplot.h.
References m_scrY.
Referenced by mpScaleY::recalculateTicks().
|
privateinherited |
Definition at line 2678 of file mathplot.cpp.
References m_buff_dc.
Referenced by mpWindow(), and mpWindow().
|
inline |
Definition at line 439 of file sim_plot_tab.h.
References m_axis_x, and m_axis_y1.
Referenced by SIM_PLOT_TAB::IsGridShown().
|
inherited |
Check if a given point is inside the area of a mpInfoLayer and eventually returns its pointer.
| point | The position to be checked |
Definition at line 2554 of file mathplot.cpp.
References mpInfoLayer::Inside(), and m_layers.
Referenced by onMouseLeftDClick(), onMouseLeftDown(), SIM_VIEW::onSmithDClick(), and SIM_VIEW::onSmithLeftDown().
|
inherited |
Check whether a layer with given name is visible.
| name | The layer name |
Definition at line 2581 of file mathplot.cpp.
References GetLayerByName(), mpLayer::IsVisible(), and name.
|
inherited |
Check whether the layer at given position is visible.
| position | The layer position in layer list |
Definition at line 2600 of file mathplot.cpp.
References GetLayer().
|
inline |
Definition at line 453 of file sim_plot_tab.h.
References m_legend.
Referenced by SIM_PLOT_TAB::IsLegendShown().
|
inline |
Refresh the grid z0 from the Smith traces shown on this view.
Definition at line 480 of file sim_plot_tab.h.
References m_smithChart.
|
inlineinherited |
Enable limiting of zooming & panning to the area used by the plots.
Definition at line 1303 of file mathplot.h.
References m_enableLimitedView.
Referenced by SIM_PLOT_TAB::AddView().
|
inlineinherited |
Definition at line 1308 of file mathplot.h.
References m_yLocked.
Referenced by SIMULATOR_FRAME_UI::loadJsonWorkbook().
|
inherited |
Definition at line 2057 of file mathplot.cpp.
References m_clickedX, m_clickedY, m_marginBottom, m_marginLeft, m_marginRight, m_marginTop, m_scrX, m_scrY, p2x(), p2y(), and SetPos().
|
inherited |
Definition at line 2049 of file mathplot.cpp.
References Fit(), m_desiredXmax, m_desiredXmin, m_desiredYmax, m_desiredYmin, and pushZoomUndo().
|
protectedinherited |
Definition at line 1527 of file mathplot.cpp.
References m_enableMouseNavigation, zoom, ZoomIn(), and ZoomOut().
|
protectedinherited |
Definition at line 1705 of file mathplot.cpp.
References IsInsideInfoLayer(), and UpdateAll().
|
protectedinherited |
Definition at line 1685 of file mathplot.cpp.
References AddLayer(), DelLayer(), IsInsideInfoLayer(), m_mouseLClick, m_movingInfoLayer, and m_zooming.
|
protectedinherited |
Definition at line 1722 of file mathplot.cpp.
References m_mouseLClick, m_movingInfoLayer, m_zooming, and ZoomRect().
|
protectedinherited |
Definition at line 1520 of file mathplot.cpp.
References m_mouseMClick.
|
protectedinherited |
Definition at line 1591 of file mathplot.cpp.
References cursor, mpInfoLayer::Inside(), m_desiredXmax, m_desiredXmin, m_desiredYmax, m_desiredYmin, m_enableMouseNavigation, m_fgColour, m_layers, m_mouseLClick, m_mouseMClick, m_movingInfoLayer, m_posX, m_posY, m_scaleX, m_scaleY, m_zooming, m_zoomRect, SetXView(), SetYView(), and UpdateAll().
|
protectedinherited |
Definition at line 1547 of file mathplot.cpp.
References m_enableMouseNavigation, m_mouseWheelActions, NONE, and PerformMouseWheelAction().
|
protectedinherited |
Definition at line 2166 of file mathplot.cpp.
References m_buff_bmp, m_buff_dc, m_enableDoubleBuffer, m_fgColour, m_last_lx, m_last_ly, m_layers, m_scrX, m_scrY, m_zooming, m_zoomRect, and scale.
|
protectedinherited |
Definition at line 2037 of file mathplot.cpp.
References m_clickedX, m_clickedY, m_popmenu, m_redoZoomStack, m_undoZoomStack, mpID_ZOOM_REDO, and mpID_ZOOM_UNDO.
|
protectedinherited |
Definition at line 2102 of file mathplot.cpp.
References Fit(), m_desiredXmax, m_desiredXmin, m_desiredYmax, and m_desiredYmin.
|
private |
Definition at line 2099 of file sim_plot_tab.cpp.
References mpWindow::IsInsideInfoLayer(), m_smithChart, and ResetSmithView().
Referenced by SIM_VIEW().
|
private |
Definition at line 2031 of file sim_plot_tab.cpp.
References mpWindow::IsInsideInfoLayer(), m_smithChart, m_smithLeftSkipped, m_smithPanLast, and m_smithPanning.
Referenced by SIM_VIEW().
|
private |
Definition at line 2081 of file sim_plot_tab.cpp.
References m_smithChart, m_smithLeftSkipped, and m_smithPanning.
Referenced by SIM_VIEW().
|
private |
Definition at line 2008 of file sim_plot_tab.cpp.
References m_smithChart, and SmithZoomAt().
Referenced by SIM_VIEW().
|
private |
Definition at line 2142 of file sim_plot_tab.cpp.
References getSmithView(), m_smithChart, m_smithMenuPos, m_smithPan, mpID_CENTER, mpID_FIT, mpID_ZOOM_IN, mpID_ZOOM_OUT, ResetSmithView(), SmithZoomAt(), and SMITH_VIEW::ToGamma().
Referenced by SIM_VIEW().
|
private |
Definition at line 2023 of file sim_plot_tab.cpp.
References m_smithChart.
Referenced by SIM_VIEW().
|
private |
Definition at line 2053 of file sim_plot_tab.cpp.
References m_smithChart, m_smithLeftSkipped, m_smithPanLast, m_smithPanning, and SmithPanBy().
Referenced by SIM_VIEW().
|
private |
Definition at line 1991 of file sim_plot_tab.cpp.
References m_smithChart, and SmithZoomAt().
Referenced by SIM_VIEW().
|
private |
Definition at line 2114 of file sim_plot_tab.cpp.
References m_smithChart, and m_smithMenuPos.
Referenced by SIM_VIEW().
|
private |
Definition at line 2124 of file sim_plot_tab.cpp.
References mpWindow::GetPopupMenu(), m_smithChart, mpID_ZOOM_REDO, and mpID_ZOOM_UNDO.
Referenced by SIM_VIEW().
|
overridevirtual |
Directly set this view's X range (used to mirror another view's zoom/pan onto this one).
Reimplemented from mpWindow.
Definition at line 1359 of file sim_plot_tab.cpp.
References m_plotTab.
|
protectedinherited |
Definition at line 2078 of file mathplot.cpp.
References m_mouseMClick, and ZoomIn().
|
protectedinherited |
Definition at line 2084 of file mathplot.cpp.
References ZoomOut().
|
protectedinherited |
Definition at line 2096 of file mathplot.cpp.
References ZoomRedo().
|
protectedinherited |
Definition at line 2090 of file mathplot.cpp.
References ZoomUndo().
|
inlineinherited |
Converts mpWindow (screen) pixel coordinates into graph (floating point) coordinates, using current mpWindow position and scale.
Definition at line 1127 of file mathplot.h.
References m_posX, and m_scaleX.
Referenced by DoZoom(), mpScaleXBase::getVisibleDataRange(), OnCenter(), CURSOR::Plot(), mpFX::Plot(), and ZoomRect().
|
inlineinherited |
Converts mpWindow (screen) pixel coordinates into graph (floating point) coordinates, using current mpWindow position and scale.
Definition at line 1131 of file mathplot.h.
References m_posY, and m_scaleY.
Referenced by DoZoom(), mpScaleY::getVisibleDataRange(), OnCenter(), mpFY::Plot(), and ZoomRect().
|
protectedinherited |
Definition at line 2372 of file mathplot.cpp.
References m_desiredXmax, m_desiredXmin, m_desiredYmax, m_desiredYmin, m_posX, m_posY, m_scaleX, m_scaleY, m_yLocked, NONE, PAN_LEFT_RIGHT, PAN_RIGHT_LEFT, PAN_UP_DOWN, SetXView(), SetYView(), UpdateAll(), ZOOM, ZOOM_HORIZONTALLY, ZOOM_VERTICALLY, ZoomIn(), zoomIncrementalFactor, and ZoomOut().
Referenced by onMouseWheel().
|
private |
<
Construct the plot axes for DC simulation plot.
Definition at line 1652 of file sim_plot_tab.cpp.
References _, mpWindow::AddLayer(), EnsureThirdYAxisExists(), m_axis_x, m_axis_y1, m_axis_y2, m_axis_y3, m_plotTab, mpALIGN_BOTTOM, mpALIGN_LEFT, mpALIGN_RIGHT, and SPT_POWER.
Referenced by updateAxes().
|
protectedinherited |
Definition at line 1998 of file mathplot.cpp.
References m_redoZoomStack, and m_undoZoomStack.
Referenced by DoZoom(), OnFit(), and ZoomRect().
|
protectedinherited |
Definition at line 2322 of file mathplot.cpp.
References m_desiredXmin, m_leftRightPlotGapFactor, m_marginLeft, m_marginRight, m_posX, m_scaleX, and m_scrX.
Referenced by DoZoom().
|
protectedinherited |
Definition at line 2333 of file mathplot.cpp.
References m_desiredYmax, m_marginBottom, m_marginTop, m_posY, m_scaleY, m_scrY, and m_topBottomPlotGapFactor.
Referenced by DoZoom().
|
inlineinherited |
Definition at line 1314 of file mathplot.h.
References m_redoZoomStack.
Referenced by SIMULATOR_FRAME::setupUIConditions().
| void SIM_VIEW::ResetScales | ( | bool | aIncludeX | ) |
|
inline |
Definition at line 491 of file sim_plot_tab.h.
References m_smithPan, and m_smithZoom.
Referenced by onSmithDClick(), onSmithMenuCommand(), SetSmithChart(), and SmithZoomAt().
|
inherited |
Draw the window on a wxBitmap, then save it to a file.
| aImage | a wxImage where to save the screenshot |
| aImageSize | Set a size for the output image. Default is the same as the screen size |
| aFit | Decide whether to fit the plot into the size |
Definition at line 2494 of file mathplot.cpp.
References Fit(), m_desiredXmax, m_desiredXmin, m_desiredYmax, m_desiredYmin, m_fgColour, m_layers, m_maxX, m_maxY, m_minX, m_minY, m_scrX, m_scrY, SetScr(), and UpdateAll().
|
inherited |
Set Color theme.
Provide colours to set a new colour theme.
| bgColour | Background colour |
| drawColour | The colour used to draw all elements in foreground, axes excluded |
| axesColour | The colour used to draw axes (but not their labels) |
Definition at line 2609 of file mathplot.cpp.
References m_axColour, m_bgColour, m_fgColour, m_layers, mpLAYER_AXIS, and mpLAYER_INFO.
|
inherited |
Sets the visibility of a layer by its position in layer list.
| position | The layer position in layer list |
| viewable | the view status to be set |
Definition at line 2590 of file mathplot.cpp.
References GetLayer(), and UpdateAll().
|
inherited |
Sets the visibility of a layer by its name.
| name | The layer name to set visibility |
| viewable | the view status to be set |
Definition at line 2571 of file mathplot.cpp.
References GetLayerByName(), name, and UpdateAll().
|
inline |
Reset the Y (and, if requested, X) scale ranges to fit this view's own traces.
Definition at line 457 of file sim_plot_tab.h.
References m_lastLegendPosition, and m_legend.
|
inlineinherited |
Set the bottom margin.
| bottom | Bottom Margin |
Definition at line 1253 of file mathplot.h.
References m_marginBottom.
|
inlineinherited |
Set the left margin.
| left | Left Margin |
Definition at line 1255 of file mathplot.h.
References left, and m_marginLeft.
|
inlineinherited |
Set the right margin.
| right | Right Margin |
Definition at line 1251 of file mathplot.h.
References m_marginRight, and right.
|
inherited |
Set window margins, creating a blank area where some kinds of layers cannot draw.
This is useful for example to draw axes outside the area where the plots are drawn.
| top | Top border |
| right | Right border |
| bottom | Bottom border |
| left | Left border |
Definition at line 2545 of file mathplot.cpp.
References left, m_marginBottom, m_marginLeft, m_marginRight, m_marginTop, right, and top().
Referenced by SIM_PLOT_TAB::AddView(), SIM_VIEW::EnsureThirdYAxisExists(), SIMULATOR_FRAME_UI::loadJsonWorkbook(), and SIM_VIEW::updateAxes().
|
inlineinherited |
Set the top margin.
| top | Top Margin |
Definition at line 1249 of file mathplot.h.
References m_marginTop, and top().
|
inlineinherited |
Set the pan/zoom actions corresponding to mousewheel/trackpad events.
Definition at line 1151 of file mathplot.h.
References m_mouseWheelActions.
Referenced by SIM_PLOT_TAB::AddView().
|
inlineinherited |
Set current view's X and Y position and refresh display.
| posX | New position that corresponds to the center point of the view. |
| posY | New position that corresponds to the center point of the view. |
Definition at line 1116 of file mathplot.h.
References m_posX, m_posY, and UpdateAll().
Referenced by OnCenter().
|
inlineinherited |
Set current view's X position and refresh display.
| posX | New position that corresponds to the center point of the view. |
Definition at line 1105 of file mathplot.h.
References m_posX, and UpdateAll().
|
inlineinherited |
Set current view's Y position and refresh display.
| posY | New position that corresponds to the center point of the view. |
Definition at line 1110 of file mathplot.h.
References m_posY, and UpdateAll().
|
inherited |
Set current view's X scale and refresh display.
| scaleX | New scale, must not be 0. |
Definition at line 2453 of file mathplot.cpp.
References m_scaleX, and UpdateAll().
|
inlineinherited |
Set current view's Y scale and refresh display.
| scaleY | New scale, must not be 0. |
Definition at line 1094 of file mathplot.h.
References m_scaleY, and UpdateAll().
|
inlineinherited |
Set current view's dimensions in device context units.
Needed by plotting functions. It doesn't refresh display.
| scrX | New position that corresponds to the center point of the view. |
| scrY | New position that corresponds to the center point of the view. |
Definition at line 1123 of file mathplot.h.
References m_scrX, and m_scrY.
Referenced by SaveScreenshot().
| void SIM_VIEW::SetSmithChart | ( | bool | aEnable | ) |
< Show/hide this view's Smith chart overlay.
The mode itself is owned by the tab; each view keeps its own grid layer and pan/zoom so the stacked charts stay independent.
Definition at line 1876 of file sim_plot_tab.cpp.
References mpWindow::AddLayer(), SIM_PLOT_COLORS::AXIS, KIUI::GetStatusFont(), m_plotTab, m_smithChart, m_smithGrid, m_smithLeftSkipped, m_smithPanning, ResetSmithView(), mpWindow::UpdateAll(), UpdateAxisVisibility(), and UpdateSmithReferenceImpedance().
Referenced by SIM_PLOT_TAB::AddView().
|
inline |
Definition at line 497 of file sim_plot_tab.h.
References m_smithPan, and m_smithZoom.
|
inline |
Definition at line 365 of file sim_plot_tab.h.
References mpWindow::SetXView().
|
protectedvirtualinherited |
Applies new X view coordinates depending on the settings.
Definition at line 1893 of file mathplot.cpp.
References AdjustLimitedView(), m_desiredXmax, m_desiredXmin, m_posX, and OnXViewChanged().
Referenced by onMouseMove(), PerformMouseWheelAction(), and SIM_VIEW::SetXRange().
| void SIM_VIEW::SetY1Scale | ( | bool | aLock, |
| double | aMin, | ||
| double | aMax ) |
Definition at line 1366 of file sim_plot_tab.cpp.
References m_axis_y1.
| void SIM_VIEW::SetY2Scale | ( | bool | aLock, |
| double | aMin, | ||
| double | aMax ) |
Definition at line 1373 of file sim_plot_tab.cpp.
References m_axis_y2.
| void SIM_VIEW::SetY3Scale | ( | bool | aLock, |
| double | aMin, | ||
| double | aMax ) |
Definition at line 1380 of file sim_plot_tab.cpp.
References m_axis_y3.
|
protectedvirtualinherited |
Applies new Y view coordinates depending on the settings.
Definition at line 1909 of file mathplot.cpp.
References AdjustLimitedView(), m_desiredYmax, m_desiredYmin, and m_posY.
Referenced by onMouseMove(), and PerformMouseWheelAction().
|
inline |
Definition at line 422 of file sim_plot_tab.h.
References m_axis_x, m_axis_y1, m_axis_y2, m_axis_y3, and mpWindow::UpdateAll().
|
inline |
Definition at line 447 of file sim_plot_tab.h.
References m_legend, and mpWindow::UpdateAll().
| void SIM_VIEW::SmithPanBy | ( | const wxPoint & | aDelta | ) |
Definition at line 1977 of file sim_plot_tab.cpp.
References getSmithView(), m_smithPan, and SMITH_VIEW::radius.
Referenced by onSmithMotion().
| void SIM_VIEW::SmithZoomAt | ( | const wxPoint & | aPos, |
| double | aFactor ) |
Definition at line 1953 of file sim_plot_tab.cpp.
References getSmithView(), m_smithPan, m_smithZoom, ResetSmithView(), and SMITH_MATH::ZoomAboutPoint().
Referenced by onSmithMagnify(), onSmithMenuCommand(), and onSmithMouseWheel().
|
inlineinherited |
Definition at line 1313 of file mathplot.h.
References m_undoZoomStack.
Referenced by SIMULATOR_FRAME::setupUIConditions().
|
inherited |
Refresh display.
Definition at line 2446 of file mathplot.cpp.
References UpdateBBox().
Referenced by AddLayer(), SIM_PLOT_TAB::AddView(), DelAllLayers(), DelLayer(), DoZoom(), Fit(), mpWindow(), onMouseLeftDClick(), onMouseMove(), PerformMouseWheelAction(), SaveScreenshot(), SetLayerVisible(), SetLayerVisible(), SetPos(), SetPosX(), SetPosY(), SetScaleX(), SetScaleY(), SIM_VIEW::SetSmithChart(), SIM_VIEW::ShowGrid(), SIM_VIEW::ShowLegend(), and SIM_VIEW::UpdateAxisVisibility().
| void SIM_VIEW::updateAxes | ( | int | aNewTraceType = SIM_TRACE_TYPE::SPT_UNKNOWN | ) |
Definition at line 1484 of file sim_plot_tab.cpp.
References _, mpWindow::AddLayer(), EnsureThirdYAxisExists(), KIUI::GetStatusFont(), m_axis_x, m_axis_y1, m_axis_y2, m_axis_y3, m_plotTab, mpALIGN_BORDER_RIGHT, mpALIGN_BOTTOM, mpALIGN_LEFT, mpALIGN_RIGHT, prepareDCAxes(), mpWindow::SetMargins(), SPT_CURRENT, SPT_POWER, ST_AC, ST_DC, ST_FFT, ST_NOISE, ST_SP, ST_TRAN, and UpdateAxisVisibility().
Referenced by SIM_PLOT_TAB::AddView(), and SIM_PLOT_TAB::GetOrAddTrace().
| void SIM_VIEW::UpdateAxisVisibility | ( | ) |
Definition at line 1769 of file sim_plot_tab.cpp.
References m_axis_x, m_axis_y1, m_axis_y2, m_axis_y3, m_plotTab, m_smithChart, name, SPT_AC_PHASE, SPT_CURRENT, SPT_POWER, ST_AC, and mpWindow::UpdateAll().
Referenced by SetSmithChart(), SIM_PLOT_TAB::SetTraceData(), and updateAxes().
|
protectedvirtualinherited |
Recalculate global layer bounding box, and save it in m_minX,...
Definition at line 2435 of file mathplot.cpp.
References m_maxX, m_maxY, m_minX, and m_minY.
Referenced by Fit(), and UpdateAll().
| void SIM_VIEW::UpdateSmithGridColor | ( | ) |
Definition at line 1940 of file sim_plot_tab.cpp.
References SIM_PLOT_COLORS::AXIS, m_plotTab, and m_smithGrid.
| void SIM_VIEW::UpdateSmithReferenceImpedance | ( | ) |
Re-read the Smith grid pen from the tab's color theme.
Definition at line 1908 of file sim_plot_tab.cpp.
References SMITH_TRACE::GetReferenceImpedance(), TRACE::GetView(), m_plotTab, m_smithGrid, and name.
Referenced by SetSmithChart().
|
protectedinherited |
Definition at line 2344 of file mathplot.cpp.
References m_desiredXmax, m_desiredXmin, m_desiredYmax, m_desiredYmin, m_enableLimitedView, m_leftRightPlotGapFactor, m_maxX, m_maxY, m_minX, m_minY, m_topBottomPlotGapFactor, and result.
Referenced by DoZoom(), and ZoomRect().
|
inlineinherited |
Converts graph (floating point) coordinates into mpWindow (screen) pixel coordinates, using current mpWindow position and scale.
Definition at line 1135 of file mathplot.h.
References m_posX, and m_scaleX.
Referenced by CURSOR::Plot(), mpFXY::Plot(), mpFY::Plot(), and mpScaleY::Plot().
|
inlineinherited |
Converts graph (floating point) coordinates into mpWindow (screen) pixel coordinates, using current mpWindow position and scale.
Definition at line 1139 of file mathplot.h.
References m_posY, and m_scaleY.
Referenced by CURSOR::Plot(), mpFX::Plot(), mpFXY::Plot(), and mpScaleXBase::Plot().
|
inherited |
Definition at line 1926 of file mathplot.cpp.
References DoZoom().
|
inherited |
Zoom into current view and refresh display.
| centerPoint | The point (pixel coordinates) that will stay in the same position on the screen after the zoom (by default, the center of the mpWindow). |
Definition at line 1920 of file mathplot.cpp.
References ZoomIn(), and zoomIncrementalFactor.
Referenced by onMagnify(), onZoomIn(), PerformMouseWheelAction(), SIMULATOR_CONTROL::Zoom(), and ZoomIn().
|
inherited |
Definition at line 1938 of file mathplot.cpp.
References DoZoom().
|
inherited |
Zoom out current view and refresh display.
| centerPoint | The point (pixel coordinates) that will stay in the same position on the screen after the zoom (by default, the center of the mpWindow). |
Definition at line 1932 of file mathplot.cpp.
References zoomIncrementalFactor, and ZoomOut().
Referenced by onMagnify(), onZoomOut(), PerformMouseWheelAction(), SIMULATOR_CONTROL::Zoom(), and ZoomOut().
|
inherited |
Zoom view fitting given coordinates to the window (p0 and p1 do not need to be in any specific order)
Definition at line 1947 of file mathplot.cpp.
References AdjustLimitedView(), Fit(), m_desiredXmax, m_desiredXmin, m_desiredYmax, m_desiredYmin, m_marginBottom, m_marginLeft, m_marginRight, m_marginTop, m_maxX, m_maxY, m_minX, m_minY, m_scrX, m_scrY, m_yLocked, p2x(), p2y(), pushZoomUndo(), and ViewNeedsRefitting().
Referenced by onMouseLeftRelease().
|
inherited |
Definition at line 2022 of file mathplot.cpp.
References AdjustLimitedView(), Fit(), m_desiredXmax, m_desiredXmin, m_desiredYmax, m_desiredYmin, m_redoZoomStack, m_undoZoomStack, and zoom.
Referenced by onZoomRedo().
|
inherited |
Definition at line 2007 of file mathplot.cpp.
References AdjustLimitedView(), Fit(), m_desiredXmax, m_desiredXmin, m_desiredYmax, m_desiredYmin, m_redoZoomStack, m_undoZoomStack, and zoom.
Referenced by onZoomUndo().
|
protectedinherited |
Definition at line 1378 of file mathplot.h.
Referenced by GetAxesColour(), and SetColourTheme().
| mpScaleXBase* SIM_VIEW::m_axis_x |
Definition at line 510 of file sim_plot_tab.h.
Referenced by GetLabelX(), GetUnitsX(), IsGridShown(), prepareDCAxes(), ResetScales(), SIM_PLOT_TAB::SetTraceData(), ShowGrid(), SIM_VIEW(), updateAxes(), and UpdateAxisVisibility().
| mpScaleY* SIM_VIEW::m_axis_y1 |
Definition at line 511 of file sim_plot_tab.h.
Referenced by EnsureThirdYAxisExists(), GetAxisBySlot(), GetLabelY1(), GetUnitsY1(), GetY1Scale(), IsGridShown(), prepareDCAxes(), ResetScales(), SIM_PLOT_TAB::SetTraceData(), SetY1Scale(), ShowGrid(), SIM_VIEW(), updateAxes(), and UpdateAxisVisibility().
| mpScaleY* SIM_VIEW::m_axis_y2 |
Definition at line 512 of file sim_plot_tab.h.
Referenced by EnsureThirdYAxisExists(), GetAxisBySlot(), GetLabelY2(), SIM_PLOT_TAB::GetOrAddTrace(), GetUnitsY2(), GetY2Scale(), prepareDCAxes(), ResetScales(), SIM_PLOT_TAB::SetTraceData(), SetY2Scale(), ShowGrid(), SIM_VIEW(), updateAxes(), and UpdateAxisVisibility().
| mpScaleY* SIM_VIEW::m_axis_y3 |
Definition at line 513 of file sim_plot_tab.h.
Referenced by EnsureThirdYAxisExists(), GetAxisBySlot(), GetLabelY3(), SIM_PLOT_TAB::GetOrAddTrace(), GetUnitsY3(), GetY3Scale(), prepareDCAxes(), ResetScales(), SIM_PLOT_TAB::SetTraceData(), SetY3Scale(), ShowGrid(), SIM_VIEW(), updateAxes(), and UpdateAxisVisibility().
|
protectedinherited |
Definition at line 1376 of file mathplot.h.
Referenced by mpWindow(), and SetColourTheme().
|
protectedinherited |
Definition at line 1412 of file mathplot.h.
Referenced by mpWindow(), OnPaint(), and ~mpWindow().
|
protectedinherited |
Definition at line 1411 of file mathplot.h.
Referenced by initializeGraphicsContext(), and OnPaint().
|
protectedinherited |
Definition at line 1390 of file mathplot.h.
Referenced by mpWindow(), OnCenter(), and OnShowPopupMenu().
|
protectedinherited |
Definition at line 1391 of file mathplot.h.
Referenced by mpWindow(), OnCenter(), and OnShowPopupMenu().
|
protectedinherited |
Definition at line 1401 of file mathplot.h.
Referenced by AdjustLimitedView(), DoZoom(), Fit(), GetDesiredXmax(), mpWindow(), OnFit(), onMouseMove(), OnSize(), PerformMouseWheelAction(), SaveScreenshot(), SetXView(), ViewNeedsRefitting(), ZoomRect(), ZoomRedo(), and ZoomUndo().
|
protectedinherited |
These are updated in Fit, ZoomIn, ZoomOut, ZoomRect, SetXView, SetYView and may be different from the real borders (layer coordinates) only if lock aspect ratio is true.
Definition at line 1401 of file mathplot.h.
Referenced by AdjustLimitedView(), DoZoom(), Fit(), GetDesiredXmin(), mpWindow(), OnFit(), onMouseMove(), OnSize(), PerformMouseWheelAction(), RecomputeDesiredX(), SaveScreenshot(), SetXView(), ViewNeedsRefitting(), ZoomRect(), ZoomRedo(), and ZoomUndo().
|
protectedinherited |
Definition at line 1401 of file mathplot.h.
Referenced by AdjustLimitedView(), DoZoom(), Fit(), GetDesiredYmax(), mpWindow(), OnFit(), onMouseMove(), OnSize(), PerformMouseWheelAction(), RecomputeDesiredY(), SaveScreenshot(), SetYView(), ViewNeedsRefitting(), ZoomRect(), ZoomRedo(), and ZoomUndo().
|
protectedinherited |
Definition at line 1401 of file mathplot.h.
Referenced by AdjustLimitedView(), DoZoom(), Fit(), GetDesiredYmin(), mpWindow(), OnFit(), onMouseMove(), OnSize(), PerformMouseWheelAction(), SaveScreenshot(), SetYView(), ViewNeedsRefitting(), ZoomRect(), ZoomRedo(), and ZoomUndo().
|
protectedinherited |
Definition at line 1413 of file mathplot.h.
Referenced by EnableDoubleBuffer(), mpWindow(), and OnPaint().
|
protectedinherited |
Definition at line 1415 of file mathplot.h.
Referenced by AdjustLimitedView(), LimitView(), mpWindow(), and ViewNeedsRefitting().
|
protectedinherited |
Definition at line 1414 of file mathplot.h.
Referenced by EnableMousePanZoom(), mpWindow(), onMagnify(), onMouseMove(), and onMouseWheel().
|
protectedinherited |
Definition at line 1377 of file mathplot.h.
Referenced by mpWindow(), onMouseMove(), OnPaint(), SaveScreenshot(), and SetColourTheme().
|
protectedinherited |
Definition at line 1410 of file mathplot.h.
Referenced by mpWindow(), and OnPaint().
|
protectedinherited |
Definition at line 1410 of file mathplot.h.
Referenced by mpWindow(), and OnPaint().
| wxPoint SIM_VIEW::m_lastLegendPosition |
Definition at line 508 of file sim_plot_tab.h.
Referenced by SIM_PLOT_TAB::AddView(), and SetLegendPosition().
|
protectedinherited |
Definition at line 1374 of file mathplot.h.
Referenced by AddLayer(), CountAllLayers(), DelAllLayers(), DelLayer(), GetLayer(), GetLayerByName(), IsInsideInfoLayer(), mpWindow(), onMouseMove(), OnPaint(), SaveScreenshot(), and SetColourTheme().
|
protectedinherited |
Definition at line 1406 of file mathplot.h.
Referenced by Fit(), mpWindow(), RecomputeDesiredX(), and ViewNeedsRefitting().
| mpInfoLegend* SIM_VIEW::m_legend |
Definition at line 514 of file sim_plot_tab.h.
Referenced by SIM_PLOT_TAB::AddView(), GetLegendPosition(), IsLegendShown(), SetLegendPosition(), ShowLegend(), and SIM_VIEW().
|
protectedinherited |
Definition at line 1408 of file mathplot.h.
Referenced by DoZoom(), Fit(), GetMarginBottom(), mpWindow(), OnCenter(), RecomputeDesiredY(), SetMarginBottom(), SetMargins(), and ZoomRect().
|
protectedinherited |
Definition at line 1408 of file mathplot.h.
Referenced by DoZoom(), Fit(), GetMarginLeft(), mpWindow(), OnCenter(), RecomputeDesiredX(), SetMarginLeft(), SetMargins(), and ZoomRect().
|
protectedinherited |
Definition at line 1408 of file mathplot.h.
Referenced by DoZoom(), Fit(), GetMarginRight(), mpWindow(), OnCenter(), RecomputeDesiredX(), SetMarginRight(), SetMargins(), and ZoomRect().
|
protectedinherited |
Definition at line 1408 of file mathplot.h.
Referenced by DoZoom(), Fit(), GetMarginTop(), mpWindow(), OnCenter(), RecomputeDesiredY(), SetMargins(), SetMarginTop(), and ZoomRect().
|
protectedinherited |
Definition at line 1381 of file mathplot.h.
Referenced by AdjustLimitedView(), DoZoom(), Fit(), GetBoundingBox(), mpWindow(), SaveScreenshot(), UpdateBBox(), ViewNeedsRefitting(), and ZoomRect().
|
protectedinherited |
Definition at line 1383 of file mathplot.h.
Referenced by AdjustLimitedView(), DoZoom(), Fit(), GetBoundingBox(), mpWindow(), SaveScreenshot(), UpdateBBox(), ViewNeedsRefitting(), and ZoomRect().
|
protectedinherited |
Definition at line 1380 of file mathplot.h.
Referenced by AdjustLimitedView(), DoZoom(), Fit(), GetBoundingBox(), mpWindow(), SaveScreenshot(), UpdateBBox(), ViewNeedsRefitting(), and ZoomRect().
|
protectedinherited |
Definition at line 1382 of file mathplot.h.
Referenced by AdjustLimitedView(), DoZoom(), Fit(), GetBoundingBox(), mpWindow(), SaveScreenshot(), UpdateBBox(), ViewNeedsRefitting(), and ZoomRect().
|
protectedinherited |
Definition at line 1418 of file mathplot.h.
Referenced by onMouseLeftDown(), onMouseLeftRelease(), and onMouseMove().
|
protectedinherited |
Definition at line 1417 of file mathplot.h.
Referenced by OnMouseMiddleDown(), onMouseMove(), and onZoomIn().
|
protectedinherited |
Definition at line 1416 of file mathplot.h.
Referenced by mpWindow(), onMouseWheel(), and SetMouseWheelActions().
|
protectedinherited |
Definition at line 1419 of file mathplot.h.
Referenced by mpWindow(), onMouseLeftDown(), onMouseLeftRelease(), and onMouseMove().
|
private |
Definition at line 534 of file sim_plot_tab.h.
Referenced by GetAxisSlot(), GetPlotTab(), GetUnitsForTrace(), OnXViewChanged(), prepareDCAxes(), ResetScales(), SetSmithChart(), SIM_VIEW(), updateAxes(), UpdateAxisVisibility(), UpdateSmithGridColor(), and UpdateSmithReferenceImpedance().
|
protectedinherited |
Definition at line 1375 of file mathplot.h.
Referenced by GetPopupMenu(), mpWindow(), and OnShowPopupMenu().
|
protectedinherited |
Definition at line 1386 of file mathplot.h.
Referenced by AdjustLimitedView(), DoZoom(), Fit(), GetPosX(), mpWindow(), onMouseMove(), p2x(), PerformMouseWheelAction(), RecomputeDesiredX(), SetPos(), SetPosX(), SetXView(), and x2p().
|
protectedinherited |
Definition at line 1387 of file mathplot.h.
Referenced by AdjustLimitedView(), DoZoom(), Fit(), GetPosY(), mpWindow(), onMouseMove(), p2y(), PerformMouseWheelAction(), RecomputeDesiredY(), SetPos(), SetPosY(), SetYView(), and y2p().
|
protectedinherited |
Definition at line 1423 of file mathplot.h.
Referenced by OnShowPopupMenu(), pushZoomUndo(), RedoZoomStackSize(), ZoomRedo(), and ZoomUndo().
|
protectedinherited |
Definition at line 1384 of file mathplot.h.
Referenced by DoZoom(), Fit(), GetScaleX(), mpWindow(), onMouseMove(), p2x(), PerformMouseWheelAction(), RecomputeDesiredX(), SetScaleX(), and x2p().
|
protectedinherited |
Definition at line 1385 of file mathplot.h.
Referenced by DoZoom(), Fit(), GetScaleY(), mpWindow(), onMouseMove(), p2y(), PerformMouseWheelAction(), RecomputeDesiredY(), SetScaleY(), and y2p().
|
protectedinherited |
Definition at line 1388 of file mathplot.h.
Referenced by DoZoom(), Fit(), GetScrX(), GetXScreen(), mpWindow(), OnCenter(), OnPaint(), RecomputeDesiredX(), SaveScreenshot(), SetScr(), and ZoomRect().
|
protectedinherited |
Definition at line 1389 of file mathplot.h.
Referenced by DoZoom(), Fit(), GetScrY(), GetYScreen(), mpWindow(), OnCenter(), OnPaint(), RecomputeDesiredY(), SaveScreenshot(), SetScr(), and ZoomRect().
|
private |
Definition at line 538 of file sim_plot_tab.h.
Referenced by IsSmithChart(), onSmithDClick(), onSmithLeftDown(), onSmithLeftUp(), onSmithMagnify(), onSmithMenuCommand(), onSmithMiddleDown(), onSmithMotion(), onSmithMouseWheel(), onSmithRightDown(), onSmithRightUp(), SetSmithChart(), SIM_VIEW(), and UpdateAxisVisibility().
|
private |
Definition at line 536 of file sim_plot_tab.h.
Referenced by SetSmithChart(), SIM_VIEW(), UpdateSmithGridColor(), and UpdateSmithReferenceImpedance().
|
private |
Definition at line 542 of file sim_plot_tab.h.
Referenced by onSmithLeftDown(), onSmithLeftUp(), onSmithMotion(), SetSmithChart(), and SIM_VIEW().
|
private |
Definition at line 544 of file sim_plot_tab.h.
Referenced by onSmithMenuCommand(), and onSmithRightDown().
|
private |
Definition at line 540 of file sim_plot_tab.h.
Referenced by GetSmithPan(), getSmithView(), onSmithMenuCommand(), ResetSmithView(), SetSmithView(), SmithPanBy(), and SmithZoomAt().
|
private |
Definition at line 543 of file sim_plot_tab.h.
Referenced by onSmithLeftDown(), and onSmithMotion().
|
private |
Definition at line 541 of file sim_plot_tab.h.
Referenced by onSmithLeftDown(), onSmithLeftUp(), onSmithMotion(), SetSmithChart(), and SIM_VIEW().
|
private |
Definition at line 539 of file sim_plot_tab.h.
Referenced by getSmithView(), GetSmithZoom(), ResetSmithView(), SetSmithView(), SIM_VIEW(), and SmithZoomAt().
|
protectedinherited |
Definition at line 1405 of file mathplot.h.
Referenced by Fit(), mpWindow(), RecomputeDesiredY(), and ViewNeedsRefitting().
|
protectedinherited |
Definition at line 1422 of file mathplot.h.
Referenced by OnShowPopupMenu(), pushZoomUndo(), UndoZoomStackSize(), ZoomRedo(), and ZoomUndo().
|
protectedinherited |
Definition at line 1393 of file mathplot.h.
Referenced by DoZoom(), GetYLocked(), LockY(), mpWindow(), PerformMouseWheelAction(), and ZoomRect().
|
protectedinherited |
Definition at line 1420 of file mathplot.h.
Referenced by mpWindow(), onMouseLeftDown(), onMouseLeftRelease(), onMouseMove(), and OnPaint().
|
protectedinherited |
Definition at line 1421 of file mathplot.h.
Referenced by onMouseMove(), and OnPaint().
|
staticinherited |
This value sets the zoom steps whenever the user clicks "Zoom in/out" or performs zoom with the mouse wheel.
It must be a number above unity. This number is used for zoom in, and its inverse for zoom out. Set to 1.5 by default.
Definition at line 1238 of file mathplot.h.
Referenced by PerformMouseWheelAction(), SIMULATOR_CONTROL::Zoom(), ZoomIn(), and ZoomOut().