KiCad PCB EDA Suite
panel_pcbnew_color_settings.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) 2020 Jon Evans <jon@craftyjon.com>
5  * Copyright (C) 2020-2021 KiCad Developers, see AUTHORS.txt for contributors.
6  *
7  * This program is free software: you can redistribute it and/or modify it
8  * under the terms of the GNU General Public License as published by the
9  * Free Software Foundation, either version 3 of the License, or (at your
10  * option) any later version.
11  *
12  * This program is distributed in the hope that it will be useful, but
13  * WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15  * General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License along
18  * with this program. If not, see <http://www.gnu.org/licenses/>.
19  */
20 
21 #ifndef PANEL_PCBNEW_COLOR_SETTINGS_H_
22 #define PANEL_PCBNEW_COLOR_SETTINGS_H_
23 
24 #include <gal/color4d.h>
25 #include <layer_ids.h>
27 
28 class COLOR_SETTINGS;
29 class PAGE_INFO;
30 class PCB_EDIT_FRAME;
32 class TITLE_BLOCK;
33 class DS_PROXY_VIEW_ITEM;
34 
35 
37 {
38 public:
39  PANEL_PCBNEW_COLOR_SETTINGS( PCB_EDIT_FRAME* aFrame, wxWindow* aParent );
40 
42 
43  void ResetPanel() override;
44 
45 protected:
46  bool TransferDataFromWindow() override;
47 
48  bool TransferDataToWindow() override;
49 
50  void OnSize( wxSizeEvent& aEvent ) override;
51  void onNewThemeSelected() override;
52  void onColorChanged() override;
53 
55  {
56  ID_COPY = wxID_HIGHEST + 1,
59  };
60 
61 private:
62  void createPreviewItems();
63  void createSwatches();
64 
65  void updatePreview();
66  void zoomFitPreview();
67 
69 
73 };
74 
75 
76 #endif
void ResetPanel() override
Reset the contents of this panel.
Hold the information shown in the lower right corner of a plot, printout, or editing view.
Definition: title_block.h:40
PANEL_PCBNEW_COLOR_SETTINGS(PCB_EDIT_FRAME *aFrame, wxWindow *aParent)
Panel that renders a single footprint via Cairo GAL, meant to be exported through Kiface.
void OnSize(wxSizeEvent &aEvent) override
Describe the page size and margins of a paper page on which to eventually print or plot.
Definition: page_info.h:53
void onColorChanged() override
Event fired when the user changes any color.
The main frame for Pcbnew.
Color settings are a bit different than most of the settings objects in that there can be more than o...
FOOTPRINT_PREVIEW_PANEL * m_preview
void onNewThemeSelected() override
Event fired when a new theme is selected that can be overridden in children.