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 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>
27 
28 class COLOR_SETTINGS;
29 class PAGE_INFO;
30 class PCB_EDIT_FRAME;
32 class TITLE_BLOCK;
33 
34 namespace KIGFX
35 {
36  class WS_PROXY_VIEW_ITEM;
37 }
38 
40 {
41 public:
42  PANEL_PCBNEW_COLOR_SETTINGS( PCB_EDIT_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 OnSize( wxSizeEvent& aEvent ) override;
54  void onNewThemeSelected() override;
55  void onColorChanged() override;
56 
58  {
59  ID_COPY = wxID_HIGHEST + 1,
62  };
63 
64 private:
66 
70 
71 private:
72  void createPreviewItems();
73  void createSwatches();
74 
75  void updatePreview();
76  void zoomFitPreview();
77 };
78 
79 
80 #endif
Class CAIRO_GAL is the cairo implementation of the graphics abstraction layer.
Definition: color4d.cpp:175
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.
Board layer functions and definitions.
PCB_EDIT_FRAME is 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.