28#ifndef __SIM_PLOT_PANEL_H 
   29#define __SIM_PLOT_PANEL_H 
   86        Move( wxPoint( aX, 0 ) );
 
 
   94    bool Inside( 
const wxPoint& aPoint ) 
const override;
 
   96    void Move( wxPoint aDelta ) 
override;
 
 
  141    void SetName( 
const wxString& aName )
 override 
 
  165    void SetData( 
const std::vector<double>& aX, 
const std::vector<double>& aY )
 override 
 
 
  208    SIM_PLOT_TAB( 
const wxString& aSimCommand, wxWindow* parent );
 
  240            return m_axis_y1->GetAxisMinMax( aMin, aMax );
 
 
  248            return m_axis_y2->GetAxisMinMax( aMin, aMax );
 
 
  256            return m_axis_y3->GetAxisMinMax( aMin, aMax );
 
 
  261    void SetY1Scale( 
bool aLock, 
double aMin, 
double aMax );
 
  262    void SetY2Scale( 
bool aLock, 
double aMin, 
double aMax );
 
  263    void SetY3Scale( 
bool aLock, 
double aMin, 
double aMax );
 
  279        return trace == 
m_traces.end() ? nullptr : trace->second;
 
 
  368    void SetTraceData( 
TRACE* aTrace, std::vector<double>& aX, std::vector<double>& aY,
 
  369                       int aSweepCount, 
size_t aSweepSize, 
bool aIsMultiRun = 
false,
 
  370                       const std::vector<wxString>& aMultiRunLabels = {} );
 
  372    bool DeleteTrace( 
const wxString& aVectorName, 
int aTraceType );
 
  388                       "mpWindow::MouseWheelAction enum must match SIM_MOUSE_WHEEL_ACTION" );
 
 
  401    wxString 
getTraceId( 
const wxString& aVectorName, 
int aType )
 const 
  403        return wxString::Format( wxS( 
"%s%d" ), aVectorName, aType & 
SPT_Y_AXIS_MASK );
 
 
The SIMULATOR_FRAME holds the main user-interface for running simulations.
 
CURSOR(TRACE *aTrace, SIM_PLOT_TAB *aPlotTab)
 
const wxRealPoint & GetCoords() const
 
void Move(wxPoint aDelta) override
Moves the layer rectangle of given pixel deltas.
 
static constexpr int DRAG_MARGIN
 
bool Inside(const wxPoint &aPoint) const override
Checks whether a point is inside the info box rectangle.
 
void doSetCoordX(double aValue)
 
bool OnDoubleClick(const wxPoint &aPoint, mpWindow &aWindow) override
 
void SetCoordX(double aValue)
 
void UpdateReference() override
Updates the rectangle reference point.
 
void Plot(wxDC &aDC, mpWindow &aWindow) override
Plot method.
 
The SIMULATOR_FRAME holds the main user-interface for running simulations.
 
bool DeleteTrace(const wxString &aVectorName, int aTraceType)
 
wxString GetLabelY1() const
 
mpWindow * GetPlotWin() const
 
void prepareDCAxes(int aNewTraceType)
Create/Ensure axes are available for plotting.
 
void ShowGrid(bool aEnable)
 
void SetTraceData(TRACE *aTrace, std::vector< double > &aX, std::vector< double > &aY, int aSweepCount, size_t aSweepSize, bool aIsMultiRun=false, const std::vector< wxString > &aMultiRunLabels={})
 
wxString GetUnitsY2() const
 
void SetY2Scale(bool aLock, double aMin, double aMax)
 
TRACE * GetTrace(const wxString &aVecName, int aType) const
 
wxString GetLabelX() const
 
const std::map< wxString, TRACE * > & GetTraces() const
 
wxString GetLabelY3() const
 
void SetY1Scale(bool aLock, double aMin, double aMax)
 
bool GetDottedSecondary() const
Turn on/off the cursor for a particular trace.
 
wxPoint GetLegendPosition() const
 
std::vector< std::pair< wxString, wxString > > m_measurements
 
void UpdateAxisVisibility()
 
void SetY3Scale(bool aLock, double aMin, double aMax)
 
std::map< wxString, TRACE * > m_traces
 
bool IsLegendShown() const
 
std::vector< std::pair< wxString, wxString > > & Measurements()
 
void UpdateTraceStyle(TRACE *trace)
Update plot colors.
 
void SetLegendPosition(const wxPoint &aPosition)
 
void ResetScales(bool aIncludeX)
Update trace line style.
 
void ShowLegend(bool aEnable)
 
bool GetY3Scale(double *aMin, double *aMax) const
 
SIM_PLOT_TAB(const wxString &aSimCommand, wxWindow *parent)
 
wxString GetLabelY2() const
 
void EnableCursor(TRACE *aTrace, int aCursorId, const wxString &aSignalName)
 
wxString GetUnitsX() const
 
void OnLanguageChanged() override
Getter for math plot window.
 
void EnsureThirdYAxisExists()
 
wxString getTraceId(const wxString &aVectorName, int aType) const
Construct the plot axes for DC simulation plot.
 
TRACE * GetOrAddTrace(const wxString &aVectorName, int aType)
 
void SetDottedSecondary(bool aEnable)
Draw secondary signal traces (current or phase) with dotted lines.
 
void ApplyPreferences(const SIM_PREFERENCES &aPrefs) override
 
wxPoint m_LastLegendPosition
 
wxString GetUnitsY1() const
 
std::map< wxString, wxColour > m_sessionTraceColors
 
static mpWindow::MouseWheelActionSet convertMouseWheelActions(const SIM_MOUSE_WHEEL_ACTION_SET &s)
 
void DisableCursor(TRACE *aTrace, int aCursorId)
Reset scale ranges to fit the current traces.
 
bool GetY2Scale(double *aMin, double *aMax) const
 
void updateAxes(int aNewTraceType=SIM_TRACE_TYPE::SPT_UNKNOWN)
 
bool GetY1Scale(double *aMin, double *aMax) const
 
wxString GetUnitsY3() const
 
std::vector< wxString > m_multiRunLabels
 
void SetIsMultiRun(bool aIsMultiRun)
 
void SetTraceColour(const wxColour &aColour)
 
void SetName(const wxString &aName) override
Set layer name.
 
void SetMultiRunLabels(const std::vector< wxString > &aLabels)
 
std::map< int, CURSOR * > & GetCursors()
 
SIM_TRACE_TYPE GetType() const
 
std::map< int, CURSOR * > m_cursors
 
bool HasCursor(int aCursorId)
 
TRACE(const wxString &aName, SIM_TRACE_TYPE aType)
 
void SetData(const std::vector< double > &aX, const std::vector< double > &aY) override
Assigns new data set for the trace.
 
const std::vector< wxString > & GetMultiRunLabels() const
 
void SetCursor(int aCursorId, CURSOR *aCursor)
 
const std::vector< double > & GetDataY() const
 
wxColour GetTraceColour() const
 
const std::vector< double > & GetDataX() const
 
CURSOR * GetCursor(int aCursorId)
 
mpFXYVector(const wxString &name=wxEmptyString, int flags=mpALIGN_NE)
 
std::vector< double > m_ys
 
std::vector< double > m_xs
The internal copy of the set of data to draw.
 
virtual void SetData(const std::vector< double > &xs, const std::vector< double > &ys)
Changes the internal data: the set of points to draw.
 
mpInfoLayer()
Default constructor.
 
Implements the legend to be added to the plot This layer allows you to add a legend to describe the p...
 
void SetContinuity(bool continuity)
Set the 'continuity' property of the layer (true:draws a continuous line, false:draws separate points...
 
void ShowName(bool show)
Shows or hides the text label with the name of the layer (default is visible).
 
virtual void SetName(const wxString &name)
Set layer name.
 
Plot layer implementing a y-scale ruler.
 
Canvas for plotting mpLayer implementations.
 
MouseWheelAction
Enumerates the possible mouse wheel actions that can be performed on the plot.
 
Class is responsible for providing colors for traces on simulation plot.
 
wxDECLARE_EVENT(EVT_SIM_CURSOR_UPDATE, wxCommandEvent)
 
Contains the set of modified mouse wheel actions that can be performed on a simulator plot.
 
SIM_MOUSE_WHEEL_ACTION vertical_unmodified
 
SIM_MOUSE_WHEEL_ACTION vertical_with_alt
 
SIM_MOUSE_WHEEL_ACTION horizontal
 
SIM_MOUSE_WHEEL_ACTION vertical_with_ctrl
 
SIM_MOUSE_WHEEL_ACTION vertical_with_shift
 
Contains preferences pertaining to the simulator.
 
SIM_MOUSE_WHEEL_ACTION_SET mouse_wheel_actions
 
Contains the set of modified mouse wheel actions that can be performed on the plot.
 
MouseWheelAction horizontal
 
MouseWheelAction verticalWithShift
 
MouseWheelAction verticalWithCtrl
 
MouseWheelAction verticalWithAlt
 
MouseWheelAction verticalUnmodified