KiCad PCB EDA Suite
events_called_functions.cpp
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) 2011-2014 Jean-Pierre Charras jp.charras at wanadoo.fr
5  * Copyright (C) 1992-2018 KiCad Developers, see AUTHORS.txt for contributors.
6  *
7  * This program is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU General Public License
9  * as published by the Free Software Foundation; either version 2
10  * of the License, or (at your option) any later version.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with this program; if not, you may find one here:
19  * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
20  * or you may search the http://www.gnu.org website for the version 2 license,
21  * or you may write to the Free Software Foundation, Inc.,
22  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
23  */
24 
30 #include <fctsys.h>
31 #include <pgm_base.h>
32 #include <class_drawpanel.h>
33 #include <gestfich.h>
34 
35 #include <gerbview.h>
36 #include <gerbview_frame.h>
37 #include <kicad_device_context.h>
38 #include <gerbview_id.h>
39 #include <gerber_file_image.h>
40 #include <gerber_file_image_list.h>
41 #include <dialog_helpers.h>
42 #include <DCodeSelectionbox.h>
43 #include <gerbview_layer_widget.h>
45 
48 #include <tool/tool_manager.h>
49 #include <gerbview_painter.h>
50 #include <view/view.h>
51 
52 
53 // Event table:
54 
55 BEGIN_EVENT_TABLE( GERBVIEW_FRAME, EDA_DRAW_FRAME )
56  EVT_CLOSE( GERBVIEW_FRAME::OnCloseWindow )
57  EVT_SIZE( GERBVIEW_FRAME::OnSize )
58 
59  EVT_TOOL( wxID_FILE, GERBVIEW_FRAME::Files_io )
65  EVT_TOOL( ID_GERBVIEW_SET_PAGE_BORDER, GERBVIEW_FRAME::Process_Special_Functions )
66 
67  // Menu Files:
68  EVT_MENU( wxID_FILE, GERBVIEW_FRAME::Files_io )
69  EVT_MENU( ID_NEW_BOARD, GERBVIEW_FRAME::Files_io )
70  EVT_MENU( ID_GERBVIEW_EXPORT_TO_PCBNEW, GERBVIEW_FRAME::ExportDataInPcbnewFormat )
71 
72  EVT_MENU_RANGE( wxID_FILE1, wxID_FILE9, GERBVIEW_FRAME::OnGbrFileHistory )
73 
75  GERBVIEW_FRAME::OnDrlFileHistory )
76 
78  GERBVIEW_FRAME::OnZipFileHistory )
79 
81  GERBVIEW_FRAME::OnJobFileHistory )
82 
83  EVT_MENU( wxID_EXIT, GERBVIEW_FRAME::OnQuit )
84 
85  // menu Preferences
87  GERBVIEW_FRAME::Process_Config )
88 
89  EVT_MENU( wxID_PREFERENCES, GERBVIEW_FRAME::InstallGerberOptionsDialog )
90  EVT_UPDATE_UI( ID_MENU_CANVAS_LEGACY, GERBVIEW_FRAME::OnUpdateSwitchCanvas )
91  EVT_UPDATE_UI( ID_MENU_CANVAS_CAIRO, GERBVIEW_FRAME::OnUpdateSwitchCanvas )
92  EVT_UPDATE_UI( ID_MENU_CANVAS_OPENGL, GERBVIEW_FRAME::OnUpdateSwitchCanvas )
93  EVT_MENU( ID_MENU_CANVAS_LEGACY, GERBVIEW_FRAME::OnSwitchCanvas )
94  EVT_MENU( ID_MENU_CANVAS_CAIRO, GERBVIEW_FRAME::OnSwitchCanvas )
95  EVT_MENU( ID_MENU_CANVAS_OPENGL, GERBVIEW_FRAME::OnSwitchCanvas )
96 
97  // menu Postprocess
98  EVT_MENU( ID_GERBVIEW_SHOW_LIST_DCODES, GERBVIEW_FRAME::Process_Special_Functions )
99  EVT_MENU( ID_GERBVIEW_SHOW_SOURCE, GERBVIEW_FRAME::OnShowGerberSourceFile )
101  EDA_BASE_FRAME::OnSelectPreferredEditor )
102 
103  // menu Miscellaneous
104  EVT_MENU( ID_GERBVIEW_ERASE_CURR_LAYER, GERBVIEW_FRAME::Process_Special_Functions )
105 
106  // Menu Help
107  EVT_MENU( wxID_HELP, EDA_DRAW_FRAME::GetKicadHelp )
108  EVT_MENU( wxID_INDEX, EDA_DRAW_FRAME::GetKicadHelp )
109  EVT_MENU( ID_HELP_GET_INVOLVED, EDA_DRAW_FRAME::GetKicadContribute )
110  EVT_MENU( wxID_ABOUT, EDA_DRAW_FRAME::GetKicadAbout )
111 
112  EVT_TOOL( wxID_UNDO, GERBVIEW_FRAME::Process_Special_Functions )
113  EVT_TOOL( wxID_PRINT, GERBVIEW_FRAME::ToPrinter )
115  GERBVIEW_FRAME::OnSelectActiveLayer )
116 
118 
119  EVT_MENU( ID_MENU_ZOOM_SELECTION, GERBVIEW_FRAME::Process_Special_Functions )
120 
121  // Vertical toolbar:
122  EVT_TOOL( ID_NO_TOOL_SELECTED, GERBVIEW_FRAME::Process_Special_Functions )
123 
125  GERBVIEW_FRAME::Process_Special_Functions )
126 
127  // Option toolbar
128  //EVT_TOOL( ID_NO_TOOL_SELECTED, GERBVIEW_FRAME::Process_Special_Functions ) // mentioned below
129  EVT_TOOL( ID_ZOOM_SELECTION, GERBVIEW_FRAME::Process_Special_Functions )
130  EVT_TOOL( ID_TB_MEASUREMENT_TOOL, GERBVIEW_FRAME::Process_Special_Functions )
132  EVT_TOOL( ID_TB_OPTIONS_SHOW_POLYGONS_SKETCH, GERBVIEW_FRAME::OnTogglePolygonDrawMode )
136  GERBVIEW_FRAME::OnToggleShowLayerManager )
137  EVT_TOOL( ID_TB_OPTIONS_SHOW_DCODES, GERBVIEW_FRAME::OnSelectOptionToolbar )
140  GERBVIEW_FRAME::OnSelectDisplayMode )
141  EVT_TOOL( ID_TB_OPTIONS_DIFF_MODE, GERBVIEW_FRAME::OnSelectOptionToolbar )
142  EVT_TOOL( ID_TB_OPTIONS_HIGH_CONTRAST_MODE, GERBVIEW_FRAME::OnSelectOptionToolbar )
143 
144  // Auxiliary horizontal toolbar
145  EVT_CHOICE( ID_GBR_AUX_TOOLBAR_PCB_CMP_CHOICE, GERBVIEW_FRAME::OnSelectHighlightChoice )
146  EVT_CHOICE( ID_GBR_AUX_TOOLBAR_PCB_NET_CHOICE, GERBVIEW_FRAME::OnSelectHighlightChoice )
148  GERBVIEW_FRAME::OnSelectHighlightChoice )
149 
150  // Right click context menu
151  EVT_MENU( ID_HIGHLIGHT_CMP_ITEMS, GERBVIEW_FRAME::Process_Special_Functions )
152  EVT_MENU( ID_HIGHLIGHT_NET_ITEMS, GERBVIEW_FRAME::Process_Special_Functions )
153  EVT_MENU( ID_HIGHLIGHT_APER_ATTRIBUTE_ITEMS, GERBVIEW_FRAME::Process_Special_Functions )
154  EVT_MENU( ID_HIGHLIGHT_REMOVE_ALL, GERBVIEW_FRAME::Process_Special_Functions )
155 
156  EVT_UPDATE_UI( ID_NO_TOOL_SELECTED, GERBVIEW_FRAME::OnUpdateSelectTool )
157  EVT_UPDATE_UI( ID_ZOOM_SELECTION, GERBVIEW_FRAME::OnUpdateSelectTool )
158  EVT_UPDATE_UI( ID_TB_MEASUREMENT_TOOL, GERBVIEW_FRAME::OnUpdateSelectTool )
159  EVT_UPDATE_UI( ID_TB_OPTIONS_SHOW_POLAR_COORD, GERBVIEW_FRAME::OnUpdateCoordType )
160  EVT_UPDATE_UI( ID_TB_OPTIONS_SHOW_FLASHED_ITEMS_SKETCH,
161  GERBVIEW_FRAME::OnUpdateFlashedItemsDrawMode )
162  EVT_UPDATE_UI( ID_TB_OPTIONS_SHOW_LINES_SKETCH, GERBVIEW_FRAME::OnUpdateLineDrawMode )
163  EVT_UPDATE_UI( ID_TB_OPTIONS_SHOW_POLYGONS_SKETCH, GERBVIEW_FRAME::OnUpdatePolygonDrawMode )
164  EVT_UPDATE_UI( ID_TB_OPTIONS_SHOW_DCODES, GERBVIEW_FRAME::OnUpdateShowDCodes )
165  EVT_UPDATE_UI( ID_TB_OPTIONS_SHOW_NEGATIVE_ITEMS, GERBVIEW_FRAME::OnUpdateShowNegativeItems )
166  EVT_UPDATE_UI( ID_TB_OPTIONS_SHOW_LAYERS_MANAGER_VERTICAL_TOOLBAR,
167  GERBVIEW_FRAME::OnUpdateShowLayerManager )
168  EVT_UPDATE_UI( ID_TB_OPTIONS_DIFF_MODE, GERBVIEW_FRAME::OnUpdateDiffMode )
169  EVT_UPDATE_UI( ID_TB_OPTIONS_HIGH_CONTRAST_MODE, GERBVIEW_FRAME::OnUpdateHighContrastMode )
170 
171  EVT_UPDATE_UI( ID_TOOLBARH_GERBER_SELECT_ACTIVE_DCODE, GERBVIEW_FRAME::OnUpdateSelectDCode )
172  EVT_UPDATE_UI( ID_TOOLBARH_GERBVIEW_SELECT_ACTIVE_LAYER,
173  GERBVIEW_FRAME::OnUpdateLayerSelectBox )
174  EVT_UPDATE_UI_RANGE( ID_TB_OPTIONS_SHOW_GBR_MODE_0, ID_TB_OPTIONS_SHOW_GBR_MODE_2,
175  GERBVIEW_FRAME::OnUpdateDrawMode )
176 
177 END_EVENT_TABLE()
178 
179 
180 /* Handles the selection of tools, menu, and popup menu commands.
181  */
182 void GERBVIEW_FRAME::Process_Special_Functions( wxCommandEvent& event )
183 {
184  int id = event.GetId();
185 
186  switch( id )
187  {
189  case ID_POPUP_ZOOM_BLOCK:
190  break;
191 
193  m_canvas->EndMouseCapture();
194 
195  if( GetScreen()->m_BlockLocate.GetCommand() != BLOCK_IDLE )
196  {
197  /* Should not be executed, except bug */
198  GetScreen()->m_BlockLocate.SetCommand( BLOCK_IDLE );
199  GetScreen()->m_BlockLocate.SetState( STATE_NO_BLOCK );
200  GetScreen()->m_BlockLocate.ClearItemsList();
201  }
202 
203  if( GetToolId() == ID_NO_TOOL_SELECTED )
204  SetNoToolSelected();
205  else
206  m_canvas->SetCursor( (wxStockCursor) m_canvas->GetCurrentCursor() );
207  break;
208 
209  default:
210  m_canvas->EndMouseCapture();
211  break;
212  }
213 
214  GERBER_DRAW_ITEM* currItem = (GERBER_DRAW_ITEM*) GetScreen()->GetCurItem();
215 
216  switch( id )
217  {
218  case ID_GERBVIEW_SET_PAGE_BORDER:
219  {
220  DIALOG_PAGE_SHOW_PAGE_BORDERS dlg( this );
221 
222  if( dlg.ShowModal() == wxID_OK )
223  m_canvas->Refresh();
224  }
225  break;
226 
227  case ID_GERBVIEW_ERASE_CURR_LAYER:
228  Erase_Current_DrawLayer( true );
229  ClearMsgPanel();
230  break;
231 
232  case ID_NO_TOOL_SELECTED:
233  SetNoToolSelected();
234  break;
235 
236  case ID_MENU_ZOOM_SELECTION:
237  case ID_ZOOM_SELECTION:
238  // This tool is located on the main toolbar: switch it on or off on click
239  if( GetToolId() != ID_ZOOM_SELECTION )
240  SetToolID( ID_ZOOM_SELECTION, wxCURSOR_MAGNIFIER, _( "Zoom to selection" ) );
241  else
242  SetNoToolSelected();
243  break;
244 
245  case ID_TB_MEASUREMENT_TOOL:
246  SetToolID( id, wxCURSOR_DEFAULT, _( "Unsupported tool in this canvas" ) );
247  break;
248 
250  SetToolID( ID_NO_TOOL_SELECTED, m_canvas->GetDefaultCursor(), wxEmptyString );
251  break;
252 
254  break;
255 
256  case ID_GERBVIEW_SHOW_LIST_DCODES:
257  Liste_D_Codes();
258  break;
259 
261  if( !IsGalCanvasActive() )
262  {
263  INSTALL_UNBUFFERED_DC( dc, m_canvas );
264  GetScreen()->m_BlockLocate.SetCommand( BLOCK_MOVE );
265  m_canvas->SetAutoPanRequest( false );
266  HandleBlockPlace( &dc );
267  }
268  break;
269 
270  case ID_POPUP_ZOOM_BLOCK:
271  if( !IsGalCanvasActive() )
272  {
273  INSTALL_UNBUFFERED_DC( dc, m_canvas );
274  GetScreen()->m_BlockLocate.SetCommand( BLOCK_ZOOM );
275  GetScreen()->m_BlockLocate.SetMessageBlock( this );
276  HandleBlockEnd( &dc );
277  }
278  break;
279 
280  case ID_HIGHLIGHT_CMP_ITEMS:
281  if( m_SelComponentBox->SetStringSelection( currItem->GetNetAttributes().m_Cmpref ) )
282  m_canvas->Refresh();
283  break;
284 
285  case ID_HIGHLIGHT_NET_ITEMS:
286  if( m_SelNetnameBox->SetStringSelection( currItem->GetNetAttributes().m_Netname ) )
287  m_canvas->Refresh();
288  break;
289 
290  case ID_HIGHLIGHT_APER_ATTRIBUTE_ITEMS:
291  {
292  D_CODE* apertDescr = currItem->GetDcodeDescr();
293  if( m_SelAperAttributesBox->SetStringSelection( apertDescr->m_AperFunction ) )
294  m_canvas->Refresh();
295  }
296  break;
297 
298  case ID_HIGHLIGHT_REMOVE_ALL:
299  m_SelComponentBox->SetSelection( 0 );
300  m_SelNetnameBox->SetSelection( 0 );
301  m_SelAperAttributesBox->SetSelection( 0 );
302 
303  if( GetGbrImage( GetActiveLayer() ) )
304  GetGbrImage( GetActiveLayer() )->m_Selected_Tool = 0;
305 
306  m_canvas->Refresh();
307  break;
308 
309  default:
310  wxFAIL_MSG( wxT( "GERBVIEW_FRAME::Process_Special_Functions error" ) );
311  break;
312  }
313 }
314 
315 
316 void GERBVIEW_FRAME::OnSelectHighlightChoice( wxCommandEvent& event )
317 {
318  if( IsGalCanvasActive() )
319  {
320  auto settings = static_cast<KIGFX::GERBVIEW_PAINTER*>( GetGalCanvas()->GetView()->GetPainter() )->GetSettings();
321 
322  switch( event.GetId() )
323  {
325  settings->m_componentHighlightString = m_SelComponentBox->GetStringSelection();
326  break;
327 
329  settings->m_netHighlightString = m_SelNetnameBox->GetStringSelection();
330  break;
331 
333  settings->m_attributeHighlightString = m_SelAperAttributesBox->GetStringSelection();
334  break;
335 
336  }
337 
339  GetGalCanvas()->Refresh();
340  }
341  else
342  m_canvas->Refresh();
343 }
344 
345 
346 void GERBVIEW_FRAME::OnSelectActiveDCode( wxCommandEvent& event )
347 {
348  GERBER_FILE_IMAGE* gerber_image = GetGbrImage( GetActiveLayer() );
349 
350  if( gerber_image )
351  {
352  int tool = m_DCodeSelector->GetSelectedDCodeId();
353 
354  if( tool != gerber_image->m_Selected_Tool )
355  {
356  gerber_image->m_Selected_Tool = tool;
357  m_canvas->Refresh();
358  }
359  }
360 }
361 
362 
363 void GERBVIEW_FRAME::OnSelectActiveLayer( wxCommandEvent& event )
364 {
365  SetActiveLayer( event.GetSelection(), true );
366 }
367 
368 
369 void GERBVIEW_FRAME::OnShowGerberSourceFile( wxCommandEvent& event )
370 {
371  int layer = GetActiveLayer();
372  GERBER_FILE_IMAGE* gerber_layer = GetGbrImage( layer );
373 
374  if( gerber_layer )
375  {
376  wxString editorname = Pgm().GetEditorName();
377 
378  if( !editorname.IsEmpty() )
379  {
380  wxFileName fn( gerber_layer->m_FileName );
381 
382  // Call the editor only if the Gerber/drill source file is available.
383  // This is not always the case, because it can be a temporary file
384  // if it comes from a zip archive.
385  if( !fn.FileExists() )
386  {
387  wxString msg;
388  msg.Printf( _( "Source file \"%s\" is not available" ),
389  GetChars( fn.GetFullPath() ) );
390  wxMessageBox( msg );
391  }
392  else
393  ExecuteFile( this, editorname, QuoteFullPath( fn ) );
394  }
395  else
396  wxMessageBox( _( "No editor defined. Please select one" ) );
397  }
398  else
399  {
400  wxString msg;
401  msg.Printf( _( "No file loaded on the active layer %d" ), layer + 1 );
402  wxMessageBox( msg );
403  }
404 }
405 
406 
407 void GERBVIEW_FRAME::OnSelectDisplayMode( wxCommandEvent& event )
408 {
409  int oldMode = GetDisplayMode();
410 
411  switch( event.GetId() )
412  {
414  SetDisplayMode( 0 );
415  break;
416 
418  SetDisplayMode( 1 );
419  break;
420 
422  SetDisplayMode( 2 );
423  break;
424  }
425 
426  if( GetDisplayMode() != oldMode )
427  m_canvas->Refresh();
428 }
429 
430 
431 void GERBVIEW_FRAME::OnQuit( wxCommandEvent& event )
432 {
433  Close( true );
434 }
435 
436 
438 {
439  // call my base class
441 
443 
444  wxAuiPaneInfo& pane_info = m_auimgr.GetPane( m_LayersManager );
445  pane_info.Caption( _( "Visibles" ) );
446  m_auimgr.Update();
447 
449 }
450 
451 
452 void GERBVIEW_FRAME::OnToggleShowLayerManager( wxCommandEvent& aEvent )
453 {
455 
456  // show/hide auxiliary Vertical layers and visibility manager toolbar
457  m_auimgr.GetPane( wxT( "m_LayersManagerToolBar" ) ).Show( m_show_layer_manager_tools );
458  m_auimgr.Update();
459 }
460 
461 
462 void GERBVIEW_FRAME::OnSelectOptionToolbar( wxCommandEvent& event )
463 {
464  int id = event.GetId();
465  bool needs_refresh = false;
466 
468 
469  switch( id )
470  {
473  m_canvas->Refresh( true );
474  break;
475 
478  m_canvas->Refresh( true );
479  break;
480 
482  options.m_DiffMode = !options.m_DiffMode;
483  needs_refresh = true;
484  break;
485 
487  options.m_HighContrastMode = !options.m_HighContrastMode;
488  needs_refresh = true;
489  break;
490 
491  // collect GAL-only tools here:
493  SetToolID( id, wxCURSOR_DEFAULT, _( "Unsupported tool in this canvas" ) );
494  break;
495 
496  default:
497  wxMessageBox( wxT( "GERBVIEW_FRAME::OnSelectOptionToolbar error" ) );
498  break;
499  }
500 
501  if( needs_refresh )
502  UpdateDisplayOptions( options );
503 }
504 
505 
506 void GERBVIEW_FRAME::OnTogglePolygonDrawMode( wxCommandEvent& aEvent )
507 {
510 
511  UpdateDisplayOptions( options );
512 }
513 
514 
515 void GERBVIEW_FRAME::OnToggleLineDrawMode( wxCommandEvent& aEvent )
516 {
519 
520  UpdateDisplayOptions( options );
521 }
522 
523 
524 void GERBVIEW_FRAME::OnToggleFlashItemDrawMode( wxCommandEvent& aEvent )
525 {
528 
529  UpdateDisplayOptions( options );
530 }
531 
532 
533 void GERBVIEW_FRAME::OnUpdateSelectTool( wxUpdateUIEvent& aEvent )
534 {
535  aEvent.Check( GetToolId() == aEvent.GetId() );
536 }
537 
538 
539 void GERBVIEW_FRAME::OnSwitchCanvas( wxCommandEvent& aEvent )
540 {
541  switch( aEvent.GetId() )
542  {
545  break;
546 
549  break;
550 
553  break;
554  }
555 }
556 
557 
558 void GERBVIEW_FRAME::OnUpdateSwitchCanvas( wxUpdateUIEvent& aEvent )
559 {
560  wxMenuBar* menuBar = GetMenuBar();
561  EDA_DRAW_PANEL_GAL* gal_canvas = GetGalCanvas();
563 
564  if( IsGalCanvasActive() && gal_canvas )
565  canvasType = gal_canvas->GetBackend();
566 
567  struct { int menuId; int galType; } menuList[] =
568  {
572  };
573 
574  for( auto ii: menuList )
575  {
576  wxMenuItem* item = menuBar->FindItem( ii.menuId );
577  if( ii.galType == canvasType )
578  {
579  item->Check( true );
580  }
581  }
582 }
void OnSelectHighlightChoice(wxCommandEvent &event)
Handles the changing of the highlighted component/net/attribute.
bool m_DisplayPolygonsFill
Option to draw polygons (filled/sketch)
GERBVIEW_FRAME::OnZipFileHistory GERBVIEW_FRAME::Process_Config EVT_MENU(ID_MENU_GERBVIEW_SELECT_PREFERED_EDITOR, EDA_BASE_FRAME::OnSelectPreferredEditor) EVT_COMBOBOX(ID_TOOLBARH_GERBVIEW_SELECT_ACTIVE_LAYER
This file is part of the common library TODO brief description.
virtual void Refresh(bool eraseBackground=true, const wxRect *rect=NULL) override
Update the board display after modifying it by a python script (note: it is automatically called by a...
Definition: draw_panel.cpp:338
GAL_TYPE GetBackend() const
Function GetBackend Returns the type of backend currently used by GAL canvas.
void OnUpdateSelectTool(wxUpdateUIEvent &aEvent)
void OnToggleShowLayerManager(wxCommandEvent &aEvent)
int GetDisplayMode()
Function GetDisplayMode.
GERBVIEW_FRAME::OnZipFileHistory ID_PREFERENCES_HOTKEY_END
void OnQuit(wxCommandEvent &event)
Function OnQuit called on request of application quit.
GERBVIEW_FRAME::OnZipFileHistory GERBVIEW_FRAME::Process_Config GERBVIEW_FRAME::OnSelectActiveLayer GERBVIEW_FRAME::OnToggleShowLayerManager GERBVIEW_FRAME::OnSelectHighlightChoice GERBVIEW_FRAME::OnUpdateShowLayerManager ID_TB_OPTIONS_SHOW_GBR_MODE_2
GERBER_LAYER_WIDGET * m_LayersManager
void UpdateAllItems(int aUpdateFlags)
Updates all items in the view according to the given flags.
Definition: view.cpp:1376
PCB_EDIT_FRAME::OnResetModuleTextSizes PCB_EDIT_FRAME::OnSelectOptionToolbar PCB_EDIT_FRAME::OnSelectOptionToolbar PCB_EDIT_FRAME::OnSelectOptionToolbar PCB_EDIT_FRAME::OnSelectOptionToolbar PCB_EDIT_FRAME::ProcessMuWaveFunctions PCB_EDIT_FRAME::Tracks_and_Vias_Size_Event PCB_EDIT_FRAME::OnUpdateHighContrastDisplayMode PCB_EDIT_FRAME::OnUpdateShowMicrowaveToolbar PCB_EDIT_FRAME::OnUpdateSelectCustomTrackWidth EVT_UPDATE_UI_RANGE(ID_POPUP_PCB_SELECT_WIDTH1, ID_POPUP_PCB_SELECT_WIDTH8, PCB_EDIT_FRAME::OnUpdateSelectTrackWidth) EVT_UPDATE_UI_RANGE(ID_POPUP_PCB_SELECT_VIASIZE1
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...
wxString m_Cmpref
the component reference parent of the data
void OnToggleFlashItemDrawMode(wxCommandEvent &aEvent)
PGM_BASE & Pgm()
The global Program "get" accessor.
Definition: kicad.cpp:66
bool m_HighContrastMode
High contrast mode (dim un-highlighted objects)
wxAuiManager m_auimgr
KIGFX::VIEW * GetView() const
Function GetView() Returns a pointer to the VIEW instance used in the panel.
Visibility flag has changed.
Definition: view_item.h:56
Class EDA_DRAW_FRAME is the base class for create windows for drawing purpose.
Definition: draw_frame.h:63
int GetActiveLayer()
Function SetActiveLayer returns the active layer.
void OnSelectActiveDCode(wxCommandEvent &event)
Function OnSelectActiveDCode Selects the active DCode for the current active layer.
wxChoice * m_SelNetnameBox
bool m_DisplayLinesFill
Option to draw line items (filled/sketch)
void OnSelectDisplayMode(wxCommandEvent &event)
Function OnSelectDisplayMode called on a display mode selection Mode selection can be fast display...
D_CODE * GetDcodeDescr() const
Function GetDcodeDescr returns the GetDcodeDescr of this object, or NULL.
void SetLayersManagerTabsText()
Function SetLayersManagerTabsText Update the layer manager tabs labels Useful when changing Language ...
EVT_TOOL(ID_MODVIEW_SELECT_LIB, FOOTPRINT_VIEWER_FRAME::SelectCurrentLibrary) EVT_TOOL(ID_MODVIEW_SELECT_PART
bool m_DiffMode
Display layers in diff mode.
GERBVIEW_FRAME::OnZipFileHistory GERBVIEW_FRAME::Process_Config GERBVIEW_FRAME::OnSelectActiveLayer GERBVIEW_FRAME::OnToggleShowLayerManager GERBVIEW_FRAME::OnSelectHighlightChoice EVT_UPDATE_UI(ID_TB_OPTIONS_SHOW_FLASHED_ITEMS_SKETCH, GERBVIEW_FRAME::OnUpdateFlashedItemsDrawMode) EVT_UPDATE_UI(ID_TB_OPTIONS_SHOW_LAYERS_MANAGER_VERTICAL_TOOLBAR
void UpdateDisplayOptions(const GBR_DISPLAY_OPTIONS &aOptions)
Updates the display options and refreshes the view as needed.
a helper to handle the real device context used in KiCad
Class GERBVIEW_PAINTER Contains methods for drawing GerbView-specific items.
GBR_DISPLAY_OPTIONS m_DisplayOptions
bool m_DisplayFlashedItemsFill
Option to draw flashed items (filled/sketch)
int GetSelectedDCodeId()
Function GetSelectedDCodeId.
void ShowChangedLanguage() override
Function ShowChangedLanguage redraws the menus and what not in current language.
EVT_MENU_RANGE(ID_GERBVIEW_DRILL_FILE1, ID_GERBVIEW_DRILL_FILE9, GERBVIEW_FRAME::OnDrlFileHistory) EVT_MENU_RANGE(ID_GERBVIEW_ZIP_FILE1
Helper dialog and control classes.
wxString m_Netname
for items associated to a net: the netname
bool IsGalCanvasActive() const
Function IsGalCanvasActive is used to check which canvas (GAL-based or standard) is currently in use...
Definition: draw_frame.h:895
virtual bool SwitchCanvas(EDA_DRAW_PANEL_GAL::GAL_TYPE aCanvasType)
Changes the current rendering backend.
virtual void SetToolID(int aId, int aCursor, const wxString &aToolMsg)
Function SetToolID sets the tool command ID to aId and sets the cursor to aCursor.
Definition: draw_frame.cpp:590
PAINTER * GetPainter() const
Function GetPainter() Returns the painter object used by the view for drawing VIEW_ITEMS.
Definition: view.h:196
void OnTogglePolygonDrawMode(wxCommandEvent &aEvent)
void OnShowGerberSourceFile(wxCommandEvent &event)
Function OnShowGerberSourceFile Call the preferred editor to show (and edit) the gerber source file l...
void Refresh(bool aEraseBackground=true, const wxRect *aRect=NULL) override
Update the board display after modifying it by a python script (note: it is automatically called by a...
void OnSelectOptionToolbar(wxCommandEvent &event)
wxString m_AperFunction
the aperture attribute (created by a TA.AperFunction command) attached to the D_CODE ...
Definition: dcode.h:105
DCODE_SELECTION_BOX * m_DCodeSelector
EDA_DRAW_PANEL * m_canvas
The area to draw on.
Definition: draw_frame.h:106
const GBR_NETLIST_METADATA & GetNetAttributes() const
void OnToggleLineDrawMode(wxCommandEvent &aEvent)
wxChoice * m_SelAperAttributesBox
GERBVIEW_FRAME::OnZipFileHistory GERBVIEW_FRAME::Process_Config GERBVIEW_FRAME::OnSelectActiveLayer GERBVIEW_FRAME::OnToggleShowLayerManager EVT_TOOL_RANGE(ID_TB_OPTIONS_SHOW_GBR_MODE_0, ID_TB_OPTIONS_SHOW_GBR_MODE_2, GERBVIEW_FRAME::OnSelectDisplayMode) EVT_CHOICE(ID_GBR_AUX_TOOLBAR_PCB_APERATTRIBUTES_CHOICE
static const wxChar * GetChars(const wxString &s)
Function GetChars returns a wxChar* to the actual wxChar* data within a wxString, and is helpful for ...
Definition: macros.h:92
see class PGM_BASE
Class D_CODE holds a gerber DCODE (also called Aperture) definition.
Definition: dcode.h:82
void OnUpdateSwitchCanvas(wxUpdateUIEvent &aEvent)
Update UI called when switches currently used canvas (default / Cairo / OpenGL).
FOOTPRINT_EDIT_FRAME::Process_Special_Functions FOOTPRINT_EDIT_FRAME::ProcessPreferences FOOTPRINT_EDIT_FRAME::ProcessPreferences FOOTPRINT_EDIT_FRAME::ProcessPreferences FOOTPRINT_EDIT_FRAME::ProcessPreferences ID_POPUP_GENERAL_END_RANGE
Dialog to show/hide frame reference and select paper size for printing.
wxString QuoteFullPath(wxFileName &fn, wxPathFormat format)
Quote return value of wxFileName::GetFullPath().
Definition: gestfich.cpp:417
void OnSwitchCanvas(wxCommandEvent &aEvent)
switches currently used canvas (default / Cairo / OpenGL).
void SetElementVisibility(GERBVIEW_LAYER_ID aItemIdVisible, bool aNewState)
Function SetElementVisibility changes the visibility of an element category.
#define INSTALL_UNBUFFERED_DC(name, parent)
int GetToolId() const
Definition: draw_frame.h:496
Class EDA_BASE_FRAME is the base frame for deriving all KiCad main window classes.
bool IsElementVisible(GERBVIEW_LAYER_ID aItemIdVisible) const
Function IsElementVisible tests whether a given element category is visible.
wxChoice * m_SelComponentBox
VTBL_ENTRY const wxString & GetEditorName(bool aCanShowFileChooser=true)
Return the preferred editor name.
Definition: pgm_base.cpp:338
#define EVT_SELECT_DCODE
EDA_DRAW_PANEL_GAL * GetGalCanvas() const
Function GetGalCanvas returns a pointer to GAL-based canvas of given EDA draw frame.
Definition: draw_frame.h:903
GERBER_FILE_IMAGE * GetGbrImage(int aIdx) const
bool m_show_layer_manager_tools
int ExecuteFile(wxWindow *frame, const wxString &ExecFile, const wxString &param, wxProcess *callback)
Function ExecuteFile calls the executable file ExecFile with the command line parameters param...
Definition: gestfich.cpp:208
virtual void ShowChangedLanguage()
Function ShowChangedLanguage redraws the menus and what not in current language.
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 SetDisplayMode(int aMode)
Function SetDisplayMode.