KiCad PCB EDA Suite
Loading...
Searching...
No Matches
SIM_PLOT_COLORS Class Reference

#include <sim_plot_colors.h>

Public Types

enum class  COLOR_SET { BACKGROUND , FOREGROUND , AXIS , TRACE }
 

Public Member Functions

 SIM_PLOT_COLORS ()
 
 ~SIM_PLOT_COLORS ()
 
wxColour GetPlotColor (enum COLOR_SET aColorId)
 
wxColour GenerateColor (std::map< wxString, wxColour > aTraceColors)
 

Static Public Member Functions

static void FillDefaultColorList (bool aWhiteBg)
 Fills m_colorList by a default set of colors. More...
 

Private Member Functions

enum COLOR_SET getPlotColorCount ()
 

Static Private Attributes

static std::vector< wxColour > m_colorList
 < The color list to draw traces, bg, fg, axis... More...
 

Detailed Description

Definition at line 42 of file sim_plot_colors.h.

Member Enumeration Documentation

◆ COLOR_SET

enum class SIM_PLOT_COLORS::COLOR_SET
strong
Enumerator
BACKGROUND 
FOREGROUND 
AXIS 
TRACE 

Definition at line 49 of file sim_plot_colors.h.

Constructor & Destructor Documentation

◆ SIM_PLOT_COLORS()

SIM_PLOT_COLORS::SIM_PLOT_COLORS ( )
inline

Definition at line 45 of file sim_plot_colors.h.

◆ ~SIM_PLOT_COLORS()

SIM_PLOT_COLORS::~SIM_PLOT_COLORS ( )
inline

Definition at line 46 of file sim_plot_colors.h.

Member Function Documentation

◆ FillDefaultColorList()

void SIM_PLOT_COLORS::FillDefaultColorList ( bool  aWhiteBg)
static

Fills m_colorList by a default set of colors.

Parameters
aWhiteBg= true to use a white (or clear) background false to use a dark background

Definition at line 95 of file sim_plot_colors.cpp.

References m_colorList.

Referenced by SIMULATOR_FRAME_UI::SIMULATOR_FRAME_UI(), and SIMULATOR_FRAME_UI::ToggleDarkModePlots().

◆ GenerateColor()

wxColour SIM_PLOT_COLORS::GenerateColor ( std::map< wxString, wxColour >  aTraceColors)
Returns
a new color from the palette
Parameters
acollection of traces in the plot panel

Definition at line 132 of file sim_plot_colors.cpp.

References GetPlotColor(), getPlotColorCount(), and TRACE.

Referenced by SIM_PLOT_TAB::GetOrAddTrace().

◆ GetPlotColor()

wxColour SIM_PLOT_COLORS::GetPlotColor ( enum COLOR_SET  aColorId)
Returns
the wxColor selected in color list.
Parameters
aColorIdis the index in color list

Definition at line 85 of file sim_plot_colors.cpp.

References m_colorList.

Referenced by GenerateColor(), and SIM_PLOT_TAB::UpdatePlotColors().

◆ getPlotColorCount()

enum COLOR_SET SIM_PLOT_COLORS::getPlotColorCount ( )
inlineprivate
Returns
the count of colors in color list

Definition at line 80 of file sim_plot_colors.h.

References m_colorList.

Referenced by GenerateColor().

Member Data Documentation

◆ m_colorList

std::vector< wxColour > SIM_PLOT_COLORS::m_colorList
staticprivate

< The color list to draw traces, bg, fg, axis...

Definition at line 84 of file sim_plot_colors.h.

Referenced by FillDefaultColorList(), GetPlotColor(), and getPlotColorCount().


The documentation for this class was generated from the following files: