UNIT_BINDERize zone dialogs.
Also includes a bunch of changes to simplifiy the terminology and unify the copper, non-copper and keepout versions. Also removes some legacy features: Removes contol for fill method. If the fill method is currently segments the dialog will ask if you want to convert to polygons on OK. Removes control of boundary resolution. We've done this with trig since 5.0. (cherry picked from commit 487aaeb)
This commit is contained in:
parent
06bf958bf1
commit
92dcf43ae8
|
@ -1,13 +1,9 @@
|
|||
/**
|
||||
* @file dialog_copper_zones.cpp
|
||||
*/
|
||||
|
||||
/*
|
||||
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||
*
|
||||
* Copyright (C) 2017 Jean-Pierre Charras, jean-pierre.charras@ujf-grenoble.fr
|
||||
* Copyright (C) 2012 SoftPLC Corporation, Dick Hollenbeck <dick@softplc.com>
|
||||
* Copyright (C) 1992-2017 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
* Copyright (C) 1992-2018 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
|
||||
|
@ -27,31 +23,19 @@
|
|||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
#include <wx/wx.h>
|
||||
#include <fctsys.h>
|
||||
#include <kiface_i.h>
|
||||
#include <confirm.h>
|
||||
#include <PolyLine.h>
|
||||
#include <pcbnew.h>
|
||||
#include <pcb_edit_frame.h>
|
||||
#include <zones.h>
|
||||
#include <base_units.h>
|
||||
#include <widgets/text_ctrl_eval.h>
|
||||
#include <bitmaps.h>
|
||||
#include <widgets/color_swatch.h>
|
||||
|
||||
#include <widgets/unit_binder.h>
|
||||
#include <class_zone.h>
|
||||
#include <class_board.h>
|
||||
|
||||
#include <dialog_copper_zones_base.h>
|
||||
|
||||
#include <wx/imaglist.h> // needed for wx/listctrl.h, in wxGTK 2.8.12
|
||||
#include <wx/listctrl.h>
|
||||
#include <layers_id_colors_and_visibility.h>
|
||||
|
||||
/**
|
||||
* Class DIALOG_COPPER_ZONE
|
||||
* is the derived class from dialog_copper_zone_frame created by wxFormBuilder
|
||||
*/
|
||||
class DIALOG_COPPER_ZONE : public DIALOG_COPPER_ZONE_BASE
|
||||
{
|
||||
public:
|
||||
|
@ -59,97 +43,77 @@ public:
|
|||
|
||||
private:
|
||||
PCB_BASE_FRAME* m_Parent;
|
||||
wxConfigBase* m_Config; ///< Current config
|
||||
wxConfigBase* m_Config; // Current config
|
||||
|
||||
ZONE_EDIT_T m_OnExitCode; ///< exit code: ZONE_ABORT if no change,
|
||||
///< ZONE_OK if new values accepted
|
||||
///< ZONE_EXPORT_VALUES if values are exported to others zones
|
||||
bool m_settingsExported; // settings were written to all other zones
|
||||
|
||||
ZONE_SETTINGS m_settings;
|
||||
ZONE_SETTINGS* m_ptr;
|
||||
|
||||
bool m_NetSortingByPadCount; ///< false = alphabetic sort.
|
||||
///< true = pad count sort.
|
||||
|
||||
bool m_NetSortingByPadCount;
|
||||
long m_NetFiltering;
|
||||
static wxString m_netNameShowFilter; // the filter to show nets (default * "*").
|
||||
// static to keep this pattern for an entire Pcbnew session
|
||||
UNIT_BINDER m_cornerRadius;
|
||||
UNIT_BINDER m_clearance;
|
||||
UNIT_BINDER m_minWidth;
|
||||
UNIT_BINDER m_antipadClearance ;
|
||||
UNIT_BINDER m_spokeWidth;
|
||||
|
||||
std::vector<PCB_LAYER_ID> m_LayerId; ///< Handle the real layer number from layer
|
||||
///< name position in m_LayerSelectionCtrl
|
||||
|
||||
static wxString m_netNameShowFilter; ///< the filter to show nets (default * "*").
|
||||
///< static to keep this pattern for an entire Pcbnew session
|
||||
|
||||
/**
|
||||
* Function initDialog
|
||||
* fills in the dialog controls using the current settings.
|
||||
*/
|
||||
void initDialog();
|
||||
|
||||
void OnButtonOkClick( wxCommandEvent& event ) override;
|
||||
void OnButtonCancelClick( wxCommandEvent& event ) override;
|
||||
void OnClose( wxCloseEvent& event ) override;
|
||||
void OnCornerSmoothingModeChoice( wxCommandEvent& event ) override;
|
||||
void OnUpdateUI( wxUpdateUIEvent& ) override;
|
||||
bool TransferDataToWindow() override;
|
||||
bool TransferDataFromWindow() override;
|
||||
|
||||
/**
|
||||
* Function AcceptOptions
|
||||
* @param aPromptForErrors is true to prompt user on incorrect params.
|
||||
* @param aUseExportableSetupOnly is true to use exportable parameters only (used to export this setup to other zones).
|
||||
* @return bool - false if incorrect options, true if ok.
|
||||
*/
|
||||
bool AcceptOptions( bool aPromptForErrors, bool aUseExportableSetupOnly = false );
|
||||
bool AcceptOptions( bool aUseExportableSetupOnly = false );
|
||||
|
||||
void OnLayerSelection( wxDataViewEvent& event ) override;
|
||||
void OnNetSortingOptionSelected( wxCommandEvent& event ) override;
|
||||
void ExportSetupToOtherCopperZones( wxCommandEvent& event ) override;
|
||||
void OnPadsInZoneClick( wxCommandEvent& event ) override;
|
||||
void OnRunFiltersButtonClick( wxCommandEvent& event ) override;
|
||||
void OnUpdateUI( wxUpdateUIEvent& ) override;
|
||||
void OnButtonCancelClick( wxCommandEvent& event ) override;
|
||||
void OnClose( wxCloseEvent& event ) override;
|
||||
|
||||
void buildAvailableListOfNets();
|
||||
|
||||
/**
|
||||
* Function initListNetsParams
|
||||
* initializes m_NetSortingByPadCount and m_NetFiltering values
|
||||
* according to m_NetDisplayOption selection.
|
||||
*/
|
||||
void initListNetsParams();
|
||||
};
|
||||
|
||||
|
||||
const static wxSize LAYER_BITMAP_SIZE( 20, 14 );
|
||||
|
||||
// Initialize static member variables
|
||||
wxString DIALOG_COPPER_ZONE::m_netNameShowFilter( wxT( "*" ) );
|
||||
|
||||
|
||||
ZONE_EDIT_T InvokeCopperZonesEditor( PCB_BASE_FRAME* aCaller, ZONE_SETTINGS* aSettings )
|
||||
int InvokeCopperZonesEditor( PCB_BASE_FRAME* aCaller, ZONE_SETTINGS* aSettings )
|
||||
{
|
||||
DIALOG_COPPER_ZONE dlg( aCaller, aSettings );
|
||||
|
||||
ZONE_EDIT_T result = ZONE_EDIT_T( dlg.ShowModal() );
|
||||
return result;
|
||||
return dlg.ShowModal();
|
||||
}
|
||||
|
||||
|
||||
DIALOG_COPPER_ZONE::DIALOG_COPPER_ZONE( PCB_BASE_FRAME* aParent, ZONE_SETTINGS* aSettings ) :
|
||||
DIALOG_COPPER_ZONE_BASE( aParent )
|
||||
DIALOG_COPPER_ZONE_BASE( aParent ),
|
||||
m_cornerRadius( aParent, m_cornerRadiusLabel, m_cornerRadiusCtrl, m_cornerRadiusUnits, true, 0 ),
|
||||
m_clearance( aParent, m_clearanceLabel, m_clearanceCtrl, m_clearanceUnits, true, 0, ZONE_CLEARANCE_MAX_VALUE_MIL*IU_PER_MILS ),
|
||||
m_minWidth( aParent, m_minWidthLabel, m_minWidthCtrl, m_minWidthUnits, true, ZONE_THICKNESS_MIN_VALUE_MIL*IU_PER_MILS ),
|
||||
m_antipadClearance( aParent, m_antipadLabel, m_antipadCtrl, m_antipadUnits, true, 0 ),
|
||||
m_spokeWidth( aParent, m_spokeWidthLabel, m_spokeWidthCtrl, m_spokeWidthUnits, true, 0 )
|
||||
{
|
||||
m_Parent = aParent;
|
||||
m_Config = Kiface().KifaceSettings();
|
||||
m_bitmapNoNetWarning->SetBitmap( KiBitmap( dialog_warning_xpm ) );
|
||||
|
||||
m_ptr = aSettings;
|
||||
m_settings = *aSettings;
|
||||
m_settings.SetupLayersList( m_layers, m_Parent, true );
|
||||
|
||||
m_settingsExported = false;
|
||||
|
||||
m_NetFiltering = false;
|
||||
m_NetSortingByPadCount = true; // false = alphabetic sort, true = pad count sort
|
||||
m_OnExitCode = ZONE_ABORT;
|
||||
|
||||
SetReturnCode( ZONE_ABORT ); // Will be changed on buttons click
|
||||
|
||||
// Fix static text widget minimum width to a suitable value so that
|
||||
// resizing the dialog is not necessary when changing the corner smoothing type.
|
||||
// Depends on the default text in the widget.
|
||||
m_cornerSmoothingValue->SetMinSize( m_cornerSmoothingValue->GetSize() );
|
||||
|
||||
initDialog();
|
||||
|
||||
m_sdbSizerOK->SetDefault();
|
||||
|
||||
|
@ -157,294 +121,165 @@ DIALOG_COPPER_ZONE::DIALOG_COPPER_ZONE( PCB_BASE_FRAME* aParent, ZONE_SETTINGS*
|
|||
}
|
||||
|
||||
|
||||
void DIALOG_COPPER_ZONE::initDialog()
|
||||
bool DIALOG_COPPER_ZONE::TransferDataToWindow()
|
||||
{
|
||||
BOARD* board = m_Parent->GetBoard();
|
||||
|
||||
m_bitmapNoNetWarning->SetBitmap( KiBitmap( dialog_warning_xpm ) );
|
||||
|
||||
wxString msg;
|
||||
|
||||
if( m_settings.m_Zone_45_Only )
|
||||
m_OrientEdgesOpt->SetSelection( 1 );
|
||||
|
||||
m_FillModeCtrl->SetSelection( m_settings.m_FillMode == ZFM_SEGMENTS ? 1 : 0 );
|
||||
|
||||
AddUnitSymbol( *m_ClearanceValueTitle, g_UserUnit );
|
||||
msg = StringFromValue( g_UserUnit, m_settings.m_ZoneClearance );
|
||||
m_ZoneClearanceCtrl->SetValue( msg );
|
||||
|
||||
AddUnitSymbol( *m_MinThicknessValueTitle, g_UserUnit );
|
||||
msg = StringFromValue( g_UserUnit, m_settings.m_ZoneMinThickness );
|
||||
m_ZoneMinThicknessCtrl->SetValue( msg );
|
||||
|
||||
switch( m_settings.GetPadConnection() )
|
||||
{
|
||||
case PAD_ZONE_CONN_THT_THERMAL: // Thermals only for THT pads
|
||||
m_PadInZoneOpt->SetSelection( 2 );
|
||||
break;
|
||||
|
||||
case PAD_ZONE_CONN_NONE: // Pads are not covered
|
||||
m_PadInZoneOpt->SetSelection( 3 );
|
||||
break;
|
||||
|
||||
default:
|
||||
case PAD_ZONE_CONN_THERMAL: // Use thermal relief for pads
|
||||
m_PadInZoneOpt->SetSelection( 1 );
|
||||
break;
|
||||
|
||||
case PAD_ZONE_CONN_FULL: // pads are covered by copper
|
||||
m_PadInZoneOpt->SetSelection( 0 );
|
||||
break;
|
||||
}
|
||||
|
||||
m_PriorityLevelCtrl->SetValue( m_settings.m_ZonePriority );
|
||||
|
||||
AddUnitSymbol( *m_AntipadSizeText, g_UserUnit );
|
||||
AddUnitSymbol( *m_CopperBridgeWidthText, g_UserUnit );
|
||||
PutValueInLocalUnits( *m_AntipadSizeValue, m_settings.m_ThermalReliefGap );
|
||||
PutValueInLocalUnits( *m_CopperWidthValue, m_settings.m_ThermalReliefCopperBridge );
|
||||
|
||||
m_constrainOutline->SetValue( m_settings.m_Zone_45_Only );
|
||||
m_cornerSmoothingChoice->SetSelection( m_settings.GetCornerSmoothingType() );
|
||||
|
||||
PutValueInLocalUnits( *m_cornerSmoothingCtrl, m_settings.GetCornerRadius() );
|
||||
m_cornerRadius.SetValue( m_settings.GetCornerRadius() );
|
||||
m_PriorityLevelCtrl->SetValue( m_settings.m_ZonePriority );
|
||||
|
||||
switch( m_settings.m_Zone_HatchingStyle )
|
||||
{
|
||||
case ZONE_CONTAINER::NO_HATCH:
|
||||
m_OutlineAppearanceCtrl->SetSelection( 0 );
|
||||
break;
|
||||
|
||||
case ZONE_CONTAINER::DIAGONAL_EDGE:
|
||||
m_OutlineAppearanceCtrl->SetSelection( 1 );
|
||||
break;
|
||||
|
||||
case ZONE_CONTAINER::DIAGONAL_FULL:
|
||||
m_OutlineAppearanceCtrl->SetSelection( 2 );
|
||||
break;
|
||||
case ZONE_CONTAINER::NO_HATCH: m_OutlineAppearanceCtrl->SetSelection( 0 ); break;
|
||||
case ZONE_CONTAINER::DIAGONAL_EDGE: m_OutlineAppearanceCtrl->SetSelection( 1 ); break;
|
||||
case ZONE_CONTAINER::DIAGONAL_FULL: m_OutlineAppearanceCtrl->SetSelection( 2 ); break;
|
||||
}
|
||||
|
||||
m_ArcApproximationOpt->SetSelection(
|
||||
m_settings.m_ArcToSegmentsCount == ARC_APPROX_SEGMENTS_COUNT_HIGHT_DEF ? 1 : 0 );
|
||||
m_clearance.SetValue( m_settings.m_ZoneClearance );
|
||||
m_minWidth.SetValue( m_settings.m_ZoneMinThickness );
|
||||
|
||||
// Create one column in m_LayerSelectionCtrl
|
||||
wxListItem column0;
|
||||
column0.SetId( 0 );
|
||||
m_LayerSelectionCtrl->InsertColumn( 0, column0 );
|
||||
|
||||
wxImageList* imageList = new wxImageList( LAYER_BITMAP_SIZE.x, LAYER_BITMAP_SIZE.y );
|
||||
m_LayerSelectionCtrl->AssignImageList( imageList, wxIMAGE_LIST_SMALL );
|
||||
|
||||
int ctrlWidth = 0; // Min width for m_LayerSelectionCtrl to show the layers names
|
||||
int imgIdx = 0;
|
||||
|
||||
LSET cu_set = LSET::AllCuMask( board->GetCopperLayerCount() );
|
||||
|
||||
COLOR4D backgroundColor = m_Parent->Settings().Colors().GetLayerColor( LAYER_PCB_BACKGROUND );
|
||||
for( LSEQ cu_stack = cu_set.UIOrder(); cu_stack; ++cu_stack, imgIdx++ )
|
||||
switch( m_settings.GetPadConnection() )
|
||||
{
|
||||
PCB_LAYER_ID layer = *cu_stack;
|
||||
|
||||
m_LayerId.push_back( layer );
|
||||
|
||||
msg = board->GetLayerName( layer );
|
||||
msg.Trim();
|
||||
wxSize tsize( GetTextSize( msg, m_LayerSelectionCtrl ) );
|
||||
ctrlWidth = std::max( ctrlWidth, tsize.x );
|
||||
|
||||
COLOR4D layerColor = m_Parent->Settings().Colors().GetLayerColor( layer );
|
||||
imageList->Add( COLOR_SWATCH::MakeBitmap( layerColor, backgroundColor, LAYER_BITMAP_SIZE ) );
|
||||
|
||||
int itemIndex = m_LayerSelectionCtrl->GetItemCount();
|
||||
m_LayerSelectionCtrl->InsertItem( itemIndex, msg, imgIdx );
|
||||
|
||||
if( m_settings.m_CurrentZone_Layer == layer )
|
||||
m_LayerSelectionCtrl->Select( itemIndex );
|
||||
default:
|
||||
case PAD_ZONE_CONN_THERMAL: m_PadInZoneOpt->SetSelection( 1 ); break;
|
||||
case PAD_ZONE_CONN_THT_THERMAL: m_PadInZoneOpt->SetSelection( 2 ); break;
|
||||
case PAD_ZONE_CONN_NONE: m_PadInZoneOpt->SetSelection( 3 ); break;
|
||||
case PAD_ZONE_CONN_FULL: m_PadInZoneOpt->SetSelection( 0 ); break;
|
||||
}
|
||||
|
||||
// The most easy way to ensure the right size is to use wxLIST_AUTOSIZE
|
||||
// unfortunately this option does not work well both on
|
||||
// wxWidgets 2.8 ( column width too small), and
|
||||
// wxWidgets 2.9 ( column width too large)
|
||||
ctrlWidth += LAYER_BITMAP_SIZE.x + 25; // Add bitmap width + margin before text
|
||||
m_LayerSelectionCtrl->SetColumnWidth( 0, ctrlWidth );
|
||||
|
||||
ctrlWidth += 25; // Add margin after text + width for scroll bar
|
||||
m_LayerSelectionCtrl->SetMinSize( wxSize( ctrlWidth, -1 ) );
|
||||
// Do not enable/disable antipad clearance and spoke width. They might be needed if
|
||||
// a module or pad overrides the zone to specify a thermal connection.
|
||||
m_antipadClearance.SetValue( m_settings.m_ThermalReliefGap );
|
||||
m_spokeWidth.SetValue( m_settings.m_ThermalReliefCopperBridge );
|
||||
|
||||
wxString netNameDoNotShowFilter = wxT( "Net-*" );
|
||||
m_NetFiltering = false;
|
||||
m_NetSortingByPadCount = true;
|
||||
|
||||
if( m_Config )
|
||||
{
|
||||
int opt = m_Config->Read( ZONE_NET_SORT_OPTION_KEY, 1l );
|
||||
m_NetDisplayOption->SetSelection( opt );
|
||||
m_NetFiltering = opt >= 2;
|
||||
m_NetSortingByPadCount = opt % 2;
|
||||
m_Config->Read( ZONE_NET_FILTER_STRING_KEY, netNameDoNotShowFilter );
|
||||
}
|
||||
else
|
||||
m_NetDisplayOption->SetSelection( 1 );
|
||||
|
||||
m_ShowNetNameFilter->SetValue( m_netNameShowFilter );
|
||||
initListNetsParams();
|
||||
m_DoNotShowNetNameFilter->SetValue( netNameDoNotShowFilter );
|
||||
m_showAllNetsOpt->SetValue( !m_NetFiltering );
|
||||
m_sortByPadsOpt->SetValue( m_NetSortingByPadCount );
|
||||
|
||||
// Build list of nets:
|
||||
m_DoNotShowNetNameFilter->SetValue( netNameDoNotShowFilter );
|
||||
buildAvailableListOfNets();
|
||||
|
||||
wxCommandEvent event;
|
||||
OnCornerSmoothingModeChoice( event );
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
void DIALOG_COPPER_ZONE::OnUpdateUI( wxUpdateUIEvent& )
|
||||
{
|
||||
if( m_ListNetNameSelection->GetSelection() < 0 )
|
||||
m_ListNetNameSelection->SetSelection( 0 );
|
||||
|
||||
m_bNoNetWarning->Show( m_ListNetNameSelection->GetSelection() == 0 );
|
||||
|
||||
if( m_cornerSmoothingChoice->GetSelection() == ZONE_SETTINGS::SMOOTHING_CHAMFER )
|
||||
m_cornerRadiusLabel->SetLabel( _( "Chamfer distance:" ) );
|
||||
else
|
||||
m_cornerRadiusLabel->SetLabel( _( "Fillet radius:" ) );
|
||||
}
|
||||
|
||||
|
||||
void DIALOG_COPPER_ZONE::OnButtonCancelClick( wxCommandEvent& event )
|
||||
{
|
||||
// After an "Export Settings to Other Zones" cancel and close must return
|
||||
// ZONE_EXPORT_VALUES instead of wxID_CANCEL.
|
||||
Close( true );
|
||||
}
|
||||
|
||||
void DIALOG_COPPER_ZONE::OnButtonOkClick( wxCommandEvent& event )
|
||||
|
||||
bool DIALOG_COPPER_ZONE::TransferDataFromWindow()
|
||||
{
|
||||
m_netNameShowFilter = m_ShowNetNameFilter->GetValue();
|
||||
|
||||
if( AcceptOptions( true ) )
|
||||
{
|
||||
*m_ptr = m_settings;
|
||||
EndModal( ZONE_OK );
|
||||
}
|
||||
if( !AcceptOptions() )
|
||||
return false;
|
||||
|
||||
*m_ptr = m_settings;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
// called on system close button
|
||||
void DIALOG_COPPER_ZONE::OnClose( wxCloseEvent& event )
|
||||
{
|
||||
if( m_OnExitCode != ZONE_ABORT )
|
||||
*m_ptr = m_settings;
|
||||
|
||||
EndModal( m_OnExitCode );
|
||||
EndModal( m_settingsExported ? ZONE_EXPORT_VALUES : wxID_CANCEL );
|
||||
}
|
||||
|
||||
|
||||
bool DIALOG_COPPER_ZONE::AcceptOptions( bool aPromptForErrors, bool aUseExportableSetupOnly )
|
||||
bool DIALOG_COPPER_ZONE::AcceptOptions( bool aUseExportableSetupOnly )
|
||||
{
|
||||
if( m_settings.m_FillMode == ZFM_SEGMENTS )
|
||||
{
|
||||
KIDIALOG dlg( this, _( "The legacy segment fill mode is not recommended."
|
||||
"Convert zone to polygon fill? "), _( "Legacy Warning" ),
|
||||
wxYES_NO | wxICON_WARNING );
|
||||
dlg.DoNotShowCheckbox();
|
||||
|
||||
if( dlg.ShowModal() == wxYES )
|
||||
m_settings.m_FillMode = ZFM_POLYGONS;
|
||||
}
|
||||
|
||||
switch( m_PadInZoneOpt->GetSelection() )
|
||||
{
|
||||
case 3:
|
||||
// Pads are not covered
|
||||
m_settings.SetPadConnection( PAD_ZONE_CONN_NONE );
|
||||
break;
|
||||
|
||||
case 2:
|
||||
// Use thermal relief for THT pads
|
||||
m_settings.SetPadConnection( PAD_ZONE_CONN_THT_THERMAL );
|
||||
break;
|
||||
|
||||
case 1:
|
||||
// Use thermal relief for pads
|
||||
m_settings.SetPadConnection( PAD_ZONE_CONN_THERMAL );
|
||||
break;
|
||||
|
||||
case 0:
|
||||
// pads are covered by copper
|
||||
m_settings.SetPadConnection( PAD_ZONE_CONN_FULL );
|
||||
break;
|
||||
case 3: m_settings.SetPadConnection( PAD_ZONE_CONN_NONE ); break;
|
||||
case 2: m_settings.SetPadConnection( PAD_ZONE_CONN_THT_THERMAL ); break;
|
||||
case 1: m_settings.SetPadConnection( PAD_ZONE_CONN_THERMAL ); break;
|
||||
case 0: m_settings.SetPadConnection( PAD_ZONE_CONN_FULL ); break;
|
||||
}
|
||||
|
||||
switch( m_OutlineAppearanceCtrl->GetSelection() )
|
||||
{
|
||||
case 0:
|
||||
m_settings.m_Zone_HatchingStyle = ZONE_CONTAINER::NO_HATCH;
|
||||
break;
|
||||
|
||||
case 1:
|
||||
m_settings.m_Zone_HatchingStyle = ZONE_CONTAINER::DIAGONAL_EDGE;
|
||||
break;
|
||||
|
||||
case 2:
|
||||
m_settings.m_Zone_HatchingStyle = ZONE_CONTAINER::DIAGONAL_FULL;
|
||||
break;
|
||||
case 0: m_settings.m_Zone_HatchingStyle = ZONE_CONTAINER::NO_HATCH; break;
|
||||
case 1: m_settings.m_Zone_HatchingStyle = ZONE_CONTAINER::DIAGONAL_EDGE; break;
|
||||
case 2: m_settings.m_Zone_HatchingStyle = ZONE_CONTAINER::DIAGONAL_FULL; break;
|
||||
}
|
||||
|
||||
m_settings.m_ArcToSegmentsCount = m_ArcApproximationOpt->GetSelection() == 1 ?
|
||||
ARC_APPROX_SEGMENTS_COUNT_HIGHT_DEF :
|
||||
ARC_APPROX_SEGMENTS_COUNT_LOW_DEF;
|
||||
|
||||
if( m_Config )
|
||||
{
|
||||
m_Config->Write( ZONE_NET_OUTLINES_HATCH_OPTION_KEY,
|
||||
(long) m_settings.m_Zone_HatchingStyle );
|
||||
m_Config->Write( ZONE_NET_OUTLINES_STYLE_KEY, (long) m_settings.m_Zone_HatchingStyle );
|
||||
wxString filter = m_DoNotShowNetNameFilter->GetValue();
|
||||
m_Config->Write( ZONE_NET_FILTER_STRING_KEY, filter );
|
||||
}
|
||||
|
||||
m_netNameShowFilter = m_ShowNetNameFilter->GetValue();
|
||||
m_settings.m_FillMode = (m_FillModeCtrl->GetSelection() == 0) ? ZFM_POLYGONS : ZFM_SEGMENTS;
|
||||
|
||||
wxString txtvalue = m_ZoneClearanceCtrl->GetValue();
|
||||
m_settings.m_ZoneClearance = ValueFromString( g_UserUnit, txtvalue );
|
||||
|
||||
// Test if this is a reasonable value for this parameter
|
||||
// A too large value can hang Pcbnew
|
||||
#define CLEARANCE_MAX_VALUE ZONE_CLEARANCE_MAX_VALUE_MIL*IU_PER_MILS
|
||||
|
||||
if( m_settings.m_ZoneClearance > CLEARANCE_MAX_VALUE )
|
||||
{
|
||||
wxString msg;
|
||||
msg.Printf( _( "Clearance must be smaller than %f\" / %f mm." ),
|
||||
ZONE_CLEARANCE_MAX_VALUE_MIL / 1000.0, ZONE_CLEARANCE_MAX_VALUE_MIL * 0.0254 );
|
||||
DisplayError( this, msg );
|
||||
if( !m_clearance.Validate( true ) )
|
||||
return false;
|
||||
}
|
||||
m_settings.m_ZoneClearance = m_clearance.GetValue();
|
||||
|
||||
txtvalue = m_ZoneMinThicknessCtrl->GetValue();
|
||||
m_settings.m_ZoneMinThickness = ValueFromString( g_UserUnit, txtvalue );
|
||||
|
||||
if( m_settings.m_ZoneMinThickness < (ZONE_THICKNESS_MIN_VALUE_MIL*IU_PER_MILS) )
|
||||
{
|
||||
wxString msg;
|
||||
msg.Printf( _( "Minimum width must be larger than %f\" / %f mm." ),
|
||||
ZONE_THICKNESS_MIN_VALUE_MIL / 1000.0, ZONE_THICKNESS_MIN_VALUE_MIL * 0.0254 );
|
||||
DisplayError( this, msg );
|
||||
if( !m_minWidth.Validate( true ) )
|
||||
return false;
|
||||
}
|
||||
m_settings.m_ZoneMinThickness = m_minWidth.GetValue();
|
||||
|
||||
m_settings.SetCornerSmoothingType( m_cornerSmoothingChoice->GetSelection() );
|
||||
txtvalue = m_cornerSmoothingCtrl->GetValue();
|
||||
m_settings.SetCornerRadius( ValueFromString( g_UserUnit, txtvalue ) );
|
||||
m_settings.SetCornerRadius( m_cornerRadius.GetValue() );
|
||||
|
||||
m_settings.m_ZonePriority = m_PriorityLevelCtrl->GetValue();
|
||||
|
||||
if( m_OrientEdgesOpt->GetSelection() == 0 )
|
||||
m_settings.m_Zone_45_Only = false;
|
||||
else
|
||||
m_settings.m_Zone_45_Only = true;
|
||||
m_settings.m_Zone_45_Only = m_constrainOutline->GetValue();
|
||||
|
||||
m_settings.m_ThermalReliefGap = ValueFromTextCtrl( *m_AntipadSizeValue );
|
||||
m_settings.m_ThermalReliefCopperBridge = ValueFromTextCtrl( *m_CopperWidthValue );
|
||||
m_settings.m_ThermalReliefGap = m_antipadClearance.GetValue();
|
||||
m_settings.m_ThermalReliefCopperBridge = m_spokeWidth.GetValue();
|
||||
|
||||
if( m_Config )
|
||||
{
|
||||
ConfigBaseWriteDouble( m_Config, ZONE_CLEARANCE_WIDTH_STRING_KEY,
|
||||
(double) m_settings.m_ZoneClearance / IU_PER_MILS );
|
||||
|
||||
ConfigBaseWriteDouble( m_Config, ZONE_MIN_THICKNESS_WIDTH_STRING_KEY,
|
||||
(double) m_settings.m_ZoneMinThickness / IU_PER_MILS );
|
||||
|
||||
(double) m_settings.m_ZoneMinThickness / IU_PER_MILS );
|
||||
ConfigBaseWriteDouble( m_Config, ZONE_THERMAL_RELIEF_GAP_STRING_KEY,
|
||||
(double) m_settings.m_ThermalReliefGap / IU_PER_MILS );
|
||||
|
||||
(double) m_settings.m_ThermalReliefGap / IU_PER_MILS );
|
||||
ConfigBaseWriteDouble( m_Config, ZONE_THERMAL_RELIEF_COPPER_WIDTH_STRING_KEY,
|
||||
(double) m_settings.m_ThermalReliefCopperBridge / IU_PER_MILS );
|
||||
}
|
||||
|
||||
if( ( m_settings.GetPadConnection() == PAD_ZONE_CONN_THT_THERMAL
|
||||
|| m_settings.GetPadConnection() == PAD_ZONE_CONN_THERMAL )
|
||||
&& m_settings.m_ThermalReliefCopperBridge <= m_settings.m_ZoneMinThickness )
|
||||
{
|
||||
DisplayError( this,
|
||||
_( "Thermal relief spoke must be greater than the minimum width." ) );
|
||||
return false;
|
||||
(double) m_settings.m_ThermalReliefCopperBridge / IU_PER_MILS );
|
||||
}
|
||||
|
||||
// If we use only exportable to others zones parameters, exit here:
|
||||
|
@ -452,78 +287,73 @@ bool DIALOG_COPPER_ZONE::AcceptOptions( bool aPromptForErrors, bool aUseExportab
|
|||
return true;
|
||||
|
||||
// Get the layer selection for this zone
|
||||
int ii = m_LayerSelectionCtrl->GetFirstSelected();
|
||||
int layer = -1;
|
||||
for( int ii = 0; ii < m_layers->GetItemCount(); ++ii )
|
||||
{
|
||||
if( m_layers->GetToggleValue( (unsigned) ii, 0 ) )
|
||||
{
|
||||
layer = ii;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if( ii < 0 && aPromptForErrors )
|
||||
if( layer < 0 )
|
||||
{
|
||||
DisplayError( this, _( "No layer selected." ) );
|
||||
return false;
|
||||
}
|
||||
|
||||
m_settings.m_CurrentZone_Layer = ToLAYER_ID( m_LayerId[ii] );
|
||||
|
||||
// Get the net name selection for this zone
|
||||
ii = m_ListNetNameSelection->GetSelection();
|
||||
|
||||
if( ii < 0 && aPromptForErrors )
|
||||
{
|
||||
DisplayError( this, _( "No net selected." ) );
|
||||
return false;
|
||||
}
|
||||
|
||||
wxString net_name = m_ListNetNameSelection->GetString( ii );
|
||||
|
||||
m_settings.m_NetcodeSelection = 0;
|
||||
NETINFO_ITEM* net = nullptr;
|
||||
|
||||
// Search net_code for this net, if a net was selected
|
||||
if( m_ListNetNameSelection->GetSelection() > 0 )
|
||||
{
|
||||
NETINFO_ITEM* net = m_Parent->GetBoard()->FindNet( net_name );
|
||||
net = m_Parent->GetBoard()->FindNet( m_ListNetNameSelection->GetStringSelection() );
|
||||
|
||||
if( net )
|
||||
m_settings.m_NetcodeSelection = net->GetNet();
|
||||
}
|
||||
m_settings.m_NetcodeSelection = net ? net->GetNet() : 0;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
void DIALOG_COPPER_ZONE::OnCornerSmoothingModeChoice( wxCommandEvent& event )
|
||||
void DIALOG_COPPER_ZONE::OnLayerSelection( wxDataViewEvent& event )
|
||||
{
|
||||
int selection = m_cornerSmoothingChoice->GetSelection();
|
||||
if( event.GetColumn() != 0 )
|
||||
return;
|
||||
|
||||
switch( selection )
|
||||
int row = m_layers->ItemToRow( event.GetItem() );
|
||||
|
||||
if( m_layers->GetToggleValue( row, 0 ) )
|
||||
{
|
||||
case ZONE_SETTINGS::SMOOTHING_NONE:
|
||||
m_cornerSmoothingValue->Enable( false );
|
||||
m_cornerSmoothingCtrl->Enable( false );
|
||||
break;
|
||||
case ZONE_SETTINGS::SMOOTHING_CHAMFER:
|
||||
m_cornerSmoothingValue->Enable( true );
|
||||
m_cornerSmoothingCtrl->Enable( true );
|
||||
m_cornerSmoothingValue->SetLabel( _( "Chamfer distance" ) );
|
||||
AddUnitSymbol( *m_cornerSmoothingValue, g_UserUnit );
|
||||
break;
|
||||
case ZONE_SETTINGS::SMOOTHING_FILLET:
|
||||
m_cornerSmoothingValue->Enable( true );
|
||||
m_cornerSmoothingCtrl->Enable( true );
|
||||
m_cornerSmoothingValue->SetLabel( _( "Fillet radius" ) );
|
||||
AddUnitSymbol( *m_cornerSmoothingValue, g_UserUnit );
|
||||
break;
|
||||
wxVariant layerID;
|
||||
m_layers->GetValue( layerID, row, 2 );
|
||||
m_settings.m_CurrentZone_Layer = ToLAYER_ID( layerID.GetInteger() );
|
||||
|
||||
// Turn all other checkboxes off.
|
||||
for( int ii = 0; ii < m_layers->GetItemCount(); ++ii )
|
||||
{
|
||||
if( ii != row )
|
||||
m_layers->SetToggleValue( false, ii, 0 );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void DIALOG_COPPER_ZONE::OnNetSortingOptionSelected( wxCommandEvent& event )
|
||||
{
|
||||
initListNetsParams();
|
||||
buildAvailableListOfNets();
|
||||
|
||||
m_NetFiltering = !m_showAllNetsOpt->GetValue();
|
||||
m_NetSortingByPadCount = m_sortByPadsOpt->GetValue();
|
||||
m_netNameShowFilter = m_ShowNetNameFilter->GetValue();
|
||||
|
||||
buildAvailableListOfNets();
|
||||
|
||||
if( m_Config )
|
||||
{
|
||||
m_Config->Write( ZONE_NET_SORT_OPTION_KEY, (long) m_NetDisplayOption->GetSelection() );
|
||||
long configValue = m_NetFiltering ? 2 : 0;
|
||||
|
||||
if( m_NetSortingByPadCount )
|
||||
configValue += 1;
|
||||
|
||||
m_Config->Write( ZONE_NET_SORT_OPTION_KEY, configValue );
|
||||
wxString Filter = m_DoNotShowNetNameFilter->GetValue();
|
||||
m_Config->Write( ZONE_NET_FILTER_STRING_KEY, Filter );
|
||||
}
|
||||
|
@ -532,7 +362,7 @@ void DIALOG_COPPER_ZONE::OnNetSortingOptionSelected( wxCommandEvent& event )
|
|||
|
||||
void DIALOG_COPPER_ZONE::ExportSetupToOtherCopperZones( wxCommandEvent& event )
|
||||
{
|
||||
if( !AcceptOptions( true, true ) )
|
||||
if( !AcceptOptions( true ) )
|
||||
return;
|
||||
|
||||
// Export settings ( but layer and netcode ) to others copper zones
|
||||
|
@ -548,61 +378,17 @@ void DIALOG_COPPER_ZONE::ExportSetupToOtherCopperZones( wxCommandEvent& event )
|
|||
continue;
|
||||
|
||||
m_settings.ExportSetting( *zone, false ); // false = partial export
|
||||
m_settingsExported = true;
|
||||
m_Parent->OnModify();
|
||||
}
|
||||
|
||||
m_OnExitCode = ZONE_EXPORT_VALUES; // values are exported to others zones
|
||||
}
|
||||
|
||||
|
||||
void DIALOG_COPPER_ZONE::OnPadsInZoneClick( wxCommandEvent& event )
|
||||
{
|
||||
// Antipad and spokes are significant only for thermals
|
||||
// However, even if thermals are disabled, these parameters must be set
|
||||
// for pads which have local settings with thermal enabled
|
||||
// Previously, wxTextCtrl widgets related to thermal settings were disabled,
|
||||
// but this is not a good idea. We leave them always enabled.
|
||||
}
|
||||
|
||||
|
||||
void DIALOG_COPPER_ZONE::initListNetsParams()
|
||||
{
|
||||
switch( m_NetDisplayOption->GetSelection() )
|
||||
{
|
||||
case 0:
|
||||
m_NetSortingByPadCount = false;
|
||||
m_NetFiltering = false;
|
||||
break;
|
||||
|
||||
case 1:
|
||||
m_NetSortingByPadCount = true;
|
||||
m_NetFiltering = false;
|
||||
break;
|
||||
|
||||
case 2:
|
||||
m_NetSortingByPadCount = false;
|
||||
m_NetFiltering = true;
|
||||
break;
|
||||
|
||||
case 3:
|
||||
m_NetSortingByPadCount = true;
|
||||
m_NetFiltering = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void DIALOG_COPPER_ZONE::OnRunFiltersButtonClick( wxCommandEvent& event )
|
||||
{
|
||||
m_netNameShowFilter = m_ShowNetNameFilter->GetValue();
|
||||
m_NetFiltering = true;
|
||||
m_showAllNetsOpt->SetValue( false );
|
||||
|
||||
// Ensure filtered option for nets
|
||||
if( m_NetDisplayOption->GetSelection() == 0 )
|
||||
m_NetDisplayOption->SetSelection( 2 );
|
||||
else if( m_NetDisplayOption->GetSelection() == 1 )
|
||||
m_NetDisplayOption->SetSelection( 3 );
|
||||
|
||||
initListNetsParams();
|
||||
buildAvailableListOfNets();
|
||||
}
|
||||
|
||||
|
@ -636,40 +422,29 @@ void DIALOG_COPPER_ZONE::buildAvailableListOfNets()
|
|||
listNetName.Insert( wxT( "<no net>" ), 0 );
|
||||
|
||||
// Ensure currently selected net for the zone is visible, regardless of filters
|
||||
int selectedNetListNdx = -1;
|
||||
int selectedNetListNdx = 0;
|
||||
int net_select = m_settings.m_NetcodeSelection;
|
||||
|
||||
if( net_select > 0 )
|
||||
{
|
||||
NETINFO_ITEM* equipot = m_Parent->GetBoard()->FindNet( net_select );
|
||||
if( equipot )
|
||||
NETINFO_ITEM* selectedNet = m_Parent->GetBoard()->FindNet( net_select );
|
||||
if( selectedNet )
|
||||
{
|
||||
selectedNetListNdx = listNetName.Index( equipot->GetNetname() );
|
||||
selectedNetListNdx = listNetName.Index( selectedNet->GetNetname() );
|
||||
|
||||
if( wxNOT_FOUND == selectedNetListNdx )
|
||||
{
|
||||
// the currently selected net must *always* be visible.
|
||||
// <no net> is the zero'th index, so pick next lowest
|
||||
listNetName.Insert( equipot->GetNetname(), 1 );
|
||||
// <no net> is the zero'th index, so pick next lowest
|
||||
listNetName.Insert( selectedNet->GetNetname(), 1 );
|
||||
selectedNetListNdx = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
else if( net_select == 0 )
|
||||
selectedNetListNdx = 0; // SetSelection() on "<no net>"
|
||||
else
|
||||
{
|
||||
// selectedNetListNdx remains -1, no net selected.
|
||||
}
|
||||
|
||||
m_ListNetNameSelection->Clear();
|
||||
m_ListNetNameSelection->InsertItems( listNetName, 0 );
|
||||
m_ListNetNameSelection->SetSelection( 0 );
|
||||
|
||||
if( selectedNetListNdx >= 0 )
|
||||
{
|
||||
m_ListNetNameSelection->SetSelection( selectedNetListNdx );
|
||||
m_ListNetNameSelection->EnsureVisible( selectedNetListNdx );
|
||||
}
|
||||
m_ListNetNameSelection->SetSelection( selectedNetListNdx );
|
||||
m_ListNetNameSelection->EnsureVisible( selectedNetListNdx );
|
||||
}
|
||||
|
||||
|
|
|
@ -1,28 +1,25 @@
|
|||
///////////////////////////////////////////////////////////////////////////
|
||||
// C++ code generated with wxFormBuilder (version Apr 19 2018)
|
||||
// C++ code generated with wxFormBuilder (version Dec 30 2017)
|
||||
// http://www.wxformbuilder.org/
|
||||
//
|
||||
// PLEASE DO *NOT* EDIT THIS FILE!
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "widgets/text_ctrl_eval.h"
|
||||
|
||||
#include "dialog_copper_zones_base.h"
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
BEGIN_EVENT_TABLE( DIALOG_COPPER_ZONE_BASE, DIALOG_SHIM )
|
||||
EVT_CLOSE( DIALOG_COPPER_ZONE_BASE::_wxFB_OnClose )
|
||||
EVT_UPDATE_UI( ID_NETNAME_SELECTION, DIALOG_COPPER_ZONE_BASE::_wxFB_OnUpdateUI )
|
||||
EVT_CHOICE( ID_M_NETDISPLAYOPTION, DIALOG_COPPER_ZONE_BASE::_wxFB_OnNetSortingOptionSelected )
|
||||
EVT_UPDATE_UI( ID_DIALOG_COPPER_ZONE_BASE, DIALOG_COPPER_ZONE_BASE::_wxFB_OnUpdateUI )
|
||||
EVT_DATAVIEW_ITEM_VALUE_CHANGED( wxID_ANY, DIALOG_COPPER_ZONE_BASE::_wxFB_OnLayerSelection )
|
||||
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 )
|
||||
EVT_BUTTON( wxID_APPLY_FILTERS, DIALOG_COPPER_ZONE_BASE::_wxFB_OnRunFiltersButtonClick )
|
||||
EVT_CHOICE( ID_CORNER_SMOOTHING, DIALOG_COPPER_ZONE_BASE::_wxFB_OnCornerSmoothingModeChoice )
|
||||
EVT_CHOICE( ID_M_PADINZONEOPT, DIALOG_COPPER_ZONE_BASE::_wxFB_OnPadsInZoneClick )
|
||||
EVT_CHECKBOX( wxID_ANY, DIALOG_COPPER_ZONE_BASE::_wxFB_OnNetSortingOptionSelected )
|
||||
EVT_CHECKBOX( wxID_ANY, DIALOG_COPPER_ZONE_BASE::_wxFB_OnNetSortingOptionSelected )
|
||||
EVT_BUTTON( wxID_BUTTON_EXPORT, DIALOG_COPPER_ZONE_BASE::_wxFB_ExportSetupToOtherCopperZones )
|
||||
EVT_BUTTON( wxID_CANCEL, DIALOG_COPPER_ZONE_BASE::_wxFB_OnButtonCancelClick )
|
||||
EVT_BUTTON( wxID_OK, DIALOG_COPPER_ZONE_BASE::_wxFB_OnButtonOkClick )
|
||||
END_EVENT_TABLE()
|
||||
|
||||
DIALOG_COPPER_ZONE_BASE::DIALOG_COPPER_ZONE_BASE( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : DIALOG_SHIM( parent, id, title, pos, size, style )
|
||||
|
@ -39,13 +36,13 @@ DIALOG_COPPER_ZONE_BASE::DIALOG_COPPER_ZONE_BASE( wxWindow* parent, wxWindowID i
|
|||
|
||||
m_staticTextLayers = new wxStaticText( this, wxID_ANY, _("Layer:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_staticTextLayers->Wrap( -1 );
|
||||
m_layerSizer->Add( m_staticTextLayers, 0, wxTOP|wxRIGHT, 5 );
|
||||
m_layerSizer->Add( m_staticTextLayers, 0, wxTOP|wxRIGHT|wxLEFT, 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_layers = new wxDataViewListCtrl( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxDV_NO_HEADER|wxSUNKEN_BORDER );
|
||||
m_layerSizer->Add( m_layers, 1, wxEXPAND|wxRIGHT, 5 );
|
||||
|
||||
|
||||
m_OptionsBoxSizer->Add( m_layerSizer, 0, wxEXPAND, 5 );
|
||||
m_OptionsBoxSizer->Add( m_layerSizer, 0, wxEXPAND|wxTOP|wxRIGHT, 5 );
|
||||
|
||||
wxBoxSizer* bSizerNets;
|
||||
bSizerNets = new wxBoxSizer( wxVERTICAL );
|
||||
|
@ -55,210 +52,196 @@ DIALOG_COPPER_ZONE_BASE::DIALOG_COPPER_ZONE_BASE( wxWindow* parent, wxWindowID i
|
|||
bSizerNets->Add( m_staticTextNets, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
m_ListNetNameSelection = new wxListBox( this, ID_NETNAME_SELECTION, wxDefaultPosition, wxDefaultSize, 0, NULL, 0 );
|
||||
bSizerNets->Add( m_ListNetNameSelection, 1, wxEXPAND, 5 );
|
||||
bSizerNets->Add( m_ListNetNameSelection, 1, wxEXPAND|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
|
||||
m_OptionsBoxSizer->Add( bSizerNets, 1, wxEXPAND, 5 );
|
||||
m_OptionsBoxSizer->Add( bSizerNets, 1, wxEXPAND|wxTOP|wxLEFT, 5 );
|
||||
|
||||
wxStaticBoxSizer* m_NetSortOptSizer;
|
||||
m_NetSortOptSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Net Filtering:") ), wxVERTICAL );
|
||||
wxBoxSizer* bFilteringSizer;
|
||||
bFilteringSizer = new wxBoxSizer( wxVERTICAL );
|
||||
|
||||
m_staticTextDisplay = new wxStaticText( m_NetSortOptSizer->GetStaticBox(), wxID_ANY, _("Display:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_staticTextDisplay = new wxStaticText( this, wxID_ANY, _("Hide nets matching:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_staticTextDisplay->Wrap( -1 );
|
||||
m_NetSortOptSizer->Add( m_staticTextDisplay, 0, wxLEFT|wxRIGHT|wxTOP, 5 );
|
||||
bFilteringSizer->Add( m_staticTextDisplay, 0, wxLEFT|wxRIGHT|wxTOP, 5 );
|
||||
|
||||
wxString m_NetDisplayOptionChoices[] = { _("Show all (alphabetical)"), _("Show all (pad count)"), _("Filtered (alphabetical)"), _("Filtered (pad count)") };
|
||||
int m_NetDisplayOptionNChoices = sizeof( m_NetDisplayOptionChoices ) / sizeof( wxString );
|
||||
m_NetDisplayOption = new wxChoice( m_NetSortOptSizer->GetStaticBox(), ID_M_NETDISPLAYOPTION, wxDefaultPosition, wxDefaultSize, m_NetDisplayOptionNChoices, m_NetDisplayOptionChoices, 0 );
|
||||
m_NetDisplayOption->SetSelection( 0 );
|
||||
m_NetSortOptSizer->Add( m_NetDisplayOption, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 );
|
||||
|
||||
m_staticTextHfilter = new wxStaticText( m_NetSortOptSizer->GetStaticBox(), wxID_ANY, _("Hidden net filter:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_staticTextHfilter->Wrap( -1 );
|
||||
m_NetSortOptSizer->Add( m_staticTextHfilter, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
m_DoNotShowNetNameFilter = new wxTextCtrl( m_NetSortOptSizer->GetStaticBox(), ID_TEXTCTRL_NETNAMES_FILTER, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_PROCESS_ENTER );
|
||||
m_DoNotShowNetNameFilter = new wxTextCtrl( this, ID_TEXTCTRL_NETNAMES_FILTER, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_PROCESS_ENTER );
|
||||
m_DoNotShowNetNameFilter->SetToolTip( _("Pattern to filter net names in filtered list.\nNet names matching this pattern are not displayed.") );
|
||||
m_DoNotShowNetNameFilter->SetMinSize( wxSize( 180,-1 ) );
|
||||
|
||||
m_NetSortOptSizer->Add( m_DoNotShowNetNameFilter, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
|
||||
bFilteringSizer->Add( m_DoNotShowNetNameFilter, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
m_staticTextVFilter = new wxStaticText( m_NetSortOptSizer->GetStaticBox(), wxID_ANY, _("Visible net filter:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_staticTextVFilter = new wxStaticText( this, wxID_ANY, _("Show nets matching:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_staticTextVFilter->Wrap( -1 );
|
||||
m_NetSortOptSizer->Add( m_staticTextVFilter, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
|
||||
bFilteringSizer->Add( m_staticTextVFilter, 0, wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
m_ShowNetNameFilter = new wxTextCtrl( m_NetSortOptSizer->GetStaticBox(), ID_TEXTCTRL_NETNAMES_FILTER, _("*"), wxDefaultPosition, wxDefaultSize, wxTE_PROCESS_ENTER );
|
||||
m_ShowNetNameFilter = new wxTextCtrl( this, ID_TEXTCTRL_NETNAMES_FILTER, _("*"), wxDefaultPosition, wxDefaultSize, wxTE_PROCESS_ENTER );
|
||||
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 );
|
||||
bFilteringSizer->Add( m_ShowNetNameFilter, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 );
|
||||
|
||||
m_buttonRunFilter = new wxButton( m_NetSortOptSizer->GetStaticBox(), wxID_APPLY_FILTERS, _("Apply Filters"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_NetSortOptSizer->Add( m_buttonRunFilter, 0, wxALL|wxEXPAND, 5 );
|
||||
m_buttonRunFilter = new wxButton( this, wxID_APPLY_FILTERS, _("Apply Filters"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
bFilteringSizer->Add( m_buttonRunFilter, 0, wxALL|wxEXPAND, 5 );
|
||||
|
||||
|
||||
m_OptionsBoxSizer->Add( m_NetSortOptSizer, 0, wxTOP|wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 );
|
||||
bFilteringSizer->Add( 0, 0, 0, wxEXPAND|wxTOP|wxBOTTOM, 5 );
|
||||
|
||||
m_showAllNetsOpt = new wxCheckBox( this, wxID_ANY, _("Show all nets"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
bFilteringSizer->Add( m_showAllNetsOpt, 0, wxALL, 5 );
|
||||
|
||||
|
||||
m_MainBoxSizer->Add( m_OptionsBoxSizer, 1, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
|
||||
bFilteringSizer->Add( 0, 0, 0, wxEXPAND|wxTOP, 5 );
|
||||
|
||||
m_sortByPadsOpt = new wxCheckBox( this, wxID_ANY, _("Sort nets by pad count"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
bFilteringSizer->Add( m_sortByPadsOpt, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
m_bNoNetWarning = new wxBoxSizer( wxHORIZONTAL );
|
||||
|
||||
m_bitmapNoNetWarning = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_bNoNetWarning->Add( m_bitmapNoNetWarning, 0, wxTOP|wxBOTTOM|wxLEFT, 8 );
|
||||
|
||||
m_staticText18 = new wxStaticText( this, wxID_ANY, _("No net will result\nin an unconnected \ncopper island."), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_staticText18->Wrap( -1 );
|
||||
m_bNoNetWarning->Add( m_staticText18, 0, wxALL, 5 );
|
||||
|
||||
|
||||
bFilteringSizer->Add( m_bNoNetWarning, 1, wxEXPAND|wxTOP, 20 );
|
||||
|
||||
|
||||
m_OptionsBoxSizer->Add( bFilteringSizer, 0, wxEXPAND|wxTOP, 20 );
|
||||
|
||||
|
||||
m_MainBoxSizer->Add( m_OptionsBoxSizer, 1, wxEXPAND|wxRIGHT|wxLEFT, 10 );
|
||||
|
||||
wxStaticBoxSizer* m_ExportableSetupSizer;
|
||||
m_ExportableSetupSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Settings:") ), wxHORIZONTAL );
|
||||
m_ExportableSetupSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Settings") ), wxHORIZONTAL );
|
||||
|
||||
wxBoxSizer* bSizerSettings;
|
||||
bSizerSettings = new wxBoxSizer( wxVERTICAL );
|
||||
wxGridBagSizer* gbSizer1;
|
||||
gbSizer1 = new wxGridBagSizer( 0, 0 );
|
||||
gbSizer1->SetFlexibleDirection( wxBOTH );
|
||||
gbSizer1->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
|
||||
|
||||
m_ClearanceValueTitle = new wxStaticText( m_ExportableSetupSizer->GetStaticBox(), wxID_ANY, _("Clearance:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_ClearanceValueTitle->Wrap( -1 );
|
||||
bSizerSettings->Add( m_ClearanceValueTitle, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
m_ZoneClearanceCtrl = new TEXT_CTRL_EVAL( m_ExportableSetupSizer->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
||||
bSizerSettings->Add( m_ZoneClearanceCtrl, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
m_MinThicknessValueTitle = new wxStaticText( m_ExportableSetupSizer->GetStaticBox(), wxID_ANY, _("Minimum width:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_MinThicknessValueTitle->Wrap( -1 );
|
||||
m_MinThicknessValueTitle->SetToolTip( _("Minimum thickness of filled areas.") );
|
||||
|
||||
bSizerSettings->Add( m_MinThicknessValueTitle, 0, wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
m_ZoneMinThicknessCtrl = new TEXT_CTRL_EVAL( m_ExportableSetupSizer->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
||||
bSizerSettings->Add( m_ZoneMinThicknessCtrl, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
|
||||
m_constrainOutline = new wxCheckBox( m_ExportableSetupSizer->GetStaticBox(), wxID_ANY, _("Constrain outline to H, V and 45 degrees"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
gbSizer1->Add( m_constrainOutline, wxGBPosition( 0, 0 ), wxGBSpan( 1, 3 ), wxBOTTOM|wxRIGHT, 5 );
|
||||
|
||||
m_staticTextSmoothing = new wxStaticText( m_ExportableSetupSizer->GetStaticBox(), wxID_ANY, _("Corner smoothing:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_staticTextSmoothing->Wrap( -1 );
|
||||
bSizerSettings->Add( m_staticTextSmoothing, 0, wxLEFT|wxRIGHT|wxTOP, 5 );
|
||||
gbSizer1->Add( m_staticTextSmoothing, wxGBPosition( 1, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 5 );
|
||||
|
||||
wxString m_cornerSmoothingChoiceChoices[] = { _("None"), _("Chamfer"), _("Fillet") };
|
||||
int m_cornerSmoothingChoiceNChoices = sizeof( m_cornerSmoothingChoiceChoices ) / sizeof( wxString );
|
||||
m_cornerSmoothingChoice = new wxChoice( m_ExportableSetupSizer->GetStaticBox(), ID_CORNER_SMOOTHING, wxDefaultPosition, wxDefaultSize, m_cornerSmoothingChoiceNChoices, m_cornerSmoothingChoiceChoices, 0 );
|
||||
m_cornerSmoothingChoice->SetSelection( 0 );
|
||||
bSizerSettings->Add( m_cornerSmoothingChoice, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 );
|
||||
gbSizer1->Add( m_cornerSmoothingChoice, wxGBPosition( 1, 1 ), wxGBSpan( 1, 1 ), wxEXPAND|wxALL, 5 );
|
||||
|
||||
m_cornerSmoothingValue = new wxStaticText( m_ExportableSetupSizer->GetStaticBox(), wxID_ANY, _("Chamfer distance (mm):"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_cornerSmoothingValue->Wrap( -1 );
|
||||
bSizerSettings->Add( m_cornerSmoothingValue, 0, wxRIGHT|wxLEFT, 5 );
|
||||
m_cornerRadiusLabel = new wxStaticText( m_ExportableSetupSizer->GetStaticBox(), wxID_ANY, _("Chamfer distance:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_cornerRadiusLabel->Wrap( -1 );
|
||||
gbSizer1->Add( m_cornerRadiusLabel, wxGBPosition( 2, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT, 5 );
|
||||
|
||||
m_cornerSmoothingCtrl = new TEXT_CTRL_EVAL( m_ExportableSetupSizer->GetStaticBox(), ID_M_CORNERSMOOTHINGCTRL, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
||||
bSizerSettings->Add( m_cornerSmoothingCtrl, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 );
|
||||
m_cornerRadiusCtrl = new wxTextCtrl( m_ExportableSetupSizer->GetStaticBox(), ID_M_CORNERSMOOTHINGCTRL, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
||||
gbSizer1->Add( m_cornerRadiusCtrl, wxGBPosition( 2, 1 ), wxGBSpan( 1, 1 ), wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
|
||||
m_ExportableSetupSizer->Add( bSizerSettings, 0, wxEXPAND, 5 );
|
||||
|
||||
wxBoxSizer* bSizerPadsConnection;
|
||||
bSizerPadsConnection = new wxBoxSizer( wxVERTICAL );
|
||||
|
||||
m_staticTextPadConnection = new wxStaticText( m_ExportableSetupSizer->GetStaticBox(), wxID_ANY, _("Default pad connection:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_staticTextPadConnection->Wrap( -1 );
|
||||
m_staticTextPadConnection->SetToolTip( _("Default pad connection type to zone.\nThis setting can be overridden by local pad settings") );
|
||||
|
||||
bSizerPadsConnection->Add( m_staticTextPadConnection, 0, wxLEFT|wxRIGHT|wxTOP, 5 );
|
||||
|
||||
wxString m_PadInZoneOptChoices[] = { _("Solid"), _("Thermal relief"), _("THT thermal"), _("None") };
|
||||
int m_PadInZoneOptNChoices = sizeof( m_PadInZoneOptChoices ) / sizeof( wxString );
|
||||
m_PadInZoneOpt = new wxChoice( m_ExportableSetupSizer->GetStaticBox(), ID_M_PADINZONEOPT, wxDefaultPosition, wxDefaultSize, m_PadInZoneOptNChoices, m_PadInZoneOptChoices, 0 );
|
||||
m_PadInZoneOpt->SetSelection( 0 );
|
||||
bSizerPadsConnection->Add( m_PadInZoneOpt, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 );
|
||||
|
||||
wxStaticBoxSizer* m_ThermalShapesParamsSizer;
|
||||
m_ThermalShapesParamsSizer = new wxStaticBoxSizer( new wxStaticBox( m_ExportableSetupSizer->GetStaticBox(), wxID_ANY, _("Thermal Reliefs:") ), wxVERTICAL );
|
||||
|
||||
m_AntipadSizeText = new wxStaticText( m_ThermalShapesParamsSizer->GetStaticBox(), wxID_ANY, _("Antipad clearance:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_AntipadSizeText->Wrap( -1 );
|
||||
m_ThermalShapesParamsSizer->Add( m_AntipadSizeText, 0, wxTOP|wxRIGHT, 5 );
|
||||
|
||||
m_AntipadSizeValue = new TEXT_CTRL_EVAL( m_ThermalShapesParamsSizer->GetStaticBox(), wxID_ANTIPAD_SIZE, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_AntipadSizeValue->SetToolTip( _("Clearance between pads in the same net and filled areas.") );
|
||||
|
||||
m_ThermalShapesParamsSizer->Add( m_AntipadSizeValue, 0, wxEXPAND|wxBOTTOM, 5 );
|
||||
|
||||
m_CopperBridgeWidthText = new wxStaticText( m_ThermalShapesParamsSizer->GetStaticBox(), wxID_ANY, _("Spoke width:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_CopperBridgeWidthText->Wrap( -1 );
|
||||
m_ThermalShapesParamsSizer->Add( m_CopperBridgeWidthText, 0, wxTOP|wxRIGHT, 5 );
|
||||
|
||||
m_CopperWidthValue = new TEXT_CTRL_EVAL( m_ThermalShapesParamsSizer->GetStaticBox(), wxID_COPPER_BRIDGE_VALUE, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_CopperWidthValue->SetToolTip( _("Width of copper in thermal reliefs.") );
|
||||
|
||||
m_ThermalShapesParamsSizer->Add( m_CopperWidthValue, 0, wxEXPAND|wxBOTTOM, 5 );
|
||||
|
||||
|
||||
bSizerPadsConnection->Add( m_ThermalShapesParamsSizer, 0, wxALL|wxEXPAND, 5 );
|
||||
|
||||
|
||||
m_ExportableSetupSizer->Add( bSizerPadsConnection, 0, wxEXPAND, 5 );
|
||||
|
||||
wxBoxSizer* m_MiddleBox;
|
||||
m_MiddleBox = new wxBoxSizer( wxVERTICAL );
|
||||
m_cornerRadiusUnits = new wxStaticText( m_ExportableSetupSizer->GetStaticBox(), wxID_ANY, _("units"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_cornerRadiusUnits->Wrap( -1 );
|
||||
gbSizer1->Add( m_cornerRadiusUnits, wxGBPosition( 2, 2 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT, 5 );
|
||||
|
||||
m_staticTextPriorityLevel = new wxStaticText( m_ExportableSetupSizer->GetStaticBox(), wxID_ANY, _("Zone priority level:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_staticTextPriorityLevel->Wrap( -1 );
|
||||
m_staticTextPriorityLevel->SetToolTip( _("Zones are filled by priority level, level 3 has higher priority than level 2.\nWhen a zone is inside another zone:\n* If its priority is higher, its outlines are removed from the other zone.\n* If its priority is equal, a DRC error is set.") );
|
||||
|
||||
m_MiddleBox->Add( m_staticTextPriorityLevel, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
|
||||
gbSizer1->Add( m_staticTextPriorityLevel, wxGBPosition( 3, 0 ), wxGBSpan( 1, 1 ), wxBOTTOM|wxRIGHT, 5 );
|
||||
|
||||
m_PriorityLevelCtrl = new wxSpinCtrl( m_ExportableSetupSizer->GetStaticBox(), ID_M_PRIORITYLEVELCTRL, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, 0, 100, 0 );
|
||||
m_MiddleBox->Add( m_PriorityLevelCtrl, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
|
||||
gbSizer1->Add( m_PriorityLevelCtrl, wxGBPosition( 3, 1 ), wxGBSpan( 1, 1 ), wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
m_staticTextFillMode = new wxStaticText( m_ExportableSetupSizer->GetStaticBox(), wxID_ANY, _("Fill mode:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_staticTextFillMode->Wrap( -1 );
|
||||
m_MiddleBox->Add( m_staticTextFillMode, 0, wxLEFT|wxRIGHT|wxTOP, 5 );
|
||||
|
||||
wxString m_FillModeCtrlChoices[] = { _("Polygon"), _("Segment") };
|
||||
int m_FillModeCtrlNChoices = sizeof( m_FillModeCtrlChoices ) / sizeof( wxString );
|
||||
m_FillModeCtrl = new wxChoice( m_ExportableSetupSizer->GetStaticBox(), ID_M_FILLMODECTRL, wxDefaultPosition, wxDefaultSize, m_FillModeCtrlNChoices, m_FillModeCtrlChoices, 0 );
|
||||
m_FillModeCtrl->SetSelection( 0 );
|
||||
m_MiddleBox->Add( m_FillModeCtrl, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 );
|
||||
|
||||
m_staticTextSegmCnt = new wxStaticText( m_ExportableSetupSizer->GetStaticBox(), wxID_ANY, _("Boundary mode:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_staticTextSegmCnt->Wrap( -1 );
|
||||
m_MiddleBox->Add( m_staticTextSegmCnt, 0, wxLEFT|wxRIGHT|wxTOP, 5 );
|
||||
|
||||
wxString m_ArcApproximationOptChoices[] = { _("Low Resolution"), _("High Resolution") };
|
||||
int m_ArcApproximationOptNChoices = sizeof( m_ArcApproximationOptChoices ) / sizeof( wxString );
|
||||
m_ArcApproximationOpt = new wxChoice( m_ExportableSetupSizer->GetStaticBox(), ID_M_ARCAPPROXIMATIONOPT, wxDefaultPosition, wxDefaultSize, m_ArcApproximationOptNChoices, m_ArcApproximationOptChoices, 0 );
|
||||
m_ArcApproximationOpt->SetSelection( 0 );
|
||||
m_MiddleBox->Add( m_ArcApproximationOpt, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 );
|
||||
|
||||
|
||||
m_ExportableSetupSizer->Add( m_MiddleBox, 0, wxEXPAND, 5 );
|
||||
|
||||
wxBoxSizer* bSizerLowerRight;
|
||||
bSizerLowerRight = new wxBoxSizer( wxVERTICAL );
|
||||
|
||||
m_staticTextSlope = new wxStaticText( m_ExportableSetupSizer->GetStaticBox(), wxID_ANY, _("Outline slope:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_staticTextSlope->Wrap( -1 );
|
||||
bSizerLowerRight->Add( m_staticTextSlope, 0, wxLEFT|wxRIGHT|wxTOP, 5 );
|
||||
|
||||
wxString m_OrientEdgesOptChoices[] = { _("Arbitrary"), _("H, V, and 45 deg only") };
|
||||
int m_OrientEdgesOptNChoices = sizeof( m_OrientEdgesOptChoices ) / sizeof( wxString );
|
||||
m_OrientEdgesOpt = new wxChoice( m_ExportableSetupSizer->GetStaticBox(), ID_M_ORIENTEDGESOPT, wxDefaultPosition, wxDefaultSize, m_OrientEdgesOptNChoices, m_OrientEdgesOptChoices, 0 );
|
||||
m_OrientEdgesOpt->SetSelection( 0 );
|
||||
bSizerLowerRight->Add( m_OrientEdgesOpt, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 );
|
||||
|
||||
m_staticTextStyle = new wxStaticText( m_ExportableSetupSizer->GetStaticBox(), wxID_ANY, _("Outline style:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_staticTextStyle = new wxStaticText( m_ExportableSetupSizer->GetStaticBox(), wxID_ANY, _("Outline display:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_staticTextStyle->Wrap( -1 );
|
||||
bSizerLowerRight->Add( m_staticTextStyle, 0, wxLEFT|wxRIGHT|wxTOP, 5 );
|
||||
gbSizer1->Add( m_staticTextStyle, wxGBPosition( 4, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT, 5 );
|
||||
|
||||
wxString m_OutlineAppearanceCtrlChoices[] = { _("Line"), _("Hatched"), _("Fully hatched") };
|
||||
int m_OutlineAppearanceCtrlNChoices = sizeof( m_OutlineAppearanceCtrlChoices ) / sizeof( wxString );
|
||||
m_OutlineAppearanceCtrl = new wxChoice( m_ExportableSetupSizer->GetStaticBox(), ID_M_OUTLINEAPPEARANCECTRL, wxDefaultPosition, wxDefaultSize, m_OutlineAppearanceCtrlNChoices, m_OutlineAppearanceCtrlChoices, 0 );
|
||||
m_OutlineAppearanceCtrl->SetSelection( 0 );
|
||||
bSizerLowerRight->Add( m_OutlineAppearanceCtrl, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 );
|
||||
|
||||
m_bNoNetWarning = new wxBoxSizer( wxHORIZONTAL );
|
||||
|
||||
m_bitmapNoNetWarning = new wxStaticBitmap( m_ExportableSetupSizer->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_bNoNetWarning->Add( m_bitmapNoNetWarning, 0, wxTOP|wxBOTTOM|wxLEFT, 8 );
|
||||
|
||||
m_staticText18 = new wxStaticText( m_ExportableSetupSizer->GetStaticBox(), wxID_ANY, _("No net will result\nin an unconnected \ncopper island."), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_staticText18->Wrap( -1 );
|
||||
m_bNoNetWarning->Add( m_staticText18, 0, wxALL, 5 );
|
||||
gbSizer1->Add( m_OutlineAppearanceCtrl, wxGBPosition( 4, 1 ), wxGBSpan( 1, 1 ), wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
|
||||
bSizerLowerRight->Add( m_bNoNetWarning, 1, wxEXPAND|wxTOP, 25 );
|
||||
gbSizer1->AddGrowableCol( 1 );
|
||||
|
||||
m_ExportableSetupSizer->Add( gbSizer1, 1, wxEXPAND|wxRIGHT, 20 );
|
||||
|
||||
wxGridBagSizer* gbSizer2;
|
||||
gbSizer2 = new wxGridBagSizer( 0, 0 );
|
||||
gbSizer2->SetFlexibleDirection( wxBOTH );
|
||||
gbSizer2->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
|
||||
|
||||
m_clearanceLabel = new wxStaticText( m_ExportableSetupSizer->GetStaticBox(), wxID_ANY, _("Clearance:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_clearanceLabel->Wrap( -1 );
|
||||
gbSizer2->Add( m_clearanceLabel, wxGBPosition( 0, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT|wxRIGHT, 5 );
|
||||
|
||||
m_clearanceCtrl = new wxTextCtrl( m_ExportableSetupSizer->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
||||
gbSizer2->Add( m_clearanceCtrl, wxGBPosition( 0, 1 ), wxGBSpan( 1, 1 ), wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
m_clearanceUnits = new wxStaticText( m_ExportableSetupSizer->GetStaticBox(), wxID_ANY, _("units"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_clearanceUnits->Wrap( -1 );
|
||||
gbSizer2->Add( m_clearanceUnits, wxGBPosition( 0, 2 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT, 5 );
|
||||
|
||||
m_minWidthLabel = new wxStaticText( m_ExportableSetupSizer->GetStaticBox(), wxID_ANY, _("Minimum width:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_minWidthLabel->Wrap( -1 );
|
||||
m_minWidthLabel->SetToolTip( _("Minimum thickness of filled areas.") );
|
||||
|
||||
gbSizer2->Add( m_minWidthLabel, wxGBPosition( 1, 0 ), wxGBSpan( 1, 1 ), wxBOTTOM|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
m_minWidthCtrl = new wxTextCtrl( m_ExportableSetupSizer->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
||||
gbSizer2->Add( m_minWidthCtrl, wxGBPosition( 1, 1 ), wxGBSpan( 1, 1 ), wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
m_minWidthUnits = new wxStaticText( m_ExportableSetupSizer->GetStaticBox(), wxID_ANY, _("units"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_minWidthUnits->Wrap( -1 );
|
||||
gbSizer2->Add( m_minWidthUnits, wxGBPosition( 1, 2 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT, 5 );
|
||||
|
||||
m_connectionLabel = new wxStaticText( m_ExportableSetupSizer->GetStaticBox(), wxID_ANY, _("Pad connections:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_connectionLabel->Wrap( -1 );
|
||||
m_connectionLabel->SetToolTip( _("Default pad connection type to zone.\nThis setting can be overridden by local pad settings") );
|
||||
|
||||
gbSizer2->Add( m_connectionLabel, wxGBPosition( 2, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
wxString m_PadInZoneOptChoices[] = { _("Solid"), _("Thermal reliefs"), _("Reliefs for PTH only"), _("None") };
|
||||
int m_PadInZoneOptNChoices = sizeof( m_PadInZoneOptChoices ) / sizeof( wxString );
|
||||
m_PadInZoneOpt = new wxChoice( m_ExportableSetupSizer->GetStaticBox(), ID_M_PADINZONEOPT, wxDefaultPosition, wxDefaultSize, m_PadInZoneOptNChoices, m_PadInZoneOptChoices, 0 );
|
||||
m_PadInZoneOpt->SetSelection( 0 );
|
||||
gbSizer2->Add( m_PadInZoneOpt, wxGBPosition( 2, 1 ), wxGBSpan( 1, 1 ), wxEXPAND|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
m_antipadLabel = new wxStaticText( m_ExportableSetupSizer->GetStaticBox(), wxID_ANY, _("Thermal clearance:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_antipadLabel->Wrap( -1 );
|
||||
gbSizer2->Add( m_antipadLabel, wxGBPosition( 3, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxTOP|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
m_antipadCtrl = new wxTextCtrl( m_ExportableSetupSizer->GetStaticBox(), wxID_ANTIPAD_SIZE, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_antipadCtrl->SetToolTip( _("Clearance between pads in the same net and filled areas.") );
|
||||
|
||||
gbSizer2->Add( m_antipadCtrl, wxGBPosition( 3, 1 ), wxGBSpan( 1, 1 ), wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
m_antipadUnits = new wxStaticText( m_ExportableSetupSizer->GetStaticBox(), wxID_ANY, _("units"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_antipadUnits->Wrap( -1 );
|
||||
gbSizer2->Add( m_antipadUnits, wxGBPosition( 3, 2 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxTOP|wxRIGHT, 5 );
|
||||
|
||||
m_spokeWidthLabel = new wxStaticText( m_ExportableSetupSizer->GetStaticBox(), wxID_ANY, _("Thermal spoke width:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_spokeWidthLabel->Wrap( -1 );
|
||||
gbSizer2->Add( m_spokeWidthLabel, wxGBPosition( 4, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxALL, 5 );
|
||||
|
||||
m_spokeWidthCtrl = new wxTextCtrl( m_ExportableSetupSizer->GetStaticBox(), wxID_COPPER_BRIDGE_VALUE, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_spokeWidthCtrl->SetToolTip( _("Width of copper in thermal reliefs.") );
|
||||
|
||||
gbSizer2->Add( m_spokeWidthCtrl, wxGBPosition( 4, 1 ), wxGBSpan( 1, 1 ), wxEXPAND|wxALL, 5 );
|
||||
|
||||
m_spokeWidthUnits = new wxStaticText( m_ExportableSetupSizer->GetStaticBox(), wxID_ANY, _("units"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_spokeWidthUnits->Wrap( -1 );
|
||||
gbSizer2->Add( m_spokeWidthUnits, wxGBPosition( 4, 2 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 5 );
|
||||
|
||||
|
||||
m_ExportableSetupSizer->Add( bSizerLowerRight, 0, wxEXPAND, 5 );
|
||||
gbSizer2->AddGrowableCol( 1 );
|
||||
|
||||
m_ExportableSetupSizer->Add( gbSizer2, 1, wxEXPAND|wxLEFT, 5 );
|
||||
|
||||
|
||||
m_MainBoxSizer->Add( m_ExportableSetupSizer, 0, wxALL|wxEXPAND, 5 );
|
||||
m_MainBoxSizer->Add( m_ExportableSetupSizer, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 10 );
|
||||
|
||||
wxBoxSizer* bSizerbottom;
|
||||
bSizerbottom = new wxBoxSizer( wxHORIZONTAL );
|
||||
|
@ -266,7 +249,7 @@ DIALOG_COPPER_ZONE_BASE::DIALOG_COPPER_ZONE_BASE( wxWindow* parent, wxWindowID i
|
|||
m_ExportSetupButton = new wxButton( this, wxID_BUTTON_EXPORT, _("Export Settings to Other Zones"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_ExportSetupButton->SetToolTip( _("Export this zone setup (excluding layer and net selection) to all other copper zones.") );
|
||||
|
||||
bSizerbottom->Add( m_ExportSetupButton, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 );
|
||||
bSizerbottom->Add( m_ExportSetupButton, 0, wxEXPAND|wxRIGHT|wxLEFT, 10 );
|
||||
|
||||
m_sdbSizer = new wxStdDialogButtonSizer();
|
||||
m_sdbSizerOK = new wxButton( this, wxID_OK );
|
||||
|
@ -275,10 +258,10 @@ DIALOG_COPPER_ZONE_BASE::DIALOG_COPPER_ZONE_BASE( wxWindow* parent, wxWindowID i
|
|||
m_sdbSizer->AddButton( m_sdbSizerCancel );
|
||||
m_sdbSizer->Realize();
|
||||
|
||||
bSizerbottom->Add( m_sdbSizer, 1, wxEXPAND, 5 );
|
||||
bSizerbottom->Add( m_sdbSizer, 1, wxEXPAND|wxALL, 5 );
|
||||
|
||||
|
||||
m_MainBoxSizer->Add( bSizerbottom, 0, wxALIGN_RIGHT|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
|
||||
m_MainBoxSizer->Add( bSizerbottom, 0, wxALIGN_RIGHT|wxEXPAND|wxLEFT, 5 );
|
||||
|
||||
|
||||
this->SetSizer( m_MainBoxSizer );
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1,5 +1,5 @@
|
|||
///////////////////////////////////////////////////////////////////////////
|
||||
// C++ code generated with wxFormBuilder (version Apr 19 2018)
|
||||
// C++ code generated with wxFormBuilder (version Dec 30 2017)
|
||||
// http://www.wxformbuilder.org/
|
||||
//
|
||||
// PLEASE DO *NOT* EDIT THIS FILE!
|
||||
|
@ -11,8 +11,6 @@
|
|||
#include <wx/artprov.h>
|
||||
#include <wx/xrc/xmlres.h>
|
||||
#include <wx/intl.h>
|
||||
class TEXT_CTRL_EVAL;
|
||||
|
||||
#include "dialog_shim.h"
|
||||
#include <wx/string.h>
|
||||
#include <wx/stattext.h>
|
||||
|
@ -20,18 +18,20 @@ class TEXT_CTRL_EVAL;
|
|||
#include <wx/font.h>
|
||||
#include <wx/colour.h>
|
||||
#include <wx/settings.h>
|
||||
#include <wx/listctrl.h>
|
||||
#include <wx/dataview.h>
|
||||
#include <wx/sizer.h>
|
||||
#include <wx/listbox.h>
|
||||
#include <wx/choice.h>
|
||||
#include <wx/textctrl.h>
|
||||
#include <wx/button.h>
|
||||
#include <wx/statbox.h>
|
||||
#include <wx/spinctrl.h>
|
||||
#include <wx/checkbox.h>
|
||||
#include <wx/bitmap.h>
|
||||
#include <wx/image.h>
|
||||
#include <wx/icon.h>
|
||||
#include <wx/statbmp.h>
|
||||
#include <wx/choice.h>
|
||||
#include <wx/spinctrl.h>
|
||||
#include <wx/gbsizer.h>
|
||||
#include <wx/statbox.h>
|
||||
#include <wx/dialog.h>
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
@ -47,13 +47,11 @@ class DIALOG_COPPER_ZONE_BASE : public DIALOG_SHIM
|
|||
// Private event handlers
|
||||
void _wxFB_OnClose( wxCloseEvent& event ){ OnClose( event ); }
|
||||
void _wxFB_OnUpdateUI( wxUpdateUIEvent& event ){ OnUpdateUI( event ); }
|
||||
void _wxFB_OnNetSortingOptionSelected( wxCommandEvent& event ){ OnNetSortingOptionSelected( event ); }
|
||||
void _wxFB_OnLayerSelection( wxDataViewEvent& event ){ OnLayerSelection( event ); }
|
||||
void _wxFB_OnRunFiltersButtonClick( wxCommandEvent& event ){ OnRunFiltersButtonClick( event ); }
|
||||
void _wxFB_OnCornerSmoothingModeChoice( wxCommandEvent& event ){ OnCornerSmoothingModeChoice( event ); }
|
||||
void _wxFB_OnPadsInZoneClick( wxCommandEvent& event ){ OnPadsInZoneClick( event ); }
|
||||
void _wxFB_OnNetSortingOptionSelected( wxCommandEvent& event ){ OnNetSortingOptionSelected( event ); }
|
||||
void _wxFB_ExportSetupToOtherCopperZones( wxCommandEvent& event ){ ExportSetupToOtherCopperZones( event ); }
|
||||
void _wxFB_OnButtonCancelClick( wxCommandEvent& event ){ OnButtonCancelClick( event ); }
|
||||
void _wxFB_OnButtonOkClick( wxCommandEvent& event ){ OnButtonOkClick( event ); }
|
||||
|
||||
|
||||
protected:
|
||||
|
@ -61,61 +59,57 @@ class DIALOG_COPPER_ZONE_BASE : public DIALOG_SHIM
|
|||
{
|
||||
ID_DIALOG_COPPER_ZONE_BASE = 1000,
|
||||
ID_NETNAME_SELECTION,
|
||||
ID_M_NETDISPLAYOPTION,
|
||||
ID_TEXTCTRL_NETNAMES_FILTER,
|
||||
wxID_APPLY_FILTERS,
|
||||
ID_CORNER_SMOOTHING,
|
||||
ID_M_CORNERSMOOTHINGCTRL,
|
||||
ID_M_PRIORITYLEVELCTRL,
|
||||
ID_M_OUTLINEAPPEARANCECTRL,
|
||||
ID_M_PADINZONEOPT,
|
||||
wxID_ANTIPAD_SIZE,
|
||||
wxID_COPPER_BRIDGE_VALUE,
|
||||
ID_M_PRIORITYLEVELCTRL,
|
||||
ID_M_FILLMODECTRL,
|
||||
ID_M_ARCAPPROXIMATIONOPT,
|
||||
ID_M_ORIENTEDGESOPT,
|
||||
ID_M_OUTLINEAPPEARANCECTRL,
|
||||
wxID_BUTTON_EXPORT
|
||||
};
|
||||
|
||||
wxBoxSizer* m_MainBoxSizer;
|
||||
wxStaticText* m_staticTextLayers;
|
||||
wxListView* m_LayerSelectionCtrl;
|
||||
wxDataViewListCtrl* m_layers;
|
||||
wxStaticText* m_staticTextNets;
|
||||
wxListBox* m_ListNetNameSelection;
|
||||
wxStaticText* m_staticTextDisplay;
|
||||
wxChoice* m_NetDisplayOption;
|
||||
wxStaticText* m_staticTextHfilter;
|
||||
wxTextCtrl* m_DoNotShowNetNameFilter;
|
||||
wxStaticText* m_staticTextVFilter;
|
||||
wxTextCtrl* m_ShowNetNameFilter;
|
||||
wxButton* m_buttonRunFilter;
|
||||
wxStaticText* m_ClearanceValueTitle;
|
||||
TEXT_CTRL_EVAL* m_ZoneClearanceCtrl;
|
||||
wxStaticText* m_MinThicknessValueTitle;
|
||||
TEXT_CTRL_EVAL* m_ZoneMinThicknessCtrl;
|
||||
wxStaticText* m_staticTextSmoothing;
|
||||
wxChoice* m_cornerSmoothingChoice;
|
||||
wxStaticText* m_cornerSmoothingValue;
|
||||
TEXT_CTRL_EVAL* m_cornerSmoothingCtrl;
|
||||
wxStaticText* m_staticTextPadConnection;
|
||||
wxChoice* m_PadInZoneOpt;
|
||||
wxStaticText* m_AntipadSizeText;
|
||||
TEXT_CTRL_EVAL* m_AntipadSizeValue;
|
||||
wxStaticText* m_CopperBridgeWidthText;
|
||||
TEXT_CTRL_EVAL* m_CopperWidthValue;
|
||||
wxStaticText* m_staticTextPriorityLevel;
|
||||
wxSpinCtrl* m_PriorityLevelCtrl;
|
||||
wxStaticText* m_staticTextFillMode;
|
||||
wxChoice* m_FillModeCtrl;
|
||||
wxStaticText* m_staticTextSegmCnt;
|
||||
wxChoice* m_ArcApproximationOpt;
|
||||
wxStaticText* m_staticTextSlope;
|
||||
wxChoice* m_OrientEdgesOpt;
|
||||
wxStaticText* m_staticTextStyle;
|
||||
wxChoice* m_OutlineAppearanceCtrl;
|
||||
wxCheckBox* m_showAllNetsOpt;
|
||||
wxCheckBox* m_sortByPadsOpt;
|
||||
wxBoxSizer* m_bNoNetWarning;
|
||||
wxStaticBitmap* m_bitmapNoNetWarning;
|
||||
wxStaticText* m_staticText18;
|
||||
wxCheckBox* m_constrainOutline;
|
||||
wxStaticText* m_staticTextSmoothing;
|
||||
wxChoice* m_cornerSmoothingChoice;
|
||||
wxStaticText* m_cornerRadiusLabel;
|
||||
wxTextCtrl* m_cornerRadiusCtrl;
|
||||
wxStaticText* m_cornerRadiusUnits;
|
||||
wxStaticText* m_staticTextPriorityLevel;
|
||||
wxSpinCtrl* m_PriorityLevelCtrl;
|
||||
wxStaticText* m_staticTextStyle;
|
||||
wxChoice* m_OutlineAppearanceCtrl;
|
||||
wxStaticText* m_clearanceLabel;
|
||||
wxTextCtrl* m_clearanceCtrl;
|
||||
wxStaticText* m_clearanceUnits;
|
||||
wxStaticText* m_minWidthLabel;
|
||||
wxTextCtrl* m_minWidthCtrl;
|
||||
wxStaticText* m_minWidthUnits;
|
||||
wxStaticText* m_connectionLabel;
|
||||
wxChoice* m_PadInZoneOpt;
|
||||
wxStaticText* m_antipadLabel;
|
||||
wxTextCtrl* m_antipadCtrl;
|
||||
wxStaticText* m_antipadUnits;
|
||||
wxStaticText* m_spokeWidthLabel;
|
||||
wxTextCtrl* m_spokeWidthCtrl;
|
||||
wxStaticText* m_spokeWidthUnits;
|
||||
wxButton* m_ExportSetupButton;
|
||||
wxStdDialogButtonSizer* m_sdbSizer;
|
||||
wxButton* m_sdbSizerOK;
|
||||
|
@ -124,13 +118,11 @@ 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 OnUpdateUI( wxUpdateUIEvent& event ) { event.Skip(); }
|
||||
virtual void OnNetSortingOptionSelected( wxCommandEvent& event ) { event.Skip(); }
|
||||
virtual void OnLayerSelection( wxDataViewEvent& event ) { event.Skip(); }
|
||||
virtual void OnRunFiltersButtonClick( wxCommandEvent& event ) { event.Skip(); }
|
||||
virtual void OnCornerSmoothingModeChoice( wxCommandEvent& event ) { event.Skip(); }
|
||||
virtual void OnPadsInZoneClick( wxCommandEvent& event ) { event.Skip(); }
|
||||
virtual void OnNetSortingOptionSelected( wxCommandEvent& event ) { event.Skip(); }
|
||||
virtual void ExportSetupToOtherCopperZones( wxCommandEvent& event ) { event.Skip(); }
|
||||
virtual void OnButtonCancelClick( wxCommandEvent& event ) { event.Skip(); }
|
||||
virtual void OnButtonOkClick( wxCommandEvent& event ) { event.Skip(); }
|
||||
|
||||
|
||||
public:
|
||||
|
|
|
@ -1,13 +1,9 @@
|
|||
/**
|
||||
* @file dialog_keepout_area_properties.cpp
|
||||
*/
|
||||
|
||||
/*
|
||||
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||
*
|
||||
* Copyright (C) 2014 Jean-Pierre Charras, jp.charras at wanadoo.fr
|
||||
* Copyright (C) 2014 SoftPLC Corporation, Dick Hollenbeck <dick@softplc.com>
|
||||
* Copyright (C) 1992-2017 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
* Copyright (C) 1992-2018 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
|
||||
|
@ -27,29 +23,16 @@
|
|||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
#include <wx/wx.h>
|
||||
#include <wx/display.h>
|
||||
#include <fctsys.h>
|
||||
#include <kiface_i.h>
|
||||
#include <confirm.h>
|
||||
#include <pcbnew.h>
|
||||
#include <pcb_edit_frame.h>
|
||||
#include <class_zone.h>
|
||||
#include <zones.h>
|
||||
#include <base_units.h>
|
||||
#include <widgets/color_swatch.h>
|
||||
|
||||
#include <zone_settings.h>
|
||||
#include <class_board.h>
|
||||
#include <dialog_keepout_area_properties_base.h>
|
||||
|
||||
#include <wx/imaglist.h> // needed for wx/listctrl.h, in wxGTK 2.8.12
|
||||
#include <wx/listctrl.h>
|
||||
|
||||
/**
|
||||
* Class DIALOG_KEEPOUT_AREA_PROPERTIES
|
||||
* is the derived class from dialog_copper_zone_frame created by wxFormBuilder
|
||||
*/
|
||||
class DIALOG_KEEPOUT_AREA_PROPERTIES : public DIALOG_KEEPOUT_AREA_PROPERTIES_BASE
|
||||
{
|
||||
public:
|
||||
|
@ -62,47 +45,18 @@ private:
|
|||
ZONE_SETTINGS* m_ptr; ///< the pointer to the zone settings
|
||||
///< of the zone to edit
|
||||
|
||||
/**
|
||||
* Function initDialog
|
||||
* fills in the dialog controls using the current settings.
|
||||
*/
|
||||
void initDialog();
|
||||
|
||||
/**
|
||||
* automatically called by wxWidgets before closing the dialog
|
||||
*/
|
||||
bool TransferDataToWindow() override;
|
||||
bool TransferDataFromWindow() override;
|
||||
|
||||
void OnLayerSelection( wxDataViewEvent& event ) override;
|
||||
|
||||
void OnSizeLayersList( wxSizeEvent& event ) override;
|
||||
|
||||
/**
|
||||
* Function AcceptOptionsForKeepOut
|
||||
* Test validity of options, and copy options in m_zonesettings, for keepout zones
|
||||
* @return bool - false if incorrect options, true if ok.
|
||||
*/
|
||||
bool AcceptOptionsForKeepOut();
|
||||
};
|
||||
|
||||
|
||||
#ifdef __WXMAC__
|
||||
const static wxSize LAYER_BITMAP_SIZE( 28, 28 ); // Things get wonky if this isn't square...
|
||||
#else
|
||||
const static wxSize LAYER_BITMAP_SIZE( 20, 14 );
|
||||
#endif
|
||||
|
||||
|
||||
ZONE_EDIT_T InvokeKeepoutAreaEditor( PCB_BASE_FRAME* aCaller, ZONE_SETTINGS* aSettings )
|
||||
int InvokeKeepoutAreaEditor( PCB_BASE_FRAME* aCaller, ZONE_SETTINGS* aSettings )
|
||||
{
|
||||
DIALOG_KEEPOUT_AREA_PROPERTIES dlg( aCaller, aSettings );
|
||||
|
||||
ZONE_EDIT_T result = ZONE_ABORT;
|
||||
|
||||
if( dlg.ShowModal() == wxID_OK )
|
||||
result = ZONE_OK;
|
||||
|
||||
return result;
|
||||
return dlg.ShowModal();
|
||||
}
|
||||
|
||||
|
||||
|
@ -116,123 +70,49 @@ DIALOG_KEEPOUT_AREA_PROPERTIES::DIALOG_KEEPOUT_AREA_PROPERTIES( PCB_BASE_FRAME*
|
|||
m_ptr = aSettings;
|
||||
m_zonesettings = *aSettings;
|
||||
|
||||
initDialog();
|
||||
m_zonesettings.SetupLayersList( m_layers, m_parent, true );
|
||||
|
||||
m_sdbSizerButtonsOK->SetDefault();
|
||||
|
||||
FinishDialogSettings();
|
||||
}
|
||||
|
||||
|
||||
void DIALOG_KEEPOUT_AREA_PROPERTIES::initDialog()
|
||||
bool DIALOG_KEEPOUT_AREA_PROPERTIES::TransferDataToWindow()
|
||||
{
|
||||
BOARD* board = m_parent->GetBoard();
|
||||
COLOR4D backgroundColor = m_parent->Settings().Colors().GetLayerColor( LAYER_PCB_BACKGROUND );
|
||||
wxString msg;
|
||||
|
||||
if( m_zonesettings.m_Zone_45_Only )
|
||||
m_OrientEdgesOpt->SetSelection( 1 );
|
||||
|
||||
switch( m_zonesettings.m_Zone_HatchingStyle )
|
||||
{
|
||||
case ZONE_CONTAINER::NO_HATCH:
|
||||
m_OutlineAppearanceCtrl->SetSelection( 0 );
|
||||
break;
|
||||
|
||||
case ZONE_CONTAINER::DIAGONAL_EDGE:
|
||||
m_OutlineAppearanceCtrl->SetSelection( 1 );
|
||||
break;
|
||||
|
||||
case ZONE_CONTAINER::DIAGONAL_FULL:
|
||||
m_OutlineAppearanceCtrl->SetSelection( 2 );
|
||||
break;
|
||||
}
|
||||
|
||||
// Build copper layer list and append to layer widget
|
||||
LSET show = LSET::AllCuMask( board->GetCopperLayerCount() );
|
||||
|
||||
auto* checkColumn = m_layers->AppendToggleColumn( wxEmptyString );
|
||||
auto* layerColumn = m_layers->AppendIconTextColumn( wxEmptyString );
|
||||
|
||||
wxVector<wxVariant> row;
|
||||
int minNamesWidth = 0;
|
||||
|
||||
for( LSEQ cu_stack = show.UIOrder(); cu_stack; ++cu_stack )
|
||||
{
|
||||
PCB_LAYER_ID layer = *cu_stack;
|
||||
|
||||
msg = board->GetLayerName( layer );
|
||||
wxSize tsize( GetTextSize( msg, m_layers ) );
|
||||
minNamesWidth = std::max( minNamesWidth, tsize.x );
|
||||
|
||||
COLOR4D layerColor = m_parent->Settings().Colors().GetLayerColor( layer );
|
||||
wxBitmap bitmap = COLOR_SWATCH::MakeBitmap( layerColor, backgroundColor, LAYER_BITMAP_SIZE );
|
||||
wxIcon icon;
|
||||
icon.CopyFromBitmap( bitmap );
|
||||
|
||||
row.clear();
|
||||
row.push_back( m_zonesettings.m_Layers.test( layer ) );
|
||||
row.push_back( wxVariant( wxDataViewIconText( msg, icon ) ) );
|
||||
m_layers->AppendItem( row );
|
||||
}
|
||||
|
||||
// Init keepout parameters:
|
||||
m_cbTracksCtrl->SetValue( m_zonesettings.GetDoNotAllowTracks() );
|
||||
m_cbViasCtrl->SetValue( m_zonesettings.GetDoNotAllowVias() );
|
||||
m_cbCopperPourCtrl->SetValue( m_zonesettings.GetDoNotAllowCopperPour() );
|
||||
|
||||
checkColumn->SetWidth( 25 ); // if only wxCOL_WIDTH_AUTOSIZE worked on all platforms...
|
||||
layerColumn->SetMinWidth( minNamesWidth + LAYER_BITMAP_SIZE.x + 25 );
|
||||
m_cbConstrainCtrl->SetValue( m_zonesettings.m_Zone_45_Only );
|
||||
|
||||
// You'd think the fact that m_layers is a list would encourage wxWidgets not to save room
|
||||
// for the tree expanders... but you'd be wrong. Force indent to 0.
|
||||
m_layers->SetIndent( 0 );
|
||||
m_layers->SetMinSize( wxSize( checkColumn->GetWidth() + layerColumn->GetWidth(), -1 ) );
|
||||
|
||||
m_layers->Update();
|
||||
|
||||
Update();
|
||||
|
||||
m_sdbSizerButtonsOK->Enable( m_zonesettings.m_Layers.count() > 0 );
|
||||
}
|
||||
|
||||
|
||||
bool DIALOG_KEEPOUT_AREA_PROPERTIES::TransferDataFromWindow()
|
||||
{
|
||||
if( AcceptOptionsForKeepOut() )
|
||||
switch( m_zonesettings.m_Zone_HatchingStyle )
|
||||
{
|
||||
*m_ptr = m_zonesettings;
|
||||
return true;
|
||||
case ZONE_CONTAINER::NO_HATCH: m_OutlineAppearanceCtrl->SetSelection( 0 ); break;
|
||||
case ZONE_CONTAINER::DIAGONAL_EDGE: m_OutlineAppearanceCtrl->SetSelection( 1 ); break;
|
||||
case ZONE_CONTAINER::DIAGONAL_FULL: m_OutlineAppearanceCtrl->SetSelection( 2 ); break;
|
||||
}
|
||||
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
void DIALOG_KEEPOUT_AREA_PROPERTIES::OnLayerSelection( wxDataViewEvent& event )
|
||||
{
|
||||
if( event.GetColumn() != 0 )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
wxDataViewItem item = event.GetItem();
|
||||
|
||||
int row = m_layers->ItemToRow( item );
|
||||
int row = m_layers->ItemToRow( event.GetItem() );
|
||||
wxVariant layerID;
|
||||
m_layers->GetValue( layerID, row, 2 );
|
||||
bool selected = m_layers->GetToggleValue( row, 0 );
|
||||
|
||||
BOARD* board = m_parent->GetBoard();
|
||||
LSEQ cu_stack = LSET::AllCuMask( board->GetCopperLayerCount() ).UIOrder();
|
||||
|
||||
if( row >= 0 && row < (int)cu_stack.size() )
|
||||
{
|
||||
m_zonesettings.m_Layers.set( cu_stack[ row ], selected );
|
||||
}
|
||||
|
||||
m_sdbSizerButtonsOK->Enable( m_zonesettings.m_Layers.count() > 0 );
|
||||
m_zonesettings.m_Layers.set( ToLAYER_ID( layerID.GetInteger() ), selected );
|
||||
}
|
||||
|
||||
|
||||
bool DIALOG_KEEPOUT_AREA_PROPERTIES::AcceptOptionsForKeepOut()
|
||||
bool DIALOG_KEEPOUT_AREA_PROPERTIES::TransferDataFromWindow()
|
||||
{
|
||||
// Init keepout parameters:
|
||||
m_zonesettings.SetIsKeepout( true );
|
||||
|
@ -245,8 +125,7 @@ bool DIALOG_KEEPOUT_AREA_PROPERTIES::AcceptOptionsForKeepOut()
|
|||
! m_zonesettings.GetDoNotAllowVias() &&
|
||||
! m_zonesettings.GetDoNotAllowCopperPour() )
|
||||
{
|
||||
DisplayError( NULL,
|
||||
_("Tracks, vias, and pads are allowed. The keepout is useless" ) );
|
||||
DisplayError( NULL, _("Tracks, vias, and pads are allowed. The keepout will have no effect." ) );
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -258,43 +137,19 @@ bool DIALOG_KEEPOUT_AREA_PROPERTIES::AcceptOptionsForKeepOut()
|
|||
|
||||
switch( m_OutlineAppearanceCtrl->GetSelection() )
|
||||
{
|
||||
case 0:
|
||||
m_zonesettings.m_Zone_HatchingStyle = ZONE_CONTAINER::NO_HATCH;
|
||||
break;
|
||||
|
||||
case 1:
|
||||
m_zonesettings.m_Zone_HatchingStyle = ZONE_CONTAINER::DIAGONAL_EDGE;
|
||||
break;
|
||||
|
||||
case 2:
|
||||
m_zonesettings.m_Zone_HatchingStyle = ZONE_CONTAINER::DIAGONAL_FULL;
|
||||
break;
|
||||
case 0: m_zonesettings.m_Zone_HatchingStyle = ZONE_CONTAINER::NO_HATCH; break;
|
||||
case 1: m_zonesettings.m_Zone_HatchingStyle = ZONE_CONTAINER::DIAGONAL_EDGE; break;
|
||||
case 2: m_zonesettings.m_Zone_HatchingStyle = ZONE_CONTAINER::DIAGONAL_FULL; break;
|
||||
}
|
||||
|
||||
if( m_config )
|
||||
{
|
||||
m_config->Write( ZONE_NET_OUTLINES_HATCH_OPTION_KEY,
|
||||
(long) m_zonesettings.m_Zone_HatchingStyle );
|
||||
}
|
||||
|
||||
if( m_OrientEdgesOpt->GetSelection() == 0 )
|
||||
m_zonesettings.m_Zone_45_Only = false;
|
||||
else
|
||||
m_zonesettings.m_Zone_45_Only = true;
|
||||
m_config->Write( ZONE_NET_OUTLINES_STYLE_KEY, (long) m_zonesettings.m_Zone_HatchingStyle );
|
||||
|
||||
m_zonesettings.m_Zone_45_Only = m_cbConstrainCtrl->GetValue();
|
||||
m_zonesettings.m_ZonePriority = 0; // for a keepout, this param is not used.
|
||||
// set it to 0
|
||||
|
||||
*m_ptr = m_zonesettings;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
void DIALOG_KEEPOUT_AREA_PROPERTIES::OnSizeLayersList( wxSizeEvent& event )
|
||||
{
|
||||
int nameColWidth = event.GetSize().GetX() - m_layers->GetColumn( 0 )->GetWidth() - 8;
|
||||
|
||||
m_layers->GetColumn( 1 )->SetWidth( nameColWidth );
|
||||
|
||||
event.Skip();
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
///////////////////////////////////////////////////////////////////////////
|
||||
// C++ code generated with wxFormBuilder (version Apr 20 2018)
|
||||
// C++ code generated with wxFormBuilder (version Dec 30 2017)
|
||||
// http://www.wxformbuilder.org/
|
||||
//
|
||||
// PLEASE DO *NOT* EDIT THIS FILE!
|
||||
|
@ -24,10 +24,9 @@ DIALOG_KEEPOUT_AREA_PROPERTIES_BASE::DIALOG_KEEPOUT_AREA_PROPERTIES_BASE( wxWind
|
|||
|
||||
m_staticTextLayerSelection = new wxStaticText( this, wxID_ANY, _("Layers:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_staticTextLayerSelection->Wrap( -1 );
|
||||
|
||||
bLayersListSizer->Add( m_staticTextLayerSelection, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
m_layers = new wxDataViewListCtrl( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxDV_NO_HEADER );
|
||||
m_layers = new wxDataViewListCtrl( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxDV_NO_HEADER|wxSUNKEN_BORDER );
|
||||
bLayersListSizer->Add( m_layers, 1, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
|
||||
|
@ -36,54 +35,45 @@ DIALOG_KEEPOUT_AREA_PROPERTIES_BASE::DIALOG_KEEPOUT_AREA_PROPERTIES_BASE( wxWind
|
|||
wxBoxSizer* bSizerRight;
|
||||
bSizerRight = new wxBoxSizer( wxVERTICAL );
|
||||
|
||||
m_cbTracksCtrl = new wxCheckBox( this, wxID_ANY, _("Keepout tracks"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_cbTracksCtrl = new wxCheckBox( this, wxID_ANY, _("Keep out tracks"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
bSizerRight->Add( m_cbTracksCtrl, 0, wxTOP|wxRIGHT|wxLEFT|wxEXPAND, 5 );
|
||||
|
||||
m_cbViasCtrl = new wxCheckBox( this, wxID_ANY, _("Keepout vias"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_cbViasCtrl = new wxCheckBox( this, wxID_ANY, _("Keep out vias"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
bSizerRight->Add( m_cbViasCtrl, 0, wxTOP|wxRIGHT|wxLEFT|wxEXPAND, 5 );
|
||||
|
||||
m_cbCopperPourCtrl = new wxCheckBox( this, wxID_ANY, _("Keepout copper pours"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_cbCopperPourCtrl = new wxCheckBox( this, wxID_ANY, _("Keep out copper pours"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
bSizerRight->Add( m_cbCopperPourCtrl, 0, wxALL|wxEXPAND, 5 );
|
||||
|
||||
|
||||
bSizerRight->Add( 0, 0, 0, wxEXPAND|wxTOP|wxBOTTOM, 5 );
|
||||
|
||||
m_cbConstrainCtrl = new wxCheckBox( this, wxID_ANY, _("Constrain outline to H, V and 45 deg"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
bSizerRight->Add( m_cbConstrainCtrl, 0, wxALL, 5 );
|
||||
|
||||
wxBoxSizer* bSizerLowerRight;
|
||||
bSizerLowerRight = new wxBoxSizer( wxVERTICAL );
|
||||
bSizerLowerRight = new wxBoxSizer( wxHORIZONTAL );
|
||||
|
||||
m_staticTextSlope = new wxStaticText( this, wxID_ANY, _("Outline slope:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_staticTextSlope->Wrap( -1 );
|
||||
|
||||
bSizerLowerRight->Add( m_staticTextSlope, 0, wxLEFT|wxRIGHT|wxTOP, 5 );
|
||||
|
||||
wxString m_OrientEdgesOptChoices[] = { _("Arbitrary"), _("H, V, and 45 deg only") };
|
||||
int m_OrientEdgesOptNChoices = sizeof( m_OrientEdgesOptChoices ) / sizeof( wxString );
|
||||
m_OrientEdgesOpt = new wxChoice( this, ID_M_ORIENTEDGESOPT, wxDefaultPosition, wxDefaultSize, m_OrientEdgesOptNChoices, m_OrientEdgesOptChoices, 0 );
|
||||
m_OrientEdgesOpt->SetSelection( 0 );
|
||||
bSizerLowerRight->Add( m_OrientEdgesOpt, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 );
|
||||
|
||||
m_staticTextStyle = new wxStaticText( this, wxID_ANY, _("Outline style:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_staticTextStyle = new wxStaticText( this, wxID_ANY, _("Outline display:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_staticTextStyle->Wrap( -1 );
|
||||
|
||||
bSizerLowerRight->Add( m_staticTextStyle, 0, wxLEFT|wxRIGHT|wxTOP, 5 );
|
||||
bSizerLowerRight->Add( m_staticTextStyle, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
wxString m_OutlineAppearanceCtrlChoices[] = { _("Line"), _("Hatched"), _("Fully hatched") };
|
||||
int m_OutlineAppearanceCtrlNChoices = sizeof( m_OutlineAppearanceCtrlChoices ) / sizeof( wxString );
|
||||
m_OutlineAppearanceCtrl = new wxChoice( this, ID_M_OUTLINEAPPEARANCECTRL, wxDefaultPosition, wxDefaultSize, m_OutlineAppearanceCtrlNChoices, m_OutlineAppearanceCtrlChoices, 0 );
|
||||
m_OutlineAppearanceCtrl->SetSelection( 0 );
|
||||
bSizerLowerRight->Add( m_OutlineAppearanceCtrl, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 );
|
||||
bSizerLowerRight->Add( m_OutlineAppearanceCtrl, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
|
||||
bSizerRight->Add( bSizerLowerRight, 1, wxEXPAND, 5 );
|
||||
|
||||
|
||||
bUpperSizer->Add( bSizerRight, 0, wxEXPAND|wxALL, 5 );
|
||||
bUpperSizer->Add( bSizerRight, 0, wxEXPAND|wxALL, 10 );
|
||||
|
||||
|
||||
bMainSizer->Add( bUpperSizer, 1, wxEXPAND, 5 );
|
||||
bMainSizer->Add( bUpperSizer, 1, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
m_staticline1 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
|
||||
bMainSizer->Add( m_staticline1, 0, wxEXPAND | wxALL, 5 );
|
||||
bMainSizer->Add( m_staticline1, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
m_sdbSizerButtons = new wxStdDialogButtonSizer();
|
||||
m_sdbSizerButtonsOK = new wxButton( this, wxID_OK );
|
||||
|
@ -92,7 +82,7 @@ DIALOG_KEEPOUT_AREA_PROPERTIES_BASE::DIALOG_KEEPOUT_AREA_PROPERTIES_BASE( wxWind
|
|||
m_sdbSizerButtons->AddButton( m_sdbSizerButtonsCancel );
|
||||
m_sdbSizerButtons->Realize();
|
||||
|
||||
bMainSizer->Add( m_sdbSizerButtons, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 );
|
||||
bMainSizer->Add( m_sdbSizerButtons, 0, wxEXPAND|wxALL, 5 );
|
||||
|
||||
|
||||
this->SetSizer( bMainSizer );
|
||||
|
|
|
@ -14,7 +14,6 @@
|
|||
<property name="file">dialog_keepout_area_properties_base</property>
|
||||
<property name="first_id">1000</property>
|
||||
<property name="help_provider">none</property>
|
||||
<property name="indent_with_spaces"></property>
|
||||
<property name="internationalize">1</property>
|
||||
<property name="name">dialog_keepout_areas_properties_base</property>
|
||||
<property name="namespace"></property>
|
||||
|
@ -96,7 +95,7 @@
|
|||
<property name="permission">none</property>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxEXPAND</property>
|
||||
<property name="flag">wxEXPAND|wxTOP|wxRIGHT|wxLEFT</property>
|
||||
<property name="proportion">1</property>
|
||||
<object class="wxBoxSizer" expanded="1">
|
||||
<property name="minimum_size"></property>
|
||||
|
@ -145,7 +144,6 @@
|
|||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="label">Layers:</property>
|
||||
<property name="markup">0</property>
|
||||
<property name="max_size"></property>
|
||||
<property name="maximize_button">0</property>
|
||||
<property name="maximum_size"></property>
|
||||
|
@ -220,7 +218,7 @@
|
|||
<property name="tooltip"></property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<property name="window_style">wxSUNKEN_BORDER</property>
|
||||
<event name="OnChar"></event>
|
||||
<event name="OnDataViewListCtrlColumnHeaderClick"></event>
|
||||
<event name="OnDataViewListCtrlColumnHeaderRightClick"></event>
|
||||
|
@ -267,7 +265,7 @@
|
|||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="border">10</property>
|
||||
<property name="flag">wxEXPAND|wxALL</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxBoxSizer" expanded="1">
|
||||
|
@ -308,7 +306,7 @@
|
|||
<property name="gripper">0</property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="label">Keepout tracks</property>
|
||||
<property name="label">Keep out tracks</property>
|
||||
<property name="max_size"></property>
|
||||
<property name="maximize_button">0</property>
|
||||
<property name="maximum_size"></property>
|
||||
|
@ -396,7 +394,7 @@
|
|||
<property name="gripper">0</property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="label">Keepout vias</property>
|
||||
<property name="label">Keep out vias</property>
|
||||
<property name="max_size"></property>
|
||||
<property name="maximize_button">0</property>
|
||||
<property name="maximum_size"></property>
|
||||
|
@ -484,7 +482,7 @@
|
|||
<property name="gripper">0</property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="label">Keepout copper pours</property>
|
||||
<property name="label">Keep out copper pours</property>
|
||||
<property name="max_size"></property>
|
||||
<property name="maximize_button">0</property>
|
||||
<property name="maximum_size"></property>
|
||||
|
@ -549,6 +547,94 @@
|
|||
<property name="width">0</property>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxALL</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxCheckBox" expanded="1">
|
||||
<property name="BottomDockable">1</property>
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
<property name="TopDockable">1</property>
|
||||
<property name="aui_layer"></property>
|
||||
<property name="aui_name"></property>
|
||||
<property name="aui_position"></property>
|
||||
<property name="aui_row"></property>
|
||||
<property name="best_size"></property>
|
||||
<property name="bg"></property>
|
||||
<property name="caption"></property>
|
||||
<property name="caption_visible">1</property>
|
||||
<property name="center_pane">0</property>
|
||||
<property name="checked">0</property>
|
||||
<property name="close_button">1</property>
|
||||
<property name="context_help"></property>
|
||||
<property name="context_menu">1</property>
|
||||
<property name="default_pane">0</property>
|
||||
<property name="dock">Dock</property>
|
||||
<property name="dock_fixed">0</property>
|
||||
<property name="docking">Left</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="floatable">1</property>
|
||||
<property name="font"></property>
|
||||
<property name="gripper">0</property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="label">Constrain outline to H, V and 45 deg</property>
|
||||
<property name="max_size"></property>
|
||||
<property name="maximize_button">0</property>
|
||||
<property name="maximum_size"></property>
|
||||
<property name="min_size"></property>
|
||||
<property name="minimize_button">0</property>
|
||||
<property name="minimum_size"></property>
|
||||
<property name="moveable">1</property>
|
||||
<property name="name">m_cbConstrainCtrl</property>
|
||||
<property name="pane_border">1</property>
|
||||
<property name="pane_position"></property>
|
||||
<property name="pane_size"></property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="pin_button">1</property>
|
||||
<property name="pos"></property>
|
||||
<property name="resize">Resizable</property>
|
||||
<property name="show">1</property>
|
||||
<property name="size"></property>
|
||||
<property name="style"></property>
|
||||
<property name="subclass">; forward_declare</property>
|
||||
<property name="toolbar_pane">0</property>
|
||||
<property name="tooltip"></property>
|
||||
<property name="validator_data_type"></property>
|
||||
<property name="validator_style">wxFILTER_NONE</property>
|
||||
<property name="validator_type">wxDefaultValidator</property>
|
||||
<property name="validator_variable"></property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<event name="OnChar"></event>
|
||||
<event name="OnCheckBox"></event>
|
||||
<event name="OnEnterWindow"></event>
|
||||
<event name="OnEraseBackground"></event>
|
||||
<event name="OnKeyDown"></event>
|
||||
<event name="OnKeyUp"></event>
|
||||
<event name="OnKillFocus"></event>
|
||||
<event name="OnLeaveWindow"></event>
|
||||
<event name="OnLeftDClick"></event>
|
||||
<event name="OnLeftDown"></event>
|
||||
<event name="OnLeftUp"></event>
|
||||
<event name="OnMiddleDClick"></event>
|
||||
<event name="OnMiddleDown"></event>
|
||||
<event name="OnMiddleUp"></event>
|
||||
<event name="OnMotion"></event>
|
||||
<event name="OnMouseEvents"></event>
|
||||
<event name="OnMouseWheel"></event>
|
||||
<event name="OnPaint"></event>
|
||||
<event name="OnRightDClick"></event>
|
||||
<event name="OnRightDown"></event>
|
||||
<event name="OnRightUp"></event>
|
||||
<event name="OnSetFocus"></event>
|
||||
<event name="OnSize"></event>
|
||||
<event name="OnUpdateUI"></event>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxEXPAND</property>
|
||||
|
@ -556,11 +642,11 @@
|
|||
<object class="wxBoxSizer" expanded="1">
|
||||
<property name="minimum_size"></property>
|
||||
<property name="name">bSizerLowerRight</property>
|
||||
<property name="orient">wxVERTICAL</property>
|
||||
<property name="orient">wxHORIZONTAL</property>
|
||||
<property name="permission">none</property>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxLEFT|wxRIGHT|wxTOP</property>
|
||||
<property name="flag">wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxStaticText" expanded="1">
|
||||
<property name="BottomDockable">1</property>
|
||||
|
@ -590,180 +676,7 @@
|
|||
<property name="gripper">0</property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="label">Outline slope:</property>
|
||||
<property name="markup">0</property>
|
||||
<property name="max_size"></property>
|
||||
<property name="maximize_button">0</property>
|
||||
<property name="maximum_size"></property>
|
||||
<property name="min_size"></property>
|
||||
<property name="minimize_button">0</property>
|
||||
<property name="minimum_size"></property>
|
||||
<property name="moveable">1</property>
|
||||
<property name="name">m_staticTextSlope</property>
|
||||
<property name="pane_border">1</property>
|
||||
<property name="pane_position"></property>
|
||||
<property name="pane_size"></property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="pin_button">1</property>
|
||||
<property name="pos"></property>
|
||||
<property name="resize">Resizable</property>
|
||||
<property name="show">1</property>
|
||||
<property name="size"></property>
|
||||
<property name="style"></property>
|
||||
<property name="subclass"></property>
|
||||
<property name="toolbar_pane">0</property>
|
||||
<property name="tooltip"></property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<property name="wrap">-1</property>
|
||||
<event name="OnChar"></event>
|
||||
<event name="OnEnterWindow"></event>
|
||||
<event name="OnEraseBackground"></event>
|
||||
<event name="OnKeyDown"></event>
|
||||
<event name="OnKeyUp"></event>
|
||||
<event name="OnKillFocus"></event>
|
||||
<event name="OnLeaveWindow"></event>
|
||||
<event name="OnLeftDClick"></event>
|
||||
<event name="OnLeftDown"></event>
|
||||
<event name="OnLeftUp"></event>
|
||||
<event name="OnMiddleDClick"></event>
|
||||
<event name="OnMiddleDown"></event>
|
||||
<event name="OnMiddleUp"></event>
|
||||
<event name="OnMotion"></event>
|
||||
<event name="OnMouseEvents"></event>
|
||||
<event name="OnMouseWheel"></event>
|
||||
<event name="OnPaint"></event>
|
||||
<event name="OnRightDClick"></event>
|
||||
<event name="OnRightDown"></event>
|
||||
<event name="OnRightUp"></event>
|
||||
<event name="OnSetFocus"></event>
|
||||
<event name="OnSize"></event>
|
||||
<event name="OnUpdateUI"></event>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxChoice" expanded="1">
|
||||
<property name="BottomDockable">1</property>
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
<property name="TopDockable">1</property>
|
||||
<property name="aui_layer"></property>
|
||||
<property name="aui_name"></property>
|
||||
<property name="aui_position"></property>
|
||||
<property name="aui_row"></property>
|
||||
<property name="best_size"></property>
|
||||
<property name="bg"></property>
|
||||
<property name="caption"></property>
|
||||
<property name="caption_visible">1</property>
|
||||
<property name="center_pane">0</property>
|
||||
<property name="choices">"Arbitrary" "H, V, and 45 deg only"</property>
|
||||
<property name="close_button">1</property>
|
||||
<property name="context_help"></property>
|
||||
<property name="context_menu">1</property>
|
||||
<property name="default_pane">0</property>
|
||||
<property name="dock">Dock</property>
|
||||
<property name="dock_fixed">0</property>
|
||||
<property name="docking">Left</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="floatable">1</property>
|
||||
<property name="font"></property>
|
||||
<property name="gripper">0</property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">ID_M_ORIENTEDGESOPT</property>
|
||||
<property name="max_size"></property>
|
||||
<property name="maximize_button">0</property>
|
||||
<property name="maximum_size"></property>
|
||||
<property name="min_size"></property>
|
||||
<property name="minimize_button">0</property>
|
||||
<property name="minimum_size"></property>
|
||||
<property name="moveable">1</property>
|
||||
<property name="name">m_OrientEdgesOpt</property>
|
||||
<property name="pane_border">1</property>
|
||||
<property name="pane_position"></property>
|
||||
<property name="pane_size"></property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="pin_button">1</property>
|
||||
<property name="pos"></property>
|
||||
<property name="resize">Resizable</property>
|
||||
<property name="selection">0</property>
|
||||
<property name="show">1</property>
|
||||
<property name="size"></property>
|
||||
<property name="style"></property>
|
||||
<property name="subclass"></property>
|
||||
<property name="toolbar_pane">0</property>
|
||||
<property name="tooltip"></property>
|
||||
<property name="validator_data_type"></property>
|
||||
<property name="validator_style">wxFILTER_NONE</property>
|
||||
<property name="validator_type">wxDefaultValidator</property>
|
||||
<property name="validator_variable"></property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<event name="OnChar"></event>
|
||||
<event name="OnChoice"></event>
|
||||
<event name="OnEnterWindow"></event>
|
||||
<event name="OnEraseBackground"></event>
|
||||
<event name="OnKeyDown"></event>
|
||||
<event name="OnKeyUp"></event>
|
||||
<event name="OnKillFocus"></event>
|
||||
<event name="OnLeaveWindow"></event>
|
||||
<event name="OnLeftDClick"></event>
|
||||
<event name="OnLeftDown"></event>
|
||||
<event name="OnLeftUp"></event>
|
||||
<event name="OnMiddleDClick"></event>
|
||||
<event name="OnMiddleDown"></event>
|
||||
<event name="OnMiddleUp"></event>
|
||||
<event name="OnMotion"></event>
|
||||
<event name="OnMouseEvents"></event>
|
||||
<event name="OnMouseWheel"></event>
|
||||
<event name="OnPaint"></event>
|
||||
<event name="OnRightDClick"></event>
|
||||
<event name="OnRightDown"></event>
|
||||
<event name="OnRightUp"></event>
|
||||
<event name="OnSetFocus"></event>
|
||||
<event name="OnSize"></event>
|
||||
<event name="OnUpdateUI"></event>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxLEFT|wxRIGHT|wxTOP</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxStaticText" expanded="1">
|
||||
<property name="BottomDockable">1</property>
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
<property name="TopDockable">1</property>
|
||||
<property name="aui_layer"></property>
|
||||
<property name="aui_name"></property>
|
||||
<property name="aui_position"></property>
|
||||
<property name="aui_row"></property>
|
||||
<property name="best_size"></property>
|
||||
<property name="bg"></property>
|
||||
<property name="caption"></property>
|
||||
<property name="caption_visible">1</property>
|
||||
<property name="center_pane">0</property>
|
||||
<property name="close_button">1</property>
|
||||
<property name="context_help"></property>
|
||||
<property name="context_menu">1</property>
|
||||
<property name="default_pane">0</property>
|
||||
<property name="dock">Dock</property>
|
||||
<property name="dock_fixed">0</property>
|
||||
<property name="docking">Left</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="floatable">1</property>
|
||||
<property name="font"></property>
|
||||
<property name="gripper">0</property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="label">Outline style:</property>
|
||||
<property name="markup">0</property>
|
||||
<property name="label">Outline display:</property>
|
||||
<property name="max_size"></property>
|
||||
<property name="maximize_button">0</property>
|
||||
<property name="maximum_size"></property>
|
||||
|
@ -816,7 +729,7 @@
|
|||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT</property>
|
||||
<property name="flag">wxEXPAND|wxRIGHT|wxLEFT</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxChoice" expanded="1">
|
||||
<property name="BottomDockable">1</property>
|
||||
|
@ -910,7 +823,7 @@
|
|||
</object>
|
||||
<object class="sizeritem" expanded="0">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxEXPAND | wxALL</property>
|
||||
<property name="flag">wxEXPAND|wxTOP|wxRIGHT|wxLEFT</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxStaticLine" expanded="0">
|
||||
<property name="BottomDockable">1</property>
|
||||
|
@ -991,7 +904,7 @@
|
|||
</object>
|
||||
<object class="sizeritem" expanded="0">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT</property>
|
||||
<property name="flag">wxEXPAND|wxALL</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxStdDialogButtonSizer" expanded="0">
|
||||
<property name="Apply">0</property>
|
||||
|
|
|
@ -1,68 +1,66 @@
|
|||
///////////////////////////////////////////////////////////////////////////
|
||||
// C++ code generated with wxFormBuilder (version Apr 20 2018)
|
||||
// http://www.wxformbuilder.org/
|
||||
//
|
||||
// PLEASE DO *NOT* EDIT THIS FILE!
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef __DIALOG_KEEPOUT_AREA_PROPERTIES_BASE_H__
|
||||
#define __DIALOG_KEEPOUT_AREA_PROPERTIES_BASE_H__
|
||||
|
||||
#include <wx/artprov.h>
|
||||
#include <wx/xrc/xmlres.h>
|
||||
#include <wx/intl.h>
|
||||
#include "dialog_shim.h"
|
||||
#include <wx/string.h>
|
||||
#include <wx/stattext.h>
|
||||
#include <wx/gdicmn.h>
|
||||
#include <wx/font.h>
|
||||
#include <wx/colour.h>
|
||||
#include <wx/settings.h>
|
||||
#include <wx/dataview.h>
|
||||
#include <wx/sizer.h>
|
||||
#include <wx/checkbox.h>
|
||||
#include <wx/choice.h>
|
||||
#include <wx/statline.h>
|
||||
#include <wx/button.h>
|
||||
#include <wx/dialog.h>
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#define ID_M_ORIENTEDGESOPT 1000
|
||||
#define ID_M_OUTLINEAPPEARANCECTRL 1001
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
/// Class DIALOG_KEEPOUT_AREA_PROPERTIES_BASE
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
class DIALOG_KEEPOUT_AREA_PROPERTIES_BASE : public DIALOG_SHIM
|
||||
{
|
||||
private:
|
||||
|
||||
protected:
|
||||
wxStaticText* m_staticTextLayerSelection;
|
||||
wxDataViewListCtrl* m_layers;
|
||||
wxCheckBox* m_cbTracksCtrl;
|
||||
wxCheckBox* m_cbViasCtrl;
|
||||
wxCheckBox* m_cbCopperPourCtrl;
|
||||
wxStaticText* m_staticTextSlope;
|
||||
wxChoice* m_OrientEdgesOpt;
|
||||
wxStaticText* m_staticTextStyle;
|
||||
wxChoice* m_OutlineAppearanceCtrl;
|
||||
wxStaticLine* m_staticline1;
|
||||
wxStdDialogButtonSizer* m_sdbSizerButtons;
|
||||
wxButton* m_sdbSizerButtonsOK;
|
||||
wxButton* m_sdbSizerButtonsCancel;
|
||||
|
||||
// Virtual event handlers, overide them in your derived class
|
||||
virtual void OnLayerSelection( wxDataViewEvent& event ) { event.Skip(); }
|
||||
virtual void OnSizeLayersList( wxSizeEvent& event ) { event.Skip(); }
|
||||
|
||||
|
||||
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( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER|wxFULL_REPAINT_ON_RESIZE|wxSUNKEN_BORDER );
|
||||
~DIALOG_KEEPOUT_AREA_PROPERTIES_BASE();
|
||||
|
||||
};
|
||||
|
||||
#endif //__DIALOG_KEEPOUT_AREA_PROPERTIES_BASE_H__
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// C++ code generated with wxFormBuilder (version Dec 30 2017)
|
||||
// http://www.wxformbuilder.org/
|
||||
//
|
||||
// PLEASE DO *NOT* EDIT THIS FILE!
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef __DIALOG_KEEPOUT_AREA_PROPERTIES_BASE_H__
|
||||
#define __DIALOG_KEEPOUT_AREA_PROPERTIES_BASE_H__
|
||||
|
||||
#include <wx/artprov.h>
|
||||
#include <wx/xrc/xmlres.h>
|
||||
#include <wx/intl.h>
|
||||
#include "dialog_shim.h"
|
||||
#include <wx/string.h>
|
||||
#include <wx/stattext.h>
|
||||
#include <wx/gdicmn.h>
|
||||
#include <wx/font.h>
|
||||
#include <wx/colour.h>
|
||||
#include <wx/settings.h>
|
||||
#include <wx/dataview.h>
|
||||
#include <wx/sizer.h>
|
||||
#include <wx/checkbox.h>
|
||||
#include <wx/choice.h>
|
||||
#include <wx/statline.h>
|
||||
#include <wx/button.h>
|
||||
#include <wx/dialog.h>
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#define ID_M_OUTLINEAPPEARANCECTRL 1000
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
/// Class DIALOG_KEEPOUT_AREA_PROPERTIES_BASE
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
class DIALOG_KEEPOUT_AREA_PROPERTIES_BASE : public DIALOG_SHIM
|
||||
{
|
||||
private:
|
||||
|
||||
protected:
|
||||
wxStaticText* m_staticTextLayerSelection;
|
||||
wxDataViewListCtrl* m_layers;
|
||||
wxCheckBox* m_cbTracksCtrl;
|
||||
wxCheckBox* m_cbViasCtrl;
|
||||
wxCheckBox* m_cbCopperPourCtrl;
|
||||
wxCheckBox* m_cbConstrainCtrl;
|
||||
wxStaticText* m_staticTextStyle;
|
||||
wxChoice* m_OutlineAppearanceCtrl;
|
||||
wxStaticLine* m_staticline1;
|
||||
wxStdDialogButtonSizer* m_sdbSizerButtons;
|
||||
wxButton* m_sdbSizerButtonsOK;
|
||||
wxButton* m_sdbSizerButtonsCancel;
|
||||
|
||||
// Virtual event handlers, overide them in your derived class
|
||||
virtual void OnLayerSelection( wxDataViewEvent& event ) { event.Skip(); }
|
||||
virtual void OnSizeLayersList( wxSizeEvent& event ) { event.Skip(); }
|
||||
|
||||
|
||||
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( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER|wxFULL_REPAINT_ON_RESIZE|wxSUNKEN_BORDER );
|
||||
~DIALOG_KEEPOUT_AREA_PROPERTIES_BASE();
|
||||
|
||||
};
|
||||
|
||||
#endif //__DIALOG_KEEPOUT_AREA_PROPERTIES_BASE_H__
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
*
|
||||
* Copyright (C) 2014 Jean-Pierre Charras, jp.charras at wanadoo.fr
|
||||
* Copyright (C) 2014 SoftPLC Corporation, Dick Hollenbeck <dick@softplc.com>
|
||||
* Copyright (C) 1992-2014 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
* Copyright (C) 1992-2018 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
|
||||
|
@ -30,240 +30,133 @@
|
|||
#include <kiface_i.h>
|
||||
#include <confirm.h>
|
||||
#include <pcb_edit_frame.h>
|
||||
#include <base_units.h>
|
||||
|
||||
#include <class_board.h>
|
||||
#include <widgets/unit_binder.h>
|
||||
#include <class_zone.h>
|
||||
|
||||
#include <pcbnew.h>
|
||||
#include <zones.h>
|
||||
|
||||
#include <wx/imaglist.h> // needed for wx/listctrl.h, in wxGTK 2.8.12
|
||||
|
||||
#include <dialog_non_copper_zones_properties_base.h>
|
||||
|
||||
#define LAYER_BITMAP_SIZE_X 20
|
||||
#define LAYER_BITMAP_SIZE_Y 10
|
||||
|
||||
/**
|
||||
* Class DIALOG_NON_COPPER_ZONES_EDITOR
|
||||
* is a dialog editor for non copper zones properties,
|
||||
* derived from DIALOG_NONCOPPER_ZONES_PROPERTIES_BASE, which is maintained and
|
||||
* created by wxFormBuilder
|
||||
*/
|
||||
class DIALOG_NON_COPPER_ZONES_EDITOR : public DIALOG_NONCOPPER_ZONES_PROPERTIES_BASE
|
||||
{
|
||||
private:
|
||||
PCB_BASE_FRAME* m_parent;
|
||||
ZONE_CONTAINER* m_zone;
|
||||
ZONE_SETTINGS* m_ptr;
|
||||
ZONE_SETTINGS m_settings; // working copy of zone settings
|
||||
UNIT_BINDER m_minWidth;
|
||||
|
||||
void OnOkClick( wxCommandEvent& event ) override;
|
||||
void OnCancelClick( wxCommandEvent& event ) override;
|
||||
void Init();
|
||||
bool TransferDataToWindow() override;
|
||||
bool TransferDataFromWindow() override;
|
||||
|
||||
void OnLayerSelection( wxDataViewEvent& event ) override;
|
||||
|
||||
public:
|
||||
DIALOG_NON_COPPER_ZONES_EDITOR( PCB_BASE_FRAME* aParent,
|
||||
ZONE_CONTAINER* aZone, ZONE_SETTINGS* aSettings );
|
||||
|
||||
private:
|
||||
/**
|
||||
* Function makeLayerBitmap
|
||||
* creates the colored rectangle bitmaps used in the layer selection widget.
|
||||
* @param aColor is the color to fill the rectangle with.
|
||||
*/
|
||||
wxBitmap makeLayerBitmap( COLOR4D aColor );
|
||||
DIALOG_NON_COPPER_ZONES_EDITOR( PCB_BASE_FRAME* aParent, ZONE_SETTINGS* aSettings );
|
||||
};
|
||||
|
||||
|
||||
ZONE_EDIT_T InvokeNonCopperZonesEditor( PCB_BASE_FRAME* aParent,
|
||||
ZONE_CONTAINER* aZone, ZONE_SETTINGS* aSettings )
|
||||
int InvokeNonCopperZonesEditor( PCB_BASE_FRAME* aParent, ZONE_SETTINGS* aSettings )
|
||||
{
|
||||
DIALOG_NON_COPPER_ZONES_EDITOR dlg( aParent, aZone, aSettings );
|
||||
DIALOG_NON_COPPER_ZONES_EDITOR dlg( aParent, aSettings );
|
||||
|
||||
ZONE_EDIT_T result = ZONE_EDIT_T( dlg.ShowModal() );
|
||||
|
||||
return result;
|
||||
return dlg.ShowModal();
|
||||
}
|
||||
|
||||
|
||||
DIALOG_NON_COPPER_ZONES_EDITOR::DIALOG_NON_COPPER_ZONES_EDITOR( PCB_BASE_FRAME* aParent,
|
||||
ZONE_CONTAINER* aZone,
|
||||
ZONE_SETTINGS* aSettings ) :
|
||||
DIALOG_NONCOPPER_ZONES_PROPERTIES_BASE( aParent )
|
||||
DIALOG_NONCOPPER_ZONES_PROPERTIES_BASE( aParent ),
|
||||
m_minWidth( aParent, m_MinWidthLabel, m_MinWidthCtrl, m_MinWidthUnits, true, 10*IU_PER_MILS )
|
||||
{
|
||||
m_parent = aParent;
|
||||
|
||||
m_zone = aZone;
|
||||
m_ptr = aSettings;
|
||||
m_settings = *aSettings;
|
||||
|
||||
Init();
|
||||
m_settings.SetupLayersList( m_layers, m_parent, false );
|
||||
|
||||
// the size of some items has changed, so we must call SetSizeHints()
|
||||
GetSizer()->SetSizeHints( this );
|
||||
FinishDialogSettings();
|
||||
}
|
||||
|
||||
|
||||
void DIALOG_NON_COPPER_ZONES_EDITOR::Init()
|
||||
bool DIALOG_NON_COPPER_ZONES_EDITOR::TransferDataToWindow()
|
||||
{
|
||||
BOARD* board = m_parent->GetBoard();
|
||||
|
||||
SetReturnCode( ZONE_ABORT ); // Will be changed on button click
|
||||
|
||||
AddUnitSymbol( *m_MinThicknessValueTitle, g_UserUnit );
|
||||
wxString msg = StringFromValue( g_UserUnit, m_settings.m_ZoneMinThickness );
|
||||
m_ZoneMinThicknessCtrl->SetValue( msg );
|
||||
|
||||
if( m_settings.m_Zone_45_Only )
|
||||
m_OrientEdgesOpt->SetSelection( 1 );
|
||||
m_minWidth.SetValue( m_settings.m_ZoneMinThickness );
|
||||
m_ConstrainOpt->SetValue( m_settings.m_Zone_45_Only );
|
||||
|
||||
switch( m_settings.m_Zone_HatchingStyle )
|
||||
{
|
||||
case ZONE_CONTAINER::NO_HATCH:
|
||||
m_OutlineAppearanceCtrl->SetSelection( 0 );
|
||||
break;
|
||||
|
||||
case ZONE_CONTAINER::DIAGONAL_EDGE:
|
||||
m_OutlineAppearanceCtrl->SetSelection( 1 );
|
||||
break;
|
||||
|
||||
case ZONE_CONTAINER::DIAGONAL_FULL:
|
||||
m_OutlineAppearanceCtrl->SetSelection( 2 );
|
||||
break;
|
||||
case ZONE_CONTAINER::NO_HATCH: m_OutlineAppearanceCtrl->SetSelection( 0 ); break;
|
||||
case ZONE_CONTAINER::DIAGONAL_EDGE: m_OutlineAppearanceCtrl->SetSelection( 1 ); break;
|
||||
case ZONE_CONTAINER::DIAGONAL_FULL: m_OutlineAppearanceCtrl->SetSelection( 2 ); break;
|
||||
}
|
||||
|
||||
// Create one column in m_LayerSelectionCtrl
|
||||
wxListItem column0;
|
||||
column0.SetId( 0 );
|
||||
m_LayerSelectionCtrl->InsertColumn( 0, column0 );
|
||||
|
||||
// Create an icon list:
|
||||
wxImageList* imageList = new wxImageList( LAYER_BITMAP_SIZE_X, LAYER_BITMAP_SIZE_Y );
|
||||
m_LayerSelectionCtrl->AssignImageList( imageList, wxIMAGE_LIST_SMALL );
|
||||
|
||||
PCB_LAYER_ID lyrSelect = m_parent->GetActiveLayer();
|
||||
|
||||
if( m_zone )
|
||||
lyrSelect = m_zone->GetLayer();
|
||||
|
||||
int ctrlWidth = 0; // Min width for m_LayerSelectionCtrl to show the layers names
|
||||
int imgIdx = 0;
|
||||
|
||||
for( LSEQ seq = LSET::AllNonCuMask().Seq(); seq; ++seq, ++imgIdx )
|
||||
{
|
||||
PCB_LAYER_ID layer = *seq;
|
||||
|
||||
COLOR4D layerColor = m_parent->Settings().Colors().GetLayerColor( layer );
|
||||
|
||||
imageList->Add( makeLayerBitmap( layerColor ) );
|
||||
|
||||
msg = board->GetLayerName( layer );
|
||||
msg.Trim();
|
||||
|
||||
int itemIndex = m_LayerSelectionCtrl->InsertItem(
|
||||
m_LayerSelectionCtrl->GetItemCount(), msg, imgIdx );
|
||||
|
||||
if(lyrSelect == layer )
|
||||
m_LayerSelectionCtrl->Select( itemIndex );
|
||||
|
||||
wxSize tsize( GetTextSize( msg, m_LayerSelectionCtrl ) );
|
||||
ctrlWidth = std::max( ctrlWidth, tsize.x );
|
||||
}
|
||||
|
||||
// The most easy way to ensure the right size is to use wxLIST_AUTOSIZE
|
||||
// unfortunately this option does not work well both on
|
||||
// wxWidgets 2.8 ( column witdth too small), and
|
||||
// wxWidgets 2.9 ( column witdth too large)
|
||||
ctrlWidth += LAYER_BITMAP_SIZE_X + 25; // Add bitmap width + margin between bitmap and text
|
||||
m_LayerSelectionCtrl->SetColumnWidth( 0, ctrlWidth );
|
||||
|
||||
ctrlWidth += 25; // add small margin between text and window borders
|
||||
// and room for vertical scroll bar
|
||||
m_LayerSelectionCtrl->SetMinSize( wxSize( ctrlWidth, -1 ) );
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
void DIALOG_NON_COPPER_ZONES_EDITOR::OnOkClick( wxCommandEvent& event )
|
||||
void DIALOG_NON_COPPER_ZONES_EDITOR::OnLayerSelection( wxDataViewEvent& event )
|
||||
{
|
||||
wxString txtvalue = m_ZoneMinThicknessCtrl->GetValue();
|
||||
|
||||
m_settings.m_ZoneMinThickness = ValueFromString( g_UserUnit, txtvalue );
|
||||
|
||||
if( m_settings.m_ZoneMinThickness < 10 )
|
||||
{
|
||||
DisplayError( this,
|
||||
_( "Error :\nyou must choose a min thickness value bigger than 0.001 inch (or 0.0254 mm)" ) );
|
||||
if( event.GetColumn() != 0 )
|
||||
return;
|
||||
|
||||
int row = m_layers->ItemToRow( event.GetItem() );
|
||||
|
||||
if( m_layers->GetToggleValue( row, 0 ) )
|
||||
{
|
||||
wxVariant layerID;
|
||||
m_layers->GetValue( layerID, row, 2 );
|
||||
m_settings.m_CurrentZone_Layer = ToLAYER_ID( layerID.GetInteger() );
|
||||
|
||||
// Turn all other checkboxes off.
|
||||
for( int ii = 0; ii < m_layers->GetItemCount(); ++ii )
|
||||
{
|
||||
if( ii != row )
|
||||
m_layers->SetToggleValue( false, ii, 0 );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
bool DIALOG_NON_COPPER_ZONES_EDITOR::TransferDataFromWindow()
|
||||
{
|
||||
m_settings.m_ZoneMinThickness = m_minWidth.GetValue();
|
||||
|
||||
m_settings.m_FillMode = ZFM_POLYGONS; // Use always polygon fill mode
|
||||
|
||||
switch( m_OutlineAppearanceCtrl->GetSelection() )
|
||||
{
|
||||
case 0:
|
||||
m_settings.m_Zone_HatchingStyle = ZONE_CONTAINER::NO_HATCH;
|
||||
break;
|
||||
|
||||
case 1:
|
||||
m_settings.m_Zone_HatchingStyle = ZONE_CONTAINER::DIAGONAL_EDGE;
|
||||
break;
|
||||
|
||||
case 2:
|
||||
m_settings.m_Zone_HatchingStyle = ZONE_CONTAINER::DIAGONAL_FULL;
|
||||
break;
|
||||
case 0: m_settings.m_Zone_HatchingStyle = ZONE_CONTAINER::NO_HATCH; break;
|
||||
case 1: m_settings.m_Zone_HatchingStyle = ZONE_CONTAINER::DIAGONAL_EDGE; break;
|
||||
case 2: m_settings.m_Zone_HatchingStyle = ZONE_CONTAINER::DIAGONAL_FULL; break;
|
||||
}
|
||||
|
||||
wxConfigBase* cfg = Kiface().KifaceSettings();
|
||||
wxASSERT( cfg );
|
||||
|
||||
cfg->Write( ZONE_NET_OUTLINES_HATCH_OPTION_KEY, (long) m_settings.m_Zone_HatchingStyle );
|
||||
cfg->Write( ZONE_NET_OUTLINES_STYLE_KEY, (long) m_settings.m_Zone_HatchingStyle );
|
||||
|
||||
if( m_OrientEdgesOpt->GetSelection() == 0 )
|
||||
m_settings.m_Zone_45_Only = false;
|
||||
else
|
||||
m_settings.m_Zone_45_Only = true;
|
||||
m_settings.m_Zone_45_Only = m_ConstrainOpt->GetValue();
|
||||
|
||||
// Get the layer selection for this zone
|
||||
int ii = m_LayerSelectionCtrl->GetFirstSelected();
|
||||
|
||||
if( ii < 0 )
|
||||
int layer = -1;
|
||||
for( unsigned int ii = 0; ii < (int) m_layers->GetItemCount(); ++ii )
|
||||
{
|
||||
DisplayError( this, _( "Error : you must choose a layer" ) );
|
||||
return;
|
||||
if( m_layers->GetToggleValue( ii, 0 ) )
|
||||
{
|
||||
layer = ii;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
LSEQ seq = LSET::AllNonCuMask().Seq();
|
||||
|
||||
m_settings.m_CurrentZone_Layer = seq[ii];
|
||||
if( layer < 0 )
|
||||
{
|
||||
DisplayError( this, _( "No layer selected." ) );
|
||||
return false;
|
||||
}
|
||||
|
||||
*m_ptr = m_settings;
|
||||
|
||||
EndModal( ZONE_OK );
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
void DIALOG_NON_COPPER_ZONES_EDITOR::OnCancelClick( wxCommandEvent& event )
|
||||
{
|
||||
// do not save the edits.
|
||||
|
||||
EndModal( ZONE_ABORT );
|
||||
}
|
||||
|
||||
|
||||
wxBitmap DIALOG_NON_COPPER_ZONES_EDITOR::makeLayerBitmap( COLOR4D aColor )
|
||||
{
|
||||
wxBitmap bitmap( LAYER_BITMAP_SIZE_X, LAYER_BITMAP_SIZE_Y );
|
||||
wxBrush brush;
|
||||
wxMemoryDC iconDC;
|
||||
|
||||
iconDC.SelectObject( bitmap );
|
||||
brush.SetColour( aColor.ToColour() );
|
||||
brush.SetStyle( wxBRUSHSTYLE_SOLID );
|
||||
|
||||
iconDC.SetBrush( brush );
|
||||
iconDC.DrawRectangle( 0, 0, LAYER_BITMAP_SIZE_X, LAYER_BITMAP_SIZE_Y );
|
||||
|
||||
return bitmap;
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
///////////////////////////////////////////////////////////////////////////
|
||||
// C++ code generated with wxFormBuilder (version Apr 19 2018)
|
||||
// C++ code generated with wxFormBuilder (version Dec 30 2017)
|
||||
// http://www.wxformbuilder.org/
|
||||
//
|
||||
// PLEASE DO *NOT* EDIT THIS FILE!
|
||||
|
@ -9,11 +9,6 @@
|
|||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
BEGIN_EVENT_TABLE( DIALOG_NONCOPPER_ZONES_PROPERTIES_BASE, DIALOG_SHIM )
|
||||
EVT_BUTTON( wxID_CANCEL, DIALOG_NONCOPPER_ZONES_PROPERTIES_BASE::_wxFB_OnCancelClick )
|
||||
EVT_BUTTON( wxID_OK, DIALOG_NONCOPPER_ZONES_PROPERTIES_BASE::_wxFB_OnOkClick )
|
||||
END_EVENT_TABLE()
|
||||
|
||||
DIALOG_NONCOPPER_ZONES_PROPERTIES_BASE::DIALOG_NONCOPPER_ZONES_PROPERTIES_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 );
|
||||
|
@ -27,52 +22,61 @@ DIALOG_NONCOPPER_ZONES_PROPERTIES_BASE::DIALOG_NONCOPPER_ZONES_PROPERTIES_BASE(
|
|||
wxBoxSizer* bSizerLeft;
|
||||
bSizerLeft = 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 );
|
||||
bSizerLeft->Add( m_staticTextLayerSelection, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
m_LayerSelectionCtrl = new wxListView( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_ALIGN_LEFT|wxLC_NO_HEADER|wxLC_REPORT|wxLC_SINGLE_SEL );
|
||||
bSizerLeft->Add( m_LayerSelectionCtrl, 1, wxALL|wxEXPAND, 5 );
|
||||
m_layers = new wxDataViewListCtrl( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxDV_NO_HEADER|wxSUNKEN_BORDER );
|
||||
m_layers->SetMinSize( wxSize( -1,200 ) );
|
||||
|
||||
bSizerLeft->Add( m_layers, 0, wxALL, 5 );
|
||||
|
||||
|
||||
m_UpperSizer->Add( bSizerLeft, 1, wxEXPAND, 5 );
|
||||
m_UpperSizer->Add( bSizerLeft, 0, wxEXPAND, 5 );
|
||||
|
||||
wxBoxSizer* bSizerRight;
|
||||
bSizerRight = new wxBoxSizer( wxVERTICAL );
|
||||
|
||||
wxStaticBoxSizer* m_OutilinesBoxOpt;
|
||||
m_OutilinesBoxOpt = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Outlines Options:") ), wxVERTICAL );
|
||||
wxGridBagSizer* gbSizer1;
|
||||
gbSizer1 = new wxGridBagSizer( 0, 0 );
|
||||
gbSizer1->SetFlexibleDirection( wxBOTH );
|
||||
gbSizer1->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
|
||||
|
||||
wxString m_OrientEdgesOptChoices[] = { _("Any"), _("H, V and 45 deg") };
|
||||
int m_OrientEdgesOptNChoices = sizeof( m_OrientEdgesOptChoices ) / sizeof( wxString );
|
||||
m_OrientEdgesOpt = new wxRadioBox( m_OutilinesBoxOpt->GetStaticBox(), wxID_ANY, _("Zone Edge Orientation:"), wxDefaultPosition, wxDefaultSize, m_OrientEdgesOptNChoices, m_OrientEdgesOptChoices, 1, wxRA_SPECIFY_COLS );
|
||||
m_OrientEdgesOpt->SetSelection( 0 );
|
||||
m_OutilinesBoxOpt->Add( m_OrientEdgesOpt, 0, wxALL|wxEXPAND, 5 );
|
||||
m_ConstrainOpt = new wxCheckBox( this, wxID_ANY, _("Constrain outline to H, V and 45 degrees"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
gbSizer1->Add( m_ConstrainOpt, wxGBPosition( 0, 0 ), wxGBSpan( 1, 3 ), wxALL, 5 );
|
||||
|
||||
wxString m_OutlineAppearanceCtrlChoices[] = { _("Line"), _("Hatched outline"), _("Full hatched") };
|
||||
m_staticTextStyle = new wxStaticText( this, wxID_ANY, _("Outline display:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_staticTextStyle->Wrap( -1 );
|
||||
gbSizer1->Add( m_staticTextStyle, wxGBPosition( 1, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxALL, 5 );
|
||||
|
||||
wxString m_OutlineAppearanceCtrlChoices[] = { _("Line"), _("Hatched"), _("Fully hatched") };
|
||||
int m_OutlineAppearanceCtrlNChoices = sizeof( m_OutlineAppearanceCtrlChoices ) / sizeof( wxString );
|
||||
m_OutlineAppearanceCtrl = new wxRadioBox( m_OutilinesBoxOpt->GetStaticBox(), wxID_ANY, _("Outline Appearance:"), wxDefaultPosition, wxDefaultSize, m_OutlineAppearanceCtrlNChoices, m_OutlineAppearanceCtrlChoices, 1, wxRA_SPECIFY_COLS );
|
||||
m_OutlineAppearanceCtrl->SetSelection( 1 );
|
||||
m_OutilinesBoxOpt->Add( m_OutlineAppearanceCtrl, 0, wxALL|wxEXPAND, 5 );
|
||||
m_OutlineAppearanceCtrl = new wxChoice( this, ID_M_OUTLINEAPPEARANCECTRL, wxDefaultPosition, wxDefaultSize, m_OutlineAppearanceCtrlNChoices, m_OutlineAppearanceCtrlChoices, 0 );
|
||||
m_OutlineAppearanceCtrl->SetSelection( 0 );
|
||||
gbSizer1->Add( m_OutlineAppearanceCtrl, wxGBPosition( 1, 1 ), wxGBSpan( 1, 1 ), wxALL|wxEXPAND, 5 );
|
||||
|
||||
m_MinWidthLabel = new wxStaticText( this, wxID_ANY, _("Minimum width:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_MinWidthLabel->Wrap( -1 );
|
||||
gbSizer1->Add( m_MinWidthLabel, wxGBPosition( 2, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxALL, 5 );
|
||||
|
||||
m_MinWidthCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
||||
gbSizer1->Add( m_MinWidthCtrl, wxGBPosition( 2, 1 ), wxGBSpan( 1, 1 ), wxALL|wxEXPAND, 5 );
|
||||
|
||||
m_MinWidthUnits = new wxStaticText( this, wxID_ANY, _("units"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_MinWidthUnits->Wrap( -1 );
|
||||
gbSizer1->Add( m_MinWidthUnits, wxGBPosition( 2, 2 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 5 );
|
||||
|
||||
|
||||
bSizerRight->Add( m_OutilinesBoxOpt, 0, wxEXPAND|wxALL, 5 );
|
||||
|
||||
m_MinThicknessValueTitle = new wxStaticText( this, wxID_ANY, _("Zone min thickness value:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_MinThicknessValueTitle->Wrap( -1 );
|
||||
bSizerRight->Add( m_MinThicknessValueTitle, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
m_ZoneMinThicknessCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
||||
bSizerRight->Add( m_ZoneMinThicknessCtrl, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
|
||||
bSizerRight->Add( gbSizer1, 1, wxEXPAND, 5 );
|
||||
|
||||
|
||||
m_UpperSizer->Add( bSizerRight, 0, wxEXPAND, 5 );
|
||||
m_UpperSizer->Add( bSizerRight, 0, wxEXPAND|wxALL, 10 );
|
||||
|
||||
|
||||
m_MainSizer->Add( m_UpperSizer, 1, wxEXPAND, 5 );
|
||||
m_MainSizer->Add( m_UpperSizer, 0, wxEXPAND|wxALL, 5 );
|
||||
|
||||
m_staticline1 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
|
||||
m_MainSizer->Add( m_staticline1, 0, wxEXPAND | wxALL, 5 );
|
||||
m_MainSizer->Add( m_staticline1, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
m_sdbSizerButtons = new wxStdDialogButtonSizer();
|
||||
m_sdbSizerButtonsOK = new wxButton( this, wxID_OK );
|
||||
|
@ -81,7 +85,7 @@ DIALOG_NONCOPPER_ZONES_PROPERTIES_BASE::DIALOG_NONCOPPER_ZONES_PROPERTIES_BASE(
|
|||
m_sdbSizerButtons->AddButton( m_sdbSizerButtonsCancel );
|
||||
m_sdbSizerButtons->Realize();
|
||||
|
||||
m_MainSizer->Add( m_sdbSizerButtons, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 );
|
||||
m_MainSizer->Add( m_sdbSizerButtons, 0, wxEXPAND|wxALL, 5 );
|
||||
|
||||
|
||||
this->SetSizer( m_MainSizer );
|
||||
|
@ -89,8 +93,14 @@ DIALOG_NONCOPPER_ZONES_PROPERTIES_BASE::DIALOG_NONCOPPER_ZONES_PROPERTIES_BASE(
|
|||
m_MainSizer->Fit( this );
|
||||
|
||||
this->Centre( wxBOTH );
|
||||
|
||||
// Connect Events
|
||||
m_layers->Connect( wxEVT_COMMAND_DATAVIEW_ITEM_VALUE_CHANGED, wxDataViewEventHandler( DIALOG_NONCOPPER_ZONES_PROPERTIES_BASE::OnLayerSelection ), NULL, this );
|
||||
}
|
||||
|
||||
DIALOG_NONCOPPER_ZONES_PROPERTIES_BASE::~DIALOG_NONCOPPER_ZONES_PROPERTIES_BASE()
|
||||
{
|
||||
// Disconnect Events
|
||||
m_layers->Disconnect( wxEVT_COMMAND_DATAVIEW_ITEM_VALUE_CHANGED, wxDataViewEventHandler( DIALOG_NONCOPPER_ZONES_PROPERTIES_BASE::OnLayerSelection ), NULL, this );
|
||||
|
||||
}
|
||||
|
|
|
@ -10,11 +10,10 @@
|
|||
<property name="disconnect_python_events">0</property>
|
||||
<property name="embedded_files_path">res</property>
|
||||
<property name="encoding">UTF-8</property>
|
||||
<property name="event_generation">table</property>
|
||||
<property name="event_generation">connect</property>
|
||||
<property name="file">dialog_non_copper_zones_properties_base</property>
|
||||
<property name="first_id">1000</property>
|
||||
<property name="help_provider">none</property>
|
||||
<property name="indent_with_spaces"></property>
|
||||
<property name="internationalize">1</property>
|
||||
<property name="name">dialog_non_copper_zones_properties_base</property>
|
||||
<property name="namespace"></property>
|
||||
|
@ -96,8 +95,8 @@
|
|||
<property name="permission">none</property>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxEXPAND</property>
|
||||
<property name="proportion">1</property>
|
||||
<property name="flag">wxEXPAND|wxALL</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxBoxSizer" expanded="1">
|
||||
<property name="minimum_size"></property>
|
||||
<property name="name">m_UpperSizer</property>
|
||||
|
@ -106,7 +105,7 @@
|
|||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxEXPAND</property>
|
||||
<property name="proportion">1</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxBoxSizer" expanded="1">
|
||||
<property name="minimum_size"></property>
|
||||
<property name="name">bSizerLeft</property>
|
||||
|
@ -144,7 +143,7 @@
|
|||
<property name="gripper">0</property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="label">Layer selection:</property>
|
||||
<property name="label">Layer:</property>
|
||||
<property name="max_size"></property>
|
||||
<property name="maximize_button">0</property>
|
||||
<property name="maximum_size"></property>
|
||||
|
@ -197,65 +196,48 @@
|
|||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxALL|wxEXPAND</property>
|
||||
<property name="proportion">1</property>
|
||||
<object class="wxListCtrl" expanded="1">
|
||||
<property name="BottomDockable">1</property>
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
<property name="TopDockable">1</property>
|
||||
<property name="aui_layer"></property>
|
||||
<property name="aui_name"></property>
|
||||
<property name="aui_position"></property>
|
||||
<property name="aui_row"></property>
|
||||
<property name="best_size"></property>
|
||||
<property name="flag">wxALL</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxDataViewListCtrl" expanded="1">
|
||||
<property name="bg"></property>
|
||||
<property name="caption"></property>
|
||||
<property name="caption_visible">1</property>
|
||||
<property name="center_pane">0</property>
|
||||
<property name="close_button">1</property>
|
||||
<property name="context_help"></property>
|
||||
<property name="context_menu">1</property>
|
||||
<property name="default_pane">0</property>
|
||||
<property name="dock">Dock</property>
|
||||
<property name="dock_fixed">0</property>
|
||||
<property name="docking">Left</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="floatable">1</property>
|
||||
<property name="font"></property>
|
||||
<property name="gripper">0</property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="max_size"></property>
|
||||
<property name="maximize_button">0</property>
|
||||
<property name="maximum_size"></property>
|
||||
<property name="min_size"></property>
|
||||
<property name="minimize_button">0</property>
|
||||
<property name="minimum_size"></property>
|
||||
<property name="moveable">1</property>
|
||||
<property name="name">m_LayerSelectionCtrl</property>
|
||||
<property name="pane_border">1</property>
|
||||
<property name="pane_position"></property>
|
||||
<property name="pane_size"></property>
|
||||
<property name="minimum_size">-1,200</property>
|
||||
<property name="name">m_layers</property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="pin_button">1</property>
|
||||
<property name="pos"></property>
|
||||
<property name="resize">Resizable</property>
|
||||
<property name="show">1</property>
|
||||
<property name="size"></property>
|
||||
<property name="style">wxLC_ALIGN_LEFT|wxLC_NO_HEADER|wxLC_REPORT|wxLC_SINGLE_SEL</property>
|
||||
<property name="subclass">wxListView; </property>
|
||||
<property name="toolbar_pane">0</property>
|
||||
<property name="style">wxDV_NO_HEADER</property>
|
||||
<property name="subclass"></property>
|
||||
<property name="tooltip"></property>
|
||||
<property name="validator_data_type"></property>
|
||||
<property name="validator_style">wxFILTER_NONE</property>
|
||||
<property name="validator_type">wxDefaultValidator</property>
|
||||
<property name="validator_variable"></property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<property name="window_style">wxSUNKEN_BORDER</property>
|
||||
<event name="OnChar"></event>
|
||||
<event name="OnDataViewListCtrlColumnHeaderClick"></event>
|
||||
<event name="OnDataViewListCtrlColumnHeaderRightClick"></event>
|
||||
<event name="OnDataViewListCtrlColumnReordered"></event>
|
||||
<event name="OnDataViewListCtrlColumnSorted"></event>
|
||||
<event name="OnDataViewListCtrlItemActivated"></event>
|
||||
<event name="OnDataViewListCtrlItemBeginDrag"></event>
|
||||
<event name="OnDataViewListCtrlItemCollapsed"></event>
|
||||
<event name="OnDataViewListCtrlItemCollapsing"></event>
|
||||
<event name="OnDataViewListCtrlItemContextMenu"></event>
|
||||
<event name="OnDataViewListCtrlItemDrop"></event>
|
||||
<event name="OnDataViewListCtrlItemDropPossible"></event>
|
||||
<event name="OnDataViewListCtrlItemEditingDone"></event>
|
||||
<event name="OnDataViewListCtrlItemEditingStarted"></event>
|
||||
<event name="OnDataViewListCtrlItemExpanded"></event>
|
||||
<event name="OnDataViewListCtrlItemExpanding"></event>
|
||||
<event name="OnDataViewListCtrlItemStartEditing"></event>
|
||||
<event name="OnDataViewListCtrlItemValueChanged">OnLayerSelection</event>
|
||||
<event name="OnDataViewListCtrlSelectionChanged"></event>
|
||||
<event name="OnEnterWindow"></event>
|
||||
<event name="OnEraseBackground"></event>
|
||||
<event name="OnKeyDown"></event>
|
||||
|
@ -265,26 +247,6 @@
|
|||
<event name="OnLeftDClick"></event>
|
||||
<event name="OnLeftDown"></event>
|
||||
<event name="OnLeftUp"></event>
|
||||
<event name="OnListBeginDrag"></event>
|
||||
<event name="OnListBeginLabelEdit"></event>
|
||||
<event name="OnListBeginRDrag"></event>
|
||||
<event name="OnListCacheHint"></event>
|
||||
<event name="OnListColBeginDrag"></event>
|
||||
<event name="OnListColClick"></event>
|
||||
<event name="OnListColDragging"></event>
|
||||
<event name="OnListColEndDrag"></event>
|
||||
<event name="OnListColRightClick"></event>
|
||||
<event name="OnListDeleteAllItems"></event>
|
||||
<event name="OnListDeleteItem"></event>
|
||||
<event name="OnListEndLabelEdit"></event>
|
||||
<event name="OnListInsertItem"></event>
|
||||
<event name="OnListItemActivated"></event>
|
||||
<event name="OnListItemDeselected"></event>
|
||||
<event name="OnListItemFocused"></event>
|
||||
<event name="OnListItemMiddleClick"></event>
|
||||
<event name="OnListItemRightClick"></event>
|
||||
<event name="OnListItemSelected"></event>
|
||||
<event name="OnListKeyDown"></event>
|
||||
<event name="OnMiddleDClick"></event>
|
||||
<event name="OnMiddleDown"></event>
|
||||
<event name="OnMiddleUp"></event>
|
||||
|
@ -303,8 +265,8 @@
|
|||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxEXPAND</property>
|
||||
<property name="border">10</property>
|
||||
<property name="flag">wxEXPAND|wxALL</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxBoxSizer" expanded="1">
|
||||
<property name="minimum_size"></property>
|
||||
|
@ -313,22 +275,27 @@
|
|||
<property name="permission">none</property>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxEXPAND|wxALL</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxStaticBoxSizer" expanded="1">
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="label">Outlines Options:</property>
|
||||
<property name="flag">wxEXPAND</property>
|
||||
<property name="proportion">1</property>
|
||||
<object class="wxGridBagSizer" expanded="1">
|
||||
<property name="empty_cell_size"></property>
|
||||
<property name="flexible_direction">wxBOTH</property>
|
||||
<property name="growablecols"></property>
|
||||
<property name="growablerows"></property>
|
||||
<property name="hgap">0</property>
|
||||
<property name="minimum_size"></property>
|
||||
<property name="name">m_OutilinesBoxOpt</property>
|
||||
<property name="orient">wxVERTICAL</property>
|
||||
<property name="parent">1</property>
|
||||
<property name="name">gbSizer1</property>
|
||||
<property name="non_flexible_grow_mode">wxFLEX_GROWMODE_SPECIFIED</property>
|
||||
<property name="permission">none</property>
|
||||
<event name="OnUpdateUI"></event>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="vgap">0</property>
|
||||
<object class="gbsizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxALL|wxEXPAND</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxRadioBox" expanded="1">
|
||||
<property name="colspan">3</property>
|
||||
<property name="column">0</property>
|
||||
<property name="flag">wxALL</property>
|
||||
<property name="row">0</property>
|
||||
<property name="rowspan">1</property>
|
||||
<object class="wxCheckBox" expanded="1">
|
||||
<property name="BottomDockable">1</property>
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
|
@ -342,7 +309,7 @@
|
|||
<property name="caption"></property>
|
||||
<property name="caption_visible">1</property>
|
||||
<property name="center_pane">0</property>
|
||||
<property name="choices">"Any" "H, V and 45 deg"</property>
|
||||
<property name="checked">0</property>
|
||||
<property name="close_button">1</property>
|
||||
<property name="context_help"></property>
|
||||
<property name="context_menu">1</property>
|
||||
|
@ -357,8 +324,7 @@
|
|||
<property name="gripper">0</property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="label">Zone Edge Orientation:</property>
|
||||
<property name="majorDimension">1</property>
|
||||
<property name="label">Constrain outline to H, V and 45 degrees</property>
|
||||
<property name="max_size"></property>
|
||||
<property name="maximize_button">0</property>
|
||||
<property name="maximum_size"></property>
|
||||
|
@ -366,7 +332,7 @@
|
|||
<property name="minimize_button">0</property>
|
||||
<property name="minimum_size"></property>
|
||||
<property name="moveable">1</property>
|
||||
<property name="name">m_OrientEdgesOpt</property>
|
||||
<property name="name">m_ConstrainOpt</property>
|
||||
<property name="pane_border">1</property>
|
||||
<property name="pane_position"></property>
|
||||
<property name="pane_size"></property>
|
||||
|
@ -374,11 +340,10 @@
|
|||
<property name="pin_button">1</property>
|
||||
<property name="pos"></property>
|
||||
<property name="resize">Resizable</property>
|
||||
<property name="selection">0</property>
|
||||
<property name="show">1</property>
|
||||
<property name="size"></property>
|
||||
<property name="style">wxRA_SPECIFY_COLS</property>
|
||||
<property name="subclass"></property>
|
||||
<property name="style"></property>
|
||||
<property name="subclass">; forward_declare</property>
|
||||
<property name="toolbar_pane">0</property>
|
||||
<property name="tooltip"></property>
|
||||
<property name="validator_data_type"></property>
|
||||
|
@ -389,6 +354,93 @@
|
|||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<event name="OnChar"></event>
|
||||
<event name="OnCheckBox"></event>
|
||||
<event name="OnEnterWindow"></event>
|
||||
<event name="OnEraseBackground"></event>
|
||||
<event name="OnKeyDown"></event>
|
||||
<event name="OnKeyUp"></event>
|
||||
<event name="OnKillFocus"></event>
|
||||
<event name="OnLeaveWindow"></event>
|
||||
<event name="OnLeftDClick"></event>
|
||||
<event name="OnLeftDown"></event>
|
||||
<event name="OnLeftUp"></event>
|
||||
<event name="OnMiddleDClick"></event>
|
||||
<event name="OnMiddleDown"></event>
|
||||
<event name="OnMiddleUp"></event>
|
||||
<event name="OnMotion"></event>
|
||||
<event name="OnMouseEvents"></event>
|
||||
<event name="OnMouseWheel"></event>
|
||||
<event name="OnPaint"></event>
|
||||
<event name="OnRightDClick"></event>
|
||||
<event name="OnRightDown"></event>
|
||||
<event name="OnRightUp"></event>
|
||||
<event name="OnSetFocus"></event>
|
||||
<event name="OnSize"></event>
|
||||
<event name="OnUpdateUI"></event>
|
||||
</object>
|
||||
</object>
|
||||
<object class="gbsizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="colspan">1</property>
|
||||
<property name="column">0</property>
|
||||
<property name="flag">wxALIGN_CENTER_VERTICAL|wxALL</property>
|
||||
<property name="row">1</property>
|
||||
<property name="rowspan">1</property>
|
||||
<object class="wxStaticText" expanded="1">
|
||||
<property name="BottomDockable">1</property>
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
<property name="TopDockable">1</property>
|
||||
<property name="aui_layer"></property>
|
||||
<property name="aui_name"></property>
|
||||
<property name="aui_position"></property>
|
||||
<property name="aui_row"></property>
|
||||
<property name="best_size"></property>
|
||||
<property name="bg"></property>
|
||||
<property name="caption"></property>
|
||||
<property name="caption_visible">1</property>
|
||||
<property name="center_pane">0</property>
|
||||
<property name="close_button">1</property>
|
||||
<property name="context_help"></property>
|
||||
<property name="context_menu">1</property>
|
||||
<property name="default_pane">0</property>
|
||||
<property name="dock">Dock</property>
|
||||
<property name="dock_fixed">0</property>
|
||||
<property name="docking">Left</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="floatable">1</property>
|
||||
<property name="font"></property>
|
||||
<property name="gripper">0</property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="label">Outline display:</property>
|
||||
<property name="max_size"></property>
|
||||
<property name="maximize_button">0</property>
|
||||
<property name="maximum_size"></property>
|
||||
<property name="min_size"></property>
|
||||
<property name="minimize_button">0</property>
|
||||
<property name="minimum_size"></property>
|
||||
<property name="moveable">1</property>
|
||||
<property name="name">m_staticTextStyle</property>
|
||||
<property name="pane_border">1</property>
|
||||
<property name="pane_position"></property>
|
||||
<property name="pane_size"></property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="pin_button">1</property>
|
||||
<property name="pos"></property>
|
||||
<property name="resize">Resizable</property>
|
||||
<property name="show">1</property>
|
||||
<property name="size"></property>
|
||||
<property name="style"></property>
|
||||
<property name="subclass"></property>
|
||||
<property name="toolbar_pane">0</property>
|
||||
<property name="tooltip"></property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<property name="wrap">-1</property>
|
||||
<event name="OnChar"></event>
|
||||
<event name="OnEnterWindow"></event>
|
||||
<event name="OnEraseBackground"></event>
|
||||
<event name="OnKeyDown"></event>
|
||||
|
@ -405,7 +457,6 @@
|
|||
<event name="OnMouseEvents"></event>
|
||||
<event name="OnMouseWheel"></event>
|
||||
<event name="OnPaint"></event>
|
||||
<event name="OnRadioBox"></event>
|
||||
<event name="OnRightDClick"></event>
|
||||
<event name="OnRightDown"></event>
|
||||
<event name="OnRightUp"></event>
|
||||
|
@ -414,11 +465,14 @@
|
|||
<event name="OnUpdateUI"></event>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<object class="gbsizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="colspan">1</property>
|
||||
<property name="column">1</property>
|
||||
<property name="flag">wxALL|wxEXPAND</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxRadioBox" expanded="1">
|
||||
<property name="row">1</property>
|
||||
<property name="rowspan">1</property>
|
||||
<object class="wxChoice" expanded="1">
|
||||
<property name="BottomDockable">1</property>
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
|
@ -432,7 +486,7 @@
|
|||
<property name="caption"></property>
|
||||
<property name="caption_visible">1</property>
|
||||
<property name="center_pane">0</property>
|
||||
<property name="choices">"Line" "Hatched outline" "Full hatched"</property>
|
||||
<property name="choices">"Line" "Hatched" "Fully hatched"</property>
|
||||
<property name="close_button">1</property>
|
||||
<property name="context_help"></property>
|
||||
<property name="context_menu">1</property>
|
||||
|
@ -446,9 +500,7 @@
|
|||
<property name="font"></property>
|
||||
<property name="gripper">0</property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="label">Outline Appearance:</property>
|
||||
<property name="majorDimension">1</property>
|
||||
<property name="id">ID_M_OUTLINEAPPEARANCECTRL</property>
|
||||
<property name="max_size"></property>
|
||||
<property name="maximize_button">0</property>
|
||||
<property name="maximum_size"></property>
|
||||
|
@ -464,10 +516,10 @@
|
|||
<property name="pin_button">1</property>
|
||||
<property name="pos"></property>
|
||||
<property name="resize">Resizable</property>
|
||||
<property name="selection">1</property>
|
||||
<property name="selection">0</property>
|
||||
<property name="show">1</property>
|
||||
<property name="size"></property>
|
||||
<property name="style">wxRA_SPECIFY_COLS</property>
|
||||
<property name="style"></property>
|
||||
<property name="subclass"></property>
|
||||
<property name="toolbar_pane">0</property>
|
||||
<property name="tooltip"></property>
|
||||
|
@ -479,6 +531,273 @@
|
|||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<event name="OnChar"></event>
|
||||
<event name="OnChoice"></event>
|
||||
<event name="OnEnterWindow"></event>
|
||||
<event name="OnEraseBackground"></event>
|
||||
<event name="OnKeyDown"></event>
|
||||
<event name="OnKeyUp"></event>
|
||||
<event name="OnKillFocus"></event>
|
||||
<event name="OnLeaveWindow"></event>
|
||||
<event name="OnLeftDClick"></event>
|
||||
<event name="OnLeftDown"></event>
|
||||
<event name="OnLeftUp"></event>
|
||||
<event name="OnMiddleDClick"></event>
|
||||
<event name="OnMiddleDown"></event>
|
||||
<event name="OnMiddleUp"></event>
|
||||
<event name="OnMotion"></event>
|
||||
<event name="OnMouseEvents"></event>
|
||||
<event name="OnMouseWheel"></event>
|
||||
<event name="OnPaint"></event>
|
||||
<event name="OnRightDClick"></event>
|
||||
<event name="OnRightDown"></event>
|
||||
<event name="OnRightUp"></event>
|
||||
<event name="OnSetFocus"></event>
|
||||
<event name="OnSize"></event>
|
||||
<event name="OnUpdateUI"></event>
|
||||
</object>
|
||||
</object>
|
||||
<object class="gbsizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="colspan">1</property>
|
||||
<property name="column">0</property>
|
||||
<property name="flag">wxALIGN_CENTER_VERTICAL|wxALL</property>
|
||||
<property name="row">2</property>
|
||||
<property name="rowspan">1</property>
|
||||
<object class="wxStaticText" expanded="1">
|
||||
<property name="BottomDockable">1</property>
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
<property name="TopDockable">1</property>
|
||||
<property name="aui_layer"></property>
|
||||
<property name="aui_name"></property>
|
||||
<property name="aui_position"></property>
|
||||
<property name="aui_row"></property>
|
||||
<property name="best_size"></property>
|
||||
<property name="bg"></property>
|
||||
<property name="caption"></property>
|
||||
<property name="caption_visible">1</property>
|
||||
<property name="center_pane">0</property>
|
||||
<property name="close_button">1</property>
|
||||
<property name="context_help"></property>
|
||||
<property name="context_menu">1</property>
|
||||
<property name="default_pane">0</property>
|
||||
<property name="dock">Dock</property>
|
||||
<property name="dock_fixed">0</property>
|
||||
<property name="docking">Left</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="floatable">1</property>
|
||||
<property name="font"></property>
|
||||
<property name="gripper">0</property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="label">Minimum width:</property>
|
||||
<property name="max_size"></property>
|
||||
<property name="maximize_button">0</property>
|
||||
<property name="maximum_size"></property>
|
||||
<property name="min_size"></property>
|
||||
<property name="minimize_button">0</property>
|
||||
<property name="minimum_size"></property>
|
||||
<property name="moveable">1</property>
|
||||
<property name="name">m_MinWidthLabel</property>
|
||||
<property name="pane_border">1</property>
|
||||
<property name="pane_position"></property>
|
||||
<property name="pane_size"></property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="pin_button">1</property>
|
||||
<property name="pos"></property>
|
||||
<property name="resize">Resizable</property>
|
||||
<property name="show">1</property>
|
||||
<property name="size"></property>
|
||||
<property name="style"></property>
|
||||
<property name="subclass">; forward_declare</property>
|
||||
<property name="toolbar_pane">0</property>
|
||||
<property name="tooltip"></property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<property name="wrap">-1</property>
|
||||
<event name="OnChar"></event>
|
||||
<event name="OnEnterWindow"></event>
|
||||
<event name="OnEraseBackground"></event>
|
||||
<event name="OnKeyDown"></event>
|
||||
<event name="OnKeyUp"></event>
|
||||
<event name="OnKillFocus"></event>
|
||||
<event name="OnLeaveWindow"></event>
|
||||
<event name="OnLeftDClick"></event>
|
||||
<event name="OnLeftDown"></event>
|
||||
<event name="OnLeftUp"></event>
|
||||
<event name="OnMiddleDClick"></event>
|
||||
<event name="OnMiddleDown"></event>
|
||||
<event name="OnMiddleUp"></event>
|
||||
<event name="OnMotion"></event>
|
||||
<event name="OnMouseEvents"></event>
|
||||
<event name="OnMouseWheel"></event>
|
||||
<event name="OnPaint"></event>
|
||||
<event name="OnRightDClick"></event>
|
||||
<event name="OnRightDown"></event>
|
||||
<event name="OnRightUp"></event>
|
||||
<event name="OnSetFocus"></event>
|
||||
<event name="OnSize"></event>
|
||||
<event name="OnUpdateUI"></event>
|
||||
</object>
|
||||
</object>
|
||||
<object class="gbsizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="colspan">1</property>
|
||||
<property name="column">1</property>
|
||||
<property name="flag">wxALL|wxEXPAND</property>
|
||||
<property name="row">2</property>
|
||||
<property name="rowspan">1</property>
|
||||
<object class="wxTextCtrl" expanded="1">
|
||||
<property name="BottomDockable">1</property>
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
<property name="TopDockable">1</property>
|
||||
<property name="aui_layer"></property>
|
||||
<property name="aui_name"></property>
|
||||
<property name="aui_position"></property>
|
||||
<property name="aui_row"></property>
|
||||
<property name="best_size"></property>
|
||||
<property name="bg"></property>
|
||||
<property name="caption"></property>
|
||||
<property name="caption_visible">1</property>
|
||||
<property name="center_pane">0</property>
|
||||
<property name="close_button">1</property>
|
||||
<property name="context_help"></property>
|
||||
<property name="context_menu">1</property>
|
||||
<property name="default_pane">0</property>
|
||||
<property name="dock">Dock</property>
|
||||
<property name="dock_fixed">0</property>
|
||||
<property name="docking">Left</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="floatable">1</property>
|
||||
<property name="font"></property>
|
||||
<property name="gripper">0</property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="max_size"></property>
|
||||
<property name="maximize_button">0</property>
|
||||
<property name="maximum_size"></property>
|
||||
<property name="maxlength"></property>
|
||||
<property name="min_size"></property>
|
||||
<property name="minimize_button">0</property>
|
||||
<property name="minimum_size"></property>
|
||||
<property name="moveable">1</property>
|
||||
<property name="name">m_MinWidthCtrl</property>
|
||||
<property name="pane_border">1</property>
|
||||
<property name="pane_position"></property>
|
||||
<property name="pane_size"></property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="pin_button">1</property>
|
||||
<property name="pos"></property>
|
||||
<property name="resize">Resizable</property>
|
||||
<property name="show">1</property>
|
||||
<property name="size"></property>
|
||||
<property name="style"></property>
|
||||
<property name="subclass">; forward_declare</property>
|
||||
<property name="toolbar_pane">0</property>
|
||||
<property name="tooltip"></property>
|
||||
<property name="validator_data_type"></property>
|
||||
<property name="validator_style">wxFILTER_NONE</property>
|
||||
<property name="validator_type">wxDefaultValidator</property>
|
||||
<property name="validator_variable"></property>
|
||||
<property name="value"></property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<event name="OnChar"></event>
|
||||
<event name="OnEnterWindow"></event>
|
||||
<event name="OnEraseBackground"></event>
|
||||
<event name="OnKeyDown"></event>
|
||||
<event name="OnKeyUp"></event>
|
||||
<event name="OnKillFocus"></event>
|
||||
<event name="OnLeaveWindow"></event>
|
||||
<event name="OnLeftDClick"></event>
|
||||
<event name="OnLeftDown"></event>
|
||||
<event name="OnLeftUp"></event>
|
||||
<event name="OnMiddleDClick"></event>
|
||||
<event name="OnMiddleDown"></event>
|
||||
<event name="OnMiddleUp"></event>
|
||||
<event name="OnMotion"></event>
|
||||
<event name="OnMouseEvents"></event>
|
||||
<event name="OnMouseWheel"></event>
|
||||
<event name="OnPaint"></event>
|
||||
<event name="OnRightDClick"></event>
|
||||
<event name="OnRightDown"></event>
|
||||
<event name="OnRightUp"></event>
|
||||
<event name="OnSetFocus"></event>
|
||||
<event name="OnSize"></event>
|
||||
<event name="OnText"></event>
|
||||
<event name="OnTextEnter"></event>
|
||||
<event name="OnTextMaxLen"></event>
|
||||
<event name="OnTextURL"></event>
|
||||
<event name="OnUpdateUI"></event>
|
||||
</object>
|
||||
</object>
|
||||
<object class="gbsizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="colspan">1</property>
|
||||
<property name="column">2</property>
|
||||
<property name="flag">wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT</property>
|
||||
<property name="row">2</property>
|
||||
<property name="rowspan">1</property>
|
||||
<object class="wxStaticText" expanded="1">
|
||||
<property name="BottomDockable">1</property>
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
<property name="TopDockable">1</property>
|
||||
<property name="aui_layer"></property>
|
||||
<property name="aui_name"></property>
|
||||
<property name="aui_position"></property>
|
||||
<property name="aui_row"></property>
|
||||
<property name="best_size"></property>
|
||||
<property name="bg"></property>
|
||||
<property name="caption"></property>
|
||||
<property name="caption_visible">1</property>
|
||||
<property name="center_pane">0</property>
|
||||
<property name="close_button">1</property>
|
||||
<property name="context_help"></property>
|
||||
<property name="context_menu">1</property>
|
||||
<property name="default_pane">0</property>
|
||||
<property name="dock">Dock</property>
|
||||
<property name="dock_fixed">0</property>
|
||||
<property name="docking">Left</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="floatable">1</property>
|
||||
<property name="font"></property>
|
||||
<property name="gripper">0</property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="label">units</property>
|
||||
<property name="max_size"></property>
|
||||
<property name="maximize_button">0</property>
|
||||
<property name="maximum_size"></property>
|
||||
<property name="min_size"></property>
|
||||
<property name="minimize_button">0</property>
|
||||
<property name="minimum_size"></property>
|
||||
<property name="moveable">1</property>
|
||||
<property name="name">m_MinWidthUnits</property>
|
||||
<property name="pane_border">1</property>
|
||||
<property name="pane_position"></property>
|
||||
<property name="pane_size"></property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="pin_button">1</property>
|
||||
<property name="pos"></property>
|
||||
<property name="resize">Resizable</property>
|
||||
<property name="show">1</property>
|
||||
<property name="size"></property>
|
||||
<property name="style"></property>
|
||||
<property name="subclass">; forward_declare</property>
|
||||
<property name="toolbar_pane">0</property>
|
||||
<property name="tooltip"></property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<property name="wrap">-1</property>
|
||||
<event name="OnChar"></event>
|
||||
<event name="OnEnterWindow"></event>
|
||||
<event name="OnEraseBackground"></event>
|
||||
<event name="OnKeyDown"></event>
|
||||
|
@ -495,7 +814,6 @@
|
|||
<event name="OnMouseEvents"></event>
|
||||
<event name="OnMouseWheel"></event>
|
||||
<event name="OnPaint"></event>
|
||||
<event name="OnRadioBox"></event>
|
||||
<event name="OnRightDClick"></event>
|
||||
<event name="OnRightDown"></event>
|
||||
<event name="OnRightUp"></event>
|
||||
|
@ -506,187 +824,13 @@
|
|||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxTOP|wxRIGHT|wxLEFT</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxStaticText" expanded="1">
|
||||
<property name="BottomDockable">1</property>
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
<property name="TopDockable">1</property>
|
||||
<property name="aui_layer"></property>
|
||||
<property name="aui_name"></property>
|
||||
<property name="aui_position"></property>
|
||||
<property name="aui_row"></property>
|
||||
<property name="best_size"></property>
|
||||
<property name="bg"></property>
|
||||
<property name="caption"></property>
|
||||
<property name="caption_visible">1</property>
|
||||
<property name="center_pane">0</property>
|
||||
<property name="close_button">1</property>
|
||||
<property name="context_help"></property>
|
||||
<property name="context_menu">1</property>
|
||||
<property name="default_pane">0</property>
|
||||
<property name="dock">Dock</property>
|
||||
<property name="dock_fixed">0</property>
|
||||
<property name="docking">Left</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="floatable">1</property>
|
||||
<property name="font"></property>
|
||||
<property name="gripper">0</property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="label">Zone min thickness value:</property>
|
||||
<property name="max_size"></property>
|
||||
<property name="maximize_button">0</property>
|
||||
<property name="maximum_size"></property>
|
||||
<property name="min_size"></property>
|
||||
<property name="minimize_button">0</property>
|
||||
<property name="minimum_size"></property>
|
||||
<property name="moveable">1</property>
|
||||
<property name="name">m_MinThicknessValueTitle</property>
|
||||
<property name="pane_border">1</property>
|
||||
<property name="pane_position"></property>
|
||||
<property name="pane_size"></property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="pin_button">1</property>
|
||||
<property name="pos"></property>
|
||||
<property name="resize">Resizable</property>
|
||||
<property name="show">1</property>
|
||||
<property name="size"></property>
|
||||
<property name="style"></property>
|
||||
<property name="subclass"></property>
|
||||
<property name="toolbar_pane">0</property>
|
||||
<property name="tooltip"></property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<property name="wrap">-1</property>
|
||||
<event name="OnChar"></event>
|
||||
<event name="OnEnterWindow"></event>
|
||||
<event name="OnEraseBackground"></event>
|
||||
<event name="OnKeyDown"></event>
|
||||
<event name="OnKeyUp"></event>
|
||||
<event name="OnKillFocus"></event>
|
||||
<event name="OnLeaveWindow"></event>
|
||||
<event name="OnLeftDClick"></event>
|
||||
<event name="OnLeftDown"></event>
|
||||
<event name="OnLeftUp"></event>
|
||||
<event name="OnMiddleDClick"></event>
|
||||
<event name="OnMiddleDown"></event>
|
||||
<event name="OnMiddleUp"></event>
|
||||
<event name="OnMotion"></event>
|
||||
<event name="OnMouseEvents"></event>
|
||||
<event name="OnMouseWheel"></event>
|
||||
<event name="OnPaint"></event>
|
||||
<event name="OnRightDClick"></event>
|
||||
<event name="OnRightDown"></event>
|
||||
<event name="OnRightUp"></event>
|
||||
<event name="OnSetFocus"></event>
|
||||
<event name="OnSize"></event>
|
||||
<event name="OnUpdateUI"></event>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxTextCtrl" expanded="1">
|
||||
<property name="BottomDockable">1</property>
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
<property name="TopDockable">1</property>
|
||||
<property name="aui_layer"></property>
|
||||
<property name="aui_name"></property>
|
||||
<property name="aui_position"></property>
|
||||
<property name="aui_row"></property>
|
||||
<property name="best_size"></property>
|
||||
<property name="bg"></property>
|
||||
<property name="caption"></property>
|
||||
<property name="caption_visible">1</property>
|
||||
<property name="center_pane">0</property>
|
||||
<property name="close_button">1</property>
|
||||
<property name="context_help"></property>
|
||||
<property name="context_menu">1</property>
|
||||
<property name="default_pane">0</property>
|
||||
<property name="dock">Dock</property>
|
||||
<property name="dock_fixed">0</property>
|
||||
<property name="docking">Left</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="floatable">1</property>
|
||||
<property name="font"></property>
|
||||
<property name="gripper">0</property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="max_size"></property>
|
||||
<property name="maximize_button">0</property>
|
||||
<property name="maximum_size"></property>
|
||||
<property name="maxlength">0</property>
|
||||
<property name="min_size"></property>
|
||||
<property name="minimize_button">0</property>
|
||||
<property name="minimum_size"></property>
|
||||
<property name="moveable">1</property>
|
||||
<property name="name">m_ZoneMinThicknessCtrl</property>
|
||||
<property name="pane_border">1</property>
|
||||
<property name="pane_position"></property>
|
||||
<property name="pane_size"></property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="pin_button">1</property>
|
||||
<property name="pos"></property>
|
||||
<property name="resize">Resizable</property>
|
||||
<property name="show">1</property>
|
||||
<property name="size"></property>
|
||||
<property name="style"></property>
|
||||
<property name="subclass"></property>
|
||||
<property name="toolbar_pane">0</property>
|
||||
<property name="tooltip"></property>
|
||||
<property name="validator_data_type"></property>
|
||||
<property name="validator_style">wxFILTER_NONE</property>
|
||||
<property name="validator_type">wxDefaultValidator</property>
|
||||
<property name="validator_variable"></property>
|
||||
<property name="value"></property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<event name="OnChar"></event>
|
||||
<event name="OnEnterWindow"></event>
|
||||
<event name="OnEraseBackground"></event>
|
||||
<event name="OnKeyDown"></event>
|
||||
<event name="OnKeyUp"></event>
|
||||
<event name="OnKillFocus"></event>
|
||||
<event name="OnLeaveWindow"></event>
|
||||
<event name="OnLeftDClick"></event>
|
||||
<event name="OnLeftDown"></event>
|
||||
<event name="OnLeftUp"></event>
|
||||
<event name="OnMiddleDClick"></event>
|
||||
<event name="OnMiddleDown"></event>
|
||||
<event name="OnMiddleUp"></event>
|
||||
<event name="OnMotion"></event>
|
||||
<event name="OnMouseEvents"></event>
|
||||
<event name="OnMouseWheel"></event>
|
||||
<event name="OnPaint"></event>
|
||||
<event name="OnRightDClick"></event>
|
||||
<event name="OnRightDown"></event>
|
||||
<event name="OnRightUp"></event>
|
||||
<event name="OnSetFocus"></event>
|
||||
<event name="OnSize"></event>
|
||||
<event name="OnText"></event>
|
||||
<event name="OnTextEnter"></event>
|
||||
<event name="OnTextMaxLen"></event>
|
||||
<event name="OnTextURL"></event>
|
||||
<event name="OnUpdateUI"></event>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxEXPAND | wxALL</property>
|
||||
<property name="flag">wxEXPAND|wxRIGHT|wxLEFT</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxStaticLine" expanded="1">
|
||||
<property name="BottomDockable">1</property>
|
||||
|
@ -767,7 +911,7 @@
|
|||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT</property>
|
||||
<property name="flag">wxEXPAND|wxALL</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxStdDialogButtonSizer" expanded="1">
|
||||
<property name="Apply">0</property>
|
||||
|
@ -782,11 +926,11 @@
|
|||
<property name="name">m_sdbSizerButtons</property>
|
||||
<property name="permission">protected</property>
|
||||
<event name="OnApplyButtonClick"></event>
|
||||
<event name="OnCancelButtonClick">OnCancelClick</event>
|
||||
<event name="OnCancelButtonClick"></event>
|
||||
<event name="OnContextHelpButtonClick"></event>
|
||||
<event name="OnHelpButtonClick"></event>
|
||||
<event name="OnNoButtonClick"></event>
|
||||
<event name="OnOKButtonClick">OnOkClick</event>
|
||||
<event name="OnOKButtonClick"></event>
|
||||
<event name="OnSaveButtonClick"></event>
|
||||
<event name="OnYesButtonClick"></event>
|
||||
</object>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
///////////////////////////////////////////////////////////////////////////
|
||||
// C++ code generated with wxFormBuilder (version Apr 19 2018)
|
||||
// C++ code generated with wxFormBuilder (version Dec 30 2017)
|
||||
// http://www.wxformbuilder.org/
|
||||
//
|
||||
// PLEASE DO *NOT* EDIT THIS FILE!
|
||||
|
@ -18,11 +18,12 @@
|
|||
#include <wx/font.h>
|
||||
#include <wx/colour.h>
|
||||
#include <wx/settings.h>
|
||||
#include <wx/listctrl.h>
|
||||
#include <wx/dataview.h>
|
||||
#include <wx/sizer.h>
|
||||
#include <wx/radiobox.h>
|
||||
#include <wx/statbox.h>
|
||||
#include <wx/checkbox.h>
|
||||
#include <wx/choice.h>
|
||||
#include <wx/textctrl.h>
|
||||
#include <wx/gbsizer.h>
|
||||
#include <wx/statline.h>
|
||||
#include <wx/button.h>
|
||||
#include <wx/dialog.h>
|
||||
|
@ -34,29 +35,29 @@
|
|||
///////////////////////////////////////////////////////////////////////////////
|
||||
class DIALOG_NONCOPPER_ZONES_PROPERTIES_BASE : public DIALOG_SHIM
|
||||
{
|
||||
DECLARE_EVENT_TABLE()
|
||||
private:
|
||||
|
||||
// Private event handlers
|
||||
void _wxFB_OnCancelClick( wxCommandEvent& event ){ OnCancelClick( event ); }
|
||||
void _wxFB_OnOkClick( wxCommandEvent& event ){ OnOkClick( event ); }
|
||||
|
||||
|
||||
protected:
|
||||
enum
|
||||
{
|
||||
ID_M_OUTLINEAPPEARANCECTRL = 1000
|
||||
};
|
||||
|
||||
wxStaticText* m_staticTextLayerSelection;
|
||||
wxListView* m_LayerSelectionCtrl;
|
||||
wxRadioBox* m_OrientEdgesOpt;
|
||||
wxRadioBox* m_OutlineAppearanceCtrl;
|
||||
wxStaticText* m_MinThicknessValueTitle;
|
||||
wxTextCtrl* m_ZoneMinThicknessCtrl;
|
||||
wxDataViewListCtrl* m_layers;
|
||||
wxCheckBox* m_ConstrainOpt;
|
||||
wxStaticText* m_staticTextStyle;
|
||||
wxChoice* m_OutlineAppearanceCtrl;
|
||||
wxStaticText* m_MinWidthLabel;
|
||||
wxTextCtrl* m_MinWidthCtrl;
|
||||
wxStaticText* m_MinWidthUnits;
|
||||
wxStaticLine* m_staticline1;
|
||||
wxStdDialogButtonSizer* m_sdbSizerButtons;
|
||||
wxButton* m_sdbSizerButtonsOK;
|
||||
wxButton* m_sdbSizerButtonsCancel;
|
||||
|
||||
// Virtual event handlers, overide them in your derived class
|
||||
virtual void OnCancelClick( wxCommandEvent& event ) { event.Skip(); }
|
||||
virtual void OnOkClick( wxCommandEvent& event ) { event.Skip(); }
|
||||
virtual void OnLayerSelection( wxDataViewEvent& event ) { event.Skip(); }
|
||||
|
||||
|
||||
public:
|
||||
|
|
|
@ -764,9 +764,8 @@ int PCB_EDITOR_CONTROL::ZoneDuplicate( const TOOL_EVENT& aEvent )
|
|||
auto selTool = m_toolMgr->GetTool<SELECTION_TOOL>();
|
||||
const auto& selection = selTool->GetSelection();
|
||||
|
||||
// because this pops up the zone editor, it would be confusing
|
||||
// to handle multiple zones, so just handle single selections
|
||||
// containing exactly one zone
|
||||
// because this pops up the zone editor, it would be confusing to handle multiple zones,
|
||||
// so just handle single selections containing exactly one zone
|
||||
if( selection.Size() != 1 )
|
||||
return 0;
|
||||
|
||||
|
@ -775,37 +774,37 @@ int PCB_EDITOR_CONTROL::ZoneDuplicate( const TOOL_EVENT& aEvent )
|
|||
if( !oldZone )
|
||||
return 0;
|
||||
|
||||
ZONE_SETTINGS zoneSettings;
|
||||
zoneSettings << *oldZone;
|
||||
int dialogResult;
|
||||
|
||||
if( oldZone->GetIsKeepout() )
|
||||
dialogResult = InvokeKeepoutAreaEditor( m_frame, &zoneSettings );
|
||||
else if( oldZone->IsOnCopperLayer() )
|
||||
dialogResult = InvokeCopperZonesEditor( m_frame, &zoneSettings );
|
||||
else
|
||||
dialogResult = InvokeNonCopperZonesEditor( m_frame, &zoneSettings );
|
||||
|
||||
if( dialogResult != wxID_OK )
|
||||
return 0;
|
||||
|
||||
// duplicate the zone
|
||||
BOARD_COMMIT commit( m_frame );
|
||||
|
||||
auto newZone = std::make_unique<ZONE_CONTAINER>( *oldZone );
|
||||
newZone->ClearSelected();
|
||||
newZone->UnFill();
|
||||
ZONE_SETTINGS zoneSettings;
|
||||
zoneSettings << *oldZone;
|
||||
zoneSettings.ExportSetting( *newZone );
|
||||
|
||||
bool success = false;
|
||||
// If the new zone is on the same layer(s) as the the initial zone,
|
||||
// offset it a bit so it can more easily be picked.
|
||||
if( oldZone->GetIsKeepout() && ( oldZone->GetLayerSet() == zoneSettings.m_Layers ) )
|
||||
newZone->Move( wxPoint( IU_PER_MM, IU_PER_MM ) );
|
||||
else if( !oldZone->GetIsKeepout() && ( oldZone->GetLayer() == zoneSettings.m_CurrentZone_Layer ) )
|
||||
newZone->Move( wxPoint( IU_PER_MM, IU_PER_MM ) );
|
||||
|
||||
if( oldZone->GetIsKeepout() )
|
||||
success = InvokeKeepoutAreaEditor( m_frame, &zoneSettings );
|
||||
else if( oldZone->IsOnCopperLayer() )
|
||||
success = InvokeCopperZonesEditor( m_frame, &zoneSettings );
|
||||
else
|
||||
success = InvokeNonCopperZonesEditor( m_frame, oldZone, &zoneSettings );
|
||||
|
||||
// duplicate the zone
|
||||
if( success )
|
||||
{
|
||||
BOARD_COMMIT commit( m_frame );
|
||||
zoneSettings.ExportSetting( *newZone );
|
||||
|
||||
// If the new zone is on the same layer(s) as the the initial zone,
|
||||
// offset it a bit so it can more easily be picked.
|
||||
if( oldZone->GetIsKeepout() && ( oldZone->GetLayerSet() == zoneSettings.m_Layers ) )
|
||||
newZone->Move( wxPoint( IU_PER_MM, IU_PER_MM ) );
|
||||
else if( !oldZone->GetIsKeepout() && ( oldZone->GetLayer() == zoneSettings.m_CurrentZone_Layer ) )
|
||||
newZone->Move( wxPoint( IU_PER_MM, IU_PER_MM ) );
|
||||
|
||||
commit.Add( newZone.release() );
|
||||
commit.Push( _( "Duplicate zone" ) );
|
||||
}
|
||||
commit.Add( newZone.release() );
|
||||
commit.Push( _( "Duplicate zone" ) );
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -36,8 +36,7 @@
|
|||
|
||||
#include <zone_filler.h>
|
||||
|
||||
ZONE_CREATE_HELPER::ZONE_CREATE_HELPER( DRAWING_TOOL& aTool,
|
||||
const PARAMS& aParams ):
|
||||
ZONE_CREATE_HELPER::ZONE_CREATE_HELPER( DRAWING_TOOL& aTool, const PARAMS& aParams ):
|
||||
m_tool( aTool ),
|
||||
m_params( aParams ),
|
||||
m_parentView( *aTool.getView() )
|
||||
|
@ -70,7 +69,7 @@ std::unique_ptr<ZONE_CONTAINER> ZONE_CREATE_HELPER::createNewZone( bool aKeepout
|
|||
// Get the current default settings for zones
|
||||
|
||||
// Show options dialog
|
||||
ZONE_EDIT_T dialogResult;
|
||||
int dialogResult;
|
||||
|
||||
if( m_params.m_keepout )
|
||||
dialogResult = InvokeKeepoutAreaEditor( &frame, &zoneInfo );
|
||||
|
@ -79,13 +78,11 @@ std::unique_ptr<ZONE_CONTAINER> ZONE_CREATE_HELPER::createNewZone( bool aKeepout
|
|||
if( IsCopperLayer( zoneInfo.m_CurrentZone_Layer ) )
|
||||
dialogResult = InvokeCopperZonesEditor( &frame, &zoneInfo );
|
||||
else
|
||||
dialogResult = InvokeNonCopperZonesEditor( &frame, nullptr, &zoneInfo );
|
||||
dialogResult = InvokeNonCopperZonesEditor( &frame, &zoneInfo );
|
||||
}
|
||||
|
||||
if( dialogResult == ZONE_ABORT )
|
||||
{
|
||||
if( dialogResult == wxID_CANCEL )
|
||||
return nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
auto newZone = std::make_unique<ZONE_CONTAINER>( &board );
|
||||
|
@ -113,29 +110,28 @@ std::unique_ptr<ZONE_CONTAINER> ZONE_CREATE_HELPER::createZoneFromExisting(
|
|||
}
|
||||
|
||||
|
||||
void ZONE_CREATE_HELPER::performZoneCutout( ZONE_CONTAINER& aExistingZone,
|
||||
ZONE_CONTAINER& aCutout )
|
||||
void ZONE_CREATE_HELPER::performZoneCutout( ZONE_CONTAINER& aZone, ZONE_CONTAINER& aCutout )
|
||||
{
|
||||
BOARD* board = m_tool.getModel<BOARD>();
|
||||
int curr_hole = aExistingZone.Outline()->NewHole( 0 );
|
||||
int curr_hole = aZone.Outline()->NewHole( 0 );
|
||||
|
||||
// Copy cutout corners into existing zone, in the new hole
|
||||
for( int ii = 0; ii < aCutout.GetNumCorners(); ii++ )
|
||||
{
|
||||
aExistingZone.Outline()->Append( aCutout.GetCornerPosition( ii ), 0, curr_hole );
|
||||
aZone.Outline()->Append( aCutout.GetCornerPosition( ii ), 0, curr_hole );
|
||||
}
|
||||
|
||||
// Be sure the current corner list is closed
|
||||
aExistingZone.Outline()->Hole( 0, curr_hole ).SetClosed( true );
|
||||
aZone.Outline()->Hole( 0, curr_hole ).SetClosed( true );
|
||||
|
||||
// Combine holes and simplify the new outline:
|
||||
board->OnAreaPolygonModified( nullptr, &aExistingZone );
|
||||
board->OnAreaPolygonModified( nullptr, &aZone );
|
||||
|
||||
// Re-fill if needed
|
||||
if( aExistingZone.IsFilled() )
|
||||
if( aZone.IsFilled() )
|
||||
{
|
||||
ZONE_FILLER filler( board );
|
||||
filler.Fill( { &aExistingZone } );
|
||||
filler.Fill( { &aZone } );
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -104,10 +104,10 @@ public:
|
|||
* Cut one zone out of another one (i.e. subtraction) and
|
||||
* update the zone.
|
||||
*
|
||||
* @param aExistingZone the zone to removed area from
|
||||
* @param aZone the zone to removed area from
|
||||
* @param aCutout the area to remove
|
||||
*/
|
||||
void performZoneCutout( ZONE_CONTAINER& aExistingZone, ZONE_CONTAINER& aCutout );
|
||||
void performZoneCutout( ZONE_CONTAINER& aZone, ZONE_CONTAINER& aCutout );
|
||||
|
||||
/**
|
||||
* Commit the current zone-in-progress to the BOARD. This might
|
||||
|
|
|
@ -31,9 +31,13 @@
|
|||
|
||||
#include <convert_to_biu.h>
|
||||
#include <pcbnew.h>
|
||||
#include <pcb_base_frame.h>
|
||||
#include <class_board.h>
|
||||
#include <zones.h>
|
||||
|
||||
#include <class_zone.h>
|
||||
#include <wx/dataview.h>
|
||||
#include <widgets/color_swatch.h>
|
||||
|
||||
ZONE_SETTINGS::ZONE_SETTINGS()
|
||||
{
|
||||
|
@ -145,3 +149,59 @@ void ZONE_SETTINGS::SetCornerRadius( int aRadius )
|
|||
else
|
||||
m_cornerRadius = aRadius;
|
||||
}
|
||||
|
||||
|
||||
const static wxSize LAYER_BITMAP_SIZE( 28, 28 ); // Mac unhappy if this isn't square...
|
||||
|
||||
// A helper for setting up a dialog list for specifying zone layers. Used by all three
|
||||
// zone settings dialogs.
|
||||
void ZONE_SETTINGS::SetupLayersList( wxDataViewListCtrl* aList, PCB_BASE_FRAME* aFrame,
|
||||
bool aShowCopper )
|
||||
{
|
||||
BOARD* board = aFrame->GetBoard();
|
||||
COLOR4D backgroundColor = aFrame->Settings().Colors().GetLayerColor( LAYER_PCB_BACKGROUND );
|
||||
LSET layers = aShowCopper ? LSET::AllCuMask( board->GetCopperLayerCount() )
|
||||
: LSET::AllNonCuMask();
|
||||
|
||||
wxDataViewColumn* checkColumn = aList->AppendToggleColumn( wxEmptyString );
|
||||
wxDataViewColumn* layerColumn = aList->AppendIconTextColumn( wxEmptyString );
|
||||
wxDataViewColumn* layerIDColumn = aList->AppendIconTextColumn( wxEmptyString );
|
||||
layerIDColumn->SetHidden( true );
|
||||
|
||||
int minWidth = 0;
|
||||
|
||||
for( LSEQ layer = layers.UIOrder(); layer; ++layer )
|
||||
{
|
||||
PCB_LAYER_ID layerID = *layer;
|
||||
wxString layerName = board->GetLayerName( layerID );
|
||||
|
||||
// wxCOL_WIDTH_AUTOSIZE doesn't work on all platforms, so we calculate width here
|
||||
minWidth = std::max( minWidth, GetTextSize( layerName, aList ).x );
|
||||
|
||||
COLOR4D layerColor = aFrame->Settings().Colors().GetLayerColor( layerID );
|
||||
auto bitmap = COLOR_SWATCH::MakeBitmap( layerColor, backgroundColor, LAYER_BITMAP_SIZE );
|
||||
wxIcon icon;
|
||||
icon.CopyFromBitmap( bitmap );
|
||||
|
||||
wxVector<wxVariant> row;
|
||||
row.push_back( wxVariant( m_Layers.test( layerID ) ) );
|
||||
row.push_back( wxVariant( wxDataViewIconText( layerName, icon ) ) );
|
||||
row.push_back( wxVariant( layerID ) );
|
||||
aList->AppendItem( row );
|
||||
|
||||
if( m_CurrentZone_Layer == layerID )
|
||||
aList->SetToggleValue( true, (unsigned) aList->GetItemCount() - 1, 0 );
|
||||
}
|
||||
|
||||
checkColumn->SetWidth( 25 );
|
||||
layerColumn->SetMinWidth( minWidth + LAYER_BITMAP_SIZE.x + 25 );
|
||||
|
||||
// You'd think the fact that m_layers is a list would encourage wxWidgets not to save room
|
||||
// for the tree expanders... but you'd be wrong. Force indent to 0.
|
||||
aList->SetIndent( 0 );
|
||||
|
||||
minWidth = checkColumn->GetWidth() + layerColumn->GetWidth();
|
||||
aList->SetMinSize( wxSize( minWidth, aList->GetMinSize().GetHeight() ) );
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -30,7 +30,8 @@
|
|||
#ifndef ZONE_SETTINGS_H_
|
||||
#define ZONE_SETTINGS_H_
|
||||
|
||||
#include "zones.h"
|
||||
#include <zones.h>
|
||||
#include <wx/dataview.h>
|
||||
|
||||
#define MAX_ZONE_CORNER_RADIUS_MILS 400
|
||||
|
||||
|
@ -108,6 +109,12 @@ public:
|
|||
*/
|
||||
ZONE_SETTINGS& operator << ( const ZONE_CONTAINER& aSource );
|
||||
|
||||
/**
|
||||
* A helper routine for the various zone dialogs (copper, non-copper, keepout).
|
||||
* @param aShowCopper indicates whether copper or technical layers should be shown
|
||||
*/
|
||||
void SetupLayersList( wxDataViewListCtrl* aList, PCB_BASE_FRAME* aFrame, bool aShowCopper );
|
||||
|
||||
/**
|
||||
* Function ExportSetting
|
||||
* copy settings to a given zone
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
#define ZONES_H_
|
||||
|
||||
// keys used to store net sort option in config file :
|
||||
#define ZONE_NET_OUTLINES_HATCH_OPTION_KEY wxT( "Zone_Ouline_Hatch_Opt" )
|
||||
#define ZONE_NET_OUTLINES_STYLE_KEY wxT( "Zone_Ouline_Hatch_Opt" )
|
||||
#define ZONE_NET_SORT_OPTION_KEY wxT( "Zone_NetSort_Opt" )
|
||||
#define ZONE_NET_FILTER_STRING_KEY wxT( "Zone_Filter_Opt" )
|
||||
#define ZONE_THERMAL_RELIEF_GAP_STRING_KEY wxT( "Zone_TH_Gap" )
|
||||
|
@ -43,13 +43,8 @@
|
|||
#define ZONE_CLEARANCE_MAX_VALUE_MIL 500 // maximum acceptable value for ZONE_SETTINGS::m_ZoneClearance
|
||||
|
||||
|
||||
/// Exit codes for zone editing dialogs
|
||||
enum ZONE_EDIT_T {
|
||||
ZONE_ABORT, ///< if no change
|
||||
ZONE_OK, ///< if new values were accepted
|
||||
ZONE_EXPORT_VALUES ///< if values were exported to others zones
|
||||
};
|
||||
|
||||
#define ZONE_EXPORT_VALUES 1004 // Copper zone dialog reports wxID_OK, wxID_CANCEL or
|
||||
// ZONE_EXPORT_VALUES
|
||||
|
||||
/// How pads are covered by copper in zone
|
||||
enum ZoneConnection {
|
||||
|
@ -70,12 +65,10 @@ class PCB_BASE_FRAME;
|
|||
*
|
||||
* @param aParent is the PCB_BASE_FRAME calling parent window for the modal dialog,
|
||||
* and it gives access to the BOARD through PCB_BASE_FRAME::GetBoard().
|
||||
* @param aZone is the ZONE_CONTAINER to edit.
|
||||
* @param aSettings points to the ZONE_SETTINGS to edit.
|
||||
* @return ZONE_EDIT_T - tells if user aborted, changed only one zone, or all of them.
|
||||
* @return int - tells if user aborted, changed only one zone, or all of them.
|
||||
*/
|
||||
ZONE_EDIT_T InvokeNonCopperZonesEditor( PCB_BASE_FRAME* aParent, ZONE_CONTAINER* aZone,
|
||||
ZONE_SETTINGS* aSettings );
|
||||
int InvokeNonCopperZonesEditor( PCB_BASE_FRAME* aParent, ZONE_SETTINGS* aSettings );
|
||||
|
||||
/**
|
||||
* Function InvokeCopperZonesEditor
|
||||
|
@ -84,9 +77,9 @@ ZONE_EDIT_T InvokeNonCopperZonesEditor( PCB_BASE_FRAME* aParent, ZONE_CONTAINER*
|
|||
* @param aCaller is the PCB_BASE_FRAME calling parent window for the modal dialog,
|
||||
* and it gives access to the BOARD through PCB_BASE_FRAME::GetBoard().
|
||||
* @param aSettings points to the ZONE_SETTINGS to edit.
|
||||
* @return ZONE_EDIT_T - tells if user aborted, changed only one zone, or all of them.
|
||||
* @return int - tells if user aborted, changed only one zone, or all of them.
|
||||
*/
|
||||
ZONE_EDIT_T InvokeCopperZonesEditor( PCB_BASE_FRAME* aCaller, ZONE_SETTINGS* aSettings );
|
||||
int InvokeCopperZonesEditor( PCB_BASE_FRAME* aCaller, ZONE_SETTINGS* aSettings );
|
||||
|
||||
/**
|
||||
* Function InvokeKeepoutAreaEditor
|
||||
|
@ -95,8 +88,8 @@ ZONE_EDIT_T InvokeCopperZonesEditor( PCB_BASE_FRAME* aCaller, ZONE_SETTINGS* aSe
|
|||
* @param aCaller is the PCB_BASE_FRAME calling parent window for the modal dialog,
|
||||
* and it gives access to the BOARD through PCB_BASE_FRAME::GetBoard().
|
||||
* @param aSettings points to the ZONE_SETTINGS to edit.
|
||||
* @return ZONE_EDIT_T - tells if user aborted, changed only one zone, or all of them.
|
||||
* @return int - tells if user aborted, changed only one zone, or all of them.
|
||||
*/
|
||||
ZONE_EDIT_T InvokeKeepoutAreaEditor( PCB_BASE_FRAME* aCaller, ZONE_SETTINGS* aSettings );
|
||||
int InvokeKeepoutAreaEditor( PCB_BASE_FRAME* aCaller, ZONE_SETTINGS* aSettings );
|
||||
|
||||
#endif // ZONES_H_
|
||||
|
|
|
@ -115,76 +115,65 @@ void PCB_EDIT_FRAME::Add_Zone_Cutout( wxDC* DC, ZONE_CONTAINER* aZone )
|
|||
|
||||
void PCB_EDIT_FRAME::duplicateZone( wxDC* aDC, ZONE_CONTAINER* aZone )
|
||||
{
|
||||
ZONE_CONTAINER* newZone = new ZONE_CONTAINER( *aZone );
|
||||
newZone->UnFill();
|
||||
ZONE_SETTINGS zoneSettings;
|
||||
zoneSettings << *aZone;
|
||||
|
||||
bool success;
|
||||
int dialogResult;
|
||||
|
||||
if( aZone->GetIsKeepout() )
|
||||
success = InvokeKeepoutAreaEditor( this, &zoneSettings );
|
||||
dialogResult = InvokeKeepoutAreaEditor( this, &zoneSettings );
|
||||
else if( aZone->IsOnCopperLayer() )
|
||||
success = InvokeCopperZonesEditor( this, &zoneSettings );
|
||||
dialogResult = InvokeCopperZonesEditor( this, &zoneSettings );
|
||||
else
|
||||
success = InvokeNonCopperZonesEditor( this, aZone, &zoneSettings );
|
||||
dialogResult = InvokeNonCopperZonesEditor( this, &zoneSettings );
|
||||
|
||||
if( dialogResult != wxID_OK )
|
||||
return;
|
||||
|
||||
// If the new zone is on the same layer as the the initial zone we'll end up combining
|
||||
// them which will result in a no-op. Might as well exit here.
|
||||
if( success )
|
||||
if( aZone->GetIsKeepout() && ( aZone->GetLayerSet() == zoneSettings.m_Layers ) )
|
||||
{
|
||||
if( aZone->GetIsKeepout() && ( aZone->GetLayerSet() == zoneSettings.m_Layers ) )
|
||||
{
|
||||
DisplayErrorMessage(
|
||||
this, _( "The duplicated zone cannot be on the same layers as the original zone." ) );
|
||||
success = false;
|
||||
}
|
||||
else if( !aZone->GetIsKeepout() && ( aZone->GetLayer() == zoneSettings.m_CurrentZone_Layer ) )
|
||||
{
|
||||
DisplayErrorMessage(
|
||||
this, _( "The duplicated zone cannot be on the same layer as the original zone." ) );
|
||||
success = false;
|
||||
}
|
||||
DisplayErrorMessage( this, _( "The duplicated zone cannot be on the same layers as the original zone." ) );
|
||||
return;
|
||||
}
|
||||
else if( !aZone->GetIsKeepout() && ( aZone->GetLayer() == zoneSettings.m_CurrentZone_Layer ) )
|
||||
{
|
||||
DisplayErrorMessage( this, _( "The duplicated zone cannot be on the same layer as the original zone." ) );
|
||||
return;
|
||||
}
|
||||
|
||||
if( success )
|
||||
{
|
||||
zoneSettings.ExportSetting( *newZone );
|
||||
newZone->Hatch();
|
||||
ZONE_CONTAINER* newZone = new ZONE_CONTAINER( *aZone );
|
||||
newZone->UnFill();
|
||||
zoneSettings.ExportSetting( *newZone );
|
||||
newZone->Hatch();
|
||||
|
||||
s_AuxiliaryList.ClearListAndDeleteItems();
|
||||
s_PickedList.ClearListAndDeleteItems();
|
||||
SaveCopyOfZones( s_PickedList, GetBoard(), newZone->GetNetCode(), newZone->GetLayer() );
|
||||
GetBoard()->Add( newZone );
|
||||
s_AuxiliaryList.ClearListAndDeleteItems();
|
||||
s_PickedList.ClearListAndDeleteItems();
|
||||
SaveCopyOfZones( s_PickedList, GetBoard(), newZone->GetNetCode(), newZone->GetLayer() );
|
||||
GetBoard()->Add( newZone );
|
||||
|
||||
ITEM_PICKER picker( newZone, UR_NEW );
|
||||
s_PickedList.PushItem( picker );
|
||||
ITEM_PICKER picker( newZone, UR_NEW );
|
||||
s_PickedList.PushItem( picker );
|
||||
|
||||
GetScreen()->SetCurItem( NULL ); // This outline may be deleted when merging outlines
|
||||
GetScreen()->SetCurItem( NULL ); // This outline may be deleted when merging outlines
|
||||
|
||||
// Combine zones if possible
|
||||
GetBoard()->OnAreaPolygonModified( &s_AuxiliaryList, newZone );
|
||||
// Combine zones if possible
|
||||
GetBoard()->OnAreaPolygonModified( &s_AuxiliaryList, newZone );
|
||||
|
||||
// Redraw zones
|
||||
GetBoard()->RedrawAreasOutlines( m_canvas, aDC, GR_OR, newZone->GetLayer() );
|
||||
GetBoard()->RedrawFilledAreas( m_canvas, aDC, GR_OR, newZone->GetLayer() );
|
||||
// Redraw zones
|
||||
GetBoard()->RedrawAreasOutlines( m_canvas, aDC, GR_OR, newZone->GetLayer() );
|
||||
GetBoard()->RedrawFilledAreas( m_canvas, aDC, GR_OR, newZone->GetLayer() );
|
||||
|
||||
DRC drc( this );
|
||||
DRC drc( this );
|
||||
|
||||
if( GetBoard()->GetAreaIndex( newZone ) >= 0
|
||||
&& drc.TestZoneToZoneOutline( newZone, true ) )
|
||||
{
|
||||
DisplayInfoMessage( this, _( "Warning: The new zone fails DRC" ) );
|
||||
}
|
||||
if( GetBoard()->GetAreaIndex( newZone ) >= 0 && drc.TestZoneToZoneOutline( newZone, true ) )
|
||||
DisplayInfoMessage( this, _( "Warning: The new zone fails DRC" ) );
|
||||
|
||||
UpdateCopyOfZonesList( s_PickedList, s_AuxiliaryList, GetBoard() );
|
||||
SaveCopyInUndoList( s_PickedList, UR_UNSPECIFIED );
|
||||
s_PickedList.ClearItemsList();
|
||||
UpdateCopyOfZonesList( s_PickedList, s_AuxiliaryList, GetBoard() );
|
||||
SaveCopyInUndoList( s_PickedList, UR_UNSPECIFIED );
|
||||
s_PickedList.ClearItemsList();
|
||||
|
||||
OnModify();
|
||||
}
|
||||
else
|
||||
delete newZone;
|
||||
OnModify();
|
||||
}
|
||||
|
||||
|
||||
|
@ -567,7 +556,7 @@ int PCB_EDIT_FRAME::Begin_Zone( wxDC* DC )
|
|||
{
|
||||
if( !s_CurrentZone ) // A new outline is created, from scratch
|
||||
{
|
||||
ZONE_EDIT_T edited;
|
||||
int dialogResult;
|
||||
|
||||
// Prompt user for parameters:
|
||||
m_canvas->SetIgnoreMouseEvents( true );
|
||||
|
@ -608,27 +597,27 @@ int PCB_EDIT_FRAME::Begin_Zone( wxDC* DC )
|
|||
zoneInfo.SetCornerSmoothingType( ZONE_SETTINGS::SMOOTHING_NONE );
|
||||
zoneInfo.SetCornerRadius( 0 );
|
||||
|
||||
edited = InvokeKeepoutAreaEditor( this, &zoneInfo );
|
||||
dialogResult = InvokeKeepoutAreaEditor( this, &zoneInfo );
|
||||
}
|
||||
else
|
||||
{
|
||||
zoneInfo.m_CurrentZone_Layer = GetActiveLayer(); // Preselect a layer
|
||||
zoneInfo.SetIsKeepout( false );
|
||||
edited = InvokeCopperZonesEditor( this, &zoneInfo );
|
||||
dialogResult = InvokeCopperZonesEditor( this, &zoneInfo );
|
||||
}
|
||||
}
|
||||
else // Put a zone on a non copper layer (technical layer)
|
||||
{
|
||||
zone->SetLayer( GetActiveLayer() ); // Preselect a layer
|
||||
zoneInfo.m_CurrentZone_Layer = GetActiveLayer(); // Preselect a layer
|
||||
zoneInfo.SetIsKeepout( false );
|
||||
zoneInfo.m_NetcodeSelection = 0; // No net for non copper zones
|
||||
edited = InvokeNonCopperZonesEditor( this, zone, &zoneInfo );
|
||||
zoneInfo.m_NetcodeSelection = 0; // No net for non copper zones
|
||||
dialogResult = InvokeNonCopperZonesEditor( this, &zoneInfo );
|
||||
}
|
||||
|
||||
m_canvas->MoveCursorToCrossHair();
|
||||
m_canvas->SetIgnoreMouseEvents( false );
|
||||
|
||||
if( edited == ZONE_ABORT )
|
||||
if( dialogResult == wxID_CANCEL )
|
||||
{
|
||||
GetBoard()->m_CurrentZoneContour = NULL;
|
||||
delete zone;
|
||||
|
@ -697,8 +686,7 @@ int PCB_EDIT_FRAME::Begin_Zone( wxDC* DC )
|
|||
// SCREEN::SetCurItem(), so the DRC error remains on screen.
|
||||
// PCB_EDIT_FRAME::SetCurItem() calls DisplayInfo().
|
||||
GetScreen()->SetCurItem( NULL );
|
||||
DisplayErrorMessage( this,
|
||||
_( "DRC error: this start point is inside or too close another area" ) );
|
||||
DisplayErrorMessage( this, _( "DRC error: this start point is inside or too close another area" ) );
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -765,8 +753,7 @@ bool PCB_EDIT_FRAME::End_Zone( wxDC* DC )
|
|||
if( Settings().m_legacyDrcOn &&
|
||||
m_drc->DrcOnCreatingZone( zone, icorner ) == BAD_DRC ) // we can't validate the closing edge
|
||||
{
|
||||
DisplayErrorMessage( this,
|
||||
_( "DRC error: closing this area creates a DRC error with another area" ) );
|
||||
DisplayErrorMessage( this, _( "DRC error: closing this area creates a DRC error with another area" ) );
|
||||
m_canvas->MoveCursorToCrossHair();
|
||||
return false;
|
||||
}
|
||||
|
@ -877,8 +864,8 @@ static void Show_New_Edge_While_Move_Mouse( EDA_DRAW_PANEL* aPanel, wxDC* aDC,
|
|||
|
||||
void PCB_EDIT_FRAME::Edit_Zone_Params( wxDC* DC, ZONE_CONTAINER* aZone )
|
||||
{
|
||||
ZONE_EDIT_T edited;
|
||||
ZONE_SETTINGS zoneInfo = GetZoneSettings();
|
||||
int dialogResult;
|
||||
ZONE_SETTINGS zoneInfo = GetZoneSettings();
|
||||
|
||||
BOARD_COMMIT commit( this );
|
||||
m_canvas->SetIgnoreMouseEvents( true );
|
||||
|
@ -893,24 +880,24 @@ void PCB_EDIT_FRAME::Edit_Zone_Params( wxDC* DC, ZONE_CONTAINER* aZone )
|
|||
{
|
||||
// edit a keepout area on a copper layer
|
||||
zoneInfo << *aZone;
|
||||
edited = InvokeKeepoutAreaEditor( this, &zoneInfo );
|
||||
dialogResult = InvokeKeepoutAreaEditor( this, &zoneInfo );
|
||||
}
|
||||
else if( IsCopperLayer( aZone->GetLayer() ) )
|
||||
{
|
||||
// edit a zone on a copper layer
|
||||
zoneInfo << *aZone;
|
||||
edited = InvokeCopperZonesEditor( this, &zoneInfo );
|
||||
dialogResult = InvokeCopperZonesEditor( this, &zoneInfo );
|
||||
}
|
||||
else
|
||||
{
|
||||
zoneInfo << *aZone;
|
||||
edited = InvokeNonCopperZonesEditor( this, aZone, &zoneInfo );
|
||||
dialogResult = InvokeNonCopperZonesEditor( this, &zoneInfo );
|
||||
}
|
||||
|
||||
m_canvas->MoveCursorToCrossHair();
|
||||
m_canvas->SetIgnoreMouseEvents( false );
|
||||
|
||||
if( edited == ZONE_ABORT )
|
||||
if( dialogResult == wxID_CANCEL )
|
||||
{
|
||||
s_AuxiliaryList.ClearListAndDeleteItems();
|
||||
s_PickedList.ClearListAndDeleteItems();
|
||||
|
@ -920,7 +907,7 @@ void PCB_EDIT_FRAME::Edit_Zone_Params( wxDC* DC, ZONE_CONTAINER* aZone )
|
|||
SetZoneSettings( zoneInfo );
|
||||
OnModify();
|
||||
|
||||
if( edited == ZONE_EXPORT_VALUES )
|
||||
if( dialogResult == ZONE_EXPORT_VALUES )
|
||||
{
|
||||
UpdateCopyOfZonesList( s_PickedList, s_AuxiliaryList, GetBoard() );
|
||||
commit.Stage( s_PickedList );
|
||||
|
|
Loading…
Reference in New Issue