KiCad PCB EDA Suite
|
#include <panel_gerbview_color_settings.h>
Public Types | |
enum | COLOR_CONTEXT_ID { ID_COPY = wxID_HIGHEST + 1 , ID_PASTE , ID_REVERT } |
Public Member Functions | |
PANEL_GERBVIEW_COLOR_SETTINGS (wxWindow *aParent) | |
~PANEL_GERBVIEW_COLOR_SETTINGS () override | |
virtual void | ResetPanel () override |
Reset the contents of this panel. | |
virtual wxString | GetResetTooltip () const override |
Get the tooltip the reset button should display when showing this panel. | |
bool | Show (bool show) override |
wxString | GetHelpTextAtPoint (const wxPoint &aPt, wxHelpEvent::Origin aOrigin) const override |
Overridden to supply the reset button tooltip when queried with { -INT_MAX, INT_MAX }. | |
Public Attributes | |
wxCheckBox * | m_optOverrideColors |
Protected Member Functions | |
bool | TransferDataFromWindow () override |
bool | TransferDataToWindow () override |
void | createSwatches () override |
void | OnBtnOpenThemeFolderClicked (wxCommandEvent &event) override |
void | OnLeftDownTheme (wxMouseEvent &event) override |
void | OnThemeChanged (wxCommandEvent &aEvent) override |
void | ShowColorContextMenu (wxMouseEvent &aEvent, int aLayer) |
void | OnColorChanged (wxCommandEvent &aEvent) |
void | updateSwatches () |
void | createThemeList (const wxString &aCurrent) |
Builds the theme listbox and sets the selection to the current theme. | |
void | createSwatch (int aLayer, const wxString &aName) |
void | updateColor (int aLayer, const KIGFX::COLOR4D &aColor) |
virtual bool | saveCurrentTheme (bool aValidate) |
virtual bool | validateSave (bool aQuiet=false) |
Performs a pre-save validation of the current color theme. | |
virtual void | onNewThemeSelected () |
Event fired when a new theme is selected that can be overridden in children. | |
virtual void | onColorChanged () |
Event fired when the user changes any color. | |
wxString | GetSettingsDropdownName (COLOR_SETTINGS *aSettings) |
Retrieves the drop down name to be displayed for a color setting. | |
virtual void | OnSize (wxSizeEvent &event) |
virtual void | OnOverrideItemColorsClicked (wxCommandEvent &event) |
Protected Attributes | |
COLOR_SETTINGS * | m_currentSettings |
std::map< int, wxStaticText * > | m_labels |
std::map< int, COLOR_SWATCH * > | m_swatches |
KIGFX::COLOR4D | m_copied |
std::vector< int > | m_validLayers |
A list of layer IDs that are valid for the current color settings dialog. | |
int | m_backgroundLayer |
std::string | m_colorNamespace |
A namespace that will be passed to SETTINGS_MANAGER::SaveColorSettings. | |
wxBoxSizer * | m_mainSizer |
wxStaticText * | m_staticText9 |
wxChoice * | m_cbTheme |
wxButton * | m_btnOpenFolder |
WX_PANEL * | m_panel1 |
wxBoxSizer * | m_colorsMainSizer |
wxScrolledWindow * | m_colorsListWindow |
wxFlexGridSizer * | m_colorsGridSizer |
wxBoxSizer * | m_previewPanelSizer |
Definition at line 30 of file panel_gerbview_color_settings.h.
|
inherited |
Enumerator | |
---|---|
ID_COPY | |
ID_PASTE | |
ID_REVERT |
Definition at line 39 of file panel_color_settings.h.
PANEL_GERBVIEW_COLOR_SETTINGS::PANEL_GERBVIEW_COLOR_SETTINGS | ( | wxWindow * | aParent | ) |
Definition at line 29 of file panel_gerbview_color_settings.cpp.
References PANEL_COLOR_SETTINGS::createThemeList(), DEFAULT_THEME, GERBER_DRAWLAYERS_COUNT, GERBVIEW_FRAME_NAME, GERBVIEW_LAYER_ID_END, GERBVIEW_LAYER_ID_START, GetAppSettings(), GetColorSettings(), JSON_SETTINGS::GetFilename(), LAYER_DCODES, LAYER_GERBVIEW_BACKGROUND, PANEL_COLOR_SETTINGS::m_backgroundLayer, PANEL_COLOR_SETTINGS::m_colorNamespace, APP_SETTINGS_BASE::m_ColorTheme, PANEL_COLOR_SETTINGS::m_currentSettings, PANEL_COLOR_SETTINGS_BASE::m_optOverrideColors, PANEL_COLOR_SETTINGS::m_validLayers, and PANEL_COLOR_SETTINGS::PANEL_COLOR_SETTINGS().
|
override |
Definition at line 63 of file panel_gerbview_color_settings.cpp.
References PANEL_COLOR_SETTINGS::m_currentSettings.
|
protectedinherited |
Definition at line 244 of file panel_color_settings.cpp.
References color, FIRST_BUTTON_ID, COLOR_SETTINGS::GetDefaultColor(), m_backgroundLayer, PANEL_COLOR_SETTINGS_BASE::m_cbTheme, PANEL_COLOR_SETTINGS_BASE::m_colorsGridSizer, PANEL_COLOR_SETTINGS_BASE::m_colorsListWindow, m_currentSettings, m_labels, m_swatches, OnColorChanged(), onNewThemeSelected(), ShowColorContextMenu(), and SWATCH_MEDIUM.
Referenced by PANEL_EESCHEMA_COLOR_SETTINGS::createSwatches(), PANEL_FP_EDITOR_COLOR_SETTINGS::createSwatches(), PANEL_GERBVIEW_COLOR_SETTINGS::createSwatches(), and PANEL_PCBNEW_COLOR_SETTINGS::createSwatches().
|
overrideprotectedvirtual |
Implements PANEL_COLOR_SETTINGS.
Definition at line 84 of file panel_gerbview_color_settings.cpp.
References _, PANEL_COLOR_SETTINGS::createSwatch(), GERBVIEW_LAYER_ID_START, LAYER_DCODES, LAYER_GERBVIEW_AXES, LAYER_GERBVIEW_BACKGROUND, LAYER_GERBVIEW_DRAWINGSHEET, LAYER_GERBVIEW_GRID, LAYER_GERBVIEW_PAGE_LIMITS, LAYER_NEGATIVE_OBJECTS, and PANEL_COLOR_SETTINGS::m_validLayers.
|
protectedinherited |
Builds the theme listbox and sets the selection to the current theme.
aCurrent | is the filename of the current color theme (no extension) |
Definition at line 214 of file panel_color_settings.cpp.
References _, GetSettingsDropdownName(), GetSettingsManager(), PANEL_COLOR_SETTINGS_BASE::m_cbTheme, name, and Pgm().
Referenced by OnLeftDownTheme(), PANEL_EESCHEMA_COLOR_SETTINGS::PANEL_EESCHEMA_COLOR_SETTINGS(), PANEL_FP_EDITOR_COLOR_SETTINGS::PANEL_FP_EDITOR_COLOR_SETTINGS(), PANEL_GERBVIEW_COLOR_SETTINGS::PANEL_GERBVIEW_COLOR_SETTINGS(), and PANEL_PCBNEW_COLOR_SETTINGS::PANEL_PCBNEW_COLOR_SETTINGS().
|
inlineoverrideinherited |
Overridden to supply the reset button tooltip when queried with { -INT_MAX, INT_MAX }.
Definition at line 72 of file resettable_panel.h.
References GetResetTooltip().
|
inlineoverridevirtualinherited |
Get the tooltip the reset button should display when showing this panel.
Reimplemented from RESETTABLE_PANEL.
Definition at line 48 of file panel_color_settings.h.
References _.
|
protectedinherited |
Retrieves the drop down name to be displayed for a color setting.
Definition at line 392 of file panel_color_settings.cpp.
References _, COLOR_SETTINGS::GetName(), JSON_SETTINGS::IsReadOnly(), and name.
Referenced by createThemeList(), and OnThemeChanged().
|
overrideprotectedvirtualinherited |
Reimplemented from PANEL_COLOR_SETTINGS_BASE.
Definition at line 65 of file panel_color_settings.cpp.
References SETTINGS_MANAGER::GetColorSettingsPath(), and LaunchExternal().
|
protectedinherited |
Definition at line 338 of file panel_color_settings.cpp.
References FIRST_BUTTON_ID, COLOR_SWATCH::GetSwatchColor(), and updateColor().
Referenced by createSwatch().
|
inlineprotectedvirtualinherited |
Event fired when the user changes any color.
Reimplemented in PANEL_EESCHEMA_COLOR_SETTINGS, and PANEL_PCBNEW_COLOR_SETTINGS.
Definition at line 98 of file panel_color_settings.h.
Referenced by updateColor().
|
overrideprotectedvirtualinherited |
Reimplemented from PANEL_COLOR_SETTINGS_BASE.
Definition at line 113 of file panel_color_settings.cpp.
References createThemeList(), and m_currentSettings.
|
inlineprotectedvirtualinherited |
Event fired when a new theme is selected that can be overridden in children.
Reimplemented in PANEL_EESCHEMA_COLOR_SETTINGS, and PANEL_PCBNEW_COLOR_SETTINGS.
Definition at line 93 of file panel_color_settings.h.
Referenced by createSwatch(), OnThemeChanged(), and Show().
|
inlineprotectedvirtualinherited |
Reimplemented in PANEL_EESCHEMA_COLOR_SETTINGS.
Definition at line 56 of file panel_color_settings_base.h.
Referenced by PANEL_COLOR_SETTINGS_BASE(), and ~PANEL_COLOR_SETTINGS_BASE().
|
inlineprotectedvirtualinherited |
Reimplemented in PANEL_EESCHEMA_COLOR_SETTINGS, and PANEL_PCBNEW_COLOR_SETTINGS.
Definition at line 53 of file panel_color_settings_base.h.
Referenced by PANEL_COLOR_SETTINGS_BASE(), and ~PANEL_COLOR_SETTINGS_BASE().
|
overrideprotectedvirtualinherited |
Reimplemented from PANEL_COLOR_SETTINGS_BASE.
Definition at line 122 of file panel_color_settings.cpp.
References _, SETTINGS_MANAGER::AddNewColorSettings(), SETTINGS_MANAGER::GetColorSettingsPath(), JSON_SETTINGS::GetFilename(), COLOR_SETTINGS::GetOverrideSchItemColors(), SETTINGS_MANAGER::GetPathForSettingsFile(), GetSettingsDropdownName(), PGM_BASE::GetSettingsManager(), JSON_SETTINGS::IsReadOnly(), PANEL_COLOR_SETTINGS_BASE::m_cbTheme, m_currentSettings, PANEL_COLOR_SETTINGS_BASE::m_optOverrideColors, m_validLayers, onNewThemeSelected(), Pgm(), saveCurrentTheme(), JSON_SETTINGS::SaveToFile(), COLOR_SETTINGS::SetColor(), COLOR_SETTINGS::SetName(), JSON_SETTINGS::SetReadOnly(), and updateSwatches().
|
overridevirtualinherited |
Reset the contents of this panel.
Implements RESETTABLE_PANEL.
Reimplemented in PANEL_EESCHEMA_COLOR_SETTINGS, and PANEL_PCBNEW_COLOR_SETTINGS.
Definition at line 72 of file panel_color_settings.cpp.
References m_currentSettings, m_swatches, and COLOR_SWATCH::SetSwatchColor().
Referenced by PANEL_EESCHEMA_COLOR_SETTINGS::ResetPanel(), and PANEL_PCBNEW_COLOR_SETTINGS::ResetPanel().
|
protectedvirtualinherited |
Reimplemented in PANEL_EESCHEMA_COLOR_SETTINGS.
Definition at line 371 of file panel_color_settings.cpp.
References GetColorSettings(), PGM_BASE::GetSettingsManager(), m_colorNamespace, m_currentSettings, PANEL_COLOR_SETTINGS_BASE::m_optOverrideColors, m_validLayers, Pgm(), SETTINGS_MANAGER::SaveColorSettings(), COLOR_SETTINGS::SetColor(), COLOR_SETTINGS::SetOverrideSchItemColors(), and validateSave().
Referenced by OnThemeChanged(), PANEL_EESCHEMA_COLOR_SETTINGS::saveCurrentTheme(), and updateColor().
|
overrideinherited |
Definition at line 90 of file panel_color_settings.cpp.
References PANEL_COLOR_SETTINGS_BASE::m_cbTheme, m_currentSettings, onNewThemeSelected(), and updateSwatches().
|
protectedinherited |
Definition at line 287 of file panel_color_settings.cpp.
References _, KIUI::AddMenuItem(), copy, COLOR_SETTINGS::GetColor(), ID_COPY, ID_PASTE, ID_REVERT, KiBitmap(), PANEL_COLOR_SETTINGS_BASE::m_cbTheme, m_copied, m_currentSettings, paste, undo, COLOR4D::UNSPECIFIED, and updateColor().
Referenced by createSwatch().
|
overrideprotected |
Definition at line 69 of file panel_gerbview_color_settings.cpp.
References GetAppSettings(), and PANEL_COLOR_SETTINGS::m_currentSettings.
|
overrideprotected |
Definition at line 78 of file panel_gerbview_color_settings.cpp.
|
protectedinherited |
Definition at line 348 of file panel_color_settings.cpp.
References m_backgroundLayer, m_currentSettings, m_swatches, onColorChanged(), and saveCurrentTheme().
Referenced by OnColorChanged(), and ShowColorContextMenu().
|
protectedinherited |
Definition at line 197 of file panel_color_settings.cpp.
References createSwatches(), m_backgroundLayer, m_currentSettings, and m_swatches.
Referenced by OnThemeChanged(), and Show().
|
inlineprotectedvirtualinherited |
Performs a pre-save validation of the current color theme.
aQuiet | will suppress any warning output (prompt dialogs) |
Reimplemented in PANEL_EESCHEMA_COLOR_SETTINGS.
Definition at line 85 of file panel_color_settings.h.
Referenced by saveCurrentTheme().
|
protectedinherited |
Definition at line 121 of file panel_color_settings.h.
Referenced by createSwatch(), PANEL_COLOR_SETTINGS(), PANEL_EESCHEMA_COLOR_SETTINGS::PANEL_EESCHEMA_COLOR_SETTINGS(), PANEL_FP_EDITOR_COLOR_SETTINGS::PANEL_FP_EDITOR_COLOR_SETTINGS(), PANEL_GERBVIEW_COLOR_SETTINGS::PANEL_GERBVIEW_COLOR_SETTINGS(), PANEL_PCBNEW_COLOR_SETTINGS::PANEL_PCBNEW_COLOR_SETTINGS(), updateColor(), and updateSwatches().
|
protectedinherited |
Definition at line 45 of file panel_color_settings_base.h.
Referenced by PANEL_COLOR_SETTINGS::PANEL_COLOR_SETTINGS(), PANEL_COLOR_SETTINGS_BASE(), and ~PANEL_COLOR_SETTINGS_BASE().
|
protectedinherited |
Definition at line 44 of file panel_color_settings_base.h.
Referenced by PANEL_COLOR_SETTINGS::createSwatch(), PANEL_COLOR_SETTINGS::createThemeList(), PANEL_COLOR_SETTINGS::OnThemeChanged(), PANEL_COLOR_SETTINGS::PANEL_COLOR_SETTINGS(), PANEL_COLOR_SETTINGS_BASE(), PANEL_COLOR_SETTINGS::Show(), PANEL_COLOR_SETTINGS::ShowColorContextMenu(), and ~PANEL_COLOR_SETTINGS_BASE().
|
protectedinherited |
A namespace that will be passed to SETTINGS_MANAGER::SaveColorSettings.
This should be set to the appropriate namespace in the application-specific constructor
Definition at line 128 of file panel_color_settings.h.
Referenced by PANEL_COLOR_SETTINGS(), PANEL_EESCHEMA_COLOR_SETTINGS::PANEL_EESCHEMA_COLOR_SETTINGS(), PANEL_FP_EDITOR_COLOR_SETTINGS::PANEL_FP_EDITOR_COLOR_SETTINGS(), PANEL_GERBVIEW_COLOR_SETTINGS::PANEL_GERBVIEW_COLOR_SETTINGS(), PANEL_PCBNEW_COLOR_SETTINGS::PANEL_PCBNEW_COLOR_SETTINGS(), and saveCurrentTheme().
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
Definition at line 47 of file panel_color_settings_base.h.
Referenced by PANEL_EESCHEMA_COLOR_SETTINGS::createSwatches(), and PANEL_COLOR_SETTINGS_BASE().
|
protectedinherited |
Definition at line 110 of file panel_color_settings.h.
Referenced by PANEL_COLOR_SETTINGS(), and ShowColorContextMenu().
|
protectedinherited |
Definition at line 105 of file panel_color_settings.h.
Referenced by createSwatch(), PANEL_FP_EDITOR_COLOR_SETTINGS::createSwatches(), OnLeftDownTheme(), PANEL_EESCHEMA_COLOR_SETTINGS::OnOverrideItemColorsClicked(), OnThemeChanged(), PANEL_COLOR_SETTINGS(), PANEL_EESCHEMA_COLOR_SETTINGS::PANEL_EESCHEMA_COLOR_SETTINGS(), PANEL_FP_EDITOR_COLOR_SETTINGS::PANEL_FP_EDITOR_COLOR_SETTINGS(), PANEL_GERBVIEW_COLOR_SETTINGS::PANEL_GERBVIEW_COLOR_SETTINGS(), PANEL_PCBNEW_COLOR_SETTINGS::PANEL_PCBNEW_COLOR_SETTINGS(), ResetPanel(), saveCurrentTheme(), PANEL_EESCHEMA_COLOR_SETTINGS::saveCurrentTheme(), Show(), ShowColorContextMenu(), PANEL_EESCHEMA_COLOR_SETTINGS::TransferDataFromWindow(), PANEL_FP_EDITOR_COLOR_SETTINGS::TransferDataFromWindow(), PANEL_GERBVIEW_COLOR_SETTINGS::TransferDataFromWindow(), PANEL_PCBNEW_COLOR_SETTINGS::TransferDataFromWindow(), PANEL_EESCHEMA_COLOR_SETTINGS::updateAllowedSwatches(), updateColor(), PANEL_EESCHEMA_COLOR_SETTINGS::updatePreview(), PANEL_PCBNEW_COLOR_SETTINGS::updatePreview(), updateSwatches(), PANEL_EESCHEMA_COLOR_SETTINGS::validateSave(), PANEL_EESCHEMA_COLOR_SETTINGS::~PANEL_EESCHEMA_COLOR_SETTINGS(), PANEL_FP_EDITOR_COLOR_SETTINGS::~PANEL_FP_EDITOR_COLOR_SETTINGS(), PANEL_GERBVIEW_COLOR_SETTINGS::~PANEL_GERBVIEW_COLOR_SETTINGS(), and PANEL_PCBNEW_COLOR_SETTINGS::~PANEL_PCBNEW_COLOR_SETTINGS().
|
protectedinherited |
Definition at line 107 of file panel_color_settings.h.
Referenced by createSwatch(), and PANEL_EESCHEMA_COLOR_SETTINGS::updateAllowedSwatches().
|
protectedinherited |
Definition at line 42 of file panel_color_settings_base.h.
Referenced by PANEL_COLOR_SETTINGS_BASE().
|
inherited |
Definition at line 61 of file panel_color_settings_base.h.
Referenced by PANEL_EESCHEMA_COLOR_SETTINGS::OnOverrideItemColorsClicked(), PANEL_COLOR_SETTINGS::OnThemeChanged(), PANEL_COLOR_SETTINGS_BASE(), PANEL_EESCHEMA_COLOR_SETTINGS::PANEL_EESCHEMA_COLOR_SETTINGS(), PANEL_FP_EDITOR_COLOR_SETTINGS::PANEL_FP_EDITOR_COLOR_SETTINGS(), PANEL_GERBVIEW_COLOR_SETTINGS::PANEL_GERBVIEW_COLOR_SETTINGS(), PANEL_PCBNEW_COLOR_SETTINGS::PANEL_PCBNEW_COLOR_SETTINGS(), PANEL_COLOR_SETTINGS::saveCurrentTheme(), DIALOG_SHEET_PROPERTIES::TransferDataFromWindow(), PANEL_EESCHEMA_COLOR_SETTINGS::TransferDataFromWindow(), and ~PANEL_COLOR_SETTINGS_BASE().
|
protectedinherited |
Definition at line 46 of file panel_color_settings_base.h.
Referenced by PANEL_EESCHEMA_COLOR_SETTINGS::createSwatches(), PANEL_PCBNEW_COLOR_SETTINGS::createSwatches(), PANEL_COLOR_SETTINGS::PANEL_COLOR_SETTINGS(), and PANEL_COLOR_SETTINGS_BASE().
|
protectedinherited |
Definition at line 50 of file panel_color_settings_base.h.
Referenced by PANEL_PCBNEW_COLOR_SETTINGS::createSwatches(), and PANEL_COLOR_SETTINGS_BASE().
|
protectedinherited |
Definition at line 43 of file panel_color_settings_base.h.
Referenced by PANEL_COLOR_SETTINGS_BASE().
|
protectedinherited |
Definition at line 108 of file panel_color_settings.h.
Referenced by createSwatch(), PANEL_COLOR_SETTINGS(), ResetPanel(), PANEL_EESCHEMA_COLOR_SETTINGS::updateAllowedSwatches(), updateColor(), and updateSwatches().
|
protectedinherited |
A list of layer IDs that are valid for the current color settings dialog.
Valid colors will be shown for editing and are the set of colors that actions like resetting to defaults will apply to.
This list must be filled in the application-specific color settings panel constructors.
Definition at line 120 of file panel_color_settings.h.
Referenced by PANEL_FP_EDITOR_COLOR_SETTINGS::createSwatches(), PANEL_GERBVIEW_COLOR_SETTINGS::createSwatches(), PANEL_PCBNEW_COLOR_SETTINGS::createSwatches(), OnThemeChanged(), PANEL_COLOR_SETTINGS(), PANEL_EESCHEMA_COLOR_SETTINGS::PANEL_EESCHEMA_COLOR_SETTINGS(), PANEL_FP_EDITOR_COLOR_SETTINGS::PANEL_FP_EDITOR_COLOR_SETTINGS(), PANEL_GERBVIEW_COLOR_SETTINGS::PANEL_GERBVIEW_COLOR_SETTINGS(), PANEL_PCBNEW_COLOR_SETTINGS::PANEL_PCBNEW_COLOR_SETTINGS(), saveCurrentTheme(), and PANEL_EESCHEMA_COLOR_SETTINGS::saveCurrentTheme().