22 #include <wx/wupdlock.h> 23 #include <wx/stattext.h> 56 wxAUI_TB_HORIZONTAL );
82 wxDefaultPosition, wxDefaultSize, 0,
nullptr );
89 wxDefaultSize, wxTE_READONLY );
103 wxWindowUpdateLocker
dummy(
this );
112 wxDefaultPosition, wxDefaultSize,
128 m_cmpText->SetLabel(
_(
"Cmp:" ) + wxS(
" " ) );
164 wxDefaultPosition, wxSize( 150, -1 ) );
176 wxDefaultPosition, wxDefaultSize, 0,
nullptr );
185 wxDefaultPosition, wxDefaultSize, 0,
nullptr );
283 #define NO_SELECTION_STRING _("<No selection>") 305 wxArrayString dcode_list;
325 units = wxT(
"mil" );
329 wxASSERT_MSG(
false, wxT(
"Invalid units" ) );
336 if( dcode ==
nullptr )
342 msg.Printf( wxT(
"tool %d [%.3fx%.3f %s] %s" ),
351 dcode_list.Add( msg );
356 if( dcode_list.size() > 1 )
359 size.x = std::max( size.x, 100 );
371 std::map<wxString, int> full_list;
377 if( gerber ==
nullptr )
387 for(
auto& ii : full_list )
399 std::map<wxString, int> full_list;
405 if( gerber ==
nullptr )
415 for(
auto& ii : full_list )
427 std::map<wxString, int> full_list;
433 if( gerber ==
nullptr )
443 if( aperture ==
nullptr )
450 full_list.insert( std::make_pair( aperture->
m_AperFunction, 0 ) );
458 for(
auto ii = full_list.begin(); ii != full_list.end(); ++ii )
469 switch( aEvent.GetId() )
498 aEvent.Enable( gerber !=
nullptr );
static TOOL_ACTION openDrillFile
static TOOL_ACTION zoomInCenter
void OnUpdateSelectDCode(wxUpdateUIEvent &aEvent)
static TOOL_ACTION openGerber
ACTION_TOOLBAR * m_auxiliaryToolBar
wxSize m_Size
Horizontal and vertical dimensions.
ACTION_TOOLBAR * m_optionsToolBar
static constexpr double IU_PER_MM
Mock up a conversion function.
bool m_InUse
false if the aperture (previously defined) is not used to draw something
static TOOL_ACTION zoomTool
APERTURE_T m_Shape
shape ( Line, rectangle, circle , oval .. )
static TOOL_ACTION clearAllLayers
D_CODE * GetDCODE(int aDCODE) const
Return a pointer to the D_CODE within this GERBER for the given aDCODE.
Hold the image data and parameters for one gerber file and layer parameters.
static TOOL_ACTION zoomFitScreen
static TOOL_ACTION millimetersUnits
GERBVIEW_FRAME::OnZipFileHistory ID_TB_OPTIONS_SHOW_GBR_MODE_2
GBR_LAYER_BOX_SELECTOR * m_SelLayerBox
void SetDCodeSelection(int aDCodeId)
void UpdateZoomSelectBox()
Rebuild the grid combobox to respond to any changes in the GUI (units, user grid changes,...
void OnUpdateLayerSelectBox(wxUpdateUIEvent &aEvent)
static TOOL_ACTION toggleLayerManager
void updateNetnameListSelectBox()
ACTION_TOOLBAR * m_mainToolBar
wxChoice * m_gridSelectBox
static TOOL_ACTION dcodeDisplay
static TOOL_ACTION negativeObjectDisplay
static TOOL_ACTION zoomOutCenter
wxChoice * m_SelNetnameBox
void UpdateToolbarControlSizes() override
Update the sizes of any controls in the toolbars of the frame.
static TOOL_ACTION toggleDiffMode
void ReCreateHToolbar() override
static LIB_SYMBOL * dummy()
Used to draw a dummy shape when a LIB_SYMBOL is not found in library.
void updateComponentListSelectBox()
void UpdateGridSelectBox()
Rebuild the grid combobox to respond to any changes in the GUI (units, user grid changes,...
static TOOL_ACTION measureTool
bool m_Defined
false if the aperture is not defined in the header
static TOOL_ACTION flipGerberView
void ReCreateAuxiliaryToolbar() override
void ReCreateVToolbar() override
Create or update the right vertical toolbar.
GERBER_FILE_IMAGE * GetGbrImage(int aIdx)
unsigned ImagesMaxCount()
static TOOL_ACTION toggleGrid
static TOOL_ACTION inchesUnits
GERBER_FILE_IMAGE * GetGbrImage(int aIdx) const
wxChoice * m_zoomSelectBox
static TOOL_ACTION linesDisplayOutlines
int m_Num_Dcode
D code value ( >= 10 )
static TOOL_ACTION togglePolarCoords
static const wxChar * ShowApertureType(APERTURE_T aType)
Return a character string telling what type of aperture type aType is.
Helper to display a DCode list and select a DCode id.
void AppendDCodeList(const wxArrayString &aChoices)
static TOOL_ACTION milsUnits
wxString UnescapeString(const wxString &aSource)
std::map< wxString, int > m_NetnamesList
wxString m_AperFunction
the aperture attribute (created by a TA.AperFunction command).
static TOOL_ACTION flashedDisplayOutlines
DCODE_SELECTION_BOX * m_DCodeSelector
int GetActiveLayer() const
Return the active layer.
void updateAperAttributesSelectBox()
wxChoice * m_SelAperAttributesBox
A gerber DCODE (also called Aperture) definition.
void OnUpdateDrawMode(wxUpdateUIEvent &aEvent)
static TOOL_ACTION zoomRedraw
static TOOL_ACTION polygonsDisplayOutlines
wxStaticText * m_dcodeText
static constexpr int KICAD_AUI_TB_STYLE
< Default style flags used for wxAUI toolbars.
wxChoice * m_SelComponentBox
void updateDCodeSelectBox()
static TOOL_ACTION toggleCursorStyle
wxStaticText * m_apertText
static TOOL_ACTION highContrastMode
GERBER_FILE_IMAGE_LIST * GetImagesList() const
Accessors to GERBER_FILE_IMAGE_LIST and GERBER_FILE_IMAGE data.
std::map< wxString, int > m_ComponentsList
static TOOL_ACTION reloadAllLayers
EDA_UNITS GetUserUnits() const
Return the user units currently in use.
static TOOL_ACTION selectionTool
void ReCreateOptToolbar() override
Create or update the left vertical toolbar (option toolbar)