KiCad PCB EDA Suite
class_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, jean-pierre.charras@gpisa-lab.inpg.fr
5  * Copyright (C) 2010 SoftPLC Corporation, Dick Hollenbeck <dick@softplc.com>
6  * Copyright (C) 2010 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 /************************************************************/
28 /* class_gerber_layer_widget.h : header for the layers manager */
29 /************************************************************/
30 
31 #ifndef _CLASS_GERBER_LAYER_WIDGET_H_
32 #define _CLASS_GERBER_LAYER_WIDGET_H_
33 
34 #include <layer_widget.h>
35 
36 // popup menu ids. in layer manager
38 {
39  ID_LAYER_MANAGER_START = wxID_HIGHEST+1,
46 };
47 
55 {
57  bool m_alwaysShowActiveLayer; // If true: Only shows the current active layer
58  // even if it is changed
59 
60 
65  void onRightDownLayers( wxMouseEvent& event );
66 
67  void onPopupSelection( wxCommandEvent& event );
68 
72 
78  virtual bool useAlternateBitmap(int aRow) override;
79 
81 
82 public:
83 
92  GERBER_LAYER_WIDGET( GERBVIEW_FRAME* aParent, wxWindow* aFocusOwner, int aPointSize = 10 );
93 
94  void ReFill();
95 
100  void ReFillRender();
101 
102  //-----<implement LAYER_WIDGET abstract callback functions>-----------
103  void OnLayerColorChange( int aLayer, COLOR4D aColor ) override;
104  bool OnLayerSelect( int aLayer ) override;
105  void OnLayerVisible( int aLayer, bool isVisible, bool isFinal ) override;
106  void OnRenderColorChange( int aId, COLOR4D aColor ) override;
107  void OnRenderEnable( int aId, bool isEnabled ) override;
108 
114  void SetLayersManagerTabsText( );
115  //-----</implement LAYER_WIDGET abstract callback functions>----------
116 
125  bool OnLayerSelected(); // postprocess after an active layer selection
126  // ensure active layer visible if
127  // m_alwaysShowActiveCopperLayer is true;
128 };
129 
130 #endif // _CLASS_GERBER_LAYER_WIDGET_H_
void installRightLayerClickHandler()
this is for the popup menu, the right click handler has to be installed on every child control within...
void OnLayerColorChange(int aLayer, COLOR4D aColor) override
Function OnLayerColorChange is called to notify client code about a layer color change.
void onRightDownLayers(wxMouseEvent &event)
Function OnRightDownLayers puts up a popup menu for the layer panel.
void OnLayerVisible(int aLayer, bool isVisible, bool isFinal) override
Function OnLayerVisible is called to notify client code about a layer visibility change.
GERBER_FILE_IMAGE_LIST * GetImagesList()
GERBER_FILE_IMAGE_LIST is a helper class to handle a list of GERBER_FILE_IMAGE files which are loaded...
GERBER_LAYER_WIDGET(GERBVIEW_FRAME *aParent, wxWindow *aFocusOwner, int aPointSize=10)
Constructor.
void SetLayersManagerTabsText()
Function SetLayersManagerTabsText Update the layer manager tabs labels Useful when changing Language ...
bool OnLayerSelect(int aLayer) override
Function OnLayerSelect is called to notify client code whenever the user selects a different layer...
void OnRenderColorChange(int aId, COLOR4D aColor) override
Function OnRenderColorChange is called to notify client code whenever the user changes a rendering co...
Class GERBER_LAYER_WIDGET is here to implement the abtract functions of LAYER_WIDGET so they may be t...
void onPopupSelection(wxCommandEvent &event)
virtual bool useAlternateBitmap(int aRow) override
Virtual Function useAlternateBitmap.
Class LAYER_WIDGET is abstract and is used to manage a list of layers, with the notion of a "current"...
Definition: layer_widget.h:76
void OnRenderEnable(int aId, bool isEnabled) override
Function OnRenderEnable is called to notify client code whenever the user changes an rendering enable...
void ReFillRender()
Function ReFillRender Rebuild Render for instance after the config is read.
bool OnLayerSelected()
Function OnLayerSelected ensure the active layer is visible, and other layers not visible when m_alwa...
Class COLOR4D is the color representation with 4 components: red, green, blue, alpha.
Definition: color4d.h:39