22#include <wx/wupdlock.h>
23#include <wx/stattext.h>
56 wxAUI_TB_HORIZONTAL );
84 wxDefaultPosition, wxDefaultSize, 0,
nullptr );
93 wxDefaultPosition, wxDefaultSize, wxTE_READONLY );
108 wxWindowUpdateLocker
dummy(
this );
132 m_cmpText->SetLabel(
_(
"Cmp:" ) + wxS(
" " ) );
170 wxDefaultPosition, wxSize( 150, -1 ) );
183 wxDefaultSize, 0,
nullptr );
192 wxDefaultSize, 0,
nullptr );
292#define NO_SELECTION_STRING _("<No selection>")
314 wxArrayString dcode_list;
322 case EDA_UNITS::MILLIMETRES:
327 case EDA_UNITS::INCHES:
332 case EDA_UNITS::MILS:
334 units = wxT(
"mil" );
338 wxASSERT_MSG(
false, wxT(
"Invalid units" ) );
345 if( dcode ==
nullptr )
351 msg.Printf( wxT(
"tool %d [%.3fx%.3f %s] %s" ),
360 dcode_list.Add( msg );
365 if( dcode_list.size() > 1 )
368 size.x = std::max( size.x, 100 );
380 std::map<wxString, int> full_list;
386 if( gerber ==
nullptr )
396 for(
const std::pair<const wxString, int>& entry : full_list )
408 std::map<wxString, int> full_list;
414 if( gerber ==
nullptr )
424 for(
const std::pair<const wxString, int>& entry : full_list )
436 std::map<wxString, int> full_list;
442 if( gerber ==
nullptr )
452 if( aperture ==
nullptr )
459 full_list.insert( std::make_pair( aperture->
m_AperFunction, 0 ) );
467 for(
const std::pair<const wxString, int>& entry : full_list )
483 aEvent.Enable( gerber !=
nullptr );
constexpr EDA_IU_SCALE gerbIUScale
static TOOL_ACTION toggleGrid
static TOOL_ACTION zoomRedraw
static TOOL_ACTION millimetersUnits
static TOOL_ACTION zoomOutCenter
static TOOL_ACTION togglePolarCoords
static TOOL_ACTION milsUnits
static TOOL_ACTION inchesUnits
static TOOL_ACTION highContrastMode
static TOOL_ACTION toggleCursorStyle
static TOOL_ACTION measureTool
static TOOL_ACTION selectionTool
static TOOL_ACTION zoomFitScreen
static TOOL_ACTION zoomTool
static TOOL_ACTION zoomInCenter
Helper to display a DCode list and select a DCode id.
void SetDCodeSelection(int aDCodeId)
void AppendDCodeList(const wxArrayString &aChoices)
A gerber DCODE (also called Aperture) definition.
wxString m_AperFunction
the aperture attribute (created by a TA.AperFunction command).
int m_Num_Dcode
D code value ( >= 10 )
static const wxChar * ShowApertureType(APERTURE_T aType)
Return a character string telling what type of aperture type aType is.
VECTOR2I m_Size
Horizontal and vertical dimensions.
APERTURE_T m_ApertType
Aperture type ( Line, rectangle, circle, oval poly, macro )
bool m_Defined
false if the aperture is not defined in the header
bool m_InUse
false if the aperture (previously defined) is not used to draw something
static constexpr int KICAD_AUI_TB_STYLE
< Default style flags used for wxAUI toolbars.
wxChoice * m_gridSelectBox
ACTION_TOOLBAR * m_optionsToolBar
void UpdateGridSelectBox()
Rebuild the grid combobox to respond to any changes in the GUI (units, user grid changes,...
void UpdateZoomSelectBox()
Rebuild the grid combobox to respond to any changes in the GUI (units, user grid changes,...
ACTION_TOOLBAR * m_mainToolBar
wxChoice * m_zoomSelectBox
ACTION_TOOLBAR * m_auxiliaryToolBar
unsigned ImagesMaxCount()
GERBER_FILE_IMAGE * GetGbrImage(int aIdx)
Hold the image data and parameters for one gerber file and layer parameters.
std::map< wxString, int > m_ComponentsList
D_CODE * GetDCODE(int aDCODE) const
Return a pointer to the D_CODE within this GERBER for the given aDCODE.
std::map< wxString, int > m_NetnamesList
static TOOL_ACTION dcodeDisplay
static TOOL_ACTION negativeObjectDisplay
static TOOL_ACTION flashedDisplayOutlines
static TOOL_ACTION toggleXORMode
static TOOL_ACTION toggleLayerManager
static TOOL_ACTION openGerber
static TOOL_ACTION clearAllLayers
static TOOL_ACTION flipGerberView
static TOOL_ACTION openAutodetected
static TOOL_ACTION reloadAllLayers
static TOOL_ACTION toggleForceOpacityMode
static TOOL_ACTION linesDisplayOutlines
static TOOL_ACTION openDrillFile
static TOOL_ACTION polygonsDisplayOutlines
void OnUpdateSelectDCode(wxUpdateUIEvent &aEvent)
wxStaticText * m_dcodeText
wxChoice * m_SelAperAttributesBox
void OnUpdateLayerSelectBox(wxUpdateUIEvent &aEvent)
void ReCreateHToolbar() override
GBR_LAYER_BOX_SELECTOR * m_SelLayerBox
void UpdateToolbarControlSizes() override
Update the sizes of any controls in the toolbars of the frame.
GERBER_FILE_IMAGE_LIST * GetImagesList() const
Accessors to GERBER_FILE_IMAGE_LIST and GERBER_FILE_IMAGE data.
void updateDCodeSelectBox()
void ReCreateAuxiliaryToolbar() override
wxChoice * m_SelComponentBox
wxChoice * m_SelNetnameBox
int GetActiveLayer() const
Return the active layer.
DCODE_SELECTION_BOX * m_DCodeSelector
void updateAperAttributesSelectBox()
void ReCreateOptToolbar() override
Create or update the left vertical toolbar (option toolbar)
wxStaticText * m_apertText
GERBER_FILE_IMAGE * GetGbrImage(int aIdx) const
void updateComponentListSelectBox()
void updateNetnameListSelectBox()
void ReCreateVToolbar() override
Create or update the right vertical toolbar.
EDA_UNITS GetUserUnits() const
@ ID_GBR_AUX_TOOLBAR_PCB_NET_CHOICE
@ ID_TOOLBARH_GERBVIEW_SELECT_ACTIVE_LAYER
@ ID_GBR_AUX_TOOLBAR_PCB_CMP_CHOICE
@ ID_TOOLBARH_GERBER_SELECT_ACTIVE_DCODE
@ ID_GBR_AUX_TOOLBAR_PCB_APERATTRIBUTES_CHOICE
@ ID_TOOLBARH_GERBER_DATA_TEXT_BOX
std::vector< FAB_LAYER_COLOR > dummy
wxString UnescapeString(const wxString &aSource)