KiCad PCB EDA Suite
panel_eeschema_color_settings.h
Go to the documentation of this file.
1 
2 /*
3  * This program source code file is part of KiCad, a free EDA CAD application.
4  *
5  * Copyright (C) 2020 Jon Evans <jon@craftyjon.com>
6  * Copyright (C) 2020 KiCad Developers, see AUTHORS.txt for contributors.
7  *
8  * This program is free software: you can redistribute it and/or modify it
9  * under the terms of the GNU General Public License as published by the
10  * Free Software Foundation, either version 3 of the License, or (at your
11  * option) any later version.
12  *
13  * This program is distributed in the hope that it will be useful, but
14  * WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16  * General Public License for more details.
17  *
18  * You should have received a copy of the GNU General Public License along
19  * with this program. If not, see <http://www.gnu.org/licenses/>.
20  */
21 
22 #ifndef PANEL_EESCHEMA_COLOR_SETTINGS_H_
23 #define PANEL_EESCHEMA_COLOR_SETTINGS_H_
24 
25 #include <gal/color4d.h>
29 
30 class COLOR_SETTINGS;
31 class SCH_BASE_FRAME;
32 class PAGE_INFO;
33 class SCH_ITEM;
34 class SCH_PREVIEW_PANEL;
35 class TITLE_BLOCK;
36 class DS_PROXY_VIEW_ITEM;
37 
38 
40 {
41 public:
42  PANEL_EESCHEMA_COLOR_SETTINGS( SCH_BASE_FRAME* aFrame, wxWindow* aParent );
43 
45 
46  void ResetPanel() override;
47 
48 protected:
49  bool TransferDataFromWindow() override;
50 
51  bool TransferDataToWindow() override;
52 
53  void OnOverrideItemColorsClicked( wxCommandEvent& aEvent ) override;
54  void OnSize( wxSizeEvent& aEvent ) override;
55  void onNewThemeSelected() override;
56  void onColorChanged() override;
57 
58  bool validateSave( bool aQuiet = false ) override;
59 
60  bool saveCurrentTheme( bool aValidate ) override;
61 
62 private:
64 
69  std::vector<EDA_ITEM*> m_previewItems;
70 
72 
73 private:
74  void createPreviewItems();
75  void createSwatches();
76 
77  void updatePreview();
78  void zoomFitPreview();
79 };
80 
81 
82 #endif
void ResetPanel() override
Reset the contents of this panel.
void OnSize(wxSizeEvent &aEvent) override
bool validateSave(bool aQuiet=false) override
Performs a pre-save validation of the current color theme.
Hold the information shown in the lower right corner of a plot, printout, or editing view.
Definition: title_block.h:40
bool saveCurrentTheme(bool aValidate) override
void onNewThemeSelected() override
Event fired when a new theme is selected that can be overridden in children.
void onColorChanged() override
Event fired when the user changes any color.
PANEL_EESCHEMA_COLOR_SETTINGS(SCH_BASE_FRAME *aFrame, wxWindow *aParent)
Describe the page size and margins of a paper page on which to eventually print or plot.
Definition: page_info.h:53
void OnOverrideItemColorsClicked(wxCommandEvent &aEvent) override
Board layer functions and definitions.
Color settings are a bit different than most of the settings objects in that there can be more than o...
KIGFX::GAL_DISPLAY_OPTIONS m_galDisplayOptions
A shim class between EDA_DRAW_FRAME and several derived classes: SYMBOL_EDIT_FRAME,...
Base class for any item which can be embedded within the SCHEMATIC container class,...
Definition: sch_item.h:197