21#ifndef PANEL_COLOR_SETTINGS_H 
   22#define PANEL_COLOR_SETTINGS_H 
   50        return _( 
"Reset all colors in this theme to the KiCad defaults" );
 
 
   53    bool Show( 
bool show ) 
override;
 
 
Color settings are a bit different than most of the settings objects in that there can be more than o...
 
A simple color swatch of the kind used to set layer colors.
 
A color representation with 4 components: red, green, blue, alpha.
 
PANEL_COLOR_SETTINGS_BASE(wxWindow *parent, wxWindowID id=wxID_ANY, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(-1,-1), long style=wxTAB_TRAVERSAL, const wxString &name=wxEmptyString)
 
void createThemeList(const wxString &aCurrent)
Builds the theme listbox and sets the selection to the current theme.
 
void createSwatch(int aLayer, const wxString &aName)
 
std::vector< int > m_validLayers
A list of layer IDs that are valid for the current color settings dialog.
 
void OnThemeChanged(wxCommandEvent &aEvent) override
 
virtual bool saveCurrentTheme(bool aValidate)
 
std::string m_colorNamespace
A namespace that will be passed to SETTINGS_MANAGER::SaveColorSettings.
 
virtual void ResetPanel() override
Reset the contents of this panel.
 
void OnBtnOpenThemeFolderClicked(wxCommandEvent &event) override
 
void OnColorChanged(wxCommandEvent &aEvent)
 
std::map< int, wxStaticText * > m_labels
 
virtual void onNewThemeSelected()
Event fired when a new theme is selected that can be overridden in children.
 
wxString GetSettingsDropdownName(COLOR_SETTINGS *aSettings)
Retrieves the drop down name to be displayed for a color setting.
 
virtual wxString GetResetTooltip() const override
Get the tooltip the reset button should display when showing this panel.
 
void updateColor(int aLayer, const KIGFX::COLOR4D &aColor)
 
COLOR_SETTINGS * m_currentSettings
 
PANEL_COLOR_SETTINGS(wxWindow *aParent)
 
void ShowColorContextMenu(wxMouseEvent &aEvent, int aLayer)
 
void OnLeftDownTheme(wxMouseEvent &event) override
 
bool Show(bool show) override
 
virtual void createSwatches()=0
 
virtual void onColorChanged()
Event fired when the user changes any color.
 
~PANEL_COLOR_SETTINGS()=default
 
virtual bool validateSave(bool aQuiet=false)
Performs a pre-save validation of the current color theme.
 
std::map< int, COLOR_SWATCH * > m_swatches