22#include <wx/wupdlock.h> 
   23#include <wx/stattext.h> 
  132    auto layerBoxFactory =
 
  139                                                            wxDefaultPosition, wxDefaultSize, 0, 
nullptr );
 
  146            aToolbar->Bind( wxEVT_UPDATE_UI,
 
  147                            [
this]( wxUpdateUIEvent& aEvent )
 
  161    auto textInfoFactory =
 
  167                                            wxDefaultPosition, wxDefaultSize, wxTE_READONLY );
 
  179    auto componentBoxFactory =
 
  186                m_cmpText = 
new wxStaticText( aToolbar, wxID_ANY, 
_( 
"Cmp:" ) + wxS( 
" " ) );
 
  189            m_cmpText->SetLabel( 
_( 
"Cmp:" ) + wxS( 
" " ) );     
 
  208                m_netText = 
new wxStaticText( aToolbar, wxID_ANY, 
_( 
"Net:" ) );
 
  223    auto appertureBoxFactory =
 
  233                m_apertText = 
new wxStaticText( aToolbar, wxID_ANY, 
_( 
"Attr:" ) );
 
  248    auto dcodeSelectorFactory =
 
  255                                                        wxDefaultPosition, wxSize( 150, -1 ) );
 
  259                m_dcodeText = 
new wxStaticText( aToolbar, wxID_ANY, 
_( 
"DCode:" ) );
 
 
  273                                                                   _( 
"Text info entry" ) );
 
  275                                                                             _( 
"Component highlight" ),
 
  276                                                                             _( 
"Highlight items belonging to this component" ) );
 
  278                                                                       _( 
"Highlight items belonging to this net" ) );
 
  280                                                                             _( 
"Highlight items with this aperture attribute" ));
 
  282                                                                        _( 
"Select all items with the selected DCode" ) );
 
  285#define NO_SELECTION_STRING _("<No selection>") 
  307    wxArrayString dcode_list;
 
  327        units = wxT( 
"mil" );
 
  331        wxASSERT_MSG( 
false, wxT( 
"Invalid units" ) );
 
  336        wxCHECK2( dcode,
continue );
 
  338        if( !dcode->m_InUse && !dcode->m_Defined )
 
  341        msg.Printf( wxT( 
"tool %d [%.3fx%.3f %s] %s" ),
 
  343                    dcode->m_Size.x / 
scale, dcode->m_Size.y / 
scale,
 
  347        if( !dcode->m_AperFunction.IsEmpty() )
 
  348            msg << wxT( 
", " ) << dcode->m_AperFunction;
 
  350        dcode_list.Add( msg );
 
  355    if( dcode_list.size() > 1 )
 
  358        size.x = std::max( size.x, 100 );
 
 
  370    std::map<wxString, int> full_list;
 
  376        if( gerber == 
nullptr )    
 
  386    for( 
const std::pair<const wxString, int>& entry : full_list )
 
 
  398    std::map<wxString, int> full_list;
 
  404        if( gerber == 
nullptr )    
 
  414    for( 
const std::pair<const wxString, int>& entry : full_list )
 
 
  426    std::map<wxString, int> full_list;
 
  432        if( gerber == 
nullptr )    
 
  440            if( aperture == 
nullptr )
 
  443            if( !aperture->m_InUse && !aperture->m_Defined )
 
  446            if( !aperture->m_AperFunction.IsEmpty() )
 
  447                full_list.insert( std::make_pair( aperture->m_AperFunction, 0 ) );
 
  455    for( 
const std::pair<const wxString, int>& entry : full_list )
 
 
  471    aEvent.Enable( gerber != 
nullptr );
 
 
constexpr EDA_IU_SCALE gerbIUScale
 
static TOOL_ACTION toggleGrid
 
static TOOL_ACTION zoomRedraw
 
static TOOL_ACTION millimetersUnits
 
static TOOL_ACTION cursorSmallCrosshairs
 
static TOOL_ACTION zoomOutCenter
 
static TOOL_ACTION togglePolarCoords
 
static TOOL_ACTION milsUnits
 
static TOOL_ACTION inchesUnits
 
static TOOL_ACTION highContrastMode
 
static TOOL_ACTION measureTool
 
static TOOL_ACTION selectionTool
 
static TOOL_ACTION zoomFitScreen
 
static TOOL_ACTION zoomTool
 
static TOOL_ACTION cursor45Crosshairs
 
static TOOL_ACTION zoomInCenter
 
static TOOL_ACTION cursorFullCrosshairs
 
Helper to display a DCode list and select a DCode id.
 
static const wxChar * ShowApertureType(APERTURE_T aType)
Return a character string telling what type of aperture type aType is.
 
void RegisterCustomToolbarControlFactory(const ACTION_TOOLBAR_CONTROL &aControlDesc, const ACTION_TOOLBAR_CONTROL_FACTORY &aControlFactory)
Register a creation factory for toolbar controls that are present in this frame.
 
void configureToolbars() override
 
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
 
std::map< int, D_CODE * > m_ApertureList
Dcode (Aperture) List for this layer (see dcode.h)
 
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 configureToolbars() override
 
GBR_LAYER_BOX_SELECTOR * m_SelLayerBox
 
GERBER_FILE_IMAGE_LIST * GetImagesList() const
Accessors to GERBER_FILE_IMAGE_LIST and GERBER_FILE_IMAGE data.
 
void updateDCodeSelectBox()
 
wxChoice * m_SelComponentBox
 
wxChoice * m_SelNetnameBox
 
int GetActiveLayer() const
Return the active layer.
 
DCODE_SELECTION_BOX * m_DCodeSelector
 
void updateAperAttributesSelectBox()
 
wxStaticText * m_apertText
 
GERBER_FILE_IMAGE * GetGbrImage(int aIdx) const
 
void updateComponentListSelectBox()
 
void updateNetnameListSelectBox()
 
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
 
wxString UnescapeString(const wxString &aSource)