30 #include <wx/wupdlock.h> 79 wxDefaultPosition, wxDefaultSize, 0,
NULL );
86 wxDefaultSize, wxTE_READONLY );
100 wxWindowUpdateLocker
dummy(
this );
109 wxDefaultPosition, wxDefaultSize,
125 m_cmpText->SetLabel(
_(
"Cmp:" ) + wxS(
" " ) );
161 wxDefaultPosition, wxSize( 150, -1 ) );
173 wxDefaultPosition, wxDefaultSize, 0,
nullptr );
182 wxDefaultPosition, wxDefaultSize, 0,
nullptr );
279 #define NO_SELECTION_STRING _("<No selection>") 300 wxArrayString dcode_list;
324 wxASSERT_MSG(
false,
"Invalid units" );
337 msg.Printf(
"tool %d [%.3fx%.3f %s] %s",
346 dcode_list.Add( msg );
351 if( dcode_list.size() > 1 )
354 size.x = std::max( size.x, 100 );
366 std::map<wxString, int> full_list;
382 for(
auto& ii : full_list )
394 std::map<wxString, int> full_list;
410 for(
auto& ii : full_list )
422 std::map<wxString, int> full_list;
438 if( aperture ==
NULL )
445 full_list.insert( std::make_pair( aperture->
m_AperFunction, 0 ) );
453 for(
auto ii = full_list.begin(); ii != full_list.end(); ++ii )
464 switch( aEvent.GetId() )
493 aEvent.Enable( gerber !=
NULL );
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 aperure (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)
Function SetDCodeSelection.
static LIB_PART * dummy()
Used to draw a dummy shape when a LIB_PART is not found in library.
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
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 )
int GetSelectedDCodeId()
Function GetSelectedDCodeId.
static TOOL_ACTION togglePolarCoords
static const wxChar * ShowApertureType(APERTURE_T aType)
Function ShowApertureType returns a character string telling what type of aperture type aType is.
Helper dialog and control classes.
void AppendDCodeList(const wxArrayString &aChoices)
Function AppendDCodeList.
static TOOL_ACTION milsUnits
std::map< wxString, int > m_NetnamesList
wxString m_AperFunction
the aperture attribute (created by a TA.AperFunction command) attached to the D_CODE
static TOOL_ACTION flashedDisplayOutlines
DCODE_SELECTION_BOX * m_DCodeSelector
int GetActiveLayer() const
Return the active layer.
void updateAperAttributesSelectBox()
wxChoice * m_SelAperAttributesBox
D_CODE holds a gerber DCODE (also called Aperture) definition.
void OnUpdateDrawMode(wxUpdateUIEvent &aEvent)
static TOOL_ACTION zoomRedraw
wxString UnescapeString(const wxString &aSource)
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)