Modify pcbnew plot and zone dialogs. Policy fixes in dialog_copper_zone.

This commit is contained in:
Marco Mattila 2011-03-02 00:36:38 +02:00
parent 1010601a78
commit 430a39d7a2
10 changed files with 3766 additions and 3673 deletions

View File

@ -24,24 +24,19 @@
#define LAYER_BITMAP_SIZE_X 20 #define LAYER_BITMAP_SIZE_X 20
#define LAYER_BITMAP_SIZE_Y 10 #define LAYER_BITMAP_SIZE_Y 10
/* the filter to show nets (default * "*"). // Initialize static member variables
* static to keep this pattern for an entire pcbnew session wxString DIALOG_COPPER_ZONE::m_netNameShowFilter( wxT( "*" ) );
*/ wxPoint DIALOG_COPPER_ZONE::prevPosition( -1, -1 );
wxString dialog_copper_zone::m_netNameShowFilter( wxT( "*" ) ); wxSize DIALOG_COPPER_ZONE::prevSize;
wxPoint dialog_copper_zone::prevPosition( -1, -1 );
wxSize dialog_copper_zone::prevSize;
dialog_copper_zone::dialog_copper_zone( PCB_EDIT_FRAME* parent, ZONE_SETTING* zone_setting ) : DIALOG_COPPER_ZONE::DIALOG_COPPER_ZONE( PCB_EDIT_FRAME* parent, ZONE_SETTING* zone_setting ) :
dialog_copper_zone_base( parent ) DIALOG_COPPER_ZONE_BASE( parent )
{ {
m_Parent = parent; m_Parent = parent;
m_Config = wxGetApp().m_EDA_Config; m_Config = wxGetApp().m_EDA_Config;
m_Zone_Setting = zone_setting; m_Zone_Setting = zone_setting;
m_NetSortingByPadCount = true; /* false = alphabetic sort. m_NetSortingByPadCount = true; // false = alphabetic sort, true = pad count sort
* true = pad count sort.
*/
m_OnExitCode = ZONE_ABORT; m_OnExitCode = ZONE_ABORT;
SetReturnCode( ZONE_ABORT ); // Will be changed on buttons click SetReturnCode( ZONE_ABORT ); // Will be changed on buttons click
@ -56,22 +51,24 @@ dialog_copper_zone::dialog_copper_zone( PCB_EDIT_FRAME* parent, ZONE_SETTING* zo
m_layerSizer->Add( m_LayerSelectionCtrl, 1, m_layerSizer->Add( m_LayerSelectionCtrl, 1,
wxGROW | wxLEFT | wxRIGHT | wxBOTTOM, 5 ); wxGROW | wxLEFT | wxRIGHT | wxBOTTOM, 5 );
// 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_cornerSmoothingTitle->SetMinSize( m_cornerSmoothingTitle->GetSize() );
initDialog(); initDialog();
GetSizer()->SetSizeHints( this ); GetSizer()->SetSizeHints( this );
Center();
if( prevPosition.x != -1 ) if( prevPosition.x != -1 )
SetSize( prevPosition.x, prevPosition.y, SetSize( prevPosition.x, prevPosition.y,
prevSize.x, prevSize.y ); prevSize.x, prevSize.y );
else
Center();
} }
/*****************************************************************/ void DIALOG_COPPER_ZONE::initDialog()
void dialog_copper_zone::initDialog()
/*****************************************************************/
// Initialise all dialog options and values in wxTextCtrl
{ {
BOARD* board = m_Parent->GetBoard(); BOARD* board = m_Parent->GetBoard();
@ -202,15 +199,13 @@ void dialog_copper_zone::initDialog()
} }
/********************************************************************/ void DIALOG_COPPER_ZONE::OnButtonCancelClick( wxCommandEvent& event )
void dialog_copper_zone::OnButtonCancelClick( wxCommandEvent& event )
/********************************************************************/
{ {
Close( true ); Close( true );
} }
void dialog_copper_zone::OnClose( wxCloseEvent& event ) void DIALOG_COPPER_ZONE::OnClose( wxCloseEvent& event )
{ {
prevPosition = GetPosition(); prevPosition = GetPosition();
prevSize = GetSize(); prevSize = GetSize();
@ -218,7 +213,7 @@ void dialog_copper_zone::OnClose( wxCloseEvent& event )
} }
void dialog_copper_zone::OnSize( wxSizeEvent& event ) void DIALOG_COPPER_ZONE::OnSize( wxSizeEvent& event )
{ {
Layout(); Layout();
@ -228,7 +223,7 @@ void dialog_copper_zone::OnSize( wxSizeEvent& event )
} }
void dialog_copper_zone::OnCornerSmoothingModeChoice( wxCommandEvent& event ) void DIALOG_COPPER_ZONE::OnCornerSmoothingModeChoice( wxCommandEvent& event )
{ {
int selection = m_cornerSmoothingChoice->GetSelection(); int selection = m_cornerSmoothingChoice->GetSelection();
@ -254,16 +249,7 @@ void dialog_copper_zone::OnCornerSmoothingModeChoice( wxCommandEvent& event )
} }
/********************************************************************************************/ bool DIALOG_COPPER_ZONE::AcceptOptions( bool aPromptForErrors, bool aUseExportableSetupOnly )
bool dialog_copper_zone::AcceptOptions( bool aPromptForErrors, bool aUseExportableSetupOnly )
/********************************************************************************************/
/**
* Function AcceptOptions(
* @return false if incorrect options, true if Ok.
* @param aPromptForErrors = true to prompt user on incorrectparams
* @param aUseExportableSetupOnly = true to use exportable parametres only (used to export this setup to other zones)
*/
{ {
switch( m_PadInZoneOpt->GetSelection() ) switch( m_PadInZoneOpt->GetSelection() )
{ {
@ -365,8 +351,9 @@ bool dialog_copper_zone::AcceptOptions( bool aPromptForErrors, bool aUseExportab
if( aUseExportableSetupOnly ) if( aUseExportableSetupOnly )
return true; return true;
/* Get the layer selection for this zone */ // Get the layer selection for this zone
int ii = m_LayerSelectionCtrl->GetFirstSelected(); int ii = m_LayerSelectionCtrl->GetFirstSelected();
if( ii < 0 && aPromptForErrors ) if( ii < 0 && aPromptForErrors )
{ {
DisplayError( this, _( "No layer selected." ) ); DisplayError( this, _( "No layer selected." ) );
@ -375,8 +362,9 @@ bool dialog_copper_zone::AcceptOptions( bool aPromptForErrors, bool aUseExportab
m_Zone_Setting->m_CurrentZone_Layer = m_LayerId[ii]; m_Zone_Setting->m_CurrentZone_Layer = m_LayerId[ii];
/* Get the net name selection for this zone */ // Get the net name selection for this zone
ii = m_ListNetNameSelection->GetSelection(); ii = m_ListNetNameSelection->GetSelection();
if( ii < 0 && aPromptForErrors ) if( ii < 0 && aPromptForErrors )
{ {
DisplayError( this, _( "No net selected." ) ); DisplayError( this, _( "No net selected." ) );
@ -395,7 +383,7 @@ bool dialog_copper_zone::AcceptOptions( bool aPromptForErrors, bool aUseExportab
g_Zone_Default_Setting.m_NetcodeSelection = 0; g_Zone_Default_Setting.m_NetcodeSelection = 0;
/* Search net_code for this net, if a net was selected */ // Search net_code for this net, if a net was selected
if( m_ListNetNameSelection->GetSelection() > 0 ) if( m_ListNetNameSelection->GetSelection() > 0 )
{ {
NETINFO_ITEM* net = m_Parent->GetBoard()->FindNet( net_name ); NETINFO_ITEM* net = m_Parent->GetBoard()->FindNet( net_name );
@ -407,9 +395,7 @@ bool dialog_copper_zone::AcceptOptions( bool aPromptForErrors, bool aUseExportab
} }
/***************************************************************************/ void DIALOG_COPPER_ZONE::OnNetSortingOptionSelected( wxCommandEvent& event )
void dialog_copper_zone::OnNetSortingOptionSelected( wxCommandEvent& event )
/***************************************************************************/
{ {
initListNetsParams(); initListNetsParams();
buildAvailableListOfNets(); buildAvailableListOfNets();
@ -424,9 +410,7 @@ void dialog_copper_zone::OnNetSortingOptionSelected( wxCommandEvent& event )
} }
/*****************************************************************/ void DIALOG_COPPER_ZONE::OnButtonOkClick( wxCommandEvent& event )
void dialog_copper_zone::OnButtonOkClick( wxCommandEvent& event )
/*****************************************************************/
{ {
m_netNameShowFilter = m_ShowNetNameFilter->GetValue(); m_netNameShowFilter = m_ShowNetNameFilter->GetValue();
prevPosition = GetPosition(); prevPosition = GetPosition();
@ -437,9 +421,7 @@ void dialog_copper_zone::OnButtonOkClick( wxCommandEvent& event )
} }
/******************************************************************************/ void DIALOG_COPPER_ZONE::ExportSetupToOtherCopperZones( wxCommandEvent& event )
void dialog_copper_zone::ExportSetupToOtherCopperZones( wxCommandEvent& event )
/******************************************************************************/
{ {
prevPosition = GetPosition(); prevPosition = GetPosition();
prevSize = GetSize(); prevSize = GetSize();
@ -460,9 +442,7 @@ void dialog_copper_zone::ExportSetupToOtherCopperZones( wxCommandEvent& event )
} }
/******************************************************************/ void DIALOG_COPPER_ZONE::OnPadsInZoneClick( wxCommandEvent& event )
void dialog_copper_zone::OnPadsInZoneClick( wxCommandEvent& event )
/******************************************************************/
{ {
switch( m_PadInZoneOpt->GetSelection() ) switch( m_PadInZoneOpt->GetSelection() )
{ {
@ -479,10 +459,7 @@ void dialog_copper_zone::OnPadsInZoneClick( wxCommandEvent& event )
} }
/** init m_NetSortingByPadCount and m_NetFiltering values void DIALOG_COPPER_ZONE::initListNetsParams()
* according to m_NetDisplayOption selection
*/
void dialog_copper_zone::initListNetsParams()
{ {
switch( m_NetDisplayOption->GetSelection() ) switch( m_NetDisplayOption->GetSelection() )
{ {
@ -509,15 +486,11 @@ void dialog_copper_zone::initListNetsParams()
} }
/* Called when clicking on Apply Filter button void DIALOG_COPPER_ZONE::OnRunFiltersButtonClick( wxCommandEvent& event )
* Rebuild the list of nets with the currents filters settings.
* If the net display options is not a filtered option, force this option
*/
void dialog_copper_zone::OnRunFiltersButtonClick( wxCommandEvent& event )
{ {
m_netNameShowFilter = m_ShowNetNameFilter->GetValue(); m_netNameShowFilter = m_ShowNetNameFilter->GetValue();
// Ensure filtered option for nets: // Ensure filtered option for nets
if( m_NetDisplayOption->GetSelection() == 0 ) if( m_NetDisplayOption->GetSelection() == 0 )
m_NetDisplayOption->SetSelection( 2 ); m_NetDisplayOption->SetSelection( 2 );
else if( m_NetDisplayOption->GetSelection() == 1 ) else if( m_NetDisplayOption->GetSelection() == 1 )
@ -527,7 +500,7 @@ void dialog_copper_zone::OnRunFiltersButtonClick( wxCommandEvent& event )
} }
void dialog_copper_zone::buildAvailableListOfNets() void DIALOG_COPPER_ZONE::buildAvailableListOfNets()
{ {
wxArrayString listNetName; wxArrayString listNetName;
@ -577,18 +550,16 @@ void dialog_copper_zone::buildAvailableListOfNets()
} }
wxBitmap dialog_copper_zone::makeLayerBitmap( int aColor ) wxBitmap DIALOG_COPPER_ZONE::makeLayerBitmap( int aColor )
{ {
wxBitmap bitmap( LAYER_BITMAP_SIZE_X, LAYER_BITMAP_SIZE_Y ); wxBitmap bitmap( LAYER_BITMAP_SIZE_X, LAYER_BITMAP_SIZE_Y );
wxBrush brush; wxBrush brush;
wxMemoryDC iconDC; wxMemoryDC iconDC;
iconDC.SelectObject( bitmap ); iconDC.SelectObject( bitmap );
brush.SetColour( MakeColour( aColor ) ); brush.SetColour( MakeColour( aColor ) );
brush.SetStyle( wxSOLID ); brush.SetStyle( wxSOLID );
iconDC.SetBrush( brush ); iconDC.SetBrush( brush );
iconDC.DrawRectangle( 0, 0, LAYER_BITMAP_SIZE_X, LAYER_BITMAP_SIZE_Y ); iconDC.DrawRectangle( 0, 0, LAYER_BITMAP_SIZE_X, LAYER_BITMAP_SIZE_Y );
return bitmap; return bitmap;

View File

@ -9,7 +9,7 @@
/* here is the derivated class from dialog_copper_zone_frame created by wxFormBuilder /* here is the derivated class from dialog_copper_zone_frame created by wxFormBuilder
*/ */
class dialog_copper_zone : public dialog_copper_zone_base class DIALOG_COPPER_ZONE : public DIALOG_COPPER_ZONE_BASE
{ {
private: private:
PCB_EDIT_FRAME* m_Parent; PCB_EDIT_FRAME* m_Parent;
@ -35,21 +35,43 @@ private:
static wxSize prevSize; static wxSize prevSize;
public: public:
dialog_copper_zone( PCB_EDIT_FRAME* parent, ZONE_SETTING* zone_setting ); DIALOG_COPPER_ZONE( PCB_EDIT_FRAME* parent, ZONE_SETTING* zone_setting );
private: private:
/** Function initDialog
* fills in the dialog controls using the current settings.
*/
void initDialog(); void initDialog();
void OnButtonOkClick( wxCommandEvent& event ); void OnButtonOkClick( wxCommandEvent& event );
void OnButtonCancelClick( wxCommandEvent& event ); void OnButtonCancelClick( wxCommandEvent& event );
void OnClose( wxCloseEvent& event ); void OnClose( wxCloseEvent& event );
void OnSize( wxSizeEvent& event ); void OnSize( wxSizeEvent& event );
void OnCornerSmoothingModeChoice( wxCommandEvent& event ); void OnCornerSmoothingModeChoice( wxCommandEvent& event );
/**
* Function AcceptOptions
* @param aPromptForErrors is true to prompt user on incorrect params.
* @param aUseExportableSetupOnly is true to use exportable parametres 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 aPromptForErrors, bool aUseExportableSetupOnly = false );
void OnNetSortingOptionSelected( wxCommandEvent& event ); void OnNetSortingOptionSelected( wxCommandEvent& event );
void ExportSetupToOtherCopperZones( wxCommandEvent& event ); void ExportSetupToOtherCopperZones( wxCommandEvent& event );
void OnPadsInZoneClick( wxCommandEvent& event ); void OnPadsInZoneClick( wxCommandEvent& event );
void OnRunFiltersButtonClick( wxCommandEvent& event ); void OnRunFiltersButtonClick( wxCommandEvent& event );
void buildAvailableListOfNets(); void buildAvailableListOfNets();
/** Function initListNetsParams
* initializes m_NetSortingByPadCount and m_NetFiltering values
* according to m_NetDisplayOption selection.
*/
void initListNetsParams(); void initListNetsParams();
/**
* 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( int aColor ); wxBitmap makeLayerBitmap( int aColor );
}; };
#endif // #ifndef DIALOG_COPPER_ZONES #endif // #ifndef DIALOG_COPPER_ZONES

View File

@ -1,247 +1,247 @@
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Nov 17 2010) // C++ code generated with wxFormBuilder (version Nov 18 2010)
// http://www.wxformbuilder.org/ // http://www.wxformbuilder.org/
// //
// PLEASE DO "NOT" EDIT THIS FILE! // PLEASE DO "NOT" EDIT THIS FILE!
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
#include "dialog_copper_zones_base.h" #include "dialog_copper_zones_base.h"
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
BEGIN_EVENT_TABLE( dialog_copper_zone_base, wxDialog ) BEGIN_EVENT_TABLE( DIALOG_COPPER_ZONE_BASE, wxDialog )
EVT_CLOSE( dialog_copper_zone_base::_wxFB_OnClose ) EVT_CLOSE( DIALOG_COPPER_ZONE_BASE::_wxFB_OnClose )
EVT_SIZE( dialog_copper_zone_base::_wxFB_OnSize ) EVT_SIZE( DIALOG_COPPER_ZONE_BASE::_wxFB_OnSize )
EVT_CHOICE( ID_M_NETDISPLAYOPTION, dialog_copper_zone_base::_wxFB_OnNetSortingOptionSelected ) EVT_CHOICE( ID_M_NETDISPLAYOPTION, DIALOG_COPPER_ZONE_BASE::_wxFB_OnNetSortingOptionSelected )
EVT_TEXT_ENTER( ID_TEXTCTRL_NETNAMES_FILTER, dialog_copper_zone_base::_wxFB_OnRunFiltersButtonClick ) EVT_TEXT_ENTER( ID_TEXTCTRL_NETNAMES_FILTER, DIALOG_COPPER_ZONE_BASE::_wxFB_OnRunFiltersButtonClick )
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_BUTTON( wxID_APPLY_FILTERS, DIALOG_COPPER_ZONE_BASE::_wxFB_OnRunFiltersButtonClick )
EVT_CHOICE( ID_CORNER_SMOOTHING, dialog_copper_zone_base::_wxFB_OnCornerSmoothingModeChoice ) EVT_CHOICE( ID_CORNER_SMOOTHING, DIALOG_COPPER_ZONE_BASE::_wxFB_OnCornerSmoothingModeChoice )
EVT_CHOICE( ID_M_PADINZONEOPT, dialog_copper_zone_base::_wxFB_OnPadsInZoneClick ) EVT_CHOICE( ID_M_PADINZONEOPT, DIALOG_COPPER_ZONE_BASE::_wxFB_OnPadsInZoneClick )
EVT_BUTTON( wxID_BUTTON_EXPORT, dialog_copper_zone_base::_wxFB_ExportSetupToOtherCopperZones ) EVT_BUTTON( wxID_BUTTON_EXPORT, DIALOG_COPPER_ZONE_BASE::_wxFB_ExportSetupToOtherCopperZones )
EVT_BUTTON( wxID_OK, dialog_copper_zone_base::_wxFB_OnButtonOkClick ) EVT_BUTTON( wxID_OK, DIALOG_COPPER_ZONE_BASE::_wxFB_OnButtonOkClick )
EVT_BUTTON( wxID_CANCEL, dialog_copper_zone_base::_wxFB_OnButtonCancelClick ) EVT_BUTTON( wxID_CANCEL, DIALOG_COPPER_ZONE_BASE::_wxFB_OnButtonCancelClick )
END_EVENT_TABLE() 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 ) : wxDialog( parent, id, title, pos, size, style ) DIALOG_COPPER_ZONE_BASE::DIALOG_COPPER_ZONE_BASE( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style )
{ {
this->SetSizeHints( wxDefaultSize, wxDefaultSize ); this->SetSizeHints( wxDefaultSize, wxDefaultSize );
m_MainBoxSizer = new wxBoxSizer( wxVERTICAL ); m_MainBoxSizer = new wxBoxSizer( wxVERTICAL );
wxBoxSizer* m_OptionsBoxSizer; wxBoxSizer* m_OptionsBoxSizer;
m_OptionsBoxSizer = new wxBoxSizer( wxHORIZONTAL ); m_OptionsBoxSizer = new wxBoxSizer( wxHORIZONTAL );
m_layerSizer = new wxBoxSizer( wxVERTICAL ); m_layerSizer = new wxBoxSizer( wxVERTICAL );
m_staticText17 = new wxStaticText( this, wxID_ANY, _("Layer:"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticText17 = new wxStaticText( this, wxID_ANY, _("Layer:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticText17->Wrap( -1 ); m_staticText17->Wrap( -1 );
m_layerSizer->Add( m_staticText17, 0, wxLEFT|wxRIGHT|wxTOP, 5 ); m_layerSizer->Add( m_staticText17, 0, wxLEFT|wxRIGHT|wxTOP, 5 );
m_OptionsBoxSizer->Add( m_layerSizer, 1, wxEXPAND, 5 ); m_OptionsBoxSizer->Add( m_layerSizer, 1, wxEXPAND, 5 );
wxBoxSizer* bSizer7; wxBoxSizer* bSizer7;
bSizer7 = new wxBoxSizer( wxVERTICAL ); bSizer7 = new wxBoxSizer( wxVERTICAL );
m_staticText2 = new wxStaticText( this, wxID_ANY, _("Net:"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticText2 = new wxStaticText( this, wxID_ANY, _("Net:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticText2->Wrap( -1 ); m_staticText2->Wrap( -1 );
bSizer7->Add( m_staticText2, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); bSizer7->Add( m_staticText2, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
m_ListNetNameSelection = new wxListBox( this, ID_NETNAME_SELECTION, wxDefaultPosition, wxDefaultSize, 0, NULL, 0 ); m_ListNetNameSelection = new wxListBox( this, ID_NETNAME_SELECTION, wxDefaultPosition, wxDefaultSize, 0, NULL, 0 );
bSizer7->Add( m_ListNetNameSelection, 1, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); bSizer7->Add( m_ListNetNameSelection, 1, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
m_OptionsBoxSizer->Add( bSizer7, 1, wxEXPAND, 5 ); m_OptionsBoxSizer->Add( bSizer7, 1, wxEXPAND, 5 );
wxStaticBoxSizer* m_NetSortOptSizer; wxStaticBoxSizer* m_NetSortOptSizer;
m_NetSortOptSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Net Filtering") ), wxVERTICAL ); m_NetSortOptSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Net Filtering") ), wxVERTICAL );
m_staticText16 = new wxStaticText( this, wxID_ANY, _("Display:"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticText16 = new wxStaticText( this, wxID_ANY, _("Display:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticText16->Wrap( -1 ); m_staticText16->Wrap( -1 );
m_NetSortOptSizer->Add( m_staticText16, 0, wxLEFT|wxRIGHT|wxTOP, 5 ); m_NetSortOptSizer->Add( m_staticText16, 0, wxLEFT|wxRIGHT|wxTOP, 5 );
wxString m_NetDisplayOptionChoices[] = { _("Show all (alphabetical)"), _("Show all (advanced)"), _("Filtered (alphabetical)"), _("Filtered (advanced)") }; wxString m_NetDisplayOptionChoices[] = { _("Show all (alphabetical)"), _("Show all (advanced)"), _("Filtered (alphabetical)"), _("Filtered (advanced)") };
int m_NetDisplayOptionNChoices = sizeof( m_NetDisplayOptionChoices ) / sizeof( wxString ); int m_NetDisplayOptionNChoices = sizeof( m_NetDisplayOptionChoices ) / sizeof( wxString );
m_NetDisplayOption = new wxChoice( this, ID_M_NETDISPLAYOPTION, wxDefaultPosition, wxDefaultSize, m_NetDisplayOptionNChoices, m_NetDisplayOptionChoices, 0 ); m_NetDisplayOption = new wxChoice( this, ID_M_NETDISPLAYOPTION, wxDefaultPosition, wxDefaultSize, m_NetDisplayOptionNChoices, m_NetDisplayOptionChoices, 0 );
m_NetDisplayOption->SetSelection( 0 ); m_NetDisplayOption->SetSelection( 0 );
m_NetSortOptSizer->Add( m_NetDisplayOption, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 ); m_NetSortOptSizer->Add( m_NetDisplayOption, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 );
m_staticText5 = new wxStaticText( this, wxID_ANY, _("Hidden net filter:"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticText5 = new wxStaticText( this, wxID_ANY, _("Hidden net filter:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticText5->Wrap( -1 ); m_staticText5->Wrap( -1 );
m_NetSortOptSizer->Add( m_staticText5, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); m_NetSortOptSizer->Add( m_staticText5, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
m_DoNotShowNetNameFilter = new wxTextCtrl( this, ID_TEXTCTRL_NETNAMES_FILTER, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_PROCESS_ENTER ); m_DoNotShowNetNameFilter = 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->SetToolTip( _("Pattern to filter net names in filtered list.\nNet names matching this pattern are not displayed.") );
m_NetSortOptSizer->Add( m_DoNotShowNetNameFilter, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); m_NetSortOptSizer->Add( m_DoNotShowNetNameFilter, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
m_staticText51 = new wxStaticText( this, wxID_ANY, _("Visible net filter:"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticText51 = new wxStaticText( this, wxID_ANY, _("Visible net filter:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticText51->Wrap( -1 ); m_staticText51->Wrap( -1 );
m_NetSortOptSizer->Add( m_staticText51, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); m_NetSortOptSizer->Add( m_staticText51, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
m_ShowNetNameFilter = new wxTextCtrl( this, ID_TEXTCTRL_NETNAMES_FILTER, _("*"), wxDefaultPosition, wxDefaultSize, wxTE_PROCESS_ENTER ); m_ShowNetNameFilter = 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_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 ); m_NetSortOptSizer->Add( m_ShowNetNameFilter, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 );
m_buttonRunFilter = new wxButton( this, wxID_APPLY_FILTERS, _("Apply Filters"), wxDefaultPosition, wxDefaultSize, 0 ); m_buttonRunFilter = new wxButton( this, wxID_APPLY_FILTERS, _("Apply Filters"), wxDefaultPosition, wxDefaultSize, 0 );
m_NetSortOptSizer->Add( m_buttonRunFilter, 0, wxALL|wxEXPAND, 5 ); m_NetSortOptSizer->Add( m_buttonRunFilter, 0, wxALL|wxEXPAND, 5 );
m_OptionsBoxSizer->Add( m_NetSortOptSizer, 0, wxALL, 5 ); m_OptionsBoxSizer->Add( m_NetSortOptSizer, 0, wxALL, 5 );
m_MainBoxSizer->Add( m_OptionsBoxSizer, 1, wxALL|wxEXPAND, 5 ); m_MainBoxSizer->Add( m_OptionsBoxSizer, 1, wxALL|wxEXPAND, 5 );
wxStaticBoxSizer* m_ExportableSetupSizer; 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* bSizer9; wxBoxSizer* bSizer9;
bSizer9 = new wxBoxSizer( wxVERTICAL ); bSizer9 = new wxBoxSizer( wxVERTICAL );
m_ClearanceValueTitle = new wxStaticText( this, wxID_ANY, _("Clearance"), wxDefaultPosition, wxDefaultSize, 0 ); m_ClearanceValueTitle = new wxStaticText( this, wxID_ANY, _("Clearance"), wxDefaultPosition, wxDefaultSize, 0 );
m_ClearanceValueTitle->Wrap( -1 ); m_ClearanceValueTitle->Wrap( -1 );
bSizer9->Add( m_ClearanceValueTitle, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); bSizer9->Add( m_ClearanceValueTitle, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
m_ZoneClearanceCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); m_ZoneClearanceCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
bSizer9->Add( m_ZoneClearanceCtrl, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); bSizer9->Add( m_ZoneClearanceCtrl, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
m_MinThicknessValueTitle = new wxStaticText( this, wxID_ANY, _("Minimum width"), wxDefaultPosition, wxDefaultSize, 0 ); m_MinThicknessValueTitle = new wxStaticText( this, wxID_ANY, _("Minimum width"), wxDefaultPosition, wxDefaultSize, 0 );
m_MinThicknessValueTitle->Wrap( -1 ); m_MinThicknessValueTitle->Wrap( -1 );
bSizer9->Add( m_MinThicknessValueTitle, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); bSizer9->Add( m_MinThicknessValueTitle, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
m_ZoneMinThicknessCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); m_ZoneMinThicknessCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
m_ZoneMinThicknessCtrl->SetToolTip( _("Minimun thickness of filled areas.") ); m_ZoneMinThicknessCtrl->SetToolTip( _("Minimun thickness of filled areas.") );
bSizer9->Add( m_ZoneMinThicknessCtrl, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); bSizer9->Add( m_ZoneMinThicknessCtrl, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
m_staticText151 = new wxStaticText( this, wxID_ANY, _("Corner smoothing:"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticText151 = new wxStaticText( this, wxID_ANY, _("Corner smoothing:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticText151->Wrap( -1 ); m_staticText151->Wrap( -1 );
bSizer9->Add( m_staticText151, 0, wxLEFT|wxRIGHT|wxTOP, 5 ); bSizer9->Add( m_staticText151, 0, wxLEFT|wxRIGHT|wxTOP, 5 );
wxString m_cornerSmoothingChoiceChoices[] = { _("None"), _("Chamfer"), _("Fillet") }; wxString m_cornerSmoothingChoiceChoices[] = { _("None"), _("Chamfer"), _("Fillet") };
int m_cornerSmoothingChoiceNChoices = sizeof( m_cornerSmoothingChoiceChoices ) / sizeof( wxString ); int m_cornerSmoothingChoiceNChoices = sizeof( m_cornerSmoothingChoiceChoices ) / sizeof( wxString );
m_cornerSmoothingChoice = new wxChoice( this, ID_CORNER_SMOOTHING, wxDefaultPosition, wxDefaultSize, m_cornerSmoothingChoiceNChoices, m_cornerSmoothingChoiceChoices, 0 ); m_cornerSmoothingChoice = new wxChoice( this, ID_CORNER_SMOOTHING, wxDefaultPosition, wxDefaultSize, m_cornerSmoothingChoiceNChoices, m_cornerSmoothingChoiceChoices, 0 );
m_cornerSmoothingChoice->SetSelection( 0 ); m_cornerSmoothingChoice->SetSelection( 0 );
bSizer9->Add( m_cornerSmoothingChoice, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 ); bSizer9->Add( m_cornerSmoothingChoice, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 );
m_cornerSmoothingTitle = new wxStaticText( this, wxID_ANY, _("Chamfer distance (mm):"), wxDefaultPosition, wxDefaultSize, 0 ); m_cornerSmoothingTitle = new wxStaticText( this, wxID_ANY, _("Chamfer distance (mm):"), wxDefaultPosition, wxDefaultSize, 0 );
m_cornerSmoothingTitle->Wrap( -1 ); m_cornerSmoothingTitle->Wrap( -1 );
bSizer9->Add( m_cornerSmoothingTitle, 0, wxLEFT|wxRIGHT|wxTOP, 5 ); bSizer9->Add( m_cornerSmoothingTitle, 0, wxLEFT|wxRIGHT|wxTOP, 5 );
m_cornerSmoothingCtrl = new wxTextCtrl( this, ID_M_CORNERSMOOTHINGCTRL, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); m_cornerSmoothingCtrl = new wxTextCtrl( this, ID_M_CORNERSMOOTHINGCTRL, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
bSizer9->Add( m_cornerSmoothingCtrl, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 ); bSizer9->Add( m_cornerSmoothingCtrl, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 );
m_ExportableSetupSizer->Add( bSizer9, 0, wxEXPAND, 5 ); m_ExportableSetupSizer->Add( bSizer9, 0, wxEXPAND, 5 );
wxBoxSizer* m_LeftBox; wxBoxSizer* m_LeftBox;
m_LeftBox = new wxBoxSizer( wxVERTICAL ); m_LeftBox = new wxBoxSizer( wxVERTICAL );
m_staticText13 = new wxStaticText( this, wxID_ANY, _("Pad connection:"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticText13 = new wxStaticText( this, wxID_ANY, _("Pad connection:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticText13->Wrap( -1 ); m_staticText13->Wrap( -1 );
m_LeftBox->Add( m_staticText13, 0, wxLEFT|wxRIGHT|wxTOP, 5 ); m_LeftBox->Add( m_staticText13, 0, wxLEFT|wxRIGHT|wxTOP, 5 );
wxString m_PadInZoneOptChoices[] = { _("Solid"), _("Thermal relief"), _("None") }; wxString m_PadInZoneOptChoices[] = { _("Solid"), _("Thermal relief"), _("None") };
int m_PadInZoneOptNChoices = sizeof( m_PadInZoneOptChoices ) / sizeof( wxString ); int m_PadInZoneOptNChoices = sizeof( m_PadInZoneOptChoices ) / sizeof( wxString );
m_PadInZoneOpt = new wxChoice( this, ID_M_PADINZONEOPT, wxDefaultPosition, wxDefaultSize, m_PadInZoneOptNChoices, m_PadInZoneOptChoices, 0 ); m_PadInZoneOpt = new wxChoice( this, ID_M_PADINZONEOPT, wxDefaultPosition, wxDefaultSize, m_PadInZoneOptNChoices, m_PadInZoneOptChoices, 0 );
m_PadInZoneOpt->SetSelection( 0 ); m_PadInZoneOpt->SetSelection( 0 );
m_LeftBox->Add( m_PadInZoneOpt, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 ); m_LeftBox->Add( m_PadInZoneOpt, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 );
wxStaticBoxSizer* m_ThermalShapesParamsSizer; wxStaticBoxSizer* m_ThermalShapesParamsSizer;
m_ThermalShapesParamsSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Thermal Reliefs") ), wxVERTICAL ); m_ThermalShapesParamsSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Thermal Reliefs") ), wxVERTICAL );
m_AntipadSizeText = new wxStaticText( this, wxID_ANY, _("Antipad clearance"), wxDefaultPosition, wxDefaultSize, 0 ); m_AntipadSizeText = new wxStaticText( this, wxID_ANY, _("Antipad clearance"), wxDefaultPosition, wxDefaultSize, 0 );
m_AntipadSizeText->Wrap( -1 ); m_AntipadSizeText->Wrap( -1 );
m_ThermalShapesParamsSizer->Add( m_AntipadSizeText, 0, wxLEFT|wxRIGHT|wxTOP, 5 ); m_ThermalShapesParamsSizer->Add( m_AntipadSizeText, 0, wxLEFT|wxRIGHT|wxTOP, 5 );
m_AntipadSizeValue = new wxTextCtrl( this, wxID_ANTIPAD_SIZE, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); m_AntipadSizeValue = new wxTextCtrl( this, wxID_ANTIPAD_SIZE, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
m_AntipadSizeValue->SetToolTip( _("Clearance between pads in the same net and filled areas.") ); m_AntipadSizeValue->SetToolTip( _("Clearance between pads in the same net and filled areas.") );
m_ThermalShapesParamsSizer->Add( m_AntipadSizeValue, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 ); m_ThermalShapesParamsSizer->Add( m_AntipadSizeValue, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 );
m_CopperBridgeWidthText = new wxStaticText( this, wxID_ANY, _("Spoke width"), wxDefaultPosition, wxDefaultSize, 0 ); m_CopperBridgeWidthText = new wxStaticText( this, wxID_ANY, _("Spoke width"), wxDefaultPosition, wxDefaultSize, 0 );
m_CopperBridgeWidthText->Wrap( -1 ); m_CopperBridgeWidthText->Wrap( -1 );
m_ThermalShapesParamsSizer->Add( m_CopperBridgeWidthText, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); m_ThermalShapesParamsSizer->Add( m_CopperBridgeWidthText, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
m_CopperWidthValue = new wxTextCtrl( this, wxID_COPPER_BRIDGE_VALUE, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); m_CopperWidthValue = new wxTextCtrl( this, wxID_COPPER_BRIDGE_VALUE, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
m_CopperWidthValue->SetToolTip( _("Width of copper in thermal reliefs.") ); m_CopperWidthValue->SetToolTip( _("Width of copper in thermal reliefs.") );
m_ThermalShapesParamsSizer->Add( m_CopperWidthValue, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 ); m_ThermalShapesParamsSizer->Add( m_CopperWidthValue, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 );
m_LeftBox->Add( m_ThermalShapesParamsSizer, 0, wxALL|wxEXPAND, 5 ); m_LeftBox->Add( m_ThermalShapesParamsSizer, 0, wxALL|wxEXPAND, 5 );
m_ExportableSetupSizer->Add( m_LeftBox, 0, wxEXPAND, 5 ); m_ExportableSetupSizer->Add( m_LeftBox, 0, wxEXPAND, 5 );
wxBoxSizer* m_MiddleBox; wxBoxSizer* m_MiddleBox;
m_MiddleBox = new wxBoxSizer( wxVERTICAL ); m_MiddleBox = new wxBoxSizer( wxVERTICAL );
m_staticText11 = new wxStaticText( this, wxID_ANY, _("Fill mode:"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticText11 = new wxStaticText( this, wxID_ANY, _("Fill mode:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticText11->Wrap( -1 ); m_staticText11->Wrap( -1 );
m_MiddleBox->Add( m_staticText11, 0, wxLEFT|wxRIGHT|wxTOP, 5 ); m_MiddleBox->Add( m_staticText11, 0, wxLEFT|wxRIGHT|wxTOP, 5 );
wxString m_FillModeCtrlChoices[] = { _("Polygon"), _("Segment") }; wxString m_FillModeCtrlChoices[] = { _("Polygon"), _("Segment") };
int m_FillModeCtrlNChoices = sizeof( m_FillModeCtrlChoices ) / sizeof( wxString ); int m_FillModeCtrlNChoices = sizeof( m_FillModeCtrlChoices ) / sizeof( wxString );
m_FillModeCtrl = new wxChoice( this, ID_M_FILLMODECTRL, wxDefaultPosition, wxDefaultSize, m_FillModeCtrlNChoices, m_FillModeCtrlChoices, 0 ); m_FillModeCtrl = new wxChoice( this, ID_M_FILLMODECTRL, wxDefaultPosition, wxDefaultSize, m_FillModeCtrlNChoices, m_FillModeCtrlChoices, 0 );
m_FillModeCtrl->SetSelection( 0 ); m_FillModeCtrl->SetSelection( 0 );
m_MiddleBox->Add( m_FillModeCtrl, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 ); m_MiddleBox->Add( m_FillModeCtrl, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 );
m_staticText12 = new wxStaticText( this, wxID_ANY, _("Segments / 360 deg:"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticText12 = new wxStaticText( this, wxID_ANY, _("Segments / 360 deg:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticText12->Wrap( -1 ); m_staticText12->Wrap( -1 );
m_MiddleBox->Add( m_staticText12, 0, wxLEFT|wxRIGHT|wxTOP, 5 ); m_MiddleBox->Add( m_staticText12, 0, wxLEFT|wxRIGHT|wxTOP, 5 );
wxString m_ArcApproximationOptChoices[] = { _("16"), _("32") }; wxString m_ArcApproximationOptChoices[] = { _("16"), _("32") };
int m_ArcApproximationOptNChoices = sizeof( m_ArcApproximationOptChoices ) / sizeof( wxString ); int m_ArcApproximationOptNChoices = sizeof( m_ArcApproximationOptChoices ) / sizeof( wxString );
m_ArcApproximationOpt = new wxChoice( this, ID_M_ARCAPPROXIMATIONOPT, wxDefaultPosition, wxDefaultSize, m_ArcApproximationOptNChoices, m_ArcApproximationOptChoices, 0 ); m_ArcApproximationOpt = new wxChoice( this, ID_M_ARCAPPROXIMATIONOPT, wxDefaultPosition, wxDefaultSize, m_ArcApproximationOptNChoices, m_ArcApproximationOptChoices, 0 );
m_ArcApproximationOpt->SetSelection( 0 ); m_ArcApproximationOpt->SetSelection( 0 );
m_MiddleBox->Add( m_ArcApproximationOpt, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 ); m_MiddleBox->Add( m_ArcApproximationOpt, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 );
m_ExportableSetupSizer->Add( m_MiddleBox, 0, wxEXPAND, 5 ); m_ExportableSetupSizer->Add( m_MiddleBox, 0, wxEXPAND, 5 );
wxBoxSizer* bSizer81; wxBoxSizer* bSizer81;
bSizer81 = new wxBoxSizer( wxVERTICAL ); bSizer81 = new wxBoxSizer( wxVERTICAL );
m_staticText14 = new wxStaticText( this, wxID_ANY, _("Outline slope:"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticText14 = new wxStaticText( this, wxID_ANY, _("Outline slope:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticText14->Wrap( -1 ); m_staticText14->Wrap( -1 );
bSizer81->Add( m_staticText14, 0, wxLEFT|wxRIGHT|wxTOP, 5 ); bSizer81->Add( m_staticText14, 0, wxLEFT|wxRIGHT|wxTOP, 5 );
wxString m_OrientEdgesOptChoices[] = { _("Arbitrary"), _("H, V, and 45 deg only") }; wxString m_OrientEdgesOptChoices[] = { _("Arbitrary"), _("H, V, and 45 deg only") };
int m_OrientEdgesOptNChoices = sizeof( m_OrientEdgesOptChoices ) / sizeof( wxString ); 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 = new wxChoice( this, ID_M_ORIENTEDGESOPT, wxDefaultPosition, wxDefaultSize, m_OrientEdgesOptNChoices, m_OrientEdgesOptChoices, 0 );
m_OrientEdgesOpt->SetSelection( 0 ); m_OrientEdgesOpt->SetSelection( 0 );
bSizer81->Add( m_OrientEdgesOpt, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 ); bSizer81->Add( m_OrientEdgesOpt, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 );
m_staticText15 = new wxStaticText( this, wxID_ANY, _("Outline style:"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticText15 = new wxStaticText( this, wxID_ANY, _("Outline style:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticText15->Wrap( -1 ); m_staticText15->Wrap( -1 );
bSizer81->Add( m_staticText15, 0, wxLEFT|wxRIGHT|wxTOP, 5 ); bSizer81->Add( m_staticText15, 0, wxLEFT|wxRIGHT|wxTOP, 5 );
wxString m_OutlineAppearanceCtrlChoices[] = { _("Line"), _("Hatched"), _("Fully hatched") }; wxString m_OutlineAppearanceCtrlChoices[] = { _("Line"), _("Hatched"), _("Fully hatched") };
int m_OutlineAppearanceCtrlNChoices = sizeof( m_OutlineAppearanceCtrlChoices ) / sizeof( wxString ); 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 = new wxChoice( this, ID_M_OUTLINEAPPEARANCECTRL, wxDefaultPosition, wxDefaultSize, m_OutlineAppearanceCtrlNChoices, m_OutlineAppearanceCtrlChoices, 0 );
m_OutlineAppearanceCtrl->SetSelection( 0 ); m_OutlineAppearanceCtrl->SetSelection( 0 );
bSizer81->Add( m_OutlineAppearanceCtrl, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 ); bSizer81->Add( m_OutlineAppearanceCtrl, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 );
m_ExportableSetupSizer->Add( bSizer81, 0, wxEXPAND, 5 ); m_ExportableSetupSizer->Add( bSizer81, 0, wxEXPAND, 5 );
m_MainBoxSizer->Add( m_ExportableSetupSizer, 1, wxALL|wxEXPAND, 5 ); m_MainBoxSizer->Add( m_ExportableSetupSizer, 1, wxALL|wxEXPAND, 5 );
wxBoxSizer* bSizer10; wxBoxSizer* bSizer10;
bSizer10 = new wxBoxSizer( wxHORIZONTAL ); bSizer10 = new wxBoxSizer( wxHORIZONTAL );
m_ExportSetupButton = new wxButton( this, wxID_BUTTON_EXPORT, _("Export Settings to Other Zones"), wxDefaultPosition, wxDefaultSize, 0 ); 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.") ); m_ExportSetupButton->SetToolTip( _("Export this zone setup (excluding layer and net selection) to all other copper zones.") );
bSizer10->Add( m_ExportSetupButton, 0, wxALL|wxEXPAND, 5 ); bSizer10->Add( m_ExportSetupButton, 0, wxALL|wxEXPAND, 5 );
m_OkButton = new wxButton( this, wxID_OK, _("Ok"), wxDefaultPosition, wxDefaultSize, 0 ); m_OkButton = new wxButton( this, wxID_OK, _("Ok"), wxDefaultPosition, wxDefaultSize, 0 );
m_OkButton->SetDefault(); m_OkButton->SetDefault();
bSizer10->Add( m_OkButton, 0, wxALL|wxEXPAND, 5 ); bSizer10->Add( m_OkButton, 0, wxALL|wxEXPAND, 5 );
m_ButtonCancel = new wxButton( this, wxID_CANCEL, _("Cancel"), wxDefaultPosition, wxDefaultSize, 0 ); m_ButtonCancel = new wxButton( this, wxID_CANCEL, _("Cancel"), wxDefaultPosition, wxDefaultSize, 0 );
bSizer10->Add( m_ButtonCancel, 0, wxALL|wxEXPAND, 5 ); bSizer10->Add( m_ButtonCancel, 0, wxALL|wxEXPAND, 5 );
m_MainBoxSizer->Add( bSizer10, 0, wxALIGN_RIGHT|wxALL, 5 ); m_MainBoxSizer->Add( bSizer10, 0, wxALIGN_RIGHT|wxALL, 5 );
this->SetSizer( m_MainBoxSizer ); this->SetSizer( m_MainBoxSizer );
this->Layout(); this->Layout();
} }
dialog_copper_zone_base::~dialog_copper_zone_base() DIALOG_COPPER_ZONE_BASE::~DIALOG_COPPER_ZONE_BASE()
{ {
} }

File diff suppressed because it is too large Load Diff

View File

@ -1,125 +1,126 @@
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Nov 17 2010) // C++ code generated with wxFormBuilder (version Nov 18 2010)
// http://www.wxformbuilder.org/ // http://www.wxformbuilder.org/
// //
// PLEASE DO "NOT" EDIT THIS FILE! // PLEASE DO "NOT" EDIT THIS FILE!
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
#ifndef __dialog_copper_zones_base__ #ifndef __dialog_copper_zones_base__
#define __dialog_copper_zones_base__ #define __dialog_copper_zones_base__
#include <wx/intl.h> #include <wx/intl.h>
#include <wx/string.h> #include <wx/string.h>
#include <wx/stattext.h> #include <wx/stattext.h>
#include <wx/gdicmn.h> #include <wx/gdicmn.h>
#include <wx/font.h> #include <wx/font.h>
#include <wx/colour.h> #include <wx/colour.h>
#include <wx/settings.h> #include <wx/settings.h>
#include <wx/sizer.h> #include <wx/sizer.h>
#include <wx/listbox.h> #include <wx/listbox.h>
#include <wx/choice.h> #include <wx/choice.h>
#include <wx/textctrl.h> #include <wx/textctrl.h>
#include <wx/button.h> #include <wx/button.h>
#include <wx/statbox.h> #include <wx/statbox.h>
#include <wx/dialog.h> #include <wx/dialog.h>
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
/// Class dialog_copper_zone_base /// Class DIALOG_COPPER_ZONE_BASE
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
class dialog_copper_zone_base : public wxDialog class DIALOG_COPPER_ZONE_BASE : public wxDialog
{ {
DECLARE_EVENT_TABLE() DECLARE_EVENT_TABLE()
private: private:
// Private event handlers // Private event handlers
void _wxFB_OnClose( wxCloseEvent& event ){ OnClose( event ); } void _wxFB_OnClose( wxCloseEvent& event ){ OnClose( event ); }
void _wxFB_OnSize( wxSizeEvent& event ){ OnSize( event ); } void _wxFB_OnSize( wxSizeEvent& event ){ OnSize( event ); }
void _wxFB_OnNetSortingOptionSelected( wxCommandEvent& event ){ OnNetSortingOptionSelected( event ); } void _wxFB_OnNetSortingOptionSelected( wxCommandEvent& event ){ OnNetSortingOptionSelected( event ); }
void _wxFB_OnRunFiltersButtonClick( wxCommandEvent& event ){ OnRunFiltersButtonClick( event ); } void _wxFB_OnRunFiltersButtonClick( wxCommandEvent& event ){ OnRunFiltersButtonClick( event ); }
void _wxFB_OnCornerSmoothingModeChoice( wxCommandEvent& event ){ OnCornerSmoothingModeChoice( event ); } void _wxFB_OnCornerSmoothingModeChoice( wxCommandEvent& event ){ OnCornerSmoothingModeChoice( event ); }
void _wxFB_OnPadsInZoneClick( wxCommandEvent& event ){ OnPadsInZoneClick( event ); } void _wxFB_OnPadsInZoneClick( wxCommandEvent& event ){ OnPadsInZoneClick( event ); }
void _wxFB_ExportSetupToOtherCopperZones( wxCommandEvent& event ){ ExportSetupToOtherCopperZones( event ); } void _wxFB_ExportSetupToOtherCopperZones( wxCommandEvent& event ){ ExportSetupToOtherCopperZones( event ); }
void _wxFB_OnButtonOkClick( wxCommandEvent& event ){ OnButtonOkClick( event ); } void _wxFB_OnButtonOkClick( wxCommandEvent& event ){ OnButtonOkClick( event ); }
void _wxFB_OnButtonCancelClick( wxCommandEvent& event ){ OnButtonCancelClick( event ); } void _wxFB_OnButtonCancelClick( wxCommandEvent& event ){ OnButtonCancelClick( event ); }
protected: protected:
enum enum
{ {
ID_NETNAME_SELECTION = 1000, ID_DIALOG_COPPER_ZONE_BASE = 1000,
ID_M_NETDISPLAYOPTION, ID_NETNAME_SELECTION,
ID_TEXTCTRL_NETNAMES_FILTER, ID_M_NETDISPLAYOPTION,
wxID_APPLY_FILTERS, ID_TEXTCTRL_NETNAMES_FILTER,
ID_CORNER_SMOOTHING, wxID_APPLY_FILTERS,
ID_M_CORNERSMOOTHINGCTRL, ID_CORNER_SMOOTHING,
ID_M_PADINZONEOPT, ID_M_CORNERSMOOTHINGCTRL,
wxID_ANTIPAD_SIZE, ID_M_PADINZONEOPT,
wxID_COPPER_BRIDGE_VALUE, wxID_ANTIPAD_SIZE,
ID_M_FILLMODECTRL, wxID_COPPER_BRIDGE_VALUE,
ID_M_ARCAPPROXIMATIONOPT, ID_M_FILLMODECTRL,
ID_M_ORIENTEDGESOPT, ID_M_ARCAPPROXIMATIONOPT,
ID_M_OUTLINEAPPEARANCECTRL, ID_M_ORIENTEDGESOPT,
wxID_BUTTON_EXPORT, ID_M_OUTLINEAPPEARANCECTRL,
}; wxID_BUTTON_EXPORT,
};
wxBoxSizer* m_MainBoxSizer;
wxBoxSizer* m_layerSizer; wxBoxSizer* m_MainBoxSizer;
wxStaticText* m_staticText17; wxBoxSizer* m_layerSizer;
wxStaticText* m_staticText2; wxStaticText* m_staticText17;
wxListBox* m_ListNetNameSelection; wxStaticText* m_staticText2;
wxStaticText* m_staticText16; wxListBox* m_ListNetNameSelection;
wxChoice* m_NetDisplayOption; wxStaticText* m_staticText16;
wxStaticText* m_staticText5; wxChoice* m_NetDisplayOption;
wxTextCtrl* m_DoNotShowNetNameFilter; wxStaticText* m_staticText5;
wxStaticText* m_staticText51; wxTextCtrl* m_DoNotShowNetNameFilter;
wxTextCtrl* m_ShowNetNameFilter; wxStaticText* m_staticText51;
wxButton* m_buttonRunFilter; wxTextCtrl* m_ShowNetNameFilter;
wxStaticText* m_ClearanceValueTitle; wxButton* m_buttonRunFilter;
wxTextCtrl* m_ZoneClearanceCtrl; wxStaticText* m_ClearanceValueTitle;
wxStaticText* m_MinThicknessValueTitle; wxTextCtrl* m_ZoneClearanceCtrl;
wxTextCtrl* m_ZoneMinThicknessCtrl; wxStaticText* m_MinThicknessValueTitle;
wxStaticText* m_staticText151; wxTextCtrl* m_ZoneMinThicknessCtrl;
wxChoice* m_cornerSmoothingChoice; wxStaticText* m_staticText151;
wxStaticText* m_cornerSmoothingTitle; wxChoice* m_cornerSmoothingChoice;
wxTextCtrl* m_cornerSmoothingCtrl; wxStaticText* m_cornerSmoothingTitle;
wxStaticText* m_staticText13; wxTextCtrl* m_cornerSmoothingCtrl;
wxChoice* m_PadInZoneOpt; wxStaticText* m_staticText13;
wxStaticText* m_AntipadSizeText; wxChoice* m_PadInZoneOpt;
wxTextCtrl* m_AntipadSizeValue; wxStaticText* m_AntipadSizeText;
wxStaticText* m_CopperBridgeWidthText; wxTextCtrl* m_AntipadSizeValue;
wxTextCtrl* m_CopperWidthValue; wxStaticText* m_CopperBridgeWidthText;
wxStaticText* m_staticText11; wxTextCtrl* m_CopperWidthValue;
wxChoice* m_FillModeCtrl; wxStaticText* m_staticText11;
wxStaticText* m_staticText12; wxChoice* m_FillModeCtrl;
wxChoice* m_ArcApproximationOpt; wxStaticText* m_staticText12;
wxStaticText* m_staticText14; wxChoice* m_ArcApproximationOpt;
wxChoice* m_OrientEdgesOpt; wxStaticText* m_staticText14;
wxStaticText* m_staticText15; wxChoice* m_OrientEdgesOpt;
wxChoice* m_OutlineAppearanceCtrl; wxStaticText* m_staticText15;
wxButton* m_ExportSetupButton; wxChoice* m_OutlineAppearanceCtrl;
wxButton* m_OkButton; wxButton* m_ExportSetupButton;
wxButton* m_ButtonCancel; wxButton* m_OkButton;
wxButton* m_ButtonCancel;
// Virtual event handlers, overide them in your derived class
virtual void OnClose( wxCloseEvent& event ) { event.Skip(); } // Virtual event handlers, overide them in your derived class
virtual void OnSize( wxSizeEvent& event ) { event.Skip(); } virtual void OnClose( wxCloseEvent& event ) { event.Skip(); }
virtual void OnNetSortingOptionSelected( wxCommandEvent& event ) { event.Skip(); } virtual void OnSize( wxSizeEvent& event ) { event.Skip(); }
virtual void OnRunFiltersButtonClick( wxCommandEvent& event ) { event.Skip(); } virtual void OnNetSortingOptionSelected( wxCommandEvent& event ) { event.Skip(); }
virtual void OnCornerSmoothingModeChoice( wxCommandEvent& event ) { event.Skip(); } virtual void OnRunFiltersButtonClick( wxCommandEvent& event ) { event.Skip(); }
virtual void OnPadsInZoneClick( wxCommandEvent& event ) { event.Skip(); } virtual void OnCornerSmoothingModeChoice( wxCommandEvent& event ) { event.Skip(); }
virtual void ExportSetupToOtherCopperZones( wxCommandEvent& event ) { event.Skip(); } virtual void OnPadsInZoneClick( wxCommandEvent& event ) { event.Skip(); }
virtual void OnButtonOkClick( 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(); }
virtual void OnButtonCancelClick( wxCommandEvent& event ) { event.Skip(); }
public:
public:
dialog_copper_zone_base( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Zone Properties"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 550,500 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
~dialog_copper_zone_base(); DIALOG_COPPER_ZONE_BASE( wxWindow* parent, wxWindowID id = ID_DIALOG_COPPER_ZONE_BASE, const wxString& title = _("Zone Properties"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 550,500 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
~DIALOG_COPPER_ZONE_BASE();
};
};
#endif //__dialog_copper_zones_base__
#endif //__dialog_copper_zones_base__

View File

@ -65,6 +65,10 @@ DIALOG_PLOT_BASE::DIALOG_PLOT_BASE( wxWindow* parent, wxWindowID id, const wxStr
m_LayersSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Layers") ), wxHORIZONTAL ); m_LayersSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Layers") ), wxHORIZONTAL );
wxArrayString m_layerCheckListBoxChoices;
m_layerCheckListBox = new wxCheckListBox( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_layerCheckListBoxChoices, 0 );
m_LayersSizer->Add( m_layerCheckListBox, 1, wxALL|wxEXPAND, 5 );
bUpperSizer->Add( m_LayersSizer, 1, wxALL|wxEXPAND, 3 ); bUpperSizer->Add( m_LayersSizer, 1, wxALL|wxEXPAND, 3 );
m_PlotOptionsSizer = new wxBoxSizer( wxVERTICAL ); m_PlotOptionsSizer = new wxBoxSizer( wxVERTICAL );

View File

@ -612,6 +612,92 @@
<property name="orient">wxHORIZONTAL</property> <property name="orient">wxHORIZONTAL</property>
<property name="permission">protected</property> <property name="permission">protected</property>
<event name="OnUpdateUI"></event> <event name="OnUpdateUI"></event>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxALL|wxEXPAND</property>
<property name="proportion">1</property>
<object class="wxCheckListBox" 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_name"></property>
<property name="bg"></property>
<property name="caption"></property>
<property name="caption_visible">1</property>
<property name="center_pane">0</property>
<property name="choices"></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="layer"></property>
<property name="maximize_button">0</property>
<property name="maximum_size"></property>
<property name="minimize_button">0</property>
<property name="minimum_size"></property>
<property name="moveable">1</property>
<property name="name">m_layerCheckListBox</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="position"></property>
<property name="resize">Resizable</property>
<property name="row"></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="OnCheckListBox"></event>
<event name="OnCheckListBoxDClick"></event>
<event name="OnCheckListBoxToggled"></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> </object>
</object> </object>
<object class="sizeritem" expanded="1"> <object class="sizeritem" expanded="1">

View File

@ -20,6 +20,7 @@
#include <wx/sizer.h> #include <wx/sizer.h>
#include <wx/textctrl.h> #include <wx/textctrl.h>
#include <wx/button.h> #include <wx/button.h>
#include <wx/checklst.h>
#include <wx/statbox.h> #include <wx/statbox.h>
#include <wx/checkbox.h> #include <wx/checkbox.h>
#include <wx/dialog.h> #include <wx/dialog.h>
@ -49,6 +50,7 @@ class DIALOG_PLOT_BASE : public wxDialog
wxTextCtrl* m_outputDirectoryName; wxTextCtrl* m_outputDirectoryName;
wxButton* m_browseButton; wxButton* m_browseButton;
wxStaticBoxSizer* m_LayersSizer; wxStaticBoxSizer* m_LayersSizer;
wxCheckListBox* m_layerCheckListBox;
wxBoxSizer* m_PlotOptionsSizer; wxBoxSizer* m_PlotOptionsSizer;
wxCheckBox* m_plotSheetRef; wxCheckBox* m_plotSheetRef;
wxCheckBox* m_plotPads_on_Silkscreen; wxCheckBox* m_plotPads_on_Silkscreen;

View File

@ -54,15 +54,16 @@ static bool setDouble( double* aDouble, double aValue, double aMin, double aMax
class DIALOG_PLOT : public DIALOG_PLOT_BASE class DIALOG_PLOT : public DIALOG_PLOT_BASE
{ {
public: private:
PCB_EDIT_FRAME* m_Parent; PCB_EDIT_FRAME* m_Parent;
wxConfig* m_Config; wxConfig* m_Config;
std::vector<int> layerList; // List to hold CheckListBox layer numbers std::vector<int> layerList; // List to hold CheckListBox layer numbers
wxCheckListBox* layerCheckListBox;
double m_XScaleAdjust; double m_XScaleAdjust;
double m_YScaleAdjust; double m_YScaleAdjust;
static wxPoint prevPosition; // Dialog position & size
public: DIALOG_PLOT( PCB_EDIT_FRAME* parent ); static wxSize prevSize;
public:
DIALOG_PLOT( PCB_EDIT_FRAME* parent );
private: private:
void Init_Dialog(); void Init_Dialog();
void Plot( wxCommandEvent& event ); void Plot( wxCommandEvent& event );
@ -75,6 +76,9 @@ private:
void CreateDrillFile( wxCommandEvent& event ); void CreateDrillFile( wxCommandEvent& event );
}; };
wxPoint DIALOG_PLOT::prevPosition( -1, -1 );
wxSize DIALOG_PLOT::prevSize;
const int UNITS_MILS = 1000; const int UNITS_MILS = 1000;
@ -84,15 +88,16 @@ DIALOG_PLOT::DIALOG_PLOT( PCB_EDIT_FRAME* parent ) :
m_Parent = parent; m_Parent = parent;
m_Config = wxGetApp().m_EDA_Config; m_Config = wxGetApp().m_EDA_Config;
layerCheckListBox = new wxCheckListBox( this, wxID_ANY );
m_LayersSizer->Add( layerCheckListBox, 0, wxGROW | wxALL, 1 );
Init_Dialog(); Init_Dialog();
GetSizer()->Fit( this ); GetSizer()->Fit( this );
GetSizer()->SetSizeHints( this ); GetSizer()->SetSizeHints( this );
Centre();
if( prevPosition.x != -1 )
SetSize( prevPosition.x, prevPosition.y,
prevSize.x, prevSize.y );
else
Center();
} }
@ -157,10 +162,10 @@ void DIALOG_PLOT::Init_Dialog()
continue; continue;
layerList.push_back( layer ); layerList.push_back( layer );
checkIndex = layerCheckListBox->Append( board->GetLayerName( layer ) ); checkIndex = m_layerCheckListBox->Append( board->GetLayerName( layer ) );
if( g_PcbPlotOptions.GetLayerSelection() & ( 1 << layer ) ) if( g_PcbPlotOptions.GetLayerSelection() & ( 1 << layer ) )
layerCheckListBox->Check( checkIndex ); m_layerCheckListBox->Check( checkIndex );
} }
// Option for using proper Gerber extensions // Option for using proper Gerber extensions
@ -227,6 +232,8 @@ void DIALOG_PLOT::OnQuit( wxCommandEvent& event )
void DIALOG_PLOT::OnClose( wxCloseEvent& event ) void DIALOG_PLOT::OnClose( wxCloseEvent& event )
{ {
prevPosition = GetPosition();
prevSize = GetSize();
applyPlotSettings(); applyPlotSettings();
EndModal( 0 ); EndModal( 0 );
} }
@ -509,7 +516,7 @@ void DIALOG_PLOT::applyPlotSettings()
unsigned int i; unsigned int i;
for( i = 0; i < layerList.size(); i++ ) for( i = 0; i < layerList.size(); i++ )
{ {
if( layerCheckListBox->IsChecked( i ) ) if( m_layerCheckListBox->IsChecked( i ) )
selectedLayers |= (1 << layerList[i]); selectedLayers |= (1 << layerList[i]);
} }
tempOptions.SetLayerSelection( selectedLayers ); tempOptions.SetLayerSelection( selectedLayers );

View File

@ -520,7 +520,7 @@ int PCB_EDIT_FRAME::Begin_Zone( wxDC* DC )
&g_Zone_Default_Setting.m_ThermalReliefCopperBridgeValue ); &g_Zone_Default_Setting.m_ThermalReliefCopperBridgeValue );
g_Zone_Default_Setting.m_CurrentZone_Layer = zone->GetLayer(); g_Zone_Default_Setting.m_CurrentZone_Layer = zone->GetLayer();
dialog_copper_zone* frame = new dialog_copper_zone( this, &g_Zone_Default_Setting ); DIALOG_COPPER_ZONE* frame = new DIALOG_COPPER_ZONE( this, &g_Zone_Default_Setting );
diag = frame->ShowModal(); diag = frame->ShowModal();
frame->Destroy(); frame->Destroy();
} }
@ -780,7 +780,7 @@ void PCB_EDIT_FRAME::Edit_Zone_Params( wxDC* DC, ZONE_CONTAINER* zone_container
if( zone_container->GetLayer() < FIRST_NO_COPPER_LAYER ) if( zone_container->GetLayer() < FIRST_NO_COPPER_LAYER )
{ // edit a zone on a copper layer { // edit a zone on a copper layer
g_Zone_Default_Setting.ImportSetting(*zone_container); g_Zone_Default_Setting.ImportSetting(*zone_container);
dialog_copper_zone* frame = new dialog_copper_zone( this, &g_Zone_Default_Setting ); DIALOG_COPPER_ZONE* frame = new DIALOG_COPPER_ZONE( this, &g_Zone_Default_Setting );
diag = frame->ShowModal(); diag = frame->ShowModal();
frame->Destroy(); frame->Destroy();
} }