KiCad PCB EDA Suite
Loading...
Searching...
No Matches
panel_eseries_display.h
Go to the documentation of this file.
1/*
2 * This program source code file is part of KICAD, a free EDA CAD application.
3 *
4 * Copyright (C) 1992-2022 Kicad Developers, see AUTHORS.txt for contributors.
5 *
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License
8 * as published by the Free Software Foundation; either version 3
9 * of the License, or (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License along
17 * with this program. If not, see <http://www.gnu.org/licenses/>.
18 */
19
20#ifndef PANEL_ESERIES_DISPLAY_H
21#define PANEL_ESERIES_DISPLAY_H
22
23#include <eseries.h>
25
27
28
30{
31public:
32 PANEL_ESERIES_DISPLAY( wxWindow* parent, wxWindowID id = wxID_ANY,
33 const wxPoint& pos = wxDefaultPosition,
34 const wxSize& size = wxDefaultSize, long style = wxTAB_TRAVERSAL,
35 const wxString& name = wxEmptyString );
37
38 // Methods from CALCULATOR_PANEL that must be overridden
39 void LoadSettings( PCB_CALCULATOR_SETTINGS* aCfg ) override;
40 void SaveSettings( PCB_CALCULATOR_SETTINGS* aCfg ) override;
41 void ThemeChanged() override;
42
43private:
49 void recalculateColumnColours( bool aDarkModeOn );
50
56
62
68
74
80 constexpr static int s_altAdjustValue = 125;
81
87 constexpr static int s_darkAdjustValue = 78;
88
93 constexpr static uint32_t s_cE1BGR = 0xf0fff0;
94
99 constexpr static uint32_t s_cE3BGR = 0x98fb98;
100
105 constexpr static uint32_t s_cE6BGR = 0xed9564;
106
111 constexpr static uint32_t s_cE12BGR = 0xdda0dd;
112
117 constexpr static uint32_t s_cE24BGR = 0xebce87;
118
123 constexpr static uint32_t s_cE48BGR = 0x23e86b;
124
129 constexpr static uint32_t s_cE96BGR = 0x7aa0ff;
130
133
135 wxColour m_colourE3Pair[2];
136
138 wxColour m_colourE6Pair[2];
139
141 wxColour m_colourE12Pair[2];
142
144 wxColour m_colourE24Pair[2];
145
147 wxColour m_colourE48Pair[2];
148
150 wxColour m_colourE96Pair[2];
151
154};
155
156#endif
const char * name
Definition: DXF_plotter.cpp:57
Class PANEL_ESERIES_DISPLAY_BASE.
wxColour m_colourE48Pair[2]
Calculated colours for E48 column in current (light,dark) theme.
static constexpr uint32_t s_cE96BGR
Colour for E96 column in light theme. Passed to wxColour constructor.
wxColour m_colourE6Pair[2]
Calculated colours for E6 column in current (light,dark) theme.
wxColour m_colourE12Pair[2]
Calculated colours for E12 column in current (light,dark) theme.
wxColour s_colourMatching
Calculated matching colour for empty columns. Same as background of labels.
void recolourE2496Tree()
Colour large E-series tree according to current theme.
static constexpr uint32_t s_cE3BGR
Colour for E3 column in light theme. Passed to wxColour constructor.
static constexpr int s_darkAdjustValue
Adjustment factor to create darker grid cells in dark theme.
void LoadSettings(PCB_CALCULATOR_SETTINGS *aCfg) override
Load the settings into the panel.
void populateE2496Tree()
Fill larger E-series tree with values.
static constexpr uint32_t s_cE1BGR
Colour for E1 column in light theme. Passed to wxColour constructor.
static constexpr uint32_t s_cE48BGR
Colour for E48 column in light theme. Passed to wxColour constructor.
wxColour m_colourE24Pair[2]
Calculated colours for E24 column in current (light,dark) theme.
wxColour m_colourE1Column
Calculated colour for E1 column in current (light,dark) theme.
static constexpr uint32_t s_cE6BGR
Colour for E6 column in light theme. Passed to wxColour constructor.
static constexpr int s_altAdjustValue
Adjustment factor to create alternating R-series table entry colours.
void ThemeChanged() override
Update UI elements of the panel when the theme changes to ensure the images and fonts/colors are appr...
void recolourE112Tree()
Colour small E-series tree according to current theme.
void recalculateColumnColours(bool aDarkModeOn)
Recalculate colours used to highlight the E-series columns.
static constexpr uint32_t s_cE24BGR
Colour for E24 column in light theme. Passed to wxColour constructor.
void SaveSettings(PCB_CALCULATOR_SETTINGS *aCfg) override
Save the settings from the panel.
PANEL_ESERIES_DISPLAY(wxWindow *parent, wxWindowID id=wxID_ANY, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxTAB_TRAVERSAL, const wxString &name=wxEmptyString)
wxColour m_colourE96Pair[2]
Calculated colours for E96 column in current (light,dark) theme.
static constexpr uint32_t s_cE12BGR
Colour for E12 column in light theme. Passed to wxColour constructor.
wxColour m_colourE3Pair[2]
Calculated colours for E3 column in current (light,dark) theme.
void populateE112Tree()
Fill small E-series tree with values.