From 9d99fd188f76c2c92ea8810d2a26cb9340edd00e Mon Sep 17 00:00:00 2001 From: Seth Hillbrand Date: Mon, 28 Jan 2019 06:15:32 -0800 Subject: [PATCH] Revert "Change top selection drop-down to combobox" This reverts commit 7d06651a1040348d0459fd575755bfd3bd152149. --- common/legacy_gal/eda_draw_frame.cpp | 2 +- common/legacy_wx/eda_draw_frame.cpp | 2 +- cvpcb/display_footprints_frame.cpp | 12 +- gerbview/events_called_functions.cpp | 10 +- gerbview/gerbview_frame.h | 6 +- gerbview/toolbars_gerber.cpp | 23 +- include/draw_frame.h | 2 +- ...ialog_global_edit_tracks_and_vias_base.cpp | 134 +- ...ialog_global_edit_tracks_and_vias_base.fbp | 2796 ++++++++++------- .../dialog_global_edit_tracks_and_vias_base.h | 27 +- pcbnew/footprint_edit_frame.cpp | 4 +- pcbnew/footprint_viewer_frame.cpp | 4 +- pcbnew/pcb_base_frame.cpp | 8 +- pcbnew/pcb_edit_frame.cpp | 8 +- pcbnew/pcb_edit_frame.h | 8 +- pcbnew/tool_footprint_editor.cpp | 11 +- pcbnew/tool_footprint_viewer.cpp | 12 +- pcbnew/tool_pcb_editor.cpp | 32 +- 18 files changed, 1816 insertions(+), 1285 deletions(-) diff --git a/common/legacy_gal/eda_draw_frame.cpp b/common/legacy_gal/eda_draw_frame.cpp index 062065b001..e8d8cef2ee 100644 --- a/common/legacy_gal/eda_draw_frame.cpp +++ b/common/legacy_gal/eda_draw_frame.cpp @@ -517,7 +517,7 @@ void EDA_DRAW_FRAME::OnSelectGrid( wxCommandEvent& event ) int* clientData; int eventId = ID_POPUP_GRID_LEVEL_100; - if( event.GetEventType() == wxEVT_COMBOBOX ) + if( event.GetEventType() == wxEVT_CHOICE ) { if( m_gridSelectBox == NULL ) // Should not happen return; diff --git a/common/legacy_wx/eda_draw_frame.cpp b/common/legacy_wx/eda_draw_frame.cpp index 265e91824c..b097000c70 100644 --- a/common/legacy_wx/eda_draw_frame.cpp +++ b/common/legacy_wx/eda_draw_frame.cpp @@ -518,7 +518,7 @@ void EDA_DRAW_FRAME::OnSelectGrid( wxCommandEvent& event ) int* clientData; int eventId = ID_POPUP_GRID_LEVEL_100; - if( event.GetEventType() == wxEVT_COMBOBOX ) + if( event.GetEventType() == wxEVT_CHOICE ) { if( m_gridSelectBox == NULL ) // Should not happen return; diff --git a/cvpcb/display_footprints_frame.cpp b/cvpcb/display_footprints_frame.cpp index 4d639a5c81..6b0f094ec2 100644 --- a/cvpcb/display_footprints_frame.cpp +++ b/cvpcb/display_footprints_frame.cpp @@ -68,8 +68,8 @@ BEGIN_EVENT_TABLE( DISPLAY_FOOTPRINTS_FRAME, PCB_BASE_FRAME ) EVT_CLOSE( DISPLAY_FOOTPRINTS_FRAME::OnCloseWindow ) EVT_TOOL( ID_OPTIONS_SETUP, DISPLAY_FOOTPRINTS_FRAME::InstallOptionsDisplay ) EVT_TOOL( ID_CVPCB_SHOW3D_FRAME, DISPLAY_FOOTPRINTS_FRAME::Show3D_Frame ) - EVT_COMBOBOX( ID_ON_ZOOM_SELECT, DISPLAY_FOOTPRINTS_FRAME::OnSelectZoom ) - EVT_COMBOBOX( ID_ON_GRID_SELECT, DISPLAY_FOOTPRINTS_FRAME::OnSelectGrid ) + EVT_CHOICE( ID_ON_ZOOM_SELECT, DISPLAY_FOOTPRINTS_FRAME::OnSelectZoom ) + EVT_CHOICE( ID_ON_GRID_SELECT, DISPLAY_FOOTPRINTS_FRAME::OnSelectGrid ) EVT_UPDATE_UI( ID_NO_TOOL_SELECTED, DISPLAY_FOOTPRINTS_FRAME::OnUIToolSelection ) EVT_UPDATE_UI( ID_TB_MEASUREMENT_TOOL, DISPLAY_FOOTPRINTS_FRAME::OnUIToolSelection ) @@ -305,16 +305,16 @@ void DISPLAY_FOOTPRINTS_FRAME::ReCreateHToolbar() KiScaledSeparator( m_mainToolBar, this ); // Grid selection choice box. - m_gridSelectBox = new wxComboBox( m_mainToolBar, ID_ON_GRID_SELECT, wxEmptyString, - wxDefaultPosition, wxDefaultSize, 0, nullptr, wxCB_READONLY ); + m_gridSelectBox = new wxChoice( m_mainToolBar, ID_ON_GRID_SELECT, + wxDefaultPosition, wxDefaultSize, 0, NULL ); UpdateGridSelectBox(); m_mainToolBar->AddControl( m_gridSelectBox ); KiScaledSeparator( m_mainToolBar, this ); // Zoom selection choice box. - m_zoomSelectBox = new wxComboBox( m_mainToolBar, ID_ON_ZOOM_SELECT, wxEmptyString, - wxDefaultPosition, wxDefaultSize, 0, nullptr, wxCB_READONLY ); + m_zoomSelectBox = new wxChoice( m_mainToolBar, ID_ON_ZOOM_SELECT, + wxDefaultPosition, wxDefaultSize, 0, NULL ); updateZoomSelectBox(); m_mainToolBar->AddControl( m_zoomSelectBox ); diff --git a/gerbview/events_called_functions.cpp b/gerbview/events_called_functions.cpp index 2d05ef5bfa..2b92533f8a 100644 --- a/gerbview/events_called_functions.cpp +++ b/gerbview/events_called_functions.cpp @@ -138,12 +138,12 @@ BEGIN_EVENT_TABLE( GERBVIEW_FRAME, EDA_DRAW_FRAME ) EVT_TOOL( ID_TB_OPTIONS_HIGH_CONTRAST_MODE, GERBVIEW_FRAME::OnSelectOptionToolbar ) // Auxiliary horizontal toolbar - EVT_COMBOBOX( ID_GBR_AUX_TOOLBAR_PCB_CMP_CHOICE, GERBVIEW_FRAME::OnSelectHighlightChoice ) - EVT_COMBOBOX( ID_GBR_AUX_TOOLBAR_PCB_NET_CHOICE, GERBVIEW_FRAME::OnSelectHighlightChoice ) - EVT_COMBOBOX( ID_GBR_AUX_TOOLBAR_PCB_APERATTRIBUTES_CHOICE, + EVT_CHOICE( ID_GBR_AUX_TOOLBAR_PCB_CMP_CHOICE, GERBVIEW_FRAME::OnSelectHighlightChoice ) + EVT_CHOICE( ID_GBR_AUX_TOOLBAR_PCB_NET_CHOICE, GERBVIEW_FRAME::OnSelectHighlightChoice ) + EVT_CHOICE( ID_GBR_AUX_TOOLBAR_PCB_APERATTRIBUTES_CHOICE, GERBVIEW_FRAME::OnSelectHighlightChoice ) - EVT_COMBOBOX( ID_ON_ZOOM_SELECT, GERBVIEW_FRAME::OnSelectZoom ) - EVT_COMBOBOX( ID_ON_GRID_SELECT, GERBVIEW_FRAME::OnSelectGrid ) + EVT_CHOICE( ID_ON_ZOOM_SELECT, GERBVIEW_FRAME::OnSelectZoom ) + EVT_CHOICE( ID_ON_GRID_SELECT, GERBVIEW_FRAME::OnSelectGrid ) // Right click context menu EVT_MENU( ID_HIGHLIGHT_CMP_ITEMS, GERBVIEW_FRAME::Process_Special_Functions ) diff --git a/gerbview/gerbview_frame.h b/gerbview/gerbview_frame.h index d5bc77b92d..0d0f172f1e 100644 --- a/gerbview/gerbview_frame.h +++ b/gerbview/gerbview_frame.h @@ -170,9 +170,9 @@ protected: wxString m_lastFileName; public: - wxComboBox* m_SelComponentBox; // a choice box to display and highlight component graphic items - wxComboBox* m_SelNetnameBox; // a choice box to display and highlight netlist graphic items - wxComboBox* m_SelAperAttributesBox; // a choice box to display aperture attributes and highlight items + wxChoice* m_SelComponentBox; // a choice box to display and highlight component graphic items + wxChoice* m_SelNetnameBox; // a choice box to display and highlight netlist graphic items + wxChoice* m_SelAperAttributesBox; // a choice box to display aperture attributes and highlight items GBR_LAYER_BOX_SELECTOR* m_SelLayerBox; // The combobox to select the current active graphic layer // (which is drawn on top on the other layers DCODE_SELECTION_BOX* m_DCodeSelector; // a list box to select the dcode Id to highlight. diff --git a/gerbview/toolbars_gerber.cpp b/gerbview/toolbars_gerber.cpp index 9318e339a9..32e3a513df 100644 --- a/gerbview/toolbars_gerber.cpp +++ b/gerbview/toolbars_gerber.cpp @@ -119,9 +119,8 @@ void GERBVIEW_FRAME::ReCreateAuxiliaryToolbar() // Creates box to display and choose components: if( !m_SelComponentBox ) { - m_SelComponentBox = new wxComboBox( m_auxiliaryToolBar, - ID_GBR_AUX_TOOLBAR_PCB_CMP_CHOICE, wxEmptyString, - wxDefaultPosition, wxDefaultSize, 0, nullptr, wxCB_READONLY ); + m_SelComponentBox = new wxChoice( m_auxiliaryToolBar, + ID_GBR_AUX_TOOLBAR_PCB_CMP_CHOICE ); m_SelComponentBox->SetToolTip( _("Highlight items belonging to this component") ); text = new wxStaticText( m_auxiliaryToolBar, wxID_ANY, _( "Cmp: ") ); m_auxiliaryToolBar->AddControl( text ); @@ -132,9 +131,8 @@ void GERBVIEW_FRAME::ReCreateAuxiliaryToolbar() // Creates choice box to display net names and highlight selected: if( !m_SelNetnameBox ) { - m_SelNetnameBox = new wxComboBox( m_auxiliaryToolBar, - ID_GBR_AUX_TOOLBAR_PCB_NET_CHOICE, wxEmptyString, - wxDefaultPosition, wxDefaultSize, 0, nullptr, wxCB_READONLY ); + m_SelNetnameBox = new wxChoice( m_auxiliaryToolBar, + ID_GBR_AUX_TOOLBAR_PCB_NET_CHOICE ); m_SelNetnameBox->SetToolTip( _("Highlight items belonging to this net") ); text = new wxStaticText( m_auxiliaryToolBar, wxID_ANY, _( "Net:" ) ); m_auxiliaryToolBar->AddControl( text ); @@ -145,9 +143,8 @@ void GERBVIEW_FRAME::ReCreateAuxiliaryToolbar() // Creates choice box to display aperture attributes and highlight selected: if( !m_SelAperAttributesBox ) { - m_SelAperAttributesBox = new wxComboBox( m_auxiliaryToolBar, - ID_GBR_AUX_TOOLBAR_PCB_APERATTRIBUTES_CHOICE, wxEmptyString, - wxDefaultPosition, wxDefaultSize, 0, nullptr, wxCB_READONLY ); + m_SelAperAttributesBox = new wxChoice( m_auxiliaryToolBar, + ID_GBR_AUX_TOOLBAR_PCB_APERATTRIBUTES_CHOICE ); m_SelAperAttributesBox->SetToolTip( _("Highlight items with this aperture attribute") ); text = new wxStaticText( m_auxiliaryToolBar, wxID_ANY, _( "Attr:" ) ); m_auxiliaryToolBar->AddControl( text ); @@ -168,16 +165,16 @@ void GERBVIEW_FRAME::ReCreateAuxiliaryToolbar() if( !m_gridSelectBox ) { KiScaledSeparator( m_auxiliaryToolBar, this ); - m_gridSelectBox = new wxComboBox( m_auxiliaryToolBar, ID_ON_GRID_SELECT, wxEmptyString, - wxDefaultPosition, wxDefaultSize, 0, nullptr, wxCB_READONLY ); + m_gridSelectBox = new wxChoice( m_auxiliaryToolBar, ID_ON_GRID_SELECT, + wxDefaultPosition, wxDefaultSize, 0, nullptr ); m_auxiliaryToolBar->AddControl( m_gridSelectBox ); } if( !m_zoomSelectBox ) { KiScaledSeparator( m_auxiliaryToolBar, this ); - m_zoomSelectBox = new wxComboBox( m_auxiliaryToolBar, ID_ON_ZOOM_SELECT, wxEmptyString, - wxDefaultPosition, wxDefaultSize, 0, nullptr, wxCB_READONLY ); + m_zoomSelectBox = new wxChoice( m_auxiliaryToolBar, ID_ON_ZOOM_SELECT, + wxDefaultPosition, wxDefaultSize, 0, nullptr ); m_auxiliaryToolBar->AddControl( m_zoomSelectBox ); } diff --git a/include/draw_frame.h b/include/draw_frame.h index e034073064..3f34aaad55 100644 --- a/include/draw_frame.h +++ b/include/draw_frame.h @@ -148,7 +148,7 @@ protected: /// Key to control whether first run dialog is shown on startup long m_firstRunDialogSetting; - wxComboBox* m_gridSelectBox; + wxChoice* m_gridSelectBox; wxChoice* m_zoomSelectBox; /// Auxiliary tool bar typically shown below the main tool bar at the top of the diff --git a/pcbnew/dialogs/dialog_global_edit_tracks_and_vias_base.cpp b/pcbnew/dialogs/dialog_global_edit_tracks_and_vias_base.cpp index 875691252b..3b50bfd3a9 100644 --- a/pcbnew/dialogs/dialog_global_edit_tracks_and_vias_base.cpp +++ b/pcbnew/dialogs/dialog_global_edit_tracks_and_vias_base.cpp @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Nov 23 2018) +// C++ code generated with wxFormBuilder (version Aug 2 2018) // http://www.wxformbuilder.org/ // // PLEASE DO *NOT* EDIT THIS FILE! @@ -14,113 +14,117 @@ DIALOG_GLOBAL_EDIT_TRACKS_AND_VIAS_BASE::DIALOG_GLOBAL_EDIT_TRACKS_AND_VIAS_BASE( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : DIALOG_SHIM( parent, id, title, pos, size, style ) { this->SetSizeHints( wxDefaultSize, wxDefaultSize ); - + wxBoxSizer* bMainSizer; bMainSizer = new wxBoxSizer( wxVERTICAL ); - + wxStaticBoxSizer* sbScope; sbScope = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Scope") ), wxVERTICAL ); - + wxFlexGridSizer* fgSizer1; fgSizer1 = new wxFlexGridSizer( 0, 2, 0, 0 ); fgSizer1->AddGrowableCol( 0 ); fgSizer1->AddGrowableCol( 1 ); fgSizer1->SetFlexibleDirection( wxBOTH ); fgSizer1->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); - + m_tracks = new wxCheckBox( sbScope->GetStaticBox(), wxID_ANY, _("Tracks"), wxDefaultPosition, wxDefaultSize, 0 ); - m_tracks->SetValue(true); + m_tracks->SetValue(true); fgSizer1->Add( m_tracks, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 ); - + m_vias = new wxCheckBox( sbScope->GetStaticBox(), wxID_ANY, _("Vias"), wxDefaultPosition, wxDefaultSize, 0 ); - m_vias->SetValue(true); + m_vias->SetValue(true); fgSizer1->Add( m_vias, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 ); - - + + sbScope->Add( fgSizer1, 0, wxEXPAND, 5 ); - - + + bMainSizer->Add( sbScope, 0, wxALL|wxEXPAND, 5 ); - + wxStaticBoxSizer* sbFilters; sbFilters = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Filters") ), wxVERTICAL ); - + wxFlexGridSizer* fgSizer3; fgSizer3 = new wxFlexGridSizer( 0, 3, 3, 0 ); fgSizer3->AddGrowableCol( 1 ); fgSizer3->AddGrowableCol( 2 ); fgSizer3->SetFlexibleDirection( wxHORIZONTAL ); fgSizer3->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); - + m_netFilterOpt = new wxCheckBox( sbFilters->GetStaticBox(), wxID_ANY, _("Filter items by net:"), wxDefaultPosition, wxDefaultSize, 0 ); fgSizer3->Add( m_netFilterOpt, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 ); - - m_netFilter = new NET_SELECTOR( sbFilters->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 ); + + m_netFilter = new NET_SELECTOR( sbFilters->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 ); fgSizer3->Add( m_netFilter, 1, wxEXPAND|wxRIGHT, 5 ); - - + + fgSizer3->Add( 0, 0, 1, wxEXPAND|wxRIGHT|wxLEFT, 100 ); - + m_netclassFilterOpt = new wxCheckBox( sbFilters->GetStaticBox(), wxID_ANY, _("Filter items by net class:"), wxDefaultPosition, wxDefaultSize, 0 ); fgSizer3->Add( m_netclassFilterOpt, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 ); - + wxArrayString m_netclassFilterChoices; m_netclassFilter = new wxChoice( sbFilters->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_netclassFilterChoices, 0 ); m_netclassFilter->SetSelection( 0 ); fgSizer3->Add( m_netclassFilter, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT, 5 ); - - + + fgSizer3->Add( 0, 0, 1, wxEXPAND, 5 ); - + m_layerFilterOpt = new wxCheckBox( sbFilters->GetStaticBox(), wxID_ANY, _("Filter items by layer:"), wxDefaultPosition, wxDefaultSize, 0 ); fgSizer3->Add( m_layerFilterOpt, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 ); - - m_layerFilter = new PCB_LAYER_BOX_SELECTOR( sbFilters->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, NULL, 0 ); + + m_layerFilter = new PCB_LAYER_BOX_SELECTOR( sbFilters->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, NULL, 0 ); fgSizer3->Add( m_layerFilter, 0, wxEXPAND|wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 ); - - + + fgSizer3->Add( 0, 0, 1, wxEXPAND, 5 ); - - + + sbFilters->Add( fgSizer3, 1, wxEXPAND, 5 ); - - + + bMainSizer->Add( sbFilters, 0, wxALL|wxEXPAND, 5 ); - + wxStaticBoxSizer* sbAction; sbAction = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Action") ), wxVERTICAL ); - + m_setToSpecifiedValues = new wxRadioButton( sbAction->GetStaticBox(), ID_SPECIFIED_NET_TO_SPECIFIED_VALUES, _("Set to specified values:"), wxDefaultPosition, wxDefaultSize, wxRB_GROUP ); - m_setToSpecifiedValues->SetValue( true ); + m_setToSpecifiedValues->SetValue( true ); sbAction->Add( m_setToSpecifiedValues, 0, wxTOP|wxBOTTOM, 5 ); - + wxBoxSizer* bSizerTrackViaPopups; bSizerTrackViaPopups = new wxBoxSizer( wxHORIZONTAL ); - - m_trackWidthSelectBox = new wxComboBox( sbAction->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, NULL, wxCB_READONLY ); + + wxArrayString m_trackWidthSelectBoxChoices; + m_trackWidthSelectBox = new wxChoice( sbAction->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_trackWidthSelectBoxChoices, 0 ); + m_trackWidthSelectBox->SetSelection( 0 ); bSizerTrackViaPopups->Add( m_trackWidthSelectBox, 4, wxEXPAND|wxRIGHT, 5 ); - - m_viaSizesSelectBox = new wxComboBox( sbAction->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, NULL, wxCB_READONLY ); - bSizerTrackViaPopups->Add( m_viaSizesSelectBox, 5, wxEXPAND|wxLEFT|wxRIGHT, 5 ); - - m_layerBox = new PCB_LAYER_BOX_SELECTOR( sbAction->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, NULL, 0 ); + + wxArrayString m_viaSizesSelectBoxChoices; + m_viaSizesSelectBox = new wxChoice( sbAction->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_viaSizesSelectBoxChoices, 0 ); + m_viaSizesSelectBox->SetSelection( 0 ); + bSizerTrackViaPopups->Add( m_viaSizesSelectBox, 5, wxEXPAND|wxRIGHT|wxLEFT, 5 ); + + m_layerBox = new PCB_LAYER_BOX_SELECTOR( sbAction->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, NULL, 0 ); bSizerTrackViaPopups->Add( m_layerBox, 0, wxRIGHT|wxLEFT, 3 ); - - + + sbAction->Add( bSizerTrackViaPopups, 0, wxEXPAND|wxBOTTOM|wxLEFT, 15 ); - + m_setToNetclassValues = new wxRadioButton( sbAction->GetStaticBox(), ID_SPECIFIED_NET_TO_NETCLASS_VALUES, _("Set to net class values:"), wxDefaultPosition, wxDefaultSize, 0 ); sbAction->Add( m_setToNetclassValues, 0, wxTOP|wxBOTTOM, 5 ); - + m_netclassGrid = new wxGrid( sbAction->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, wxBORDER_DEFAULT|wxVSCROLL ); - + // Grid m_netclassGrid->CreateGrid( 1, 6 ); m_netclassGrid->EnableEditing( false ); m_netclassGrid->EnableGridLines( true ); m_netclassGrid->EnableDragGridSize( false ); m_netclassGrid->SetMargins( 0, 0 ); - + // Columns m_netclassGrid->SetColSize( 0, 95 ); m_netclassGrid->SetColSize( 1, 95 ); @@ -131,41 +135,41 @@ DIALOG_GLOBAL_EDIT_TRACKS_AND_VIAS_BASE::DIALOG_GLOBAL_EDIT_TRACKS_AND_VIAS_BASE m_netclassGrid->EnableDragColMove( false ); m_netclassGrid->EnableDragColSize( false ); m_netclassGrid->SetColLabelSize( 0 ); - m_netclassGrid->SetColLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER ); - + m_netclassGrid->SetColLabelAlignment( wxALIGN_CENTRE, wxALIGN_CENTRE ); + // Rows m_netclassGrid->EnableDragRowSize( false ); m_netclassGrid->SetRowLabelSize( 0 ); - m_netclassGrid->SetRowLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER ); - + m_netclassGrid->SetRowLabelAlignment( wxALIGN_CENTRE, wxALIGN_CENTRE ); + // Label Appearance - + // Cell Defaults m_netclassGrid->SetDefaultCellBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_BTNFACE ) ); m_netclassGrid->SetDefaultCellFont( wxFont( 11, wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL, false, wxEmptyString ) ); - m_netclassGrid->SetDefaultCellAlignment( wxALIGN_LEFT, wxALIGN_CENTER ); + m_netclassGrid->SetDefaultCellAlignment( wxALIGN_LEFT, wxALIGN_CENTRE ); sbAction->Add( m_netclassGrid, 0, wxEXPAND|wxLEFT, 15 ); - - + + sbAction->Add( 0, 0, 1, wxEXPAND|wxTOP, 5 ); - - + + bMainSizer->Add( sbAction, 1, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 ); - + m_sdbSizer = new wxStdDialogButtonSizer(); m_sdbSizerOK = new wxButton( this, wxID_OK ); m_sdbSizer->AddButton( m_sdbSizerOK ); m_sdbSizerCancel = new wxButton( this, wxID_CANCEL ); m_sdbSizer->AddButton( m_sdbSizerCancel ); m_sdbSizer->Realize(); - + bMainSizer->Add( m_sdbSizer, 0, wxEXPAND|wxALL, 5 ); - - + + this->SetSizer( bMainSizer ); this->Layout(); bMainSizer->Fit( this ); - + // Connect Events this->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_GLOBAL_EDIT_TRACKS_AND_VIAS_BASE::OnUpdateUI ) ); m_netclassFilter->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( DIALOG_GLOBAL_EDIT_TRACKS_AND_VIAS_BASE::OnNetclassFilterSelect ), NULL, this ); @@ -180,5 +184,5 @@ DIALOG_GLOBAL_EDIT_TRACKS_AND_VIAS_BASE::~DIALOG_GLOBAL_EDIT_TRACKS_AND_VIAS_BAS m_netclassFilter->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( DIALOG_GLOBAL_EDIT_TRACKS_AND_VIAS_BASE::OnNetclassFilterSelect ), NULL, this ); m_layerFilter->Disconnect( wxEVT_COMMAND_COMBOBOX_SELECTED, wxCommandEventHandler( DIALOG_GLOBAL_EDIT_TRACKS_AND_VIAS_BASE::OnLayerFilterSelect ), NULL, this ); m_netclassGrid->Disconnect( wxEVT_SIZE, wxSizeEventHandler( DIALOG_GLOBAL_EDIT_TRACKS_AND_VIAS_BASE::OnSizeNetclassGrid ), NULL, this ); - + } diff --git a/pcbnew/dialogs/dialog_global_edit_tracks_and_vias_base.fbp b/pcbnew/dialogs/dialog_global_edit_tracks_and_vias_base.fbp index bf0bf08030..51f2907e37 100644 --- a/pcbnew/dialogs/dialog_global_edit_tracks_and_vias_base.fbp +++ b/pcbnew/dialogs/dialog_global_edit_tracks_and_vias_base.fbp @@ -1,1137 +1,1659 @@ - - - - - - C++ - 1 - source_name - 0 - 0 - res - UTF-8 - connect - dialog_global_edit_tracks_and_vias_base - 1000 - none - - 1 - dialog_global_edit_tracks_and_vias_base - - . - - 1 - 1 - 1 - 1 - UI - 0 - 0 - - 0 - wxAUI_MGR_DEFAULT - - - - 1 - 1 - impl_virtual - - - - 0 - wxID_ANY - - - DIALOG_GLOBAL_EDIT_TRACKS_AND_VIAS_BASE - - -1,-1 - wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER - DIALOG_SHIM; dialog_shim.h - Set Track and Via Properties - - - - - OnUpdateUI - - - bMainSizer - wxVERTICAL - none - - 5 - wxALL|wxEXPAND - 0 - - wxID_ANY - Scope - - sbScope - wxVERTICAL - 1 - none - - 5 - wxEXPAND - 0 - - 2 - wxBOTH - 0,1 - - 0 - - fgSizer1 - wxFLEX_GROWMODE_SPECIFIED - none - 0 - 0 - - 5 - wxBOTTOM|wxRIGHT|wxLEFT - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Tracks - - 0 - - - 0 - - 1 - m_tracks - 1 - - - protected - 1 - - Resizable - 1 - - - ; forward_declare - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - 5 - wxBOTTOM|wxRIGHT|wxLEFT - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Vias - - 0 - - - 0 - - 1 - m_vias - 1 - - - protected - 1 - - Resizable - 1 - - - ; forward_declare - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - - - - - 5 - wxALL|wxEXPAND - 0 - - wxID_ANY - Filters - - sbFilters - wxVERTICAL - 1 - none - - 5 - wxEXPAND - 1 - - 3 - wxHORIZONTAL - 1,2 - - 0 - - fgSizer3 - wxFLEX_GROWMODE_SPECIFIED - none - 0 - 3 - - 5 - wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Filter items by net: - - 0 - - - 0 - - 1 - m_netFilterOpt - 1 - - - protected - 1 - - Resizable - 1 - - - ; forward_declare - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - 5 - wxEXPAND|wxRIGHT - 1 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - NET_SELECTOR - 1 - - - 1 - - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - #include <widgets/net_selector.h> - - 0 - - - 0 - - 1 - m_netFilter - 1 - - - protected - 1 - - Resizable - - 1 - - ; forward_declare - 0 - - - - - - - - 100 - wxEXPAND|wxRIGHT|wxLEFT - 1 - - 0 - protected - 0 - - - - 5 - wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Filter items by net class: - - 0 - - - 0 - - 1 - m_netclassFilterOpt - 1 - - - protected - 1 - - Resizable - 1 - - - ; forward_declare - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - 5 - wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - - 0 - - - 0 - - 1 - m_netclassFilter - 1 - - - protected - 1 - - Resizable - 0 - 1 - - - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - OnNetclassFilterSelect - - - - 5 - wxEXPAND - 1 - - 0 - protected - 0 - - - - 5 - wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Filter items by layer: - - 0 - - - 0 - - 1 - m_layerFilterOpt - 1 - - - protected - 1 - - Resizable - 1 - - - ; forward_declare - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - 5 - wxEXPAND|wxALIGN_CENTER_VERTICAL|wxRIGHT - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - - 0 - - - 0 - - 1 - m_layerFilter - 1 - - - protected - 1 - - Resizable - -1 - 1 - - - PCB_LAYER_BOX_SELECTOR; pcb_layer_box_selector.h; forward_declare - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - OnLayerFilterSelect - - - - 5 - wxEXPAND - 1 - - 0 - protected - 0 - - - - - - - - 5 - wxEXPAND|wxTOP|wxRIGHT|wxLEFT - 1 - - wxID_ANY - Action - - sbAction - wxVERTICAL - 1 - none - - 5 - wxTOP|wxBOTTOM - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - ID_SPECIFIED_NET_TO_SPECIFIED_VALUES - Set to specified values: - - 0 - - - 0 - - 1 - m_setToSpecifiedValues - 1 - - - protected - 1 - - Resizable - 1 - - wxRB_GROUP - ; forward_declare - 0 - - - wxFILTER_NONE - wxDefaultValidator - - 1 - - - - - - - 15 - wxEXPAND|wxBOTTOM|wxLEFT - 0 - - - bSizerTrackViaPopups - wxHORIZONTAL - none - - 5 - wxEXPAND|wxRIGHT - 4 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - - 0 - - - 0 - - 1 - m_trackWidthSelectBox - 1 - - - protected - 1 - - Resizable - -1 - 1 - - wxCB_READONLY - ; forward_declare; forward_declare - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - - 5 - wxEXPAND|wxLEFT|wxRIGHT - 5 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - - 0 - - - 0 - - 1 - m_viaSizesSelectBox - 1 - - - protected - 1 - - Resizable - -1 - 1 - - wxCB_READONLY - ; forward_declare; forward_declare - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - - 3 - wxRIGHT|wxLEFT - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - - 0 - - - 0 - - 1 - m_layerBox - 1 - - - protected - 1 - - Resizable - -1 - 1 - - - PCB_LAYER_BOX_SELECTOR; pcb_layer_box_selector.h; forward_declare - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - - - - 5 - wxTOP|wxBOTTOM - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - ID_SPECIFIED_NET_TO_NETCLASS_VALUES - Set to net class values: - - 0 - - - 0 - - 1 - m_setToNetclassValues - 1 - - - protected - 1 - - Resizable - 1 - - - ; forward_declare - 0 - - - wxFILTER_NONE - wxDefaultValidator - - 0 - - - - - - - 15 - wxEXPAND|wxLEFT - 0 - - 1 - 1 - 1 - 1 - - - - - 0 - 0 - - - - 1 - wxSYS_COLOUR_BTNFACE - ,90,90,11,70,0 - wxALIGN_LEFT - - wxALIGN_CENTER - 0 - 1 - wxALIGN_CENTER - 0 - - wxALIGN_CENTER - 6 - 95,95,95,95,95,95 - - 1 - 0 - Dock - 0 - Left - 0 - 0 - 0 - 0 - 0 - 1 - - 1 - - - 1 - 0 - 0 - wxID_ANY - - - - 0 - 0 - - 0 - - - 0 - - 1 - m_netclassGrid - 1 - - - protected - 1 - - Resizable - wxALIGN_CENTER - 0 - - wxALIGN_CENTER - - 1 - 1 - - - 0 - - - - wxBORDER_DEFAULT|wxVSCROLL - OnSizeNetclassGrid - - - - 5 - wxEXPAND|wxTOP - 1 - - 0 - protected - 0 - - - - - - 5 - wxEXPAND|wxALL - 0 - - 0 - 1 - 0 - 0 - 0 - 1 - 0 - 0 - - m_sdbSizer - protected - - - - - - + + + + + + C++ + 1 + source_name + 0 + 0 + res + UTF-8 + connect + dialog_global_edit_tracks_and_vias_base + 1000 + none + + 1 + dialog_global_edit_tracks_and_vias_base + + . + + 1 + 1 + 1 + 1 + UI + 0 + 0 + + 0 + wxAUI_MGR_DEFAULT + + + + 1 + 1 + impl_virtual + + + + 0 + wxID_ANY + + + DIALOG_GLOBAL_EDIT_TRACKS_AND_VIAS_BASE + + -1,-1 + wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER + DIALOG_SHIM; dialog_shim.h + Set Track and Via Properties + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + OnUpdateUI + + + bMainSizer + wxVERTICAL + none + + 5 + wxALL|wxEXPAND + 0 + + wxID_ANY + Scope + + sbScope + wxVERTICAL + 1 + none + + + 5 + wxEXPAND + 0 + + 2 + wxBOTH + 0,1 + + 0 + + fgSizer1 + wxFLEX_GROWMODE_SPECIFIED + none + 0 + 0 + + 5 + wxBOTTOM|wxRIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Tracks + + 0 + + + 0 + + 1 + m_tracks + 1 + + + protected + 1 + + Resizable + 1 + + + ; forward_declare + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxBOTTOM|wxRIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Vias + + 0 + + + 0 + + 1 + m_vias + 1 + + + protected + 1 + + Resizable + 1 + + + ; forward_declare + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL|wxEXPAND + 0 + + wxID_ANY + Filters + + sbFilters + wxVERTICAL + 1 + none + + + 5 + wxEXPAND + 1 + + 3 + wxHORIZONTAL + 1,2 + + 0 + + fgSizer3 + wxFLEX_GROWMODE_SPECIFIED + none + 0 + 3 + + 5 + wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Filter items by net: + + 0 + + + 0 + + 1 + m_netFilterOpt + 1 + + + protected + 1 + + Resizable + 1 + + + ; forward_declare + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND|wxRIGHT + 1 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + NET_SELECTOR + 1 + + + 1 + + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + #include <widgets/net_selector.h> + + 0 + + + 0 + + 1 + m_netFilter + 1 + + + protected + 1 + + Resizable + + 1 + + ; forward_declare + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 100 + wxEXPAND|wxRIGHT|wxLEFT + 1 + + 0 + protected + 0 + + + + 5 + wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Filter items by net class: + + 0 + + + 0 + + 1 + m_netclassFilterOpt + 1 + + + protected + 1 + + Resizable + 1 + + + ; forward_declare + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + + 0 + + 1 + m_netclassFilter + 1 + + + protected + 1 + + Resizable + 0 + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + OnNetclassFilterSelect + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND + 1 + + 0 + protected + 0 + + + + 5 + wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Filter items by layer: + + 0 + + + 0 + + 1 + m_layerFilterOpt + 1 + + + protected + 1 + + Resizable + 1 + + + ; forward_declare + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND|wxALIGN_CENTER_VERTICAL|wxRIGHT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + + 0 + + 1 + m_layerFilter + 1 + + + protected + 1 + + Resizable + -1 + 1 + + + PCB_LAYER_BOX_SELECTOR; pcb_layer_box_selector.h; forward_declare + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + OnLayerFilterSelect + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND + 1 + + 0 + protected + 0 + + + + + + + + 5 + wxEXPAND|wxTOP|wxRIGHT|wxLEFT + 1 + + wxID_ANY + Action + + sbAction + wxVERTICAL + 1 + none + + + 5 + wxTOP|wxBOTTOM + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + ID_SPECIFIED_NET_TO_SPECIFIED_VALUES + Set to specified values: + + 0 + + + 0 + + 1 + m_setToSpecifiedValues + 1 + + + protected + 1 + + Resizable + 1 + + wxRB_GROUP + ; forward_declare + 0 + + + wxFILTER_NONE + wxDefaultValidator + + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 15 + wxEXPAND|wxBOTTOM|wxLEFT + 0 + + + bSizerTrackViaPopups + wxHORIZONTAL + none + + 5 + wxEXPAND|wxRIGHT + 4 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + + 0 + + 1 + m_trackWidthSelectBox + 1 + + + protected + 1 + + Resizable + 0 + 1 + + + ; forward_declare + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND|wxRIGHT|wxLEFT + 5 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + + 0 + + 1 + m_viaSizesSelectBox + 1 + + + protected + 1 + + Resizable + 0 + 1 + + + ; forward_declare + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 3 + wxRIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + + 0 + + 1 + m_layerBox + 1 + + + protected + 1 + + Resizable + -1 + 1 + + + PCB_LAYER_BOX_SELECTOR; pcb_layer_box_selector.h; forward_declare + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxTOP|wxBOTTOM + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + ID_SPECIFIED_NET_TO_NETCLASS_VALUES + Set to net class values: + + 0 + + + 0 + + 1 + m_setToNetclassValues + 1 + + + protected + 1 + + Resizable + 1 + + + ; forward_declare + 0 + + + wxFILTER_NONE + wxDefaultValidator + + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 15 + wxEXPAND|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + 0 + 0 + + + + 1 + wxSYS_COLOUR_BTNFACE + ,90,90,11,70,0 + wxALIGN_LEFT + + wxALIGN_CENTRE + 0 + 1 + wxALIGN_CENTRE + 0 + + wxALIGN_CENTRE + 6 + 95,95,95,95,95,95 + + 1 + 0 + Dock + 0 + Left + 0 + 0 + 0 + 0 + 0 + 1 + + 1 + + + 1 + 0 + 0 + wxID_ANY + + + + 0 + 0 + + 0 + + + 0 + + 1 + m_netclassGrid + 1 + + + protected + 1 + + Resizable + wxALIGN_CENTRE + 0 + + wxALIGN_CENTRE + + 1 + 1 + + + 0 + + + + wxBORDER_DEFAULT|wxVSCROLL + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + OnSizeNetclassGrid + + + + + 5 + wxEXPAND|wxTOP + 1 + + 0 + protected + 0 + + + + + + 5 + wxEXPAND|wxALL + 0 + + 0 + 1 + 0 + 0 + 0 + 1 + 0 + 0 + + m_sdbSizer + protected + + + + + + + + + + + + + + diff --git a/pcbnew/dialogs/dialog_global_edit_tracks_and_vias_base.h b/pcbnew/dialogs/dialog_global_edit_tracks_and_vias_base.h index 3dd37b6b5f..6daadbe145 100644 --- a/pcbnew/dialogs/dialog_global_edit_tracks_and_vias_base.h +++ b/pcbnew/dialogs/dialog_global_edit_tracks_and_vias_base.h @@ -1,11 +1,12 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Nov 23 2018) +// C++ code generated with wxFormBuilder (version Aug 2 2018) // http://www.wxformbuilder.org/ // // PLEASE DO *NOT* EDIT THIS FILE! /////////////////////////////////////////////////////////////////////////// -#pragma once +#ifndef __DIALOG_GLOBAL_EDIT_TRACKS_AND_VIAS_BASE_H__ +#define __DIALOG_GLOBAL_EDIT_TRACKS_AND_VIAS_BASE_H__ #include #include @@ -25,7 +26,6 @@ class PCB_LAYER_BOX_SELECTOR; #include #include #include -#include #include #include #include @@ -41,37 +41,38 @@ class PCB_LAYER_BOX_SELECTOR; class DIALOG_GLOBAL_EDIT_TRACKS_AND_VIAS_BASE : public DIALOG_SHIM { private: - + protected: wxCheckBox* m_tracks; wxCheckBox* m_vias; wxCheckBox* m_netFilterOpt; - NET_SELECTOR* m_netFilter; + NET_SELECTOR* m_netFilter; wxCheckBox* m_netclassFilterOpt; wxChoice* m_netclassFilter; wxCheckBox* m_layerFilterOpt; PCB_LAYER_BOX_SELECTOR* m_layerFilter; wxRadioButton* m_setToSpecifiedValues; - wxComboBox* m_trackWidthSelectBox; - wxComboBox* m_viaSizesSelectBox; + wxChoice* m_trackWidthSelectBox; + wxChoice* m_viaSizesSelectBox; PCB_LAYER_BOX_SELECTOR* m_layerBox; wxRadioButton* m_setToNetclassValues; wxGrid* m_netclassGrid; wxStdDialogButtonSizer* m_sdbSizer; wxButton* m_sdbSizerOK; wxButton* m_sdbSizerCancel; - + // Virtual event handlers, overide them in your derived class virtual void OnUpdateUI( wxUpdateUIEvent& event ) { event.Skip(); } virtual void OnNetclassFilterSelect( wxCommandEvent& event ) { event.Skip(); } virtual void OnLayerFilterSelect( wxCommandEvent& event ) { event.Skip(); } virtual void OnSizeNetclassGrid( wxSizeEvent& event ) { event.Skip(); } - - + + public: - - DIALOG_GLOBAL_EDIT_TRACKS_AND_VIAS_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Set Track and Via Properties"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); + + DIALOG_GLOBAL_EDIT_TRACKS_AND_VIAS_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Set Track and Via Properties"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); ~DIALOG_GLOBAL_EDIT_TRACKS_AND_VIAS_BASE(); - + }; +#endif //__DIALOG_GLOBAL_EDIT_TRACKS_AND_VIAS_BASE_H__ diff --git a/pcbnew/footprint_edit_frame.cpp b/pcbnew/footprint_edit_frame.cpp index 7a176088dc..7789d84b72 100644 --- a/pcbnew/footprint_edit_frame.cpp +++ b/pcbnew/footprint_edit_frame.cpp @@ -92,8 +92,8 @@ BEGIN_EVENT_TABLE( FOOTPRINT_EDIT_FRAME, PCB_BASE_FRAME ) EVT_SIZE( FOOTPRINT_EDIT_FRAME::OnSize ) - EVT_COMBOBOX( ID_ON_ZOOM_SELECT, FOOTPRINT_EDIT_FRAME::OnSelectZoom ) - EVT_COMBOBOX( ID_ON_GRID_SELECT, FOOTPRINT_EDIT_FRAME::OnSelectGrid ) + EVT_CHOICE( ID_ON_ZOOM_SELECT, FOOTPRINT_EDIT_FRAME::OnSelectZoom ) + EVT_CHOICE( ID_ON_GRID_SELECT, FOOTPRINT_EDIT_FRAME::OnSelectGrid ) EVT_TOOL( ID_MODEDIT_SAVE, FOOTPRINT_EDIT_FRAME::Process_Special_Functions ) EVT_TOOL( ID_MODEDIT_SAVE_AS, FOOTPRINT_EDIT_FRAME::Process_Special_Functions ) diff --git a/pcbnew/footprint_viewer_frame.cpp b/pcbnew/footprint_viewer_frame.cpp index 058c176119..726c9c0882 100644 --- a/pcbnew/footprint_viewer_frame.cpp +++ b/pcbnew/footprint_viewer_frame.cpp @@ -94,8 +94,8 @@ BEGIN_EVENT_TABLE( FOOTPRINT_VIEWER_FRAME, EDA_DRAW_FRAME ) EVT_TOOL( ID_MODVIEW_PREVIOUS, FOOTPRINT_VIEWER_FRAME::OnIterateFootprintList ) EVT_TOOL( ID_MODVIEW_EXPORT_TO_BOARD, FOOTPRINT_VIEWER_FRAME::ExportSelectedFootprint ) EVT_TOOL( ID_MODVIEW_SHOW_3D_VIEW, FOOTPRINT_VIEWER_FRAME::Show3D_Frame ) - EVT_COMBOBOX( ID_ON_ZOOM_SELECT, FOOTPRINT_VIEWER_FRAME::OnSelectZoom ) - EVT_COMBOBOX( ID_ON_GRID_SELECT, FOOTPRINT_VIEWER_FRAME::OnSelectGrid ) + EVT_CHOICE( ID_ON_ZOOM_SELECT, FOOTPRINT_VIEWER_FRAME::OnSelectZoom ) + EVT_CHOICE( ID_ON_GRID_SELECT, FOOTPRINT_VIEWER_FRAME::OnSelectGrid ) EVT_UPDATE_UI( ID_ON_GRID_SELECT, FOOTPRINT_VIEWER_FRAME::OnUpdateSelectGrid ) EVT_UPDATE_UI( ID_ON_ZOOM_SELECT, FOOTPRINT_VIEWER_FRAME::OnUpdateSelectZoom ) diff --git a/pcbnew/pcb_base_frame.cpp b/pcbnew/pcb_base_frame.cpp index 8726ca29ad..7e0fa417f0 100644 --- a/pcbnew/pcb_base_frame.cpp +++ b/pcbnew/pcb_base_frame.cpp @@ -1087,7 +1087,7 @@ void PCB_BASE_FRAME::SetFastGrid1() if( m_gridSelectBox ) { - wxCommandEvent cmd( wxEVT_COMBOBOX ); + wxCommandEvent cmd( wxEVT_CHOICE ); cmd.SetEventObject( this ); OnSelectGrid( cmd ); } @@ -1106,7 +1106,7 @@ void PCB_BASE_FRAME::SetFastGrid2() if( m_gridSelectBox ) { - wxCommandEvent cmd( wxEVT_COMBOBOX ); + wxCommandEvent cmd( wxEVT_CHOICE ); cmd.SetEventObject( this ); OnSelectGrid( cmd ); } @@ -1120,7 +1120,7 @@ void PCB_BASE_FRAME::SetNextGrid() if( m_gridSelectBox ) { - wxCommandEvent cmd( wxEVT_COMBOBOX ); + wxCommandEvent cmd( wxEVT_CHOICE ); cmd.SetEventObject( this ); OnSelectGrid( cmd ); } @@ -1135,7 +1135,7 @@ void PCB_BASE_FRAME::SetPrevGrid() if( m_gridSelectBox ) { - wxCommandEvent cmd( wxEVT_COMBOBOX ); + wxCommandEvent cmd( wxEVT_CHOICE ); cmd.SetEventObject( this ); OnSelectGrid( cmd ); } diff --git a/pcbnew/pcb_edit_frame.cpp b/pcbnew/pcb_edit_frame.cpp index 8bcab56ac2..24a34d68a5 100644 --- a/pcbnew/pcb_edit_frame.cpp +++ b/pcbnew/pcb_edit_frame.cpp @@ -96,8 +96,8 @@ BEGIN_EVENT_TABLE( PCB_EDIT_FRAME, PCB_BASE_FRAME ) EVT_SOCKET( ID_EDA_SOCKET_EVENT_SERV, PCB_EDIT_FRAME::OnSockRequestServer ) EVT_SOCKET( ID_EDA_SOCKET_EVENT, PCB_EDIT_FRAME::OnSockRequest ) - EVT_COMBOBOX( ID_ON_ZOOM_SELECT, PCB_EDIT_FRAME::OnSelectZoom ) - EVT_COMBOBOX( ID_ON_GRID_SELECT, PCB_EDIT_FRAME::OnSelectGrid ) + EVT_CHOICE( ID_ON_ZOOM_SELECT, PCB_EDIT_FRAME::OnSelectZoom ) + EVT_CHOICE( ID_ON_GRID_SELECT, PCB_EDIT_FRAME::OnSelectGrid ) EVT_CLOSE( PCB_EDIT_FRAME::OnCloseWindow ) EVT_SIZE( PCB_EDIT_FRAME::OnSize ) @@ -197,8 +197,8 @@ BEGIN_EVENT_TABLE( PCB_EDIT_FRAME, PCB_BASE_FRAME ) EVT_TOOL( ID_AUX_TOOLBAR_PCB_SELECT_LAYER_PAIR, PCB_EDIT_FRAME::Process_Special_Functions ) EVT_TOOL( ID_AUX_TOOLBAR_PCB_SELECT_AUTO_WIDTH, PCB_EDIT_FRAME::Tracks_and_Vias_Size_Event ) EVT_COMBOBOX( ID_TOOLBARH_PCB_SELECT_LAYER, PCB_EDIT_FRAME::Process_Special_Functions ) - EVT_COMBOBOX( ID_AUX_TOOLBAR_PCB_TRACK_WIDTH, PCB_EDIT_FRAME::Tracks_and_Vias_Size_Event ) - EVT_COMBOBOX( ID_AUX_TOOLBAR_PCB_VIA_SIZE, PCB_EDIT_FRAME::Tracks_and_Vias_Size_Event ) + EVT_CHOICE( ID_AUX_TOOLBAR_PCB_TRACK_WIDTH, PCB_EDIT_FRAME::Tracks_and_Vias_Size_Event ) + EVT_CHOICE( ID_AUX_TOOLBAR_PCB_VIA_SIZE, PCB_EDIT_FRAME::Tracks_and_Vias_Size_Event ) #if defined(KICAD_SCRIPTING) && defined(KICAD_SCRIPTING_ACTION_MENU) diff --git a/pcbnew/pcb_edit_frame.h b/pcbnew/pcb_edit_frame.h index bddff21e30..7f66c1a83a 100644 --- a/pcbnew/pcb_edit_frame.h +++ b/pcbnew/pcb_edit_frame.h @@ -262,8 +262,8 @@ protected: public: PCB_LAYER_BOX_SELECTOR* m_SelLayerBox; // a combo box to display and select active layer - wxComboBox* m_SelTrackWidthBox; // a choice box to display and select current track width - wxComboBox* m_SelViaSizeBox; // a choice box to display and select current via diameter + wxChoice* m_SelTrackWidthBox; // a choice box to display and select current track width + wxChoice* m_SelViaSizeBox; // a choice box to display and select current via diameter bool m_show_microwave_tools; bool m_show_layer_manager_tools; @@ -353,8 +353,8 @@ public: void OnUpdatePCBFromSch( wxCommandEvent& event ); void OnRunEeschema( wxCommandEvent& event ); - void UpdateTrackWidthSelectBox( wxComboBox* aTrackWidthSelectBox ); - void UpdateViaSizeSelectBox( wxComboBox* aViaSizeSelectBox ); + void UpdateTrackWidthSelectBox( wxChoice* aTrackWidthSelectBox ); + void UpdateViaSizeSelectBox( wxChoice* aViaSizeSelectBox ); void GetKicadAbout( wxCommandEvent& event ); diff --git a/pcbnew/tool_footprint_editor.cpp b/pcbnew/tool_footprint_editor.cpp index 20d547bf16..783591ece7 100644 --- a/pcbnew/tool_footprint_editor.cpp +++ b/pcbnew/tool_footprint_editor.cpp @@ -125,8 +125,9 @@ void FOOTPRINT_EDIT_FRAME::ReCreateHToolbar() // Grid selection choice box. if( m_gridSelectBox == nullptr ) - m_gridSelectBox = new wxComboBox( m_mainToolBar, ID_ON_GRID_SELECT, wxEmptyString, - wxDefaultPosition, wxDefaultSize, 0, nullptr, wxCB_READONLY ); + m_gridSelectBox = new wxChoice( m_mainToolBar, ID_ON_GRID_SELECT, + wxDefaultPosition, wxDefaultSize, 0, NULL ); + UpdateGridSelectBox(); m_mainToolBar->AddControl( m_gridSelectBox ); @@ -134,9 +135,9 @@ void FOOTPRINT_EDIT_FRAME::ReCreateHToolbar() // Zoom selection choice box. if( m_zoomSelectBox == nullptr ) - m_zoomSelectBox = new wxComboBox( m_mainToolBar, ID_ON_ZOOM_SELECT, wxEmptyString, - wxDefaultPosition, wxDefaultSize, 0, nullptr, - wxCB_READONLY ); + m_zoomSelectBox = new wxChoice( m_mainToolBar, ID_ON_ZOOM_SELECT, + wxDefaultPosition, wxDefaultSize, 0, NULL ); + updateZoomSelectBox(); m_mainToolBar->AddControl( m_zoomSelectBox ); diff --git a/pcbnew/tool_footprint_viewer.cpp b/pcbnew/tool_footprint_viewer.cpp index ad7de6a138..76053be33c 100644 --- a/pcbnew/tool_footprint_viewer.cpp +++ b/pcbnew/tool_footprint_viewer.cpp @@ -110,9 +110,9 @@ void FOOTPRINT_VIEWER_FRAME::ReCreateHToolbar() // Grid selection choice box. if( m_gridSelectBox == nullptr ) - m_gridSelectBox = new wxComboBox( m_mainToolBar, ID_ON_GRID_SELECT, wxEmptyString, - wxDefaultPosition, wxDefaultSize, 0, nullptr, - wxCB_READONLY ); + m_gridSelectBox = new wxChoice( m_mainToolBar, ID_ON_GRID_SELECT, + wxDefaultPosition, wxDefaultSize, 0, NULL ); + UpdateGridSelectBox(); m_mainToolBar->AddControl( m_gridSelectBox ); @@ -120,9 +120,9 @@ void FOOTPRINT_VIEWER_FRAME::ReCreateHToolbar() // Zoom selection choice box. if( m_zoomSelectBox == nullptr ) - m_zoomSelectBox = new wxComboBox( m_mainToolBar, ID_ON_ZOOM_SELECT, wxEmptyString, - wxDefaultPosition, wxDefaultSize, 0, nullptr, - wxCB_READONLY ); + m_zoomSelectBox = new wxChoice( m_mainToolBar, ID_ON_ZOOM_SELECT, + wxDefaultPosition, wxDefaultSize, 0, NULL ); + updateZoomSelectBox(); m_mainToolBar->AddControl( m_zoomSelectBox ); diff --git a/pcbnew/tool_pcb_editor.cpp b/pcbnew/tool_pcb_editor.cpp index 838616dc99..40bd48072a 100644 --- a/pcbnew/tool_pcb_editor.cpp +++ b/pcbnew/tool_pcb_editor.cpp @@ -598,18 +598,21 @@ void PCB_EDIT_FRAME::ReCreateAuxiliaryToolbar() // Creates box to display and choose tracks widths: if( m_SelTrackWidthBox == nullptr ) - m_SelTrackWidthBox = new wxComboBox( m_auxiliaryToolBar, - ID_AUX_TOOLBAR_PCB_TRACK_WIDTH, wxEmptyString, - wxDefaultPosition, wxDefaultSize, 0, nullptr, wxCB_READONLY ); + m_SelTrackWidthBox = new wxChoice( m_auxiliaryToolBar, + ID_AUX_TOOLBAR_PCB_TRACK_WIDTH, + wxDefaultPosition, wxDefaultSize, + 0, NULL ); UpdateTrackWidthSelectBox( m_SelTrackWidthBox ); m_auxiliaryToolBar->AddControl( m_SelTrackWidthBox ); // Creates box to display and choose vias diameters: + if( m_SelViaSizeBox == nullptr ) - m_SelViaSizeBox = new wxComboBox( m_auxiliaryToolBar, - ID_AUX_TOOLBAR_PCB_VIA_SIZE, wxEmptyString, - wxDefaultPosition, wxDefaultSize, 0, nullptr, wxCB_READONLY ); + m_SelViaSizeBox = new wxChoice( m_auxiliaryToolBar, + ID_AUX_TOOLBAR_PCB_VIA_SIZE, + wxDefaultPosition, wxDefaultSize, + 0, NULL ); UpdateViaSizeSelectBox( m_SelViaSizeBox ); m_auxiliaryToolBar->AddControl( m_SelViaSizeBox ); @@ -627,8 +630,10 @@ void PCB_EDIT_FRAME::ReCreateAuxiliaryToolbar() KiScaledSeparator( m_auxiliaryToolBar, this ); if( m_gridSelectBox == nullptr ) - m_gridSelectBox = new wxComboBox( m_auxiliaryToolBar, ID_ON_GRID_SELECT, wxEmptyString, - wxDefaultPosition, wxDefaultSize, 0, nullptr, wxCB_READONLY ); + m_gridSelectBox = new wxChoice( m_auxiliaryToolBar, + ID_ON_GRID_SELECT, + wxDefaultPosition, wxDefaultSize, + 0, NULL ); UpdateGridSelectBox(); @@ -638,9 +643,10 @@ void PCB_EDIT_FRAME::ReCreateAuxiliaryToolbar() KiScaledSeparator( m_auxiliaryToolBar, this ); if( m_zoomSelectBox == nullptr ) - m_zoomSelectBox = new wxComboBox( m_auxiliaryToolBar, - ID_ON_ZOOM_SELECT, wxEmptyString, - wxDefaultPosition, wxDefaultSize, 0, nullptr, wxCB_READONLY ); + m_zoomSelectBox = new wxChoice( m_auxiliaryToolBar, + ID_ON_ZOOM_SELECT, + wxDefaultPosition, wxDefaultSize, + 0, NULL ); updateZoomSelectBox(); m_auxiliaryToolBar->AddControl( m_zoomSelectBox ); @@ -650,7 +656,7 @@ void PCB_EDIT_FRAME::ReCreateAuxiliaryToolbar() } -void PCB_EDIT_FRAME::UpdateTrackWidthSelectBox( wxComboBox* aTrackWidthSelectBox ) +void PCB_EDIT_FRAME::UpdateTrackWidthSelectBox( wxChoice* aTrackWidthSelectBox ) { if( aTrackWidthSelectBox == NULL ) return; @@ -691,7 +697,7 @@ void PCB_EDIT_FRAME::UpdateTrackWidthSelectBox( wxComboBox* aTrackWidthSelectBox } -void PCB_EDIT_FRAME::UpdateViaSizeSelectBox( wxComboBox* aViaSizeSelectBox ) +void PCB_EDIT_FRAME::UpdateViaSizeSelectBox( wxChoice* aViaSizeSelectBox ) { if( aViaSizeSelectBox == NULL ) return;