KiCad PCB EDA Suite
Loading...
Searching...
No Matches
gerbview_layer_widget.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) 2004-2010 Jean-Pierre Charras, jp.charras at wanadoo.fr
5 * Copyright (C) 2010 SoftPLC Corporation, Dick Hollenbeck <[email protected]>
6 * Copyright (C) 2010-2022 KiCad Developers, see change_log.txt for contributors.
7 *
8 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License
10 * as published by the Free Software Foundation; either version 2
11 * of the License, or (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, you may find one here:
20 * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
21 * or you may search the http://www.gnu.org website for the version 2 license,
22 * or you may write to the Free Software Foundation, Inc.,
23 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
24 */
25
26
27#ifndef GERBER_LAYER_WIDGET_H
28#define GERBER_LAYER_WIDGET_H
29
30#include "layer_widget.h"
31
37{
38public:
43 GERBER_LAYER_WIDGET( GERBVIEW_FRAME* aParent, wxWindow* aFocusOwner );
44
48 void CollectCurrentColorSettings( COLOR_SETTINGS* aColorSettings );
49
53 void ReFill();
54
58 void ReFillRender();
59
60 //-----<implement LAYER_WIDGET abstract callback functions>-----------
61 void OnLayerRightClick( wxMenu& aMenu ) override;
62 void OnLayerColorChange( int aLayer, const COLOR4D& aColor ) override;
63 bool OnLayerSelect( int aLayer ) override;
64 void OnLayerVisible( int aLayer, bool isVisible, bool isFinal ) override;
65 void OnRenderColorChange( int aId, const COLOR4D& aColor ) override;
66 void OnRenderEnable( int aId, bool isEnabled ) override;
67
74 //-----</implement LAYER_WIDGET abstract callback functions>----------
75
83 bool OnLayerSelected(); // postprocess after an active layer selection
84 // ensure active layer visible if
85 // m_alwaysShowActiveCopperLayer is true;
86
92 void AddRightClickMenuItems( wxMenu* aMenu );
93
94protected:
95 // popup menu ids. in layer manager
97 {
110 };
111
112private:
116 void onRightDownLayers( wxMouseEvent& event );
117
118 void onPopupSelection( wxCommandEvent& event );
119
123
125
127
128 bool m_alwaysShowActiveLayer; // If true: Only shows the current active layer
129 // even if it is changed
130};
131
132#endif // GERBER_LAYER_WIDGET_H
Color settings are a bit different than most of the settings objects in that there can be more than o...
GERBER_FILE_IMAGE_LIST is a helper class to handle a list of GERBER_FILE_IMAGE files which are loaded...
Abstract functions of LAYER_WIDGET so they may be tied into the GERBVIEW_FRAME's data and we can add ...
GERBER_FILE_IMAGE_LIST * GetImagesList()
void installRightLayerClickHandler()
this is for the popup menu, the right click handler has to be installed on every child control within...
void OnRenderEnable(int aId, bool isEnabled) override
Notify client code whenever the user changes an rendering enable in one of the rendering checkboxes.
void onPopupSelection(wxCommandEvent &event)
bool OnLayerSelect(int aLayer) override
Notify client code whenever the user selects a different layer.
void OnLayerRightClick(wxMenu &aMenu) override
Notify client code about a layer being right-clicked.
void onRightDownLayers(wxMouseEvent &event)
Put up a popup menu for the layer panel.
void OnLayerVisible(int aLayer, bool isVisible, bool isFinal) override
Notify client code about a layer visibility change.
void CollectCurrentColorSettings(COLOR_SETTINGS *aColorSettings)
Collect the current color settings and put it in aColorSettings.
void SetLayersManagerTabsText()
Update the layer manager tabs labels.
void AddRightClickMenuItems(wxMenu *aMenu)
Add menu items to a menu that should be shown when right-clicking the Gerber layer widget.
bool OnLayerSelected()
Ensure the active layer is visible, and other layers not visible when m_alwaysShowActiveLayer is true...
void OnLayerColorChange(int aLayer, const COLOR4D &aColor) override
Notify client code about a layer color change.
void OnRenderColorChange(int aId, const COLOR4D &aColor) override
Notify client code whenever the user changes a rendering color.
void ReFillRender()
Rebuild Render for instance after the config is read.
void ReFill()
Rebuild Render for instance after the config is read.
A color representation with 4 components: red, green, blue, alpha.
Definition: color4d.h:104
Manage a list of layers with the notion of a "current" layer, and layer specific visibility control.
Definition: layer_widget.h:78