KiCad PCB EDA Suite
toolbars_gerber.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) 2013 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 
31 #include <fctsys.h>
32 
33 #include <common.h>
34 #include <gerbview.h>
35 #include <gerbview_frame.h>
36 #include <bitmaps.h>
37 #include <gerbview_id.h>
38 #include <hotkeys.h>
43 #include <dialog_helpers.h>
44 #include <bitmaps.h>
45 
46 #include <wx/wupdlock.h>
47 
49 {
50  wxString msg;
51 
52  if( m_mainToolBar != NULL )
53  return;
54 
55  m_mainToolBar = new wxAuiToolBar( this, ID_H_TOOLBAR, wxDefaultPosition, wxDefaultSize,
56  KICAD_AUI_TB_STYLE | wxAUI_TB_HORZ_LAYOUT );
57 
58  // Set up toolbar
59  m_mainToolBar->AddTool( ID_GERBVIEW_ERASE_ALL, wxEmptyString,
60  KiBitmap( gerbview_clear_layers_xpm ),
61  _( "Erase all layers" ) );
62 
63  m_mainToolBar->AddTool( wxID_FILE, wxEmptyString, KiBitmap( gerber_file_xpm ),
64  _( "Load a new Gerber file on the current layer. Previous data will be deleted" ) );
65 
66  m_mainToolBar->AddTool( ID_GERBVIEW_LOAD_DRILL_FILE, wxEmptyString,
67  KiBitmap( gerbview_drill_file_xpm ),
68  _( "Load an excellon drill file on the current layer. Previous data will be deleted" ) );
69 
70  m_mainToolBar->AddSeparator();
71  m_mainToolBar->AddTool( ID_GERBVIEW_SET_PAGE_BORDER, wxEmptyString, KiBitmap( sheetset_xpm ),
72  _( "Show/hide frame reference and select paper size for printing" ) );
73 
74  m_mainToolBar->AddSeparator();
75  m_mainToolBar->AddTool( wxID_PRINT, wxEmptyString, KiBitmap( print_button_xpm ),
76  _( "Print layers" ) );
77 
78  m_mainToolBar->AddSeparator();
79  msg = AddHotkeyName( _( "Redraw view" ), GerbviewHokeysDescr, HK_ZOOM_REDRAW, IS_COMMENT );
80  m_mainToolBar->AddTool( ID_ZOOM_REDRAW, wxEmptyString, KiBitmap( zoom_redraw_xpm ), msg );
81 
82  msg = AddHotkeyName( _( "Zoom in" ), GerbviewHokeysDescr, HK_ZOOM_IN, IS_COMMENT );
83  m_mainToolBar->AddTool( ID_ZOOM_IN, wxEmptyString, KiBitmap( zoom_in_xpm ), msg );
84 
85  msg = AddHotkeyName( _( "Zoom out" ), GerbviewHokeysDescr, HK_ZOOM_OUT, IS_COMMENT );
86  m_mainToolBar->AddTool( ID_ZOOM_OUT, wxEmptyString, KiBitmap( zoom_out_xpm ), msg );
87 
88  msg = AddHotkeyName( _( "Zoom auto" ), GerbviewHokeysDescr, HK_ZOOM_AUTO, IS_COMMENT );
89  m_mainToolBar->AddTool( ID_ZOOM_PAGE, wxEmptyString, KiBitmap( zoom_fit_in_page_xpm ), msg );
90 
91  m_mainToolBar->AddTool( ID_ZOOM_SELECTION, wxEmptyString, KiBitmap( zoom_area_xpm ),
92  _( "Zoom to selection" ), wxITEM_CHECK );
93 
94  m_mainToolBar->AddSeparator();
95 
98  wxDefaultPosition, wxDefaultSize, 0,NULL);
100 
101  m_mainToolBar->AddControl( m_SelLayerBox );
102 
103  m_TextInfo = new wxTextCtrl( m_mainToolBar, wxID_ANY, wxEmptyString, wxDefaultPosition,
104  wxDefaultSize, wxTE_READONLY );
105  m_mainToolBar->AddControl( m_TextInfo );
106 
107  // after adding the buttons to the toolbar, must call Realize() to reflect the changes
108  m_mainToolBar->Realize();
109 }
110 
112 {
113  wxWindowUpdateLocker dummy( this );
114 
115  if( m_auxiliaryToolBar )
116  {
121 
122  // combobox sizes can have changed: apply new best sizes
123  wxSize size;
124  size = m_SelComponentBox->GetBestSize();
125  size.x = std::max( size.x, 100 );
126  m_SelComponentBox->SetMinSize( size );
127 
128  size = m_SelNetnameBox->GetBestSize();
129  size.x = std::max( size.x, 100 );
130  m_SelNetnameBox->SetMinSize( size );
131 
132  size = m_SelAperAttributesBox->GetBestSize();
133  size.x = std::max( size.x, 100 );
134  m_SelAperAttributesBox->SetMinSize( size );
135 
136  size = m_DCodeSelector->GetBestSize();
137  size.x = std::max( size.x, 100 );
138  m_DCodeSelector->SetMinSize( size );
139 
140  m_auimgr.Update();
141  return;
142  }
143 
144  m_auxiliaryToolBar = new wxAuiToolBar( this, ID_AUX_TOOLBAR, wxDefaultPosition, wxDefaultSize,
145  KICAD_AUI_TB_STYLE | wxAUI_TB_HORZ_LAYOUT );
146 
147  // Creates box to display and choose components:
148  wxStaticText* text = new wxStaticText( m_auxiliaryToolBar, wxID_ANY, _("Cmp:") );
149  m_auxiliaryToolBar->AddControl( text );
150  m_SelComponentBox = new wxChoice( m_auxiliaryToolBar,
152  m_SelComponentBox->SetToolTip( _("Select a component and highlight items belonging to this component") );
154  m_auxiliaryToolBar->AddControl( m_SelComponentBox );
155  m_auxiliaryToolBar->AddSeparator();
156 
157  // Creates choice box to display net names and highlight selected:
158  text = new wxStaticText( m_auxiliaryToolBar, wxID_ANY, _("Net:") );
159  m_auxiliaryToolBar->AddControl( text );
160  m_SelNetnameBox = new wxChoice( m_auxiliaryToolBar,
162  m_SelNetnameBox->SetToolTip( _("Select a net name and highlight graphic items belonging to this net") );
163  m_auxiliaryToolBar->AddControl( m_SelNetnameBox );
165  m_auxiliaryToolBar->AddSeparator();
166 
167  // Creates choice box to display aperture attributes and highlight selected:
168  text = new wxStaticText( m_auxiliaryToolBar, wxID_ANY, _("Attr:") );
169  m_auxiliaryToolBar->AddControl( text );
172  m_SelAperAttributesBox->SetToolTip( _("Select an aperture attribute and highlight graphic items having this attribute") );
175 
176  m_auxiliaryToolBar->AddSeparator();
177  text = new wxStaticText( m_auxiliaryToolBar, wxID_ANY, _("DCode:") );
178  m_auxiliaryToolBar->AddControl( text );
181  wxDefaultPosition, wxSize( 150, -1 ) );
183  m_auxiliaryToolBar->AddControl( m_DCodeSelector );
184 
185  // after adding the buttons to the toolbar, must call Realize()
186  m_auxiliaryToolBar->Realize();
187 }
188 
189 
191 {
192  if( m_drawToolBar )
193  return;
194 
195  m_drawToolBar = new wxAuiToolBar( this, ID_V_TOOLBAR, wxDefaultPosition, wxDefaultSize,
196  KICAD_AUI_TB_STYLE | wxAUI_TB_VERTICAL );
197 
198  // Set up toolbar
199  m_drawToolBar->AddTool( ID_NO_TOOL_SELECTED, wxEmptyString, KiBitmap( cursor_xpm ) );
200  m_drawToolBar->AddSeparator();
201 
202  m_drawToolBar->Realize();
203 }
204 
205 
207 {
208  if( m_optionsToolBar )
209  m_optionsToolBar->Clear();
210  else
211  m_optionsToolBar = new wxAuiToolBar( this, ID_OPT_TOOLBAR, wxDefaultPosition, wxDefaultSize,
212  KICAD_AUI_TB_STYLE | wxAUI_TB_VERTICAL );
213 
214  // TODO: these can be moved to the 'proper' vertical toolbar if and when there are
215  // actual tools to put there. That, or I'll get around to implementing configurable
216  // toolbars.
217  m_optionsToolBar->AddTool( ID_NO_TOOL_SELECTED, wxEmptyString, KiBitmap( cursor_xpm ),
218  wxEmptyString, wxITEM_CHECK );
219 
220  if( IsGalCanvasActive() )
221  {
222  m_optionsToolBar->AddTool( ID_TB_MEASUREMENT_TOOL, wxEmptyString,
223  KiBitmap( measurement_xpm ),
224  _( "Measure distance between two points" ),
225  wxITEM_CHECK );
226  }
227 
228  m_optionsToolBar->AddSeparator();
229 
230  m_optionsToolBar->AddTool( ID_TB_OPTIONS_SHOW_GRID, wxEmptyString, KiBitmap( grid_xpm ),
231  _( "Turn grid off" ), wxITEM_CHECK );
232 
233  m_optionsToolBar->AddTool( ID_TB_OPTIONS_SHOW_POLAR_COORD, wxEmptyString,
234  KiBitmap( polar_coord_xpm ),
235  _( "Turn polar coordinate on" ), wxITEM_CHECK );
236 
237  m_optionsToolBar->AddTool( ID_TB_OPTIONS_SELECT_UNIT_INCH, wxEmptyString,
238  KiBitmap( unit_inch_xpm ),
239  _( "Set units to inches" ), wxITEM_CHECK );
240 
241  m_optionsToolBar->AddTool( ID_TB_OPTIONS_SELECT_UNIT_MM, wxEmptyString,
242  KiBitmap( unit_mm_xpm ),
243  _( "Set units to millimeters" ), wxITEM_CHECK );
244 
245 #ifndef __APPLE__
246  m_optionsToolBar->AddTool( ID_TB_OPTIONS_SELECT_CURSOR, wxEmptyString,
247  KiBitmap( cursor_shape_xpm ),
248  _( "Change cursor shape" ), wxITEM_CHECK );
249 #endif // !__APPLE__
250 
251  m_optionsToolBar->AddSeparator();
253  KiBitmap( pad_sketch_xpm ),
254  _( "Show spots in sketch mode" ), wxITEM_CHECK );
255 
256  m_optionsToolBar->AddTool( ID_TB_OPTIONS_SHOW_LINES_SKETCH, wxEmptyString,
257  KiBitmap( showtrack_xpm ),
258  _( "Show lines in sketch mode" ), wxITEM_CHECK );
259 
260  m_optionsToolBar->AddTool( ID_TB_OPTIONS_SHOW_POLYGONS_SKETCH, wxEmptyString,
261  KiBitmap( opt_show_polygon_xpm ),
262  _( "Show polygons in sketch mode" ),
263  wxITEM_CHECK );
264 
265  m_optionsToolBar->AddTool( ID_TB_OPTIONS_SHOW_NEGATIVE_ITEMS, wxEmptyString,
266  KiBitmap( gerbview_show_negative_objects_xpm ),
267  _( "Show negatives objects in ghost color" ),
268  wxITEM_CHECK );
269 
270  m_optionsToolBar->AddTool( ID_TB_OPTIONS_SHOW_DCODES, wxEmptyString,
271  KiBitmap( show_dcodenumber_xpm ),
272  _( "Show dcode number" ), wxITEM_CHECK );
273 
274  // tools to select draw mode in GerbView, unused in GAL
275  if( !IsGalCanvasActive() )
276  {
277  m_optionsToolBar->AddSeparator();
278  m_optionsToolBar->AddTool( ID_TB_OPTIONS_SHOW_GBR_MODE_0, wxEmptyString,
279  KiBitmap( gbr_select_mode0_xpm ),
280  _( "Show layers in raw mode\n"
281  "(could have problems with negative items when more than one gerber file is shown)" ),
282  wxITEM_CHECK );
283  m_optionsToolBar->AddTool( ID_TB_OPTIONS_SHOW_GBR_MODE_1, wxEmptyString,
284  KiBitmap( gbr_select_mode1_xpm ),
285  _( "Show layers in stacked mode\n"
286  "(show negative items without artifacts)" ),
287  wxITEM_CHECK );
288  m_optionsToolBar->AddTool( ID_TB_OPTIONS_SHOW_GBR_MODE_2, wxEmptyString,
289  KiBitmap( gbr_select_mode2_xpm ),
290  _( "Show layers in transparency mode\n"
291  "(show negative items without artifacts)" ),
292  wxITEM_CHECK );
293  }
294  else
295  {
296  m_optionsToolBar->AddTool( ID_TB_OPTIONS_DIFF_MODE, wxEmptyString,
297  KiBitmap( gbr_select_mode2_xpm ),
298  _( "Show layers in diff (compare) mode" ),
299  wxITEM_CHECK );
300 
301  m_optionsToolBar->AddTool( ID_TB_OPTIONS_HIGH_CONTRAST_MODE, wxEmptyString,
302  KiBitmap( contrast_mode_xpm ),
303  _( "Enable high contrast display mode" ),
304  wxITEM_CHECK );
305 
306  }
307 
308  // Tools to show/hide toolbars:
309  m_optionsToolBar->AddSeparator();
311  wxEmptyString,
312  KiBitmap( layers_manager_xpm ),
313  _( "Show/hide the layers manager toolbar" ),
314  wxITEM_CHECK );
315 
316 
317  m_optionsToolBar->Realize();
318 }
319 
320 
321 #define NO_SELECTION_STRING _("<No selection>")
322 
324 {
325  m_DCodeSelector->Clear();
326 
327  // Add an empty string to deselect net highlight
329 
330  int layer = GetActiveLayer();
331  GERBER_FILE_IMAGE* gerber = GetGbrImage( layer );
332 
333  if( !gerber || gerber->GetDcodesCount() == 0 )
334  {
335  if( m_DCodeSelector->GetSelection() != 0 )
336  m_DCodeSelector->SetSelection( 0 );
337 
338  return;
339  }
340 
341  // Build the aperture list of the current layer, and add it to the combo box:
342  wxArrayString dcode_list;
343  wxString msg;
344  const char* units = g_UserUnit == INCHES ? "mils" : "mm";
345  double scale = g_UserUnit == INCHES ? IU_PER_MILS : IU_PER_MM;
346 
347  for( int ii = 0; ii < TOOLS_MAX_COUNT; ii++ )
348  {
349  D_CODE* dcode = gerber->GetDCODE( ii + FIRST_DCODE );
350 
351  if( dcode == NULL )
352  continue;
353 
354  if( !dcode->m_InUse && !dcode->m_Defined )
355  continue;
356 
357  msg.Printf( "tool %d [%.3fx%.3f %s] %s",
358  dcode->m_Num_Dcode,
359  dcode->m_Size.y / scale, dcode->m_Size.x / scale,
360  units,
362  );
363  if( !dcode->m_AperFunction.IsEmpty() )
364  msg << ", " << dcode->m_AperFunction;
365 
366  dcode_list.Add( msg );
367  }
368 
369  m_DCodeSelector->AppendDCodeList( dcode_list );
370 
371  if( dcode_list.size() > 1 )
372  {
373  wxSize size = m_DCodeSelector->GetBestSize();
374  size.x = std::max( size.x, 100 );
375  m_DCodeSelector->SetMinSize( size );
376  m_auimgr.Update();
377  }
378 }
379 
381 {
382  m_SelComponentBox->Clear();
383 
384  // Build the full list of component names from the partial lists stored in each file image
385  std::map<wxString, int> full_list;
386 
387  for( unsigned layer = 0; layer < GetImagesList()->ImagesMaxCount(); ++layer )
388  {
389  GERBER_FILE_IMAGE* gerber = GetImagesList()->GetGbrImage( layer );
390 
391  if( gerber == NULL ) // Graphic layer not yet used
392  continue;
393 
394  full_list.insert( gerber->m_ComponentsList.begin(), gerber->m_ComponentsList.end() );
395  }
396 
397  // Add an empty string to deselect net highlight
399 
400  // Now copy the list to the choice box
401  for( auto ii = full_list.begin(); ii != full_list.end(); ++ii )
402  {
403  m_SelComponentBox->Append( ii->first );
404  }
405 
406  m_SelComponentBox->SetSelection( 0 );
407 }
408 
409 
411 {
412  m_SelNetnameBox->Clear();
413 
414  // Build the full list of netnames from the partial lists stored in each file image
415  std::map<wxString, int> full_list;
416 
417  for( unsigned layer = 0; layer < GetImagesList()->ImagesMaxCount(); ++layer )
418  {
419  GERBER_FILE_IMAGE* gerber = GetImagesList()->GetGbrImage( layer );
420 
421  if( gerber == NULL ) // Graphic layer not yet used
422  continue;
423 
424  full_list.insert( gerber->m_NetnamesList.begin(), gerber->m_NetnamesList.end() );
425  }
426 
427  // Add an empty string to deselect net highlight
429 
430  // Now copy the list to the choice box
431  for( auto ii = full_list.begin(); ii != full_list.end(); ++ii )
432  {
433  m_SelNetnameBox->Append( ii->first );
434  }
435 
436  m_SelNetnameBox->SetSelection( 0 );
437 }
438 
439 
441 {
442  m_SelAperAttributesBox->Clear();
443 
444  // Build the full list of netnames from the partial lists stored in each file image
445  std::map<wxString, int> full_list;
446 
447  for( unsigned layer = 0; layer < GetImagesList()->ImagesMaxCount(); ++layer )
448  {
449  GERBER_FILE_IMAGE* gerber = GetImagesList()->GetGbrImage( layer );
450 
451  if( gerber == NULL ) // Graphic layer not yet used
452  continue;
453 
454  if( gerber->GetDcodesCount() == 0 )
455  continue;
456 
457  for( int ii = 0; ii < TOOLS_MAX_COUNT; ii++ )
458  {
459  D_CODE* aperture = gerber->GetDCODE( ii + FIRST_DCODE );
460 
461  if( aperture == NULL )
462  continue;
463 
464  if( !aperture->m_InUse && !aperture->m_Defined )
465  continue;
466 
467  if( !aperture->m_AperFunction.IsEmpty() )
468  full_list.insert( std::make_pair( aperture->m_AperFunction, 0 ) );
469  }
470  }
471 
472  // Add an empty string to deselect net highlight
474 
475  // Now copy the list to the choice box
476  for( auto ii = full_list.begin(); ii != full_list.end(); ++ii )
477  {
478  m_SelAperAttributesBox->Append( ii->first );
479  }
480 
481  m_SelAperAttributesBox->SetSelection( 0 );
482 }
483 
484 void GERBVIEW_FRAME::OnUpdateDrawMode( wxUpdateUIEvent& aEvent )
485 {
486  switch( aEvent.GetId() )
487  {
489  aEvent.Check( GetDisplayMode() == 0 );
490  break;
491 
493  aEvent.Check( GetDisplayMode() == 1 );
494  break;
495 
497  aEvent.Check( GetDisplayMode() == 2 );
498  break;
499 
500  default:
501  break;
502  }
503 }
504 
505 
506 void GERBVIEW_FRAME::OnUpdateCoordType( wxUpdateUIEvent& aEvent )
507 {
508  aEvent.Check( m_DisplayOptions.m_DisplayPolarCood );
509 }
510 
511 void GERBVIEW_FRAME::OnUpdateFlashedItemsDrawMode( wxUpdateUIEvent& aEvent )
512 {
514 }
515 
516 
517 void GERBVIEW_FRAME::OnUpdateLinesDrawMode( wxUpdateUIEvent& aEvent )
518 {
519  aEvent.Check( !m_DisplayOptions.m_DisplayLinesFill );
520 }
521 
522 
523 void GERBVIEW_FRAME::OnUpdatePolygonsDrawMode( wxUpdateUIEvent& aEvent )
524 {
525  aEvent.Check( !m_DisplayOptions.m_DisplayPolygonsFill );
526 }
527 
528 
529 void GERBVIEW_FRAME::OnUpdateShowDCodes( wxUpdateUIEvent& aEvent )
530 {
531  aEvent.Check( IsElementVisible( LAYER_DCODES ) );
532 }
533 
534 
535 void GERBVIEW_FRAME::OnUpdateShowNegativeItems( wxUpdateUIEvent& aEvent )
536 {
537  aEvent.Check( IsElementVisible( LAYER_NEGATIVE_OBJECTS ) );
538 }
539 
540 
541 void GERBVIEW_FRAME::OnUpdateDiffMode( wxUpdateUIEvent& aEvent )
542 {
543  aEvent.Check( m_DisplayOptions.m_DiffMode );
544 }
545 
546 
547 void GERBVIEW_FRAME::OnUpdateHighContrastMode( wxUpdateUIEvent& aEvent )
548 {
549  aEvent.Check( m_DisplayOptions.m_HighContrastMode );
550 }
551 
552 
553 void GERBVIEW_FRAME::OnUpdateShowLayerManager( wxUpdateUIEvent& aEvent )
554 {
555  aEvent.Check( m_show_layer_manager_tools );
556 
557  if( m_optionsToolBar )
558  {
560  m_optionsToolBar->SetToolShortHelp( aEvent.GetId(), _("Hide layers manager" ) );
561  else
562  m_optionsToolBar->SetToolShortHelp( aEvent.GetId(), _("Show layers manager" ) );
563  }
564 }
565 
566 
567 void GERBVIEW_FRAME::OnUpdateSelectDCode( wxUpdateUIEvent& aEvent )
568 {
569  if( !m_DCodeSelector )
570  return;
571 
572  int layer = GetActiveLayer();
573  GERBER_FILE_IMAGE* gerber = GetGbrImage( layer );
574  int selected = ( gerber ) ? gerber->m_Selected_Tool : 0;
575 
576  aEvent.Enable( gerber != NULL );
577 
578  if( m_DCodeSelector->GetSelectedDCodeId() != selected )
579  {
580  m_DCodeSelector->SetDCodeSelection( selected );
581  // Be sure the selection can be made. If no, set to
582  // a correct value
583  if( gerber )
585  }
586 }
587 
588 
589 void GERBVIEW_FRAME::OnUpdateLayerSelectBox( wxUpdateUIEvent& aEvent )
590 {
591  if( m_SelLayerBox->GetSelection() != GetActiveLayer() )
592  {
593  m_SelLayerBox->SetSelection( GetActiveLayer() );
594  }
595 }
void OnUpdateHighContrastMode(wxUpdateUIEvent &aEvent)
bool m_DisplayPolygonsFill
Option to draw polygons (filled/sketch)
D_CODE * GetDCODE(int aDCODE) const
Function GetDCODE returns a pointer to the D_CODE within this GERBER for the given aDCODE...
void OnUpdateSelectDCode(wxUpdateUIEvent &aEvent)
wxSize m_Size
Horizontal and vertical dimensions.
Definition: dcode.h:94
int GetDisplayMode()
Function GetDisplayMode.
bool m_InUse
false if the aperure (previously defined) is not used to draw something
Definition: dcode.h:102
APERTURE_T m_Shape
shape ( Line, rectangle, circle , oval .. )
Definition: dcode.h:95
void OnUpdateFlashedItemsDrawMode(wxUpdateUIEvent &aEvent)
Definition: id.h:232
Class GERBER_FILE_IMAGE holds the Image data and parameters for one gerber file and layer parameters ...
GBR_LAYER_BOX_SELECTOR * m_SelLayerBox
void SetDCodeSelection(int aDCodeId)
Function SetDCodeSelection.
void OnUpdateLayerSelectBox(wxUpdateUIEvent &aEvent)
bool m_HighContrastMode
High contrast mode (dim un-highlighted objects)
void updateNetnameListSelectBox()
wxAuiManager m_auimgr
Definition: wxstruct.h:149
int GetActiveLayer()
Function SetActiveLayer returns the active layer.
wxChoice * m_SelNetnameBox
EDA_DRAW_FRAME::OnSelectGrid ID_TB_OPTIONS_SELECT_UNIT_INCH
Definition: draw_frame.cpp:124
bool m_DisplayLinesFill
Option to draw line items (filled/sketch)
void ReCreateHToolbar() override
void updateComponentListSelectBox()
wxBitmap KiBitmap(BITMAP_DEF aBitmap)
Function KiBitmap constructs a wxBitmap from a memory record, held in a BITMAP_DEF.
Definition: bitmap.cpp:36
bool m_Defined
false if the aperture is not defined in the header
Definition: dcode.h:104
bool m_DiffMode
Display layers in diff mode.
wxAuiToolBar * m_optionsToolBar
The options tool bar typcially located on the left edge of the main window.
Definition: draw_frame.h:126
void ReCreateAuxiliaryToolbar() override
void ReCreateVToolbar() override
Function ReCreateVToolbar creates or updates the right vertical toolbar.
GERBER_FILE_IMAGE * GetGbrImage(int aIdx)
#define FIRST_DCODE
Definition: dcode.h:71
Definition: common.h:144
int m_Num_Dcode
D code value ( >= 10 )
Definition: dcode.h:96
GBR_DISPLAY_OPTIONS m_DisplayOptions
bool m_DisplayFlashedItemsFill
Option to draw flashed items (filled/sketch)
int GetSelectedDCodeId()
Function GetSelectedDCodeId.
void OnUpdatePolygonsDrawMode(wxUpdateUIEvent &aEvent)
void OnUpdateDiffMode(wxUpdateUIEvent &aEvent)
static const wxChar * ShowApertureType(APERTURE_T aType)
Function ShowApertureType returns a character string telling what type of aperture type aType is...
Definition: dcode.cpp:95
Helper dialog and control classes.
bool IsGalCanvasActive() const
Function IsGalCanvasActive is used to check which canvas (GAL-based or standard) is currently in use...
Definition: draw_frame.h:862
bool m_DisplayPolarCood
Option to display coordinates in status bar in X,Y or Polar coords.
GERBER_FILE_IMAGE_LIST * GetImagesList() const
Accessors to GERBER_FILE_IMAGE_LIST and GERBER_FILE_IMAGE data.
void OnUpdateShowNegativeItems(wxUpdateUIEvent &aEvent)
void AppendDCodeList(const wxArrayString &aChoices)
Function AppendDCodeList.
wxAuiToolBar * m_drawToolBar
The tool bar that contains the buttons for quick access to the application draw tools.
Definition: draw_frame.h:123
wxAuiToolBar * m_mainToolBar
Standard horizontal Toolbar.
Definition: wxstruct.h:145
GERBVIEW_FRAME::OnZipFileHistory GERBVIEW_FRAME::Process_Config EDA_BASE_FRAME::OnSelectPreferredEditor GERBVIEW_FRAME::Process_Special_Functions ID_TB_OPTIONS_SHOW_GBR_MODE_2
std::map< wxString, int > m_NetnamesList
void ReCreateOptToolbar()
Create or update the left vertical toolbar (option toolbar.
wxString m_AperFunction
the aperture attribute (created by a TA.AperFunction command) attached to the D_CODE ...
Definition: dcode.h:105
void OnUpdateShowDCodes(wxUpdateUIEvent &aEvent)
EDA_UNITS_T g_UserUnit
Global variables definitions.
Definition: common.cpp:56
wxTextCtrl * m_TextInfo
DCODE_SELECTION_BOX * m_DCodeSelector
wxAuiToolBar * m_auxiliaryToolBar
Auxiliary tool bar typically shown below the main tool bar at the top of the main window...
void updateAperAttributesSelectBox()
wxChoice * m_SelAperAttributesBox
const int scale
wxString AddHotkeyName(const wxString &aText, EDA_HOTKEY **aList, int aCommandId, HOTKEY_ACTION_TYPE aShortCutType)
Function AddHotkeyName Add the key name from the Command id value ( m_Idcommand member value) ...
Class D_CODE holds a gerber DCODE (also called Aperture) definition.
Definition: dcode.h:82
static LIB_PART * dummy()
Used when a LIB_PART is not found in library to draw a dummy shape This component is a 400 mils squar...
#define max(a, b)
Definition: auxiliary.h:86
void OnUpdateDrawMode(wxUpdateUIEvent &aEvent)
bool IsElementVisible(GERBVIEW_LAYER_ID aItemIdVisible) const
Function IsElementVisible tests whether a given element category is visible.
#define TOOLS_MAX_COUNT
Definition: dcode.h:73
struct EDA_HOTKEY_CONFIG GerbviewHokeysDescr[]
void OnUpdateCoordType(wxUpdateUIEvent &aEvent)
The common library.
static constexpr int KICAD_AUI_TB_STYLE
Default style flags used for wxAUI toolbars
Definition: wxstruct.h:168
#define NO_SELECTION_STRING
wxChoice * m_SelComponentBox
GERBER_FILE_IMAGE * GetGbrImage(int aIdx) const
bool m_show_layer_manager_tools
std::map< wxString, int > m_ComponentsList
void OnUpdateLinesDrawMode(wxUpdateUIEvent &aEvent)
void OnUpdateShowLayerManager(wxUpdateUIEvent &aEvent)