diff --git a/pcbnew/dialogs/dialog_copper_zones.cpp b/pcbnew/dialogs/dialog_copper_zones.cpp index 06483cfcd6..6daacdb21b 100644 --- a/pcbnew/dialogs/dialog_copper_zones.cpp +++ b/pcbnew/dialogs/dialog_copper_zones.cpp @@ -85,7 +85,6 @@ private: void OnButtonOkClick( wxCommandEvent& event ); void OnButtonCancelClick( wxCommandEvent& event ); void OnClose( wxCloseEvent& event ); - void OnSize( wxSizeEvent& event ); void OnCornerSmoothingModeChoice( wxCommandEvent& event ); /** @@ -132,9 +131,6 @@ ZONE_EDIT_T InvokeCopperZonesEditor( PCB_BASE_FRAME* aCaller, ZONE_SETTINGS* aSe DIALOG_COPPER_ZONE dlg( aCaller, aSettings ); ZONE_EDIT_T result = ZONE_EDIT_T( dlg.ShowModal() ); - - // D(printf( "%s: result:%d\n", __FUNCTION__, result );) - return result; } @@ -161,6 +157,7 @@ DIALOG_COPPER_ZONE::DIALOG_COPPER_ZONE( PCB_BASE_FRAME* aParent, ZONE_SETTINGS* initDialog(); GetSizer()->SetSizeHints( this ); + Center(); } @@ -246,17 +243,16 @@ void DIALOG_COPPER_ZONE::initDialog() m_settings.m_ArcToSegmentsCount == ARC_APPROX_SEGMENTS_COUNT_HIGHT_DEF ? 1 : 0 ); // Create one column in m_LayerSelectionCtrl - wxListItem col0; - col0.SetId( 0 ); - m_LayerSelectionCtrl->InsertColumn( 0, col0 ); + wxListItem column0; + column0.SetId( 0 ); + m_LayerSelectionCtrl->InsertColumn( 0, column0 ); // Build copper layer list and append to layer widget int layerCount = board->GetCopperLayerCount(); - int layerNumber, itemIndex; wxImageList* imageList = new wxImageList( LAYER_BITMAP_SIZE_X, LAYER_BITMAP_SIZE_Y ); m_LayerSelectionCtrl->AssignImageList( imageList, wxIMAGE_LIST_SMALL ); for( int ii = 0; ii < layerCount; ii++ ) { - layerNumber = LAYER_N_BACK; + int layerNumber = LAYER_N_BACK; if( layerCount <= 1 || ii < layerCount - 1 ) layerNumber = ii; @@ -268,12 +264,14 @@ void DIALOG_COPPER_ZONE::initDialog() msg = board->GetLayerName( layerNumber ).Trim(); EDA_COLOR_T layerColor = board->GetLayerColor( layerNumber ); imageList->Add( makeLayerBitmap( layerColor ) ); - itemIndex = m_LayerSelectionCtrl->InsertItem( 0, msg, ii ); + int itemIndex = m_LayerSelectionCtrl->InsertItem( 0, msg, ii ); if( m_settings.m_CurrentZone_Layer == layerNumber ) m_LayerSelectionCtrl->Select( itemIndex ); } + m_LayerSelectionCtrl->SetColumnWidth( 0, wxLIST_AUTOSIZE); + wxString netNameDoNotShowFilter = wxT( "N-*" ); if( m_Config ) { @@ -323,16 +321,6 @@ void DIALOG_COPPER_ZONE::OnClose( wxCloseEvent& event ) } -void DIALOG_COPPER_ZONE::OnSize( wxSizeEvent& event ) -{ - Layout(); - - // Set layer list column width to widget width minus a few pixels - m_LayerSelectionCtrl->SetColumnWidth( 0, m_LayerSelectionCtrl->GetSize().x - 5 ); - event.Skip(); -} - - bool DIALOG_COPPER_ZONE::AcceptOptions( bool aPromptForErrors, bool aUseExportableSetupOnly ) { switch( m_PadInZoneOpt->GetSelection() ) diff --git a/pcbnew/dialogs/dialog_copper_zones_base.cpp b/pcbnew/dialogs/dialog_copper_zones_base.cpp index 02e794730b..61f25c8603 100644 --- a/pcbnew/dialogs/dialog_copper_zones_base.cpp +++ b/pcbnew/dialogs/dialog_copper_zones_base.cpp @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Apr 10 2012) +// C++ code generated with wxFormBuilder (version Oct 8 2012) // http://www.wxformbuilder.org/ // // PLEASE DO "NOT" EDIT THIS FILE! @@ -11,7 +11,6 @@ BEGIN_EVENT_TABLE( DIALOG_COPPER_ZONE_BASE, DIALOG_SHIM ) EVT_CLOSE( DIALOG_COPPER_ZONE_BASE::_wxFB_OnClose ) - EVT_SIZE( DIALOG_COPPER_ZONE_BASE::_wxFB_OnSize ) EVT_CHOICE( ID_M_NETDISPLAYOPTION, DIALOG_COPPER_ZONE_BASE::_wxFB_OnNetSortingOptionSelected ) EVT_TEXT_ENTER( ID_TEXTCTRL_NETNAMES_FILTER, DIALOG_COPPER_ZONE_BASE::_wxFB_OnRunFiltersButtonClick ) EVT_TEXT_ENTER( ID_TEXTCTRL_NETNAMES_FILTER, DIALOG_COPPER_ZONE_BASE::_wxFB_OnRunFiltersButtonClick ) @@ -39,24 +38,24 @@ DIALOG_COPPER_ZONE_BASE::DIALOG_COPPER_ZONE_BASE( wxWindow* parent, wxWindowID i m_staticText17->Wrap( -1 ); m_layerSizer->Add( m_staticText17, 0, wxTOP|wxRIGHT, 5 ); - m_LayerSelectionCtrl = new wxListView( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_NO_HEADER|wxLC_REPORT|wxLC_SINGLE_SEL ); - m_layerSizer->Add( m_LayerSelectionCtrl, 1, wxEXPAND|wxRIGHT, 5 ); + m_LayerSelectionCtrl = new wxListView( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_ALIGN_LEFT|wxLC_NO_HEADER|wxLC_REPORT|wxLC_SINGLE_SEL ); + m_layerSizer->Add( m_LayerSelectionCtrl, 1, wxRIGHT, 5 ); - m_OptionsBoxSizer->Add( m_layerSizer, 1, wxEXPAND, 5 ); + m_OptionsBoxSizer->Add( m_layerSizer, 0, wxEXPAND, 5 ); - wxBoxSizer* bSizer7; - bSizer7 = new wxBoxSizer( wxVERTICAL ); + wxBoxSizer* bSizerNets; + bSizerNets = new wxBoxSizer( wxVERTICAL ); m_staticText2 = new wxStaticText( this, wxID_ANY, _("Net:"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticText2->Wrap( -1 ); - bSizer7->Add( m_staticText2, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); + bSizerNets->Add( m_staticText2, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); m_ListNetNameSelection = new wxListBox( this, ID_NETNAME_SELECTION, wxDefaultPosition, wxDefaultSize, 0, NULL, 0 ); - bSizer7->Add( m_ListNetNameSelection, 1, wxEXPAND, 5 ); + bSizerNets->Add( m_ListNetNameSelection, 1, wxEXPAND, 5 ); - m_OptionsBoxSizer->Add( bSizer7, 1, wxEXPAND, 5 ); + m_OptionsBoxSizer->Add( bSizerNets, 1, wxEXPAND, 5 ); wxStaticBoxSizer* m_NetSortOptSizer; m_NetSortOptSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Net Filtering") ), wxVERTICAL ); @@ -76,6 +75,7 @@ DIALOG_COPPER_ZONE_BASE::DIALOG_COPPER_ZONE_BASE( wxWindow* parent, wxWindowID i m_NetSortOptSizer->Add( m_staticText5, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); m_DoNotShowNetNameFilter = new wxTextCtrl( this, ID_TEXTCTRL_NETNAMES_FILTER, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_PROCESS_ENTER ); + m_DoNotShowNetNameFilter->SetMaxLength( 0 ); m_DoNotShowNetNameFilter->SetToolTip( _("Pattern to filter net names in filtered list.\nNet names matching this pattern are not displayed.") ); m_NetSortOptSizer->Add( m_DoNotShowNetNameFilter, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); @@ -85,6 +85,7 @@ DIALOG_COPPER_ZONE_BASE::DIALOG_COPPER_ZONE_BASE( wxWindow* parent, wxWindowID i m_NetSortOptSizer->Add( m_staticText51, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); m_ShowNetNameFilter = new wxTextCtrl( this, ID_TEXTCTRL_NETNAMES_FILTER, _("*"), wxDefaultPosition, wxDefaultSize, wxTE_PROCESS_ENTER ); + m_ShowNetNameFilter->SetMaxLength( 0 ); m_ShowNetNameFilter->SetToolTip( _("Pattern to filter net names in filtered list.\nOnly net names matching this pattern are displayed.") ); m_NetSortOptSizer->Add( m_ShowNetNameFilter, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 ); @@ -109,6 +110,7 @@ DIALOG_COPPER_ZONE_BASE::DIALOG_COPPER_ZONE_BASE( wxWindow* parent, wxWindowID i bSizerSettings->Add( m_ClearanceValueTitle, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); m_ZoneClearanceCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + m_ZoneClearanceCtrl->SetMaxLength( 0 ); bSizerSettings->Add( m_ZoneClearanceCtrl, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); m_MinThicknessValueTitle = new wxStaticText( this, wxID_ANY, _("Minimum width"), wxDefaultPosition, wxDefaultSize, 0 ); @@ -118,6 +120,7 @@ DIALOG_COPPER_ZONE_BASE::DIALOG_COPPER_ZONE_BASE( wxWindow* parent, wxWindowID i bSizerSettings->Add( m_MinThicknessValueTitle, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); m_ZoneMinThicknessCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + m_ZoneMinThicknessCtrl->SetMaxLength( 0 ); bSizerSettings->Add( m_ZoneMinThicknessCtrl, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); m_staticText151 = new wxStaticText( this, wxID_ANY, _("Corner smoothing:"), wxDefaultPosition, wxDefaultSize, 0 ); @@ -135,6 +138,7 @@ DIALOG_COPPER_ZONE_BASE::DIALOG_COPPER_ZONE_BASE( wxWindow* parent, wxWindowID i bSizerSettings->Add( m_cornerSmoothingTitle, 0, wxRIGHT|wxLEFT, 5 ); m_cornerSmoothingCtrl = new wxTextCtrl( this, ID_M_CORNERSMOOTHINGCTRL, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + m_cornerSmoothingCtrl->SetMaxLength( 0 ); bSizerSettings->Add( m_cornerSmoothingCtrl, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 ); @@ -161,6 +165,7 @@ DIALOG_COPPER_ZONE_BASE::DIALOG_COPPER_ZONE_BASE( wxWindow* parent, wxWindowID i m_ThermalShapesParamsSizer->Add( m_AntipadSizeText, 0, wxTOP|wxRIGHT, 5 ); m_AntipadSizeValue = new wxTextCtrl( this, wxID_ANTIPAD_SIZE, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + m_AntipadSizeValue->SetMaxLength( 0 ); m_AntipadSizeValue->SetToolTip( _("Clearance between pads in the same net and filled areas.") ); m_ThermalShapesParamsSizer->Add( m_AntipadSizeValue, 0, wxEXPAND|wxBOTTOM, 5 ); @@ -170,6 +175,7 @@ DIALOG_COPPER_ZONE_BASE::DIALOG_COPPER_ZONE_BASE( wxWindow* parent, wxWindowID i m_ThermalShapesParamsSizer->Add( m_CopperBridgeWidthText, 0, wxTOP|wxRIGHT, 5 ); m_CopperWidthValue = new wxTextCtrl( this, wxID_COPPER_BRIDGE_VALUE, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + m_CopperWidthValue->SetMaxLength( 0 ); m_CopperWidthValue->SetToolTip( _("Width of copper in thermal reliefs.") ); m_ThermalShapesParamsSizer->Add( m_CopperWidthValue, 0, wxEXPAND|wxBOTTOM, 5 ); diff --git a/pcbnew/dialogs/dialog_copper_zones_base.fbp b/pcbnew/dialogs/dialog_copper_zones_base.fbp index 82fa8cbe9d..b057c062c7 100644 --- a/pcbnew/dialogs/dialog_copper_zones_base.fbp +++ b/pcbnew/dialogs/dialog_copper_zones_base.fbp @@ -42,7 +42,7 @@ DIALOG_COPPER_ZONE_BASE - 567,500 + 567,443 wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER DIALOG_SHIM; dialog_shim.h Copper Zone Properties @@ -84,7 +84,7 @@ - OnSize + @@ -103,7 +103,7 @@ 5 wxEXPAND - 1 + 0 m_layerSizer @@ -194,7 +194,7 @@ 5 - wxEXPAND|wxRIGHT + wxRIGHT 1 1 @@ -241,7 +241,7 @@ Resizable 1 - wxLC_NO_HEADER|wxLC_REPORT|wxLC_SINGLE_SEL + wxLC_ALIGN_LEFT|wxLC_NO_HEADER|wxLC_REPORT|wxLC_SINGLE_SEL wxListView; 0 @@ -305,7 +305,7 @@ 1 - bSizer7 + bSizerNets wxVERTICAL none diff --git a/pcbnew/dialogs/dialog_copper_zones_base.h b/pcbnew/dialogs/dialog_copper_zones_base.h index 904802b9cb..eaea076b58 100644 --- a/pcbnew/dialogs/dialog_copper_zones_base.h +++ b/pcbnew/dialogs/dialog_copper_zones_base.h @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Apr 10 2012) +// C++ code generated with wxFormBuilder (version Oct 8 2012) // http://www.wxformbuilder.org/ // // PLEASE DO "NOT" EDIT THIS FILE! @@ -11,6 +11,9 @@ #include #include #include +class DIALOG_SHIM; +class wxListView; + #include "dialog_shim.h" #include #include @@ -40,7 +43,6 @@ class DIALOG_COPPER_ZONE_BASE : public DIALOG_SHIM // Private event handlers void _wxFB_OnClose( wxCloseEvent& event ){ OnClose( event ); } - void _wxFB_OnSize( wxSizeEvent& event ){ OnSize( event ); } void _wxFB_OnNetSortingOptionSelected( wxCommandEvent& event ){ OnNetSortingOptionSelected( event ); } void _wxFB_OnRunFiltersButtonClick( wxCommandEvent& event ){ OnRunFiltersButtonClick( event ); } void _wxFB_OnCornerSmoothingModeChoice( wxCommandEvent& event ){ OnCornerSmoothingModeChoice( event ); } @@ -114,7 +116,6 @@ class DIALOG_COPPER_ZONE_BASE : public DIALOG_SHIM // Virtual event handlers, overide them in your derived class virtual void OnClose( wxCloseEvent& event ) { event.Skip(); } - virtual void OnSize( wxSizeEvent& event ) { event.Skip(); } virtual void OnNetSortingOptionSelected( wxCommandEvent& event ) { event.Skip(); } virtual void OnRunFiltersButtonClick( wxCommandEvent& event ) { event.Skip(); } virtual void OnCornerSmoothingModeChoice( wxCommandEvent& event ) { event.Skip(); } @@ -126,7 +127,7 @@ class DIALOG_COPPER_ZONE_BASE : public DIALOG_SHIM public: - DIALOG_COPPER_ZONE_BASE( wxWindow* parent, wxWindowID id = ID_DIALOG_COPPER_ZONE_BASE, const wxString& title = _("Copper Zone Properties"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 567,500 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); + DIALOG_COPPER_ZONE_BASE( wxWindow* parent, wxWindowID id = ID_DIALOG_COPPER_ZONE_BASE, const wxString& title = _("Copper Zone Properties"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 567,443 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); ~DIALOG_COPPER_ZONE_BASE(); }; diff --git a/pcbnew/dialogs/dialog_keepout_area_properties.cpp b/pcbnew/dialogs/dialog_keepout_area_properties.cpp index ea400d9ca1..98c587d5bd 100644 --- a/pcbnew/dialogs/dialog_keepout_area_properties.cpp +++ b/pcbnew/dialogs/dialog_keepout_area_properties.cpp @@ -5,9 +5,9 @@ /* * This program source code file is part of KiCad, a free EDA CAD application. * - * Copyright (C) 2012 Jean-Pierre Charras, jean-pierre.charras@ujf-grenoble.fr - * Copyright (C) 2012 SoftPLC Corporation, Dick Hollenbeck - * Copyright (C) 1992-2012 KiCad Developers, see AUTHORS.txt for contributors. + * Copyright (C) 2013 Jean-Pierre Charras, jean-pierre.charras@ujf-grenoble.fr + * Copyright (C) 2013 SoftPLC Corporation, Dick Hollenbeck + * Copyright (C) 1992-2013 KiCad Developers, see AUTHORS.txt for contributors. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -55,12 +55,12 @@ public: DIALOG_KEEPOUT_AREA_PROPERTIES( PCB_BASE_FRAME* aParent, ZONE_SETTINGS* aSettings ); private: - PCB_BASE_FRAME* m_Parent; - wxConfig* m_Config; ///< Current config + PCB_BASE_FRAME* m_parent; + wxConfig* m_config; ///< Current config ZONE_SETTINGS m_zonesettings; ZONE_SETTINGS* m_ptr; - std::vector m_LayerId; ///< Handle the real layer number from layer + std::vector m_layerId; ///< Handle the real layer number from layer ///< name position in m_LayerSelectionCtrl /** @@ -71,7 +71,6 @@ private: void OnOkClick( wxCommandEvent& event ); void OnCancelClick( wxCommandEvent& event ); - void OnSize( wxSizeEvent& event ); /** * Function AcceptOptionsForKeepOut @@ -105,8 +104,8 @@ ZONE_EDIT_T InvokeKeepoutAreaEditor( PCB_BASE_FRAME* aCaller, ZONE_SETTINGS* aSe DIALOG_KEEPOUT_AREA_PROPERTIES::DIALOG_KEEPOUT_AREA_PROPERTIES( PCB_BASE_FRAME* aParent, ZONE_SETTINGS* aSettings ) : DIALOG_KEEPOUT_AREA_PROPERTIES_BASE( aParent ) { - m_Parent = aParent; - m_Config = wxGetApp().GetSettings(); + m_parent = aParent; + m_config = wxGetApp().GetSettings(); m_ptr = aSettings; m_zonesettings = *aSettings; @@ -116,12 +115,13 @@ DIALOG_KEEPOUT_AREA_PROPERTIES::DIALOG_KEEPOUT_AREA_PROPERTIES( PCB_BASE_FRAME* initDialog(); GetSizer()->SetSizeHints( this ); + Center(); } void DIALOG_KEEPOUT_AREA_PROPERTIES::initDialog() { - BOARD* board = m_Parent->GetBoard(); + BOARD* board = m_parent->GetBoard(); wxString msg; @@ -144,35 +144,35 @@ void DIALOG_KEEPOUT_AREA_PROPERTIES::initDialog() } // Create one column in m_LayerSelectionCtrl - wxListItem col0; - col0.SetId( 0 ); - m_LayerSelectionCtrl->InsertColumn( 0, col0 ); + wxListItem column0; + column0.SetId( 0 ); + m_LayerSelectionCtrl->InsertColumn( 0, column0 ); // Build copper layer list and append to layer widget int layerCount = board->GetCopperLayerCount(); - int layerNumber, itemIndex; - EDA_COLOR_T layerColor; wxImageList* imageList = new wxImageList( LAYER_BITMAP_SIZE_X, LAYER_BITMAP_SIZE_Y ); m_LayerSelectionCtrl->AssignImageList( imageList, wxIMAGE_LIST_SMALL ); for( int ii = 0; ii < layerCount; ii++ ) { - layerNumber = LAYER_N_BACK; + int layerNumber = LAYER_N_BACK; if( layerCount <= 1 || ii < layerCount - 1 ) layerNumber = ii; else if( ii == layerCount - 1 ) layerNumber = LAYER_N_FRONT; - m_LayerId.insert( m_LayerId.begin(), layerNumber ); + m_layerId.insert( m_layerId.begin(), layerNumber ); msg = board->GetLayerName( layerNumber ); - layerColor = board->GetLayerColor( layerNumber ); + EDA_COLOR_T layerColor = board->GetLayerColor( layerNumber ); imageList->Add( makeLayerBitmap( layerColor ) ); - itemIndex = m_LayerSelectionCtrl->InsertItem( 0, msg, ii ); + int itemIndex = m_LayerSelectionCtrl->InsertItem( 0, msg, ii ); if( m_zonesettings.m_CurrentZone_Layer == layerNumber ) m_LayerSelectionCtrl->Select( itemIndex ); } + m_LayerSelectionCtrl->SetColumnWidth( 0, wxLIST_AUTOSIZE); + // Init keepout parameters: m_cbTracksCtrl->SetValue( m_zonesettings.GetDoNotAllowTracks() ); m_cbViasCtrl->SetValue( m_zonesettings.GetDoNotAllowVias() ); @@ -193,16 +193,6 @@ void DIALOG_KEEPOUT_AREA_PROPERTIES::OnOkClick( wxCommandEvent& event ) } } - -void DIALOG_KEEPOUT_AREA_PROPERTIES::OnSize( wxSizeEvent& event ) -{ - Layout(); - - // Set layer list column width to widget width minus a few pixels - m_LayerSelectionCtrl->SetColumnWidth( 0, m_LayerSelectionCtrl->GetSize().x - 5 ); - event.Skip(); -} - bool DIALOG_KEEPOUT_AREA_PROPERTIES::AcceptOptionsForKeepOut() { // Init keepout parameters: @@ -230,7 +220,7 @@ bool DIALOG_KEEPOUT_AREA_PROPERTIES::AcceptOptionsForKeepOut() return false; } - m_zonesettings.m_CurrentZone_Layer = m_LayerId[ii]; + m_zonesettings.m_CurrentZone_Layer = m_layerId[ii]; switch( m_OutlineAppearanceCtrl->GetSelection() ) { case 0: @@ -246,9 +236,9 @@ bool DIALOG_KEEPOUT_AREA_PROPERTIES::AcceptOptionsForKeepOut() break; } - if( m_Config ) + if( m_config ) { - m_Config->Write( ZONE_NET_OUTLINES_HATCH_OPTION_KEY, + m_config->Write( ZONE_NET_OUTLINES_HATCH_OPTION_KEY, (long) m_zonesettings.m_Zone_HatchingStyle ); } diff --git a/pcbnew/dialogs/dialog_keepout_area_properties_base.cpp b/pcbnew/dialogs/dialog_keepout_area_properties_base.cpp index 507de0d24e..cb675e7e5a 100644 --- a/pcbnew/dialogs/dialog_keepout_area_properties_base.cpp +++ b/pcbnew/dialogs/dialog_keepout_area_properties_base.cpp @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Apr 10 2012) +// C++ code generated with wxFormBuilder (version Oct 8 2012) // http://www.wxformbuilder.org/ // // PLEASE DO "NOT" EDIT THIS FILE! @@ -27,12 +27,12 @@ DIALOG_KEEPOUT_AREA_PROPERTIES_BASE::DIALOG_KEEPOUT_AREA_PROPERTIES_BASE( wxWind wxBoxSizer* m_layersListSizer; m_layersListSizer = new wxBoxSizer( wxVERTICAL ); - m_staticTextLayerSelection = new wxStaticText( this, wxID_ANY, _("Layer selection:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextLayerSelection = new wxStaticText( this, wxID_ANY, _("Layer:"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticTextLayerSelection->Wrap( -1 ); m_layersListSizer->Add( m_staticTextLayerSelection, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); - m_LayerSelectionCtrl = new wxListView( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_ALIGN_LEFT|wxLC_ICON|wxLC_NO_HEADER|wxLC_REPORT|wxLC_SINGLE_SEL|wxLC_SMALL_ICON ); - m_layersListSizer->Add( m_LayerSelectionCtrl, 1, wxALL|wxEXPAND, 5 ); + m_LayerSelectionCtrl = new wxListView( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_ALIGN_LEFT|wxLC_NO_HEADER|wxLC_REPORT|wxLC_SINGLE_SEL ); + m_layersListSizer->Add( m_LayerSelectionCtrl, 1, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 ); m_UpperSizer->Add( m_layersListSizer, 1, wxEXPAND, 5 ); @@ -40,23 +40,21 @@ DIALOG_KEEPOUT_AREA_PROPERTIES_BASE::DIALOG_KEEPOUT_AREA_PROPERTIES_BASE( wxWind wxBoxSizer* bSizerRight; bSizerRight = new wxBoxSizer( wxVERTICAL ); - wxStaticBoxSizer* m_OutilinesBoxOpt; - m_OutilinesBoxOpt = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Outlines Options:") ), wxVERTICAL ); + m_staticTextprops = new wxStaticText( this, wxID_ANY, _("Properties:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextprops->Wrap( -1 ); + bSizerRight->Add( m_staticTextprops, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); wxString m_OrientEdgesOptChoices[] = { _("Any"), _("H, V and 45 deg") }; int m_OrientEdgesOptNChoices = sizeof( m_OrientEdgesOptChoices ) / sizeof( wxString ); m_OrientEdgesOpt = new wxRadioBox( this, wxID_ANY, _("Zone Edges Orient"), wxDefaultPosition, wxDefaultSize, m_OrientEdgesOptNChoices, m_OrientEdgesOptChoices, 1, wxRA_SPECIFY_COLS ); m_OrientEdgesOpt->SetSelection( 0 ); - m_OutilinesBoxOpt->Add( m_OrientEdgesOpt, 0, wxALL|wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); + bSizerRight->Add( m_OrientEdgesOpt, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); wxString m_OutlineAppearanceCtrlChoices[] = { _("Line"), _("Hatched Outline"), _("Full Hatched") }; int m_OutlineAppearanceCtrlNChoices = sizeof( m_OutlineAppearanceCtrlChoices ) / sizeof( wxString ); m_OutlineAppearanceCtrl = new wxRadioBox( this, wxID_ANY, _("Outlines Appearence"), wxDefaultPosition, wxDefaultSize, m_OutlineAppearanceCtrlNChoices, m_OutlineAppearanceCtrlChoices, 1, wxRA_SPECIFY_COLS ); m_OutlineAppearanceCtrl->SetSelection( 1 ); - m_OutilinesBoxOpt->Add( m_OutlineAppearanceCtrl, 0, wxALL|wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); - - - bSizerRight->Add( m_OutilinesBoxOpt, 0, wxEXPAND|wxALL, 5 ); + bSizerRight->Add( m_OutlineAppearanceCtrl, 0, wxALL|wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); wxStaticBoxSizer* sbSizerCutoutOpts; sbSizerCutoutOpts = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Keepout Options:") ), wxVERTICAL ); @@ -89,7 +87,7 @@ DIALOG_KEEPOUT_AREA_PROPERTIES_BASE::DIALOG_KEEPOUT_AREA_PROPERTIES_BASE( wxWind m_sdbSizerButtons->AddButton( m_sdbSizerButtonsCancel ); m_sdbSizerButtons->Realize(); - m_MainSizer->Add( m_sdbSizerButtons, 0, wxEXPAND, 5 ); + m_MainSizer->Add( m_sdbSizerButtons, 0, wxEXPAND|wxALL, 5 ); this->SetSizer( m_MainSizer ); diff --git a/pcbnew/dialogs/dialog_keepout_area_properties_base.fbp b/pcbnew/dialogs/dialog_keepout_area_properties_base.fbp index d3b2aa9699..1a9e39e6b2 100644 --- a/pcbnew/dialogs/dialog_keepout_area_properties_base.fbp +++ b/pcbnew/dialogs/dialog_keepout_area_properties_base.fbp @@ -22,7 +22,7 @@ 1 1 1 - 1 + 0 0 0 @@ -42,7 +42,7 @@ DIALOG_KEEPOUT_AREA_PROPERTIES_BASE - 308,355 + 358,338 wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER DIALOG_SHIM; dialog_shim.h Keepout Area Properties @@ -141,7 +141,7 @@ 0 0 wxID_ANY - Layer selection: + Layer: 0 @@ -194,7 +194,7 @@ 5 - wxALL|wxEXPAND + wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND 1 1 @@ -241,7 +241,7 @@ Resizable 1 - wxLC_ALIGN_LEFT|wxLC_ICON|wxLC_NO_HEADER|wxLC_REPORT|wxLC_SINGLE_SEL|wxLC_SMALL_ICON + wxLC_ALIGN_LEFT|wxLC_NO_HEADER|wxLC_REPORT|wxLC_SINGLE_SEL wxListView; 0 @@ -310,196 +310,265 @@ none 5 - wxEXPAND|wxALL + wxTOP|wxRIGHT|wxLEFT 0 - + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 wxID_ANY - Outlines Options: + Properties: + + 0 + + + 0 - m_OutilinesBoxOpt - wxVERTICAL - none + 1 + m_staticTextprops + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALIGN_CENTER_VERTICAL|wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + "Any" "H, V and 45 deg" + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Zone Edges Orient + 1 + + 0 + + + 0 + + 1 + m_OrientEdgesOpt + 1 + + + protected + 1 + + Resizable + 0 + 1 + + wxRA_SPECIFY_COLS + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL|wxALIGN_CENTER_VERTICAL|wxEXPAND + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + "Line" "Hatched Outline" "Full Hatched" + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Outlines Appearence + 1 + + 0 + + + 0 + + 1 + m_OutlineAppearanceCtrl + 1 + + + protected + 1 + + Resizable + 1 + 1 + + wxRA_SPECIFY_COLS + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + - - 5 - wxALL|wxALIGN_CENTER_VERTICAL|wxEXPAND - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - "Any" "H, V and 45 deg" - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Zone Edges Orient - 1 - - 0 - - - 0 - - 1 - m_OrientEdgesOpt - 1 - - - protected - 1 - - Resizable - 0 - 1 - - wxRA_SPECIFY_COLS - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxALL|wxALIGN_CENTER_VERTICAL|wxEXPAND - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - "Line" "Hatched Outline" "Full Hatched" - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Outlines Appearence - 1 - - 0 - - - 0 - - 1 - m_OutlineAppearanceCtrl - 1 - - - protected - 1 - - Resizable - 1 - 1 - - wxRA_SPECIFY_COLS - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -867,7 +936,7 @@ 5 - wxEXPAND + wxEXPAND|wxALL 0 0 diff --git a/pcbnew/dialogs/dialog_keepout_area_properties_base.h b/pcbnew/dialogs/dialog_keepout_area_properties_base.h index bd16619914..3522585a68 100644 --- a/pcbnew/dialogs/dialog_keepout_area_properties_base.h +++ b/pcbnew/dialogs/dialog_keepout_area_properties_base.h @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Apr 10 2012) +// C++ code generated with wxFormBuilder (version Oct 8 2012) // http://www.wxformbuilder.org/ // // PLEASE DO "NOT" EDIT THIS FILE! @@ -11,6 +11,9 @@ #include #include #include +class DIALOG_SHIM; +class wxListView; + #include "dialog_shim.h" #include #include @@ -21,14 +24,15 @@ #include #include #include -#include #include +#include #include #include #include /////////////////////////////////////////////////////////////////////////// + /////////////////////////////////////////////////////////////////////////////// /// Class DIALOG_KEEPOUT_AREA_PROPERTIES_BASE /////////////////////////////////////////////////////////////////////////////// @@ -45,6 +49,7 @@ class DIALOG_KEEPOUT_AREA_PROPERTIES_BASE : public DIALOG_SHIM protected: wxStaticText* m_staticTextLayerSelection; wxListView* m_LayerSelectionCtrl; + wxStaticText* m_staticTextprops; wxRadioBox* m_OrientEdgesOpt; wxRadioBox* m_OutlineAppearanceCtrl; wxCheckBox* m_cbTracksCtrl; @@ -62,7 +67,7 @@ class DIALOG_KEEPOUT_AREA_PROPERTIES_BASE : public DIALOG_SHIM public: - DIALOG_KEEPOUT_AREA_PROPERTIES_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Keepout Area Properties"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 308,355 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER|wxFULL_REPAINT_ON_RESIZE|wxSUNKEN_BORDER ); + DIALOG_KEEPOUT_AREA_PROPERTIES_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Keepout Area Properties"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 358,338 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER|wxFULL_REPAINT_ON_RESIZE|wxSUNKEN_BORDER ); ~DIALOG_KEEPOUT_AREA_PROPERTIES_BASE(); };