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@verizon.net>
6  * Copyright (C) 1992-2016 KiCad Developers, see AUTHORS.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 
30 #ifndef WX_GERBER_STRUCT_H
31 #define WX_GERBER_STRUCT_H
32 
33 
34 #include <config_params.h>
35 #include <draw_frame.h>
37 
38 #include <gerbview.h>
39 #include <convert_to_biu.h>
40 #include <class_gbr_layout.h>
41 #include <class_gbr_screen.h>
42 #include <class_page_info.h>
45 
47 
48 #define NO_AVAILABLE_LAYERS UNDEFINED_LAYER
49 
53 class GERBER_DRAW_ITEM;
54 class GERBER_FILE_IMAGE;
56 class REPORTER;
57 
58 
64 #define GERBVIEW_FRAME_NAME wxT( "GerberFrame" )
65 
66 class GERBVIEW_FRAME : public EDA_DRAW_FRAME // PCB_BASE_FRAME
67 {
70  PAGE_INFO m_paper; // used only to show paper limits to screen
71 
72 public:
74 
81  void SetLayout( GBR_LAYOUT* aLayout )
82  {
83  delete m_gerberLayout;
84  m_gerberLayout = aLayout;
85  }
86 
88  {
89  wxASSERT( m_gerberLayout );
90  return m_gerberLayout;
91  }
92 
97  {
98  return m_gerberLayout->GetImagesList();
99  }
100 
101  GERBER_FILE_IMAGE* GetGbrImage( int aIdx ) const;
102 
103  unsigned ImagesMaxCount() const;
104 
105 
112 
113  void SetPageSettings( const PAGE_INFO& aPageSettings ) override;
114  const PAGE_INFO& GetPageSettings() const override;
115  const wxSize GetPageSizeIU() const override;
116 
117  const wxPoint& GetAuxOrigin() const override;
118  void SetAuxOrigin( const wxPoint& aPoint ) override;
119 
120  const wxPoint& GetGridOrigin() const override { return m_grid_origin; }
121  void SetGridOrigin( const wxPoint& aPoint ) override
122  {
123  m_grid_origin = aPoint;
124  }
125 
126  const TITLE_BLOCK& GetTitleBlock() const override;
127  void SetTitleBlock( const TITLE_BLOCK& aTitleBlock ) override;
128 
139  void SetCurItem( GERBER_DRAW_ITEM* aItem, bool aDisplayInfo = true );
140 
156  int SelectPCBLayer( int aDefaultLayer, int aOpperLayerCount, bool aNullLayer = false );
157 
159  virtual void SetGridColor( COLOR4D aColor ) override;
160 
161 protected:
163 
164  // Auxiliary file history used to store zip files history.
165  wxFileHistory m_zipFileHistory;
166 
167  // Auxiliary file history used to store drill files history.
168  wxFileHistory m_drillFileHistory;
169 
170  // Auxiliary file history used to store job files history.
171  wxFileHistory m_jobFileHistory;
172 
174  wxString m_lastFileName;
175 
177  virtual void forceColorsToLegacy() override;
178 
179 public:
180  wxChoice* m_SelComponentBox; // a choice box to display and highlight component graphic items
181  wxChoice* m_SelNetnameBox; // a choice box to display and highlight netlist graphic items
182  wxChoice* m_SelAperAttributesBox; // a choice box to display aperture attributes and highlight items
183  GBR_LAYER_BOX_SELECTOR* m_SelLayerBox; // The combobox to select the current active graphic layer
184  // (which is drawn on top on the other layers
185  DCODE_SELECTION_BOX* m_DCodeSelector; // a list box to select the dcode Id to highlight.
186  wxTextCtrl* m_TextInfo; // a wxTextCtrl used to display some info about
187  // gerber data (format..)
188 
190 
191 private:
194  wxAuiToolBar* m_auxiliaryToolBar;
195 
196  // list of PARAM_CFG_xxx to read/write parameters saved in config
198 
199  int m_displayMode; // Gerber images ("layers" in Gerbview) can be drawn:
200  // - in fast mode (write mode) but if there are negative
201  // items only the last image is correctly drawn (no
202  // problem to see only one image or when no negative items)
203  // - in "exact" mode (but slower) in write mode:
204  // last image covers previous images
205  // - in "exact" mode (also slower) in OR mode
206  // (transparency mode)
207  // m_displayMode = 0, 1 or 2
208 
210 
214  void updateDCodeSelectBox();
215  virtual void unitsChangeRefresh() override; // See class EDA_DRAW_FRAME
216 
217  // The Tool Framework initalization
218  void setupTools();
219 
220  // An array string to store warning messages when reading a gerber file.
221  wxArrayString m_Messages;
222 
225 
226 public:
227  GERBVIEW_FRAME( KIWAY* aKiway, wxWindow* aParent );
228  ~GERBVIEW_FRAME();
229 
230  void OnCloseWindow( wxCloseEvent& Event );
231 
232  bool OpenProjectFiles( const std::vector<wxString>& aFileSet, int aCtl ) override;
233 
234  // Virtual basic functions:
235  void RedrawActiveWindow( wxDC* DC, bool EraseBg ) override;
236  void ReCreateHToolbar() override;
237  void ReCreateAuxiliaryToolbar() override;
238 
245  void ReCreateVToolbar() override;
246 
250  void ReCreateOptToolbar();
251 
252  void ReCreateMenuBar() override;
253  void OnLeftClick( wxDC* aDC, const wxPoint& aMousePos ) override;
254  void OnLeftDClick( wxDC* aDC, const wxPoint& aMousePos ) override;
255  bool OnRightClick( const wxPoint& aMousePos, wxMenu* aPopMenu ) override;
256  void OnUpdateSelectTool( wxUpdateUIEvent& aEvent );
257  double BestZoom() override;
258  void UpdateStatusBar() override;
259 
260  wxAuiToolBar* GetMainToolBar() { return m_optionsToolBar; }
261 
268  const wxString GetZoomLevelIndicator() const override;
269 
276  void ReportMessage( const wxString aMessage )
277  {
278  m_Messages.Add( aMessage );
279  }
280 
287  {
288  m_Messages.Clear();
289  }
290 
297  int GetDisplayMode() { return m_displayMode; }
298 
305  void SetDisplayMode( int aMode ) { m_displayMode = aMode; }
306 
314  bool IsElementVisible( GERBVIEW_LAYER_ID aItemIdVisible ) const;
315 
323  void SetElementVisibility( GERBVIEW_LAYER_ID aItemIdVisible, bool aNewState );
324 
330  void SetGridVisibility( bool aVisible ) override;
331 
338  long GetVisibleLayers() const;
339 
346  void SetVisibleLayers( long aLayerMask );
347 
354  bool IsLayerVisible( int aLayer ) const;
355 
361 
362  void SetVisibleElementColor( GERBVIEW_LAYER_ID aItemIdVisible, COLOR4D aColor );
363 
368  COLOR4D GetLayerColor( int aLayer ) const;
369 
374  void SetLayerColor( int aLayer, COLOR4D aColor );
375 
383 
390  {
391  return m_DisplayOptions.m_DisplayLinesFill;
392  }
393 
400  {
401  return m_DisplayOptions.m_DisplayPolygonsFill;
402  }
403 
410  {
411  return m_DisplayOptions.m_DisplayFlashedItemsFill;
412  }
413 
419  void ReFillLayerWidget();
420 
426  void SetActiveLayer( int aLayer, bool doLayerWidgetUpdate = true );
427 
432  int GetActiveLayer();
433 
441  int getNextAvailableLayer( int aLayer = 0 ) const;
442 
443  bool hasAvailableLayers() const
444  {
446  }
447 
456  void syncLayerWidget();
457 
466  void syncLayerBox( bool aRebuildLayerBox = false );
467 
477  void UpdateTitleAndInfo();
478 
489 
490  void LoadSettings( wxConfigBase* aCfg ) override;
491 
492  void SaveSettings( wxConfigBase* aCfg ) override;
493 
494  void ShowChangedLanguage() override;
495 
496  void Process_Special_Functions( wxCommandEvent& event );
497  void OnSelectOptionToolbar( wxCommandEvent& event );
498 
500  void OnSelectHighlightChoice( wxCommandEvent& event );
501 
507  void OnSelectActiveDCode( wxCommandEvent& event );
508 
515  void OnSelectActiveLayer( wxCommandEvent& event );
516 
522  void OnShowGerberSourceFile( wxCommandEvent& event );
523 
530  void OnSelectDisplayMode( wxCommandEvent& event );
531 
536  void OnQuit( wxCommandEvent& event );
537 
539  EDA_HOTKEY* GetHotKeyDescription( int aCommand ) const override;
540 
550  bool OnHotKey( wxDC* aDC, int aHotkeyCode, const wxPoint& aPosition, EDA_ITEM* aItem = NULL ) override;
551 
552  GERBER_DRAW_ITEM* Locate( const wxPoint& aPosition, int typeloc );
553 
554  void Process_Config( wxCommandEvent& event );
555  void InstallGerberOptionsDialog( wxCommandEvent& event );
556 
557  void OnUpdateDrawMode( wxUpdateUIEvent& aEvent );
558  void OnUpdateCoordType( wxUpdateUIEvent& aEvent );
559  void OnUpdateFlashedItemsDrawMode( wxUpdateUIEvent& aEvent );
560  void OnUpdateLinesDrawMode( wxUpdateUIEvent& aEvent );
561  void OnUpdatePolygonsDrawMode( wxUpdateUIEvent& aEvent );
562  void OnUpdateShowDCodes( wxUpdateUIEvent& aEvent );
563  void OnUpdateShowNegativeItems( wxUpdateUIEvent& aEvent );
564  void OnUpdateShowLayerManager( wxUpdateUIEvent& aEvent );
565  void OnUpdateSelectDCode( wxUpdateUIEvent& aEvent );
566  void OnUpdateLayerSelectBox( wxUpdateUIEvent& aEvent );
567  void OnUpdateDiffMode( wxUpdateUIEvent& aEvent );
568  void OnUpdateHighContrastMode( wxUpdateUIEvent& aEvent );
569 
575  virtual int BlockCommand( EDA_KEY key ) override;
576 
581  virtual void HandleBlockPlace( wxDC* DC ) override;
582 
594  virtual bool HandleBlockEnd( wxDC* DC ) override;
595 
602  void Block_Move();
603 
608  void ToPrinter( wxCommandEvent& event );
609 
610  void Files_io( wxCommandEvent& event );
611 
617  void OnGbrFileHistory( wxCommandEvent& event );
618 
624  void OnDrlFileHistory( wxCommandEvent& event );
625 
631  void OnZipFileHistory( wxCommandEvent& event );
632 
637  void OnJobFileHistory( wxCommandEvent& event );
638 
645  bool unarchiveFiles( const wxString& aFullFileName,
646  REPORTER* aReporter = nullptr );
647 
656  bool LoadGerberFiles( const wxString& aFileName );
657  bool Read_GERBER_File( const wxString& GERBER_FullFileName );
658 
667  bool LoadExcellonFiles( const wxString& aFileName );
668  bool Read_EXCELLON_File( const wxString& aFullFileName );
669 
678  bool LoadZipArchiveFile( const wxString& aFileName );
679 
680 
688  bool LoadGerberJobFile( const wxString& aFileName );
689 
690 
691  bool GeneralControl( wxDC* aDC, const wxPoint& aPosition, EDA_KEY aHotKey = 0 ) override;
692 
696  void Liste_D_Codes();
697 
698  // PCB handling
699  bool Clear_DrawLayers( bool query );
700  void Erase_Current_DrawLayer( bool query );
701 
702  // Conversion function
703  void ExportDataInPcbnewFormat( wxCommandEvent& event );
704 
705  /* SaveCopyInUndoList() virtual
706  * currently: do nothing in GerbView.
707  */
709  UNDO_REDO_T aTypeCommand = UR_UNSPECIFIED,
710  const wxPoint& aTransformPoint = wxPoint( 0, 0 ) ) { }
711 
721  void SaveCopyInUndoList( const PICKED_ITEMS_LIST& aItemsList,
722  UNDO_REDO_T aTypeCommand,
723  const wxPoint& aTransformPoint = wxPoint( 0, 0 ) )
724  {
725  // currently: do nothing in GerbView.
726  }
727 
735  virtual void PrintPage( wxDC* aDC, LSET aPrintMasklayer, bool aPrintMirrorMode,
736  void* aData = NULL ) override;
737 
739  virtual void UseGalCanvas( bool aEnable ) override;
740 
744  void SwitchCanvas( wxCommandEvent& aEvent );
745 
749  void OnUpdateSwitchCanvas( wxUpdateUIEvent& aEvent );
750 
751  DECLARE_EVENT_TABLE()
752 };
753 
754 #endif /* WX_GERBER_STRUCT_H */
void OnUpdateHighContrastMode(wxUpdateUIEvent &aEvent)
Class GBR_LAYOUT holds list of GERBER_DRAW_ITEM currently loaded.
void SetTitleBlock(const TITLE_BLOCK &aTitleBlock) override
void OnSelectHighlightChoice(wxCommandEvent &event)
Handles the changing of the highlighted component/net/attribute.
A list of parameters type.
bool m_DisplayPolygonsFill
Option to draw polygons (filled/sketch)
wxString m_lastFileName
The last filename chosen to be proposed to the user.
void OnLeftDClick(wxDC *aDC, const wxPoint &aMousePos) override
bool Clear_DrawLayers(bool query)
const wxSize GetPageSizeIU() const override
Function GetPageSizeIU works off of GetPageSettings() to return the size of the paper page in the int...
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
Function UpdateStatusBar updates the status bar information.
void OnUpdateSelectTool(wxUpdateUIEvent &aEvent)
EDA_RECT GetGerberLayoutBoundingBox()
Function GetGerberLayoutBoundingBox calculates the bounding box containing all gerber items...
virtual void forceColorsToLegacy() override
>
COLOR4D GetNegativeItemsColor()
Function GetNegativeItemsColor.
virtual int BlockCommand(EDA_KEY key) override
Function BlockCommand returns the block command (BLOCK_MOVE, BLOCK_COPY...) corresponding to the aKey...
void SetVisibleElementColor(GERBVIEW_LAYER_ID aItemIdVisible, COLOR4D aColor)
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
void SetCurItem(GERBER_DRAW_ITEM *aItem, bool aDisplayInfo=true)
Function SetCurItem sets the currently selected item and displays it in the MsgPanel.
bool DisplayPolygonsSolidMode()
Function DisplayPolygonsSolidMode.
const wxPoint & GetAuxOrigin() const override
Function GetAuxOrigin returns the origin of the axis used for plotting and various exports...
void OnQuit(wxCommandEvent &event)
Function OnQuit called on request of application quit.
void SetPageSettings(const PAGE_INFO &aPageSettings) override
const TITLE_BLOCK & GetTitleBlock() const override
GERBER_LAYER_WIDGET * m_LayersManager
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...
GBR_LAYER_BOX_SELECTOR * m_SelLayerBox
void SaveCopyInUndoList(GERBER_DRAW_ITEM *aItemToCopy, UNDO_REDO_T aTypeCommand=UR_UNSPECIFIED, const wxPoint &aTransformPoint=wxPoint(0, 0))
The common library.
void OnUpdateLayerSelectBox(wxUpdateUIEvent &aEvent)
void updateNetnameListSelectBox()
wxFileHistory m_drillFileHistory
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)
Class EDA_DRAW_FRAME is the base class for create windows for drawing purpose.
Definition: draw_frame.h:54
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.
void SetVisibleLayers(long aLayerMask)
Function SetVisibleLayers is a proxy function that calls the correspondent function in m_BoardSetting...
Class TITLE_BLOCK holds the information shown in the lower right corner of a plot, printout, or editing view.
void OnSelectActiveDCode(wxCommandEvent &event)
Function OnSelectActiveDCode Selects the active DCode for the current active layer.
GERBVIEW_LAYER_ID
GerbView draw layers.
wxChoice * m_SelNetnameBox
void SaveSettings(wxConfigBase *aCfg) override
Function SaveSettings saves common frame parameters to a configuration data file. ...
int getNextAvailableLayer(int aLayer=0) const
Function getNextAvailableLayer finds the next empty layer starting at aLayer and returns it to the ca...
bool m_DisplayLinesFill
Option to draw line items (filled/sketch)
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)
long GetVisibleLayers() const
Function GetVisibleLayers is a proxy function that calls the correspondent function in m_BoardSetting...
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 Process_Special_Functions(wxCommandEvent &event)
void SetGridOrigin(const wxPoint &aPoint) override
void updateComponentListSelectBox()
void ClearMessageList()
Function ClearMessageList Clear the message list Call it before reading a Gerber file.
UNDO_REDO_T
Undo Redo considerations: Basically we have 3 cases New item Deleted item Modified item there is also...
COLORS_DESIGN_SETTINGS g_ColorsSettings
virtual void HandleBlockPlace(wxDC *DC) override
Function HandleBlockPlace handles the block place command.
Class LSET is a set of PCB_LAYER_IDs.
COLOR4D GetVisibleElementColor(GERBVIEW_LAYER_ID aItemIdVisible)
Function GetVisibleElementColor returns the color of a gerber visible element.
wxAuiToolBar * m_optionsToolBar
The options tool bar typcially located on the left edge of the main window.
Definition: draw_frame.h:126
bool unarchiveFiles(const wxString &aFullFileName, REPORTER *aReporter=nullptr)
Extracts gerber and drill files from the zip archive, and load them.
unsigned ImagesMaxCount() const
The max number of file images.
PAGE_INFO m_paper
void ReCreateAuxiliaryToolbar() override
virtual void unitsChangeRefresh() override
Function unitsChangeRefresh is called when when the units setting has changed to allow for any derive...
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 GBR_DISPLAY_OPTIONS is a helper class to handle display options (filling modes and afew other o...
Class PAGE_INFO describes the page size and margins of a paper page on which to eventually print or p...
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.
bool m_DisplayFlashedItemsFill
Option to draw flashed items (filled/sketch)
void OnUpdatePolygonsDrawMode(wxUpdateUIEvent &aEvent)
void ShowChangedLanguage() override
Function ShowChangedLanguage redraws 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.
GBR_LAYOUT * m_gerberLayout
wxFileHistory m_jobFileHistory
Class KIWAY is a minimalistic software bus for communications between various DLLs/DSOs (DSOs) within...
Definition: kiway.h:257
uint32_t EDA_KEY
Definition: common.h:52
const wxPoint & GetGridOrigin() const override
Function GetGridOrigin returns the absolute coordinates of the origin of the snap grid...
GBR_LAYOUT * GetGerberLayout() const
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...
GERBER_FILE_IMAGE_LIST * GetImagesList() const
Accessors to GERBER_FILE_IMAGE_LIST and GERBER_FILE_IMAGE data.
void OnLeftClick(wxDC *aDC, const wxPoint &aMousePos) override
EDA_HOTKEY * GetHotKeyDescription(int aCommand) const override
>
void OnUpdateShowNegativeItems(wxUpdateUIEvent &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
Function LoadSettings loads common frame parameters from a configuration file.
void OnCloseWindow(wxCloseEvent &Event)
bool IsLayerVisible(int aLayer) const
Function IsLayerVisible tests whether a given layer is visible.
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
Function GeneralControl performs application specific control using aDC at aPosition in logical units...
GERBER_DRAW_ITEM * Locate(const wxPoint &aPosition, int typeloc)
Definition: locate.cpp:43
void ReportMessage(const wxString aMessage)
Function ReportMessage Add a message (a string) in message list for instance when reading a Gerber fi...
void ReCreateOptToolbar()
Create or update the left vertical toolbar (option toolbar.
wxArrayString m_Messages
void OnSelectOptionToolbar(wxCommandEvent &event)
void OnUpdateShowDCodes(wxUpdateUIEvent &aEvent)
bool DisplayLinesSolidMode()
Function DisplayLinesSolidMode.
virtual bool HandleBlockEnd(wxDC *DC) override
Function HandleBlockEnd( ) handles the end of a block command, It is called at the end of the definit...
wxTextCtrl * m_TextInfo
DCODE_SELECTION_BOX * m_DCodeSelector
void ExportDataInPcbnewFormat(wxCommandEvent &event)
wxAuiToolBar * m_auxiliaryToolBar
Auxiliary tool bar typically shown below the main tool bar at the top of the main window...
wxFileHistory m_zipFileHistory
const PAGE_INFO & GetPageSettings() const override
wxAuiToolBar * GetMainToolBar()
COLOR4D GetLayerColor(int aLayer) const
Function GetLayerColor gets a layer color for any valid layer.
bool DisplayFlashedItemsSolidMode()
Function DisplayFlashedItemsSolidMode.
void OnJobFileHistory(wxCommandEvent &event)
deletes the current data and load a gerber job file selected from the history list.
void updateAperAttributesSelectBox()
wxChoice * m_SelAperAttributesBox
class EDA_HOTKEY is a class to handle hot key commands.
Definition: hotkeys_basic.h:57
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 SetElementVisibility(GERBVIEW_LAYER_ID aItemIdVisible, bool aNewState)
Function SetElementVisibility changes the visibility of an element category.
void OnUpdateDrawMode(wxUpdateUIEvent &aEvent)
GERBER_FILE_IMAGE_LIST * GetImagesList() const
void SaveCopyInUndoList(const PICKED_ITEMS_LIST &aItemsList, UNDO_REDO_T aTypeCommand, const wxPoint &aTransformPoint=wxPoint(0, 0))
Function SaveCopyInUndoList (overloaded).
bool IsElementVisible(GERBVIEW_LAYER_ID aItemIdVisible) const
Function IsElementVisible tests whether a given element category is visible.
Class EDA_RECT handles the component boundary box.
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:165
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 SwitchCanvas(wxCommandEvent &aEvent)
switches currently used canvas (default / Cairo / OpenGL).
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 ...
bool hasAvailableLayers() const
void ToPrinter(wxCommandEvent &event)
Function ToPrinter Open a dialog frame to print layers.
void InstallGerberOptionsDialog(wxCommandEvent &event)
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...
GERBER_FILE_IMAGE * GetGbrImage(int aIdx) const
bool m_show_layer_manager_tools
void ReCreateMenuBar() override
Function ReCreateMenuBar Creates recreates the menu bar.
virtual void PrintPage(wxDC *aDC, LSET aPrintMasklayer, bool aPrintMirrorMode, void *aData=NULL) override
Virtual function PrintPage used to print a page.
void SetLayout(GBR_LAYOUT *aLayout)
Function SetLayout sets the m_gerberLayout member in such as way as to ensure deleting any previous G...
Class CLASS_GBR_LAYOUT to handle info to draw/print loaded Gerber images and page frame reference...
void Liste_D_Codes()
Set Size Items (Lines, Flashes) from DCodes List.
Handle colors used to draw all items or layers.
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.
void OnUpdateLinesDrawMode(wxUpdateUIEvent &aEvent)
int SelectPCBLayer(int aDefaultLayer, int aOpperLayerCount, bool aNullLayer=false)
Install the dialog box for layer selection.
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)