KiCad PCB EDA Suite
gerbview_frame.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) 2016 Jean-Pierre Charras, jp.charras at wanadoo.fr
5  * Copyright (C) 2013 Wayne Stambaugh <stambaughw@gmail.com>
6  * Copyright (C) 1992-2019 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 WX_GERBER_STRUCT_H
23 #define WX_GERBER_STRUCT_H
24 
25 
26 #include <pgm_base.h>
27 #include <config_params.h>
28 #include <draw_frame.h>
30 #include <gerbview.h>
31 #include <convert_to_biu.h>
32 #include <gbr_layout.h>
33 #include <gbr_screen.h>
34 #include <page_info.h>
35 #include <gbr_display_options.h>
36 #include <colors_design_settings.h>
37 
39 
40 #define NO_AVAILABLE_LAYERS UNDEFINED_LAYER
41 
45 class GERBER_DRAW_ITEM;
46 class GERBER_FILE_IMAGE;
48 class REPORTER;
49 
50 
56 #define GERBVIEW_FRAME_NAME wxT( "GerberFrame" )
57 
58 class GERBVIEW_FRAME : public EDA_DRAW_FRAME // PCB_BASE_FRAME
59 {
61  wxPoint m_grid_origin;
62  PAGE_INFO m_paper; // used only to show paper limits to screen
63 
64 public:
66 
73  void SetLayout( GBR_LAYOUT* aLayout )
74  {
75  delete m_gerberLayout;
76  m_gerberLayout = aLayout;
77  }
78 
80  {
81  wxASSERT( m_gerberLayout );
82  return m_gerberLayout;
83  }
84 
89  {
90  return m_gerberLayout->GetImagesList();
91  }
92 
93  GERBER_FILE_IMAGE* GetGbrImage( int aIdx ) const;
94 
95  unsigned ImagesMaxCount() const;
96 
97 
98  void SetPageSettings( const PAGE_INFO& aPageSettings ) override;
99  const PAGE_INFO& GetPageSettings() const override;
100  const wxSize GetPageSizeIU() const override;
101 
102  const wxPoint& GetAuxOrigin() const override;
103  void SetAuxOrigin( const wxPoint& aPoint ) override;
104 
105  const wxPoint& GetGridOrigin() const override { return m_grid_origin; }
106  void SetGridOrigin( const wxPoint& aPoint ) override { m_grid_origin = aPoint; }
107 
108  const TITLE_BLOCK& GetTitleBlock() const override;
109  void SetTitleBlock( const TITLE_BLOCK& aTitleBlock ) override;
110 
121  void SetCurItem( GERBER_DRAW_ITEM* aItem, bool aDisplayInfo = true );
122 
138  int SelectPCBLayer( int aDefaultLayer, int aOpperLayerCount, bool aNullLayer = false );
139 
141  virtual void SetGridColor( COLOR4D aColor ) override;
142 
143 protected:
145 
149 
150  wxString m_lastFileName; // The last filename chosen to be proposed to the user
151 
152 public:
153  wxChoice* m_SelComponentBox; // a choice box to display and highlight component graphic items
154  wxChoice* m_SelNetnameBox; // a choice box to display and highlight netlist graphic items
155  wxChoice* m_SelAperAttributesBox; // a choice box to display aperture attributes and highlight items
156  GBR_LAYER_BOX_SELECTOR* m_SelLayerBox; // The combobox to select the current active graphic layer
157  // (which is drawn on top on the other layers
158  DCODE_SELECTION_BOX* m_DCodeSelector; // a list box to select the dcode Id to highlight.
159  wxTextCtrl* m_TextInfo; // a wxTextCtrl used to display some info about
160  // gerber data (format..)
161 
163 
164 private:
165  // list of PARAM_CFG_xxx to read/write parameters saved in config
167 
168  int m_displayMode; // Gerber images ("layers" in Gerbview) can be drawn:
169  // - in fast mode (write mode) but if there are negative
170  // items only the last image is correctly drawn (no
171  // problem to see only one image or when no negative items)
172  // - in "exact" mode (but slower) in write mode:
173  // last image covers previous images
174  // - in "exact" mode (also slower) in OR mode
175  // (transparency mode)
176  // m_displayMode = 0, 1 or 2
177 
179 
183  void updateDCodeSelectBox();
184  void updateGridSelectBox();
185  void updateZoomSelectBox();
186  void unitsChangeRefresh() override; // See class EDA_DRAW_FRAME
187 
188  // The Tool Framework initalization
189  void setupTools();
190 
193 
202  bool loadListOfGerberAndDrillFiles( const wxString& aPath,
203  const wxArrayString& aFilenameList,
204  const std::vector<int>* aFileType = nullptr );
205 
206 public:
207  GERBVIEW_FRAME( KIWAY* aKiway, wxWindow* aParent );
208  ~GERBVIEW_FRAME();
209 
210  void OnCloseWindow( wxCloseEvent& Event );
211 
212  bool OpenProjectFiles( const std::vector<wxString>& aFileSet, int aCtl ) override;
213 
214  // Virtual basic functions:
215  void RedrawActiveWindow( wxDC* DC, bool EraseBg ) override;
216  void ReCreateHToolbar() override;
217  void ReCreateAuxiliaryToolbar() override;
218 
225  void ReCreateVToolbar() override;
226 
230  void ReCreateOptToolbar();
231 
232  void ReCreateMenuBar() override;
233  void OnLeftClick( wxDC* aDC, const wxPoint& aMousePos ) override;
234  void OnLeftDClick( wxDC* aDC, const wxPoint& aMousePos ) override;
235  bool OnRightClick( const wxPoint& aMousePos, wxMenu* aPopMenu ) override;
236  void OnUpdateSelectTool( wxUpdateUIEvent& aEvent );
237  void OnUpdateSelectZoom( wxUpdateUIEvent& aEvent );
238  double BestZoom() override;
239  void UpdateStatusBar() override;
240 
247  const wxString GetZoomLevelIndicator() const override;
248 
255  int GetDisplayMode() { return m_displayMode; }
256 
263  void SetDisplayMode( int aMode ) { m_displayMode = aMode; }
264 
272  bool IsElementVisible( int aLayerID ) const;
273 
281  void SetElementVisibility( int aLayerID, bool aNewState );
282 
288  void SetGridVisibility( bool aVisible ) override;
289 
295  LSET GetVisibleLayers() const;
296 
302  void SetVisibleLayers( LSET aLayerMask );
303 
310  bool IsLayerVisible( int aLayer ) const;
311 
316  COLOR4D GetVisibleElementColor( int aLayerID );
317 
318  void SetVisibleElementColor( int aLayerID, COLOR4D aColor );
319 
324  COLOR4D GetLayerColor( int aLayer ) const;
325 
330  void SetLayerColor( int aLayer, COLOR4D aColor );
331 
339 
345  void ReFillLayerWidget();
346 
352  void SetActiveLayer( int aLayer, bool doLayerWidgetUpdate = true );
353 
358  int GetActiveLayer();
359 
367  int getNextAvailableLayer( int aLayer = 0 ) const;
368 
369  bool hasAvailableLayers() const
370  {
372  }
373 
382  void syncLayerWidget();
383 
392  void syncLayerBox( bool aRebuildLayerBox = false );
393 
403  void UpdateTitleAndInfo();
404 
415 
416  void LoadSettings( wxConfigBase* aCfg ) override;
417 
418  void SaveSettings( wxConfigBase* aCfg ) override;
419 
420  void OnToggleCoordType( wxCommandEvent& aEvent );
421  void OnToggleFlashItemDrawMode( wxCommandEvent& aEvent );
422  void OnToggleLineDrawMode( wxCommandEvent& aEvent );
423  void OnTogglePolygonDrawMode( wxCommandEvent& aEvent );
424  void OnToggleShowLayerManager( wxCommandEvent& aEvent );
425 
426  void ShowChangedLanguage() override;
427 
428  void Process_Special_Functions( wxCommandEvent& event );
429  void OnSelectOptionToolbar( wxCommandEvent& event );
430 
432  void OnSelectHighlightChoice( wxCommandEvent& event );
433 
439  void OnSelectActiveDCode( wxCommandEvent& event );
440 
447  void OnSelectActiveLayer( wxCommandEvent& event );
448 
454  void OnShowGerberSourceFile( wxCommandEvent& event );
455 
462  void OnSelectDisplayMode( wxCommandEvent& event );
463 
468  void OnQuit( wxCommandEvent& event );
469 
471  EDA_HOTKEY* GetHotKeyDescription( int aCommand ) const override;
472 
482  bool OnHotKey( wxDC* aDC, int aHotkeyCode, const wxPoint& aPosition, EDA_ITEM* aItem = NULL ) override;
483 
484  GERBER_DRAW_ITEM* Locate( const wxPoint& aPosition, int typeloc );
485 
486  void Process_Config( wxCommandEvent& event );
487 
488  void OnUpdateDrawMode( wxUpdateUIEvent& aEvent );
489  void OnUpdateCoordType( wxUpdateUIEvent& aEvent );
490  void OnUpdateFlashedItemsDrawMode( wxUpdateUIEvent& aEvent );
491  void OnUpdateLineDrawMode( wxUpdateUIEvent& aEvent );
492  void OnUpdatePolygonDrawMode( wxUpdateUIEvent& aEvent );
493  void OnUpdateShowDCodes( wxUpdateUIEvent& aEvent );
494  void OnUpdateShowNegativeItems( wxUpdateUIEvent& aEvent );
495  void OnUpdateShowLayerManager( wxUpdateUIEvent& aEvent );
496  void OnUpdateSelectDCode( wxUpdateUIEvent& aEvent );
497  void OnUpdateLayerSelectBox( wxUpdateUIEvent& aEvent );
498  void OnUpdateDiffMode( wxUpdateUIEvent& aEvent );
499  void OnUpdateHighContrastMode( wxUpdateUIEvent& aEvent );
500 
506  virtual int BlockCommand( EDA_KEY key ) override;
507 
512  virtual void HandleBlockPlace( wxDC* DC ) override;
513 
525  virtual bool HandleBlockEnd( wxDC* DC ) override;
526 
533  void Block_Move();
534 
539  void ToPrinter( wxCommandEvent& event );
540 
541  void Files_io( wxCommandEvent& event );
542 
548  void OnGbrFileHistory( wxCommandEvent& event );
549 
555  void OnDrlFileHistory( wxCommandEvent& event );
556 
562  void OnZipFileHistory( wxCommandEvent& event );
563 
568  void OnJobFileHistory( wxCommandEvent& event );
569 
576  bool unarchiveFiles( const wxString& aFullFileName, REPORTER* aReporter = nullptr );
577 
586  bool LoadGerberFiles( const wxString& aFileName );
587  bool Read_GERBER_File( const wxString& GERBER_FullFileName );
588 
597  bool LoadExcellonFiles( const wxString& aFileName );
598  bool Read_EXCELLON_File( const wxString& aFullFileName );
599 
608  bool LoadZipArchiveFile( const wxString& aFileName );
609 
610 
618  bool LoadGerberJobFile( const wxString& aFileName );
619 
620 
621  bool GeneralControl( wxDC* aDC, const wxPoint& aPosition, EDA_KEY aHotKey = 0 ) override;
622 
626  void Liste_D_Codes();
627 
628  // PCB handling
629  bool Clear_DrawLayers( bool query );
630  void Erase_Current_DrawLayer( bool query );
631 
633 
638  void UpdateDisplayOptions( const GBR_DISPLAY_OPTIONS& aOptions );
639 
640  // Conversion function
641  void ExportDataInPcbnewFormat( wxCommandEvent& event );
642 
643  /* SaveCopyInUndoList() virtual
644  * currently: do nothing in GerbView.
645  */
647  UNDO_REDO_T aTypeCommand = UR_UNSPECIFIED,
648  const wxPoint& aTransformPoint = wxPoint( 0, 0 ) ) { }
649 
659  void SaveCopyInUndoList( const PICKED_ITEMS_LIST& aItemsList,
660  UNDO_REDO_T aTypeCommand,
661  const wxPoint& aTransformPoint = wxPoint( 0, 0 ) )
662  {
663  // currently: do nothing in GerbView.
664  }
665 
667  virtual void UseGalCanvas( bool aEnable ) override;
668 
672  void OnSwitchCanvas( wxCommandEvent& aEvent );
673 
677  void OnUpdateSwitchCanvas( wxUpdateUIEvent& aEvent );
678 
682  void InstallPreferences( PAGED_DIALOG* aParent ) override;
683 
687  void CommonSettingsChanged() override;
688 
689  void SyncMenusAndToolbars() override;
690 
691  DECLARE_EVENT_TABLE()
692 };
693 
694 #endif /* WX_GERBER_STRUCT_H */
void OnUpdateHighContrastMode(wxUpdateUIEvent &aEvent)
void OnUpdateLineDrawMode(wxUpdateUIEvent &aEvent)
Class GBR_DISPLAY_OPTIONS is a helper class to handle display options (filling modes and afew other o...
Class GBR_LAYOUT holds list of GERBER_DRAW_ITEM currently loaded.
Definition: gbr_layout.h:53
void SetTitleBlock(const TITLE_BLOCK &aTitleBlock) override
void OnSelectHighlightChoice(wxCommandEvent &event)
Handles the changing of the highlighted component/net/attribute.
Class CLASS_GBR_LAYOUT to handle info to draw loaded Gerber images and page frame reference.
A list of parameters type.
wxString m_lastFileName
void SetVisibleElementColor(int aLayerID, COLOR4D aColor)
void SortLayersByX2Attributes()
void OnLeftDClick(wxDC *aDC, const wxPoint &aMousePos) override
bool Clear_DrawLayers(bool query)
const wxSize GetPageSizeIU() const override
Works off of GetPageSettings() to return the size of the paper page in the internal units of this par...
void OnUpdateSelectDCode(wxUpdateUIEvent &aEvent)
void Block_Move()
Function Block_Move moves all tracks and segments within the selected block.
void Files_io(wxCommandEvent &event)
void UpdateStatusBar() override
Update the status bar information.
void Process_Special_Functions(wxCommandEvent &event)
void OnUpdateSelectTool(wxUpdateUIEvent &aEvent)
COLOR4D GetNegativeItemsColor()
Function GetNegativeItemsColor.
Handle colors used to draw all items or layers.
virtual int BlockCommand(EDA_KEY key) override
Function BlockCommand returns the block command (BLOCK_MOVE, BLOCK_COPY...) corresponding to the aKey...
void OnToggleShowLayerManager(wxCommandEvent &aEvent)
void syncLayerBox(bool aRebuildLayerBox=false)
Function syncLayerBox updates the currently "selected" layer within m_SelLayerBox The currently activ...
int GetDisplayMode()
Function GetDisplayMode.
void SetAuxOrigin(const wxPoint &aPoint) override
COLOR4D GetVisibleElementColor(int aLayerID)
Function GetVisibleElementColor returns the color of a gerber visible element.
LSET GetVisibleLayers() const
Function GetVisibleLayers is a proxy function that calls the correspondent function in m_BoardSetting...
void SetCurItem(GERBER_DRAW_ITEM *aItem, bool aDisplayInfo=true)
Function SetCurItem sets the currently selected item and displays it in the MsgPanel.
const wxPoint & GetAuxOrigin() const override
Return the origin of the axis used for plotting and various exports.
void OnQuit(wxCommandEvent &event)
Function OnQuit called on request of application quit.
FILE_HISTORY m_jobFileHistory
void SetPageSettings(const PAGE_INFO &aPageSettings) override
const TITLE_BLOCK & GetTitleBlock() const override
GERBER_LAYER_WIDGET * m_LayersManager
UNDO_REDO_T
Undo Redo considerations: Basically we have 3 cases New item Deleted item Modified item there is also...
void OnUpdateFlashedItemsDrawMode(wxUpdateUIEvent &aEvent)
bool OpenProjectFiles(const std::vector< wxString > &aFileSet, int aCtl) override
bool Read_GERBER_File(const wxString &GERBER_FullFileName)
Definition: readgerb.cpp:40
Class GERBER_FILE_IMAGE holds the Image data and parameters for one gerber file and layer parameters ...
void SetActiveLayer(int aLayer, bool doLayerWidgetUpdate=true)
Function SetActiveLayer will change the currently active layer to aLayer and also update the GERBER_L...
void OnGbrFileHistory(wxCommandEvent &event)
Function OnGbrFileHistory deletes the current data and loads a Gerber file selected from history list...
bool loadListOfGerberAndDrillFiles(const wxString &aPath, const wxArrayString &aFilenameList, const std::vector< int > *aFileType=nullptr)
Loads a list of Gerber and NC drill files and updates the view based on them.
GBR_LAYER_BOX_SELECTOR * m_SelLayerBox
void SaveCopyInUndoList(GERBER_DRAW_ITEM *aItemToCopy, UNDO_REDO_T aTypeCommand=UR_UNSPECIFIED, const wxPoint &aTransformPoint=wxPoint(0, 0))
void OnToggleFlashItemDrawMode(wxCommandEvent &aEvent)
The common library.
void OnUpdateLayerSelectBox(wxUpdateUIEvent &aEvent)
void updateNetnameListSelectBox()
void Process_Config(wxCommandEvent &event)
Class REPORTER is a pure virtual class used to derive REPORTER objects from.
Definition: reporter.h:61
void Erase_Current_DrawLayer(bool query)
The base class for create windows for drawing purpose.
Definition: draw_frame.h:82
GERBER_FILE_IMAGE_LIST is a helper class to handle a list of GERBER_FILE_IMAGE files which are loaded...
int GetActiveLayer()
Function SetActiveLayer returns the active layer.
Class TITLE_BLOCK holds the information shown in the lower right corner of a plot,...
Definition: title_block.h:40
void OnSelectActiveDCode(wxCommandEvent &event)
Function OnSelectActiveDCode Selects the active DCode for the current active layer.
wxChoice * m_SelNetnameBox
void SaveSettings(wxConfigBase *aCfg) override
Saves common frame parameters to a configuration data file.
void SetGridVisibility(bool aVisible) override
Function SetGridVisibility(), virtual from EDA_DRAW_FRAME It may be overloaded by derived classes.
GERBVIEW_FRAME(KIWAY *aKiway, wxWindow *aParent)
void OnSelectDisplayMode(wxCommandEvent &event)
Function OnSelectDisplayMode called on a display mode selection Mode selection can be fast display,...
void ReCreateHToolbar() override
bool OnRightClick(const wxPoint &aMousePos, wxMenu *aPopMenu) override
bool LoadGerberJobFile(const wxString &aFileName)
Load a Gerber job file, and load gerber files found in job files.
void SetGridOrigin(const wxPoint &aPoint) override
FILE_HISTORY m_zipFileHistory
void updateComponentListSelectBox()
void OnUpdatePolygonDrawMode(wxUpdateUIEvent &aEvent)
bool hasAvailableLayers() const
COLORS_DESIGN_SETTINGS g_ColorsSettings
virtual void HandleBlockPlace(wxDC *DC) override
Function HandleBlockPlace handles the block place command.
void UpdateDisplayOptions(const GBR_DISPLAY_OPTIONS &aOptions)
Updates the display options and refreshes the view as needed.
Class LSET is a set of PCB_LAYER_IDs.
unsigned ImagesMaxCount() const
The max number of file images.
bool unarchiveFiles(const wxString &aFullFileName, REPORTER *aReporter=nullptr)
Extracts gerber and drill files from the zip archive, and load them.
void OnToggleCoordType(wxCommandEvent &aEvent)
PAGE_INFO m_paper
void ReCreateAuxiliaryToolbar() override
void unitsChangeRefresh() override
Called when when the units setting has changed to allow for any derived classes to handle refreshing ...
void ReCreateVToolbar() override
Function ReCreateVToolbar creates or updates the right vertical toolbar.
PARAM_CFG_ARRAY m_configSettings
#define NO_AVAILABLE_LAYERS
bool LoadGerberFiles(const wxString &aFileName)
function LoadGerberFiles Load a photoplot (Gerber) file or many files.
Class PAGE_INFO describes the page size and margins of a paper page on which to eventually print or p...
Definition: page_info.h:54
GERBER_FILE_IMAGE * GetGbrImage(int aIdx) const
void InstallPreferences(PAGED_DIALOG *aParent) override
Allows Gerbview to install its preferences panels into the preferences dialog.
bool LoadZipArchiveFile(const wxString &aFileName)
function LoadZipArchiveFileLoadZipArchiveFile Load a zipped archive file.
COLORS_DESIGN_SETTINGS * m_colorsSettings
GBR_DISPLAY_OPTIONS m_DisplayOptions
void applyDisplaySettingsToGAL()
Updates the GAL with display settings changes.
void ShowChangedLanguage() override
Redraw the menus and what not in current language.
void OnUpdateDiffMode(wxUpdateUIEvent &aEvent)
double BestZoom() override
Return the zoom level which displays the full page on screen.
bool IsElementVisible(int aLayerID) const
Function IsElementVisible tests whether a given element category is visible.
GBR_LAYOUT * m_gerberLayout
Class KIWAY is a minimalistic software bus for communications between various DLLs/DSOs (DSOs) within...
Definition: kiway.h:258
uint32_t EDA_KEY
Definition: common.h:71
const wxPoint & GetGridOrigin() const override
Return the absolute coordinates of the origin of the snap grid.
virtual void UseGalCanvas(bool aEnable) override
Class GERBER_LAYER_WIDGET is here to implement the abtract functions of LAYER_WIDGET so they may be t...
void OnLeftClick(wxDC *aDC, const wxPoint &aMousePos) override
EDA_HOTKEY * GetHotKeyDescription(int aCommand) const override
void OnUpdateShowNegativeItems(wxUpdateUIEvent &aEvent)
void SyncMenusAndToolbars() override
Update the toolbars and menus (mostly settings/check buttons/checkboxes) with the current controller ...
void OnTogglePolygonDrawMode(wxCommandEvent &aEvent)
Class PICKED_ITEMS_LIST is a holder to handle information on schematic or board items.
void RedrawActiveWindow(wxDC *DC, bool EraseBg) override
void LoadSettings(wxConfigBase *aCfg) override
Load common frame parameters from a configuration file.
void OnCloseWindow(wxCloseEvent &Event)
FILE_HISTORY m_drillFileHistory
void OnShowGerberSourceFile(wxCommandEvent &event)
Function OnShowGerberSourceFile Call the preferred editor to show (and edit) the gerber source file l...
bool GeneralControl(wxDC *aDC, const wxPoint &aPosition, EDA_KEY aHotKey=0) override
Perform application specific control using aDC at aPosition in logical units.
GERBER_DRAW_ITEM * Locate(const wxPoint &aPosition, int typeloc)
Definition: locate.cpp:43
void OnUpdateSelectZoom(wxUpdateUIEvent &aEvent)
void ReCreateOptToolbar()
Create or update the left vertical toolbar (option toolbar.
void OnSelectOptionToolbar(wxCommandEvent &event)
GBR_LAYOUT * GetGerberLayout() const
void OnUpdateShowDCodes(wxUpdateUIEvent &aEvent)
virtual bool HandleBlockEnd(wxDC *DC) override
Function HandleBlockEnd handles the end of a block command, It is called at the end of the definition...
wxTextCtrl * m_TextInfo
DCODE_SELECTION_BOX * m_DCodeSelector
void ExportDataInPcbnewFormat(wxCommandEvent &event)
const PAGE_INFO & GetPageSettings() const override
void OnJobFileHistory(wxCommandEvent &event)
deletes the current data and load a gerber job file selected from the history list.
void updateAperAttributesSelectBox()
void OnToggleLineDrawMode(wxCommandEvent &aEvent)
wxChoice * m_SelAperAttributesBox
see class PGM_BASE
class EDA_HOTKEY is a class to handle hot key commands.
Definition: hotkeys_basic.h:59
Board layer functions and definitions.
void OnUpdateSwitchCanvas(wxUpdateUIEvent &aEvent)
Update UI called when switches currently used canvas (default / Cairo / OpenGL).
PARAM_CFG_ARRAY & GetConfigurationSettings(void)
Function GetConfigurationSettings Populates the GerbView applications settings list.
void OnSwitchCanvas(wxCommandEvent &aEvent)
switches currently used canvas (default / Cairo / OpenGL).
void OnUpdateDrawMode(wxUpdateUIEvent &aEvent)
void SaveCopyInUndoList(const PICKED_ITEMS_LIST &aItemsList, UNDO_REDO_T aTypeCommand, const wxPoint &aTransformPoint=wxPoint(0, 0))
Function SaveCopyInUndoList (overloaded).
COLOR4D GetLayerColor(int aLayer) const
Function GetLayerColor gets a layer color for any valid layer.
GERBER_FILE_IMAGE_LIST * GetImagesList() const
Definition: gbr_layout.cpp:50
void OnUpdateCoordType(wxUpdateUIEvent &aEvent)
Class EDA_ITEM is a base class for most all the KiCad significant classes, used in schematics and boa...
Definition: base_struct.h:157
void SetLayerColor(int aLayer, COLOR4D aColor)
Function SetLayerColor changes a layer color for any valid layer.
virtual void SetGridColor(COLOR4D aColor) override
wxPoint m_grid_origin
void syncLayerWidget()
Function syncLayerWidget updates the currently "selected" layer within the GERBER_LAYER_WIDGET.
Class COLORS_DESIGN_SETTINGS is a list of color settings for designs in Pcbnew.
wxChoice * m_SelComponentBox
void OnDrlFileHistory(wxCommandEvent &event)
Function OnDrlFileHistory deletes the current data and load a drill file in Excellon format selected ...
void ToPrinter(wxCommandEvent &event)
Function ToPrinter Open a dialog frame to print layers.
bool LoadExcellonFiles(const wxString &aFileName)
function LoadExcellonFiles Load a drill (EXCELLON) file or many files.
void OnZipFileHistory(wxCommandEvent &event)
Function OnZipFileHistory deletes the current data and load a zip archive file selected from the hist...
void SetVisibleLayers(LSET aLayerMask)
Function SetVisibleLayers is a proxy function that calls the correspondent function in m_BoardSetting...
bool m_show_layer_manager_tools
void ReCreateMenuBar() override
Recreates the menu bar.
int getNextAvailableLayer(int aLayer=0) const
Function getNextAvailableLayer finds the next empty layer starting at aLayer and returns it to the ca...
void SetLayout(GBR_LAYOUT *aLayout)
Function SetLayout sets the m_gerberLayout member in such as way as to ensure deleting any previous G...
bool IsLayerVisible(int aLayer) const
Function IsLayerVisible tests whether a given layer is visible.
GERBER_FILE_IMAGE_LIST * GetImagesList() const
Accessors to GERBER_FILE_IMAGE_LIST and GERBER_FILE_IMAGE data.
void Liste_D_Codes()
Set Size Items (Lines, Flashes) from DCodes List.
void SetElementVisibility(int aLayerID, bool aNewState)
Function SetElementVisibility changes the visibility of an element category.
bool OnHotKey(wxDC *aDC, int aHotkeyCode, const wxPoint &aPosition, EDA_ITEM *aItem=NULL) override
Function OnHotKey.
void ReFillLayerWidget()
Function ReFillLayerWidget changes out all the layers in m_Layers and may be called upon loading new ...
void OnSelectActiveLayer(wxCommandEvent &event)
Function OnSelectActiveLayer Selects the active layer:
void UpdateTitleAndInfo()
Function UpdateTitleAndInfo displays the short filename (if exists) of the selected layer on the capt...
void SetDisplayMode(int aMode)
Function SetDisplayMode.
int SelectPCBLayer(int aDefaultLayer, int aOpperLayerCount, bool aNullLayer=false)
Install the dialog box for layer selection.
void CommonSettingsChanged() override
Called after the preferences dialog is run.
void OnUpdateShowLayerManager(wxUpdateUIEvent &aEvent)
const wxString GetZoomLevelIndicator() const override
Function GetZoomLevelIndicator returns a human readable value which can be displayed as zoom level in...
Class COLOR4D is the color representation with 4 components: red, green, blue, alpha.
Definition: color4d.h:39
bool Read_EXCELLON_File(const wxString &aFullFileName)