diff --git a/pcbnew/CMakeLists.txt b/pcbnew/CMakeLists.txt index a4b2569880..e5da0c0211 100644 --- a/pcbnew/CMakeLists.txt +++ b/pcbnew/CMakeLists.txt @@ -53,6 +53,7 @@ set(PCBNEW_SRCS dialog_freeroute_exchange.cpp # dialog_gendrill.cpp dialog_general_options.cpp + dialog_generaloptions_BoardEditor_base.cpp # dialog_graphic_items_options.cpp # dialog_initpcb.cpp # dialog_netlist.cpp diff --git a/pcbnew/dialog_general_options.cpp b/pcbnew/dialog_general_options.cpp index 5a6d0080b3..1cc9658525 100644 --- a/pcbnew/dialog_general_options.cpp +++ b/pcbnew/dialog_general_options.cpp @@ -1,52 +1,38 @@ ///////////////////////////////////////////////////////////////////////////// // Name: dialog_general_options.cpp -// Purpose: // Author: jean-pierre Charras -// Modified by: -// Created: 21/01/2006 18:28:47 -// RCS-ID: -// Copyright: License GNU -// Licence: ///////////////////////////////////////////////////////////////////////////// -// Generated by DialogBlocks (unregistered), 21/01/2006 18:28:47 - -#if defined (__GNUG__) && !defined (NO_GCC_PRAGMA) -#pragma implementation "dialog_general_options.h" -#endif - -// For compilers that support precompilation, includes "wx/wx.h". -#include "wx/wxprec.h" - -#ifdef __BORLANDC__ -#pragma hdrstop -#endif - -#ifndef WX_PRECOMP -#include "wx/wx.h" -#endif - -////@begin includes -////@end includes #include "fctsys.h" #include "common.h" #include "pcbnew.h" #include "id.h" -#include "dialog_general_options.h" - -////@begin XPM images -////@end XPM images +#include "dialog_generaloptions_BoardEditor_base.h" +/***********************************************************************/ +class Dialog_GeneralOptions : public DialogGeneralOptionsBoardEditor_base +/***********************************************************************/ +{ +private: + WinEDA_PcbFrame* m_Parent; + wxDC* m_DC; +public: + Dialog_GeneralOptions( WinEDA_PcbFrame* parent, wxDC* DC ); + ~Dialog_GeneralOptions() {}; + void OnInitDialog( wxInitDialogEvent& event ); + void OnOkClick( wxCommandEvent& event ); + void OnCancelClick( wxCommandEvent& event ); +}; /*****************************************************************/ void WinEDA_PcbFrame::OnSelectOptionToolbar( wxCommandEvent& event ) /*****************************************************************/ -/* Mises a jour de differentes variables de gestion d'options apres action sur - * le toolbar d'options +/* Must be called on a click on the left toolbar (options toolbar + * Update variables according to the tools states */ { int id = event.GetId(); @@ -160,58 +146,43 @@ void WinEDA_PcbFrame::OnSelectOptionToolbar( wxCommandEvent& event ) } -/*! - * WinEDA_PcbGeneralOptionsFrame type definition - */ - -IMPLEMENT_DYNAMIC_CLASS( WinEDA_PcbGeneralOptionsFrame, wxDialog ) - -/*! - * WinEDA_PcbGeneralOptionsFrame event table definition - */ - -BEGIN_EVENT_TABLE( WinEDA_PcbGeneralOptionsFrame, wxDialog ) - -////@begin WinEDA_PcbGeneralOptionsFrame event table entries -EVT_BUTTON( wxID_OK, WinEDA_PcbGeneralOptionsFrame::OnOkClick ) - -EVT_BUTTON( wxID_CANCEL, WinEDA_PcbGeneralOptionsFrame::OnCancelClick ) - -////@end WinEDA_PcbGeneralOptionsFrame event table entries - -END_EVENT_TABLE() - -/*! - * WinEDA_PcbGeneralOptionsFrame constructors - */ - -WinEDA_PcbGeneralOptionsFrame::WinEDA_PcbGeneralOptionsFrame() -{ -} - - -WinEDA_PcbGeneralOptionsFrame::WinEDA_PcbGeneralOptionsFrame( WinEDA_PcbFrame* parent, - wxDC* DC, - wxWindowID id, - const wxString& caption, - const wxPoint& pos, - const wxSize& size, - long style ) +Dialog_GeneralOptions::Dialog_GeneralOptions( WinEDA_PcbFrame* parent, wxDC* DC ) : + DialogGeneralOptionsBoardEditor_base( parent ) { m_Parent = parent; m_DC = DC; +} + + +/*! + * Dialog_GeneralOptions creator + */ + +void Dialog_GeneralOptions::OnInitDialog( wxInitDialogEvent& event ) +{ + SetFont( *g_DialogFont ); + SetFocus(); - Create( parent, id, caption, pos, size, style ); /* Set display options */ m_PolarDisplay->SetSelection( DisplayOpt.DisplayPolarCood ? 1 : 0 ); - m_BoxUnits->SetSelection( g_UnitMetric ? 1 : 0 ); + m_UnitsSelection->SetSelection( g_UnitMetric ? 1 : 0 ); m_CursorShape->SetSelection( g_CursorShape ? 1 : 0 ); wxString timevalue; timevalue << g_TimeOut / 60; m_SaveTime->SetValue( timevalue ); - m_LayerNumber->SetValue( g_DesignSettings.m_CopperLayerCount ); + int layer_count[] = {1,2,4,6,8,10,12,14,16}; + m_LayerNumber->SetSelection(1); + for ( unsigned ii = 0; ii < sizeof(layer_count); ii++ ) + { + if ( g_DesignSettings.m_CopperLayerCount == layer_count[ii] ) + continue; + m_LayerNumber->SetSelection(ii); + break; + } + + m_LayerNumber->SetSelection( g_DesignSettings.m_CopperLayerCount ); m_MaxShowLinks->SetValue( g_MaxLinksShowed ); m_DrcOn->SetValue( Drc_On ); @@ -223,359 +194,28 @@ WinEDA_PcbGeneralOptionsFrame::WinEDA_PcbGeneralOptionsFrame( WinEDA_PcbFrame* p m_AutoPANOpt->SetValue( m_Parent->DrawPanel->m_AutoPAN_Enable ); m_Segments_45_Only_Ctrl->SetValue( Segments_45_Only ); m_Track_DoubleSegm_Ctrl->SetValue( g_TwoSegmentTrackBuild ); -} + m_MagneticPadOptCtrl->SetSelection( g_MagneticPadOption ); + m_MagneticTrackOptCtrl->SetSelection( g_MagneticTrackOption ); -/*! - * WinEDA_PcbGeneralOptionsFrame creator - */ - -bool WinEDA_PcbGeneralOptionsFrame::Create( wxWindow* parent, - wxWindowID id, - const wxString& caption, - const wxPoint& pos, - const wxSize& size, - long style ) -{ -////@begin WinEDA_PcbGeneralOptionsFrame member initialisation - m_PolarDisplay = NULL; - m_BoxUnits = NULL; - m_CursorShape = NULL; - m_LayerNumber = NULL; - m_MaxShowLinks = NULL; - m_SaveTime = NULL; - m_DrcOn = NULL; - m_ShowGlobalRatsnest = NULL; - m_ShowModuleRatsnest = NULL; - m_TrackAutodel = NULL; - m_Track_45_Only_Ctrl = NULL; - m_Segments_45_Only_Ctrl = NULL; - m_AutoPANOpt = NULL; - m_Track_DoubleSegm_Ctrl = NULL; - m_MagneticPadOptCtrl = NULL; - m_MagneticTrackOptCtrl = NULL; - -////@end WinEDA_PcbGeneralOptionsFrame member initialisation - -////@begin WinEDA_PcbGeneralOptionsFrame creation - SetExtraStyle( wxWS_EX_BLOCK_EVENTS ); - wxDialog::Create( parent, id, caption, pos, size, style ); - - CreateControls(); if( GetSizer() ) { GetSizer()->SetSizeHints( this ); } - Centre(); - -////@end WinEDA_PcbGeneralOptionsFrame creation - SetFont( *g_DialogFont ); - return true; } -/*! - * Control creation for WinEDA_PcbGeneralOptionsFrame - */ - -void WinEDA_PcbGeneralOptionsFrame::CreateControls() +/*****************************************************************/ +void Dialog_GeneralOptions::OnCancelClick( wxCommandEvent& event ) +/*****************************************************************/ { -////@begin WinEDA_PcbGeneralOptionsFrame content construction - // Generated by DialogBlocks, Mon 03 Mar 2008 04:27:22 PM EST (unregistered) - - WinEDA_PcbGeneralOptionsFrame* itemDialog1 = this; - - wxBoxSizer* itemBoxSizer2 = new wxBoxSizer( wxHORIZONTAL ); - - itemDialog1->SetSizer( itemBoxSizer2 ); - - wxBoxSizer* itemBoxSizer3 = new wxBoxSizer( wxVERTICAL ); - - itemBoxSizer2->Add( itemBoxSizer3, 0, wxGROW | wxALL, 5 ); - - wxArrayString m_PolarDisplayStrings; - m_PolarDisplayStrings.Add( _( "No Display" ) ); - m_PolarDisplayStrings.Add( _( "Display" ) ); - m_PolarDisplay = new wxRadioBox( itemDialog1, ID_RADIOBOX, _( - "Display Polar Coord" ), wxDefaultPosition, wxDefaultSize, - m_PolarDisplayStrings, 1, - wxRA_SPECIFY_COLS ); - - m_PolarDisplay->SetSelection( 0 ); - itemBoxSizer3->Add( m_PolarDisplay, 0, wxALIGN_LEFT | wxALL, 5 ); - - wxArrayString m_BoxUnitsStrings; - m_BoxUnitsStrings.Add( _( "Inches" ) ); - m_BoxUnitsStrings.Add( _( "millimeters" ) ); - m_BoxUnits = new wxRadioBox( itemDialog1, ID_RADIOBOX1, _( - "Units" ), wxDefaultPosition, wxDefaultSize, - m_BoxUnitsStrings, 1, wxRA_SPECIFY_COLS ); - - m_BoxUnits->SetSelection( 0 ); - itemBoxSizer3->Add( m_BoxUnits, 0, wxALIGN_LEFT | wxALL, 5 ); - - wxArrayString m_CursorShapeStrings; - m_CursorShapeStrings.Add( _( "Small" ) ); - m_CursorShapeStrings.Add( _( "Big" ) ); - m_CursorShape = new wxRadioBox( itemDialog1, ID_RADIOBOX2, _( - "Cursor" ), - wxDefaultPosition, - wxDefaultSize, m_CursorShapeStrings, 1, wxRA_SPECIFY_COLS ); - - m_CursorShape->SetSelection( 0 ); - itemBoxSizer3->Add( m_CursorShape, 0, wxALIGN_LEFT | wxALL, 5 ); - - wxBoxSizer* itemBoxSizer7 = new wxBoxSizer( wxVERTICAL ); - - itemBoxSizer2->Add( itemBoxSizer7, 0, wxGROW | wxALL, 5 ); - - wxStaticBox* itemStaticBoxSizer8Static = new wxStaticBox( itemDialog1, wxID_ANY, _( - "Number of Layers:" ) ); - - wxStaticBoxSizer* itemStaticBoxSizer8 = new wxStaticBoxSizer( - itemStaticBoxSizer8Static, - wxVERTICAL ); - - itemBoxSizer7->Add( itemStaticBoxSizer8, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5 ); - - m_LayerNumber = new wxSpinCtrl( itemDialog1, ID_SPINCTRL1, _T( - "1" ), wxDefaultPosition, - wxDefaultSize, wxSP_ARROW_KEYS, - 1, 16, 1 ); - - itemStaticBoxSizer8->Add( m_LayerNumber, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5 ); - - wxStaticBox* itemStaticBoxSizer10Static = new wxStaticBox( itemDialog1, wxID_ANY, _( - "Max Links:" ) ); - - wxStaticBoxSizer* itemStaticBoxSizer10 = new wxStaticBoxSizer( - itemStaticBoxSizer10Static, - wxVERTICAL ); - - itemBoxSizer7->Add( itemStaticBoxSizer10, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5 ); - - m_MaxShowLinks = new wxSpinCtrl( itemDialog1, ID_SPINCTRL2, _T( - "1" ), wxDefaultPosition, - wxDefaultSize, wxSP_ARROW_KEYS, - 1, 5, 1 ); - - itemStaticBoxSizer10->Add( m_MaxShowLinks, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5 ); - - wxStaticBox* itemStaticBoxSizer12Static = new wxStaticBox( itemDialog1, wxID_ANY, _( - "Auto Save (minuts):" ) ); - - wxStaticBoxSizer* itemStaticBoxSizer12 = new wxStaticBoxSizer( - itemStaticBoxSizer12Static, - wxVERTICAL ); - - itemBoxSizer7->Add( itemStaticBoxSizer12, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5 ); - - m_SaveTime = new wxSpinCtrl( itemDialog1, ID_SPINCTRL3, _T( - "0" ), wxDefaultPosition, - wxDefaultSize, wxSP_ARROW_KEYS, - 0, 60, 0 ); - - itemStaticBoxSizer12->Add( m_SaveTime, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5 ); - - wxBoxSizer* itemBoxSizer14 = new wxBoxSizer( wxVERTICAL ); - - itemBoxSizer2->Add( itemBoxSizer14, 0, wxGROW | wxALL, 5 ); - - wxStaticBox* itemStaticBoxSizer15Static = new wxStaticBox( itemDialog1, wxID_ANY, _( - "Options:" ) ); - - wxStaticBoxSizer* itemStaticBoxSizer15 = new wxStaticBoxSizer( - itemStaticBoxSizer15Static, - wxVERTICAL ); - - itemBoxSizer14->Add( itemStaticBoxSizer15, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5 ); - - m_DrcOn = new wxCheckBox( itemDialog1, ID_CHECKBOX, _( - "Drc ON" ), - wxDefaultPosition, - wxDefaultSize, wxCHK_2STATE ); - - m_DrcOn->SetValue( false ); - m_DrcOn->SetForegroundColour( wxColour( 198, 0, 0 ) ); - itemStaticBoxSizer15->Add( m_DrcOn, 0, wxALIGN_LEFT | wxALL, 5 ); - - m_ShowGlobalRatsnest = new wxCheckBox( itemDialog1, ID_CHECKBOX1, _( - "Show Ratsnest" ), wxDefaultPosition, - wxDefaultSize, wxCHK_2STATE ); - - m_ShowGlobalRatsnest->SetValue( false ); - itemStaticBoxSizer15->Add( m_ShowGlobalRatsnest, 0, wxALIGN_LEFT | wxALL, 5 ); - - m_ShowModuleRatsnest = new wxCheckBox( itemDialog1, ID_CHECKBOX2, _( - "Show Mod Ratsnest" ), wxDefaultPosition, - wxDefaultSize, wxCHK_2STATE ); - - m_ShowModuleRatsnest->SetValue( false ); - itemStaticBoxSizer15->Add( m_ShowModuleRatsnest, 0, wxALIGN_LEFT | wxALL, 5 ); - - m_TrackAutodel = new wxCheckBox( itemDialog1, ID_CHECKBOX3, _( - "Tracks Auto Del" ), wxDefaultPosition, - wxDefaultSize, wxCHK_2STATE ); - - m_TrackAutodel->SetValue( false ); - itemStaticBoxSizer15->Add( m_TrackAutodel, 0, wxALIGN_LEFT | wxALL, 5 ); - - m_Track_45_Only_Ctrl = new wxCheckBox( itemDialog1, ID_CHECKBOX4, _( - "Track only 45 degrees" ), wxDefaultPosition, - wxDefaultSize, wxCHK_2STATE ); - - m_Track_45_Only_Ctrl->SetValue( false ); - itemStaticBoxSizer15->Add( m_Track_45_Only_Ctrl, 0, wxALIGN_LEFT | wxALL, 5 ); - - m_Segments_45_Only_Ctrl = new wxCheckBox( itemDialog1, ID_CHECKBOX5, _( - "Segments 45 Only" ), wxDefaultPosition, - wxDefaultSize, wxCHK_2STATE ); - - m_Segments_45_Only_Ctrl->SetValue( false ); - itemStaticBoxSizer15->Add( m_Segments_45_Only_Ctrl, 0, wxALIGN_LEFT | wxALL, 5 ); - - m_AutoPANOpt = new wxCheckBox( itemDialog1, ID_CHECKBOX6, _( - "Auto PAN" ), wxDefaultPosition, wxDefaultSize, - wxCHK_2STATE ); - - m_AutoPANOpt->SetValue( false ); - m_AutoPANOpt->SetForegroundColour( wxColour( 0, 0, 255 ) ); - itemStaticBoxSizer15->Add( m_AutoPANOpt, 0, wxALIGN_LEFT | wxALL, 5 ); - - m_Track_DoubleSegm_Ctrl = new wxCheckBox( itemDialog1, ID_CHECKBOX7, _( - "Double Segm Track" ), wxDefaultPosition, - wxDefaultSize, wxCHK_2STATE ); - - m_Track_DoubleSegm_Ctrl->SetValue( false ); - m_Track_DoubleSegm_Ctrl->SetForegroundColour( wxColour( 0, 144, 0 ) ); - itemStaticBoxSizer15->Add( m_Track_DoubleSegm_Ctrl, 0, wxALIGN_LEFT | wxALL, 5 ); - - wxBoxSizer* itemBoxSizer24 = new wxBoxSizer( wxVERTICAL ); - - itemBoxSizer2->Add( itemBoxSizer24, 0, wxALIGN_TOP | wxALL, 5 ); - - wxArrayString m_MagneticPadOptCtrlStrings; - m_MagneticPadOptCtrlStrings.Add( _( "Never" ) ); - m_MagneticPadOptCtrlStrings.Add( _( "When creating tracks" ) ); - m_MagneticPadOptCtrlStrings.Add( _( "Always" ) ); - m_MagneticPadOptCtrl = new wxRadioBox( itemDialog1, ID_RADIOBOX4, _( - "Magnetic Pads" ), wxDefaultPosition, wxDefaultSize, - m_MagneticPadOptCtrlStrings, 1, - wxRA_SPECIFY_COLS ); - - m_MagneticPadOptCtrl->SetSelection( 0 ); - if( WinEDA_PcbGeneralOptionsFrame::ShowToolTips() ) - m_MagneticPadOptCtrl->SetToolTip( _( - "control the capture of the pcb cursor when the mouse cursor enters a pad area" ) ); - itemBoxSizer24->Add( m_MagneticPadOptCtrl, 0, wxGROW | wxALL, 5 ); - - wxArrayString m_MagneticTrackOptCtrlStrings; - m_MagneticTrackOptCtrlStrings.Add( _( "Never" ) ); - m_MagneticTrackOptCtrlStrings.Add( _( "When creating tracks" ) ); - m_MagneticTrackOptCtrlStrings.Add( _( "Always" ) ); - m_MagneticTrackOptCtrl = new wxRadioBox( itemDialog1, ID_RADIOBOX3, _( - "Magnetic Tracks" ), wxDefaultPosition, - wxDefaultSize, m_MagneticTrackOptCtrlStrings, 1, - wxRA_SPECIFY_COLS ); - - m_MagneticTrackOptCtrl->SetSelection( 0 ); - if( WinEDA_PcbGeneralOptionsFrame::ShowToolTips() ) - m_MagneticTrackOptCtrl->SetToolTip( _( - "control the capture of the pcb cursor when the mouse cursor enters a track" ) ); - itemBoxSizer24->Add( m_MagneticTrackOptCtrl, 0, wxGROW | wxALL, 5 ); - - wxButton* itemButton27 = new wxButton( itemDialog1, wxID_OK, _( - "&OK" ), wxDefaultPosition, wxDefaultSize, 0 ); - - itemButton27->SetForegroundColour( wxColour( 221, 0, 0 ) ); - itemBoxSizer24->Add( itemButton27, 0, wxGROW | wxALL, 5 ); - - wxButton* itemButton28 = new wxButton( itemDialog1, wxID_CANCEL, _( - "&Cancel" ), wxDefaultPosition, wxDefaultSize, 0 ); - - itemButton28->SetForegroundColour( wxColour( 0, 0, 255 ) ); - itemBoxSizer24->Add( itemButton28, 0, wxGROW | wxALL, 5 ); - - // Set validators - m_MagneticPadOptCtrl->SetValidator( wxGenericValidator( &g_MagneticPadOption ) ); - m_MagneticTrackOptCtrl->SetValidator( wxGenericValidator( &g_MagneticTrackOption ) ); - -////@end WinEDA_PcbGeneralOptionsFrame content construction -} - - -/*! - * Should we show tooltips? - */ - -bool WinEDA_PcbGeneralOptionsFrame::ShowToolTips() -{ - return true; -} - - -/*! - * Get bitmap resources - */ - -wxBitmap WinEDA_PcbGeneralOptionsFrame::GetBitmapResource( const wxString& name ) -{ - // Bitmap retrieval -////@begin WinEDA_PcbGeneralOptionsFrame bitmap retrieval - wxUnusedVar( name ); - return wxNullBitmap; - -////@end WinEDA_PcbGeneralOptionsFrame bitmap retrieval -} - - -/*! - * Get icon resources - */ - -wxIcon WinEDA_PcbGeneralOptionsFrame::GetIconResource( const wxString& name ) -{ - // Icon retrieval -////@begin WinEDA_PcbGeneralOptionsFrame icon retrieval - wxUnusedVar( name ); - return wxNullIcon; - -////@end WinEDA_PcbGeneralOptionsFrame icon retrieval -} - - -/*! - * wxEVT_COMMAND_BUTTON_CLICKED event handler for wxID_CANCEL - */ - -void WinEDA_PcbGeneralOptionsFrame::OnCancelClick( wxCommandEvent& event ) -{ -////@begin wxEVT_COMMAND_BUTTON_CLICKED event handler for wxID_OK in WinEDA_PcbGeneralOptionsFrame. - // Before editing this code, remove the block markers. event.Skip(); - -////@end wxEVT_COMMAND_BUTTON_CLICKED event handler for wxID_OK in WinEDA_PcbGeneralOptionsFrame. } -/*! - * wxEVT_COMMAND_BUTTON_CLICKED event handler for wxID_OK - */ - -void WinEDA_PcbGeneralOptionsFrame::OnOkClick( wxCommandEvent& event ) -{ - AcceptPcbOptions( event ); - -////@begin wxEVT_COMMAND_BUTTON_CLICKED event handler for wxID_OK in WinEDA_PcbGeneralOptionsFrame. - // Before editing this code, remove the block markers. - event.Skip(); - -////@end wxEVT_COMMAND_BUTTON_CLICKED event handler for wxID_OK in WinEDA_PcbGeneralOptionsFrame. -} - /**************************************************************************/ -void WinEDA_PcbGeneralOptionsFrame::AcceptPcbOptions( wxCommandEvent& event ) +void Dialog_GeneralOptions::OnOkClick( wxCommandEvent& event ) /**************************************************************************/ { int ii; @@ -583,7 +223,7 @@ void WinEDA_PcbGeneralOptionsFrame::AcceptPcbOptions( wxCommandEvent& event ) DisplayOpt.DisplayPolarCood = (m_PolarDisplay->GetSelection() == 0) ? FALSE : TRUE; ii = g_UnitMetric; - g_UnitMetric = (m_BoxUnits->GetSelection() == 0) ? 0 : 1; + g_UnitMetric = (m_UnitsSelection->GetSelection() == 0) ? 0 : 1; if( ii != g_UnitMetric ) m_Parent->ReCreateAuxiliaryToolbar(); @@ -591,7 +231,8 @@ void WinEDA_PcbGeneralOptionsFrame::AcceptPcbOptions( wxCommandEvent& event ) g_TimeOut = 60 * m_SaveTime->GetValue(); /* Mise a jour de la combobox d'affichage de la couche active */ - g_DesignSettings.m_CopperLayerCount = m_LayerNumber->GetValue(); + int layer_count[] = {1,2,4,6,8,10,12,14,16}; + g_DesignSettings.m_CopperLayerCount = layer_count[m_LayerNumber->GetSelection()]; m_Parent->ReCreateLayerBox( NULL ); g_MaxLinksShowed = m_MaxShowLinks->GetValue(); @@ -660,8 +301,8 @@ void WinEDA_PcbFrame::InstallPcbOptionsFrame( const wxPoint& pos, case ID_OPTIONS_SETUP: { - WinEDA_PcbGeneralOptionsFrame* OptionsFrame = - new WinEDA_PcbGeneralOptionsFrame( this, DC ); + Dialog_GeneralOptions* OptionsFrame = + new Dialog_GeneralOptions( this, DC ); OptionsFrame->ShowModal(); OptionsFrame->Destroy(); diff --git a/pcbnew/dialog_general_options.h b/pcbnew/dialog_general_options.h deleted file mode 100644 index e88905d93d..0000000000 --- a/pcbnew/dialog_general_options.h +++ /dev/null @@ -1,142 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: dialog_general_options.h -// Purpose: -// Author: jean-pierre Charras -// Modified by: -// Created: 21/01/2006 18:28:47 -// RCS-ID: -// Copyright: License GNU -// Licence: -///////////////////////////////////////////////////////////////////////////// - -// Generated by DialogBlocks (unregistered), 21/01/2006 18:28:47 - -#ifndef _DIALOG_GENERAL_OPTIONS_H_ -#define _DIALOG_GENERAL_OPTIONS_H_ - -#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) -#pragma interface "dialog_general_options.h" -#endif - -/*! - * Includes - */ - -////@begin includes -#include "wx/spinctrl.h" -#include "wx/valgen.h" -////@end includes - -/*! - * Forward declarations - */ - -////@begin forward declarations -class wxSpinCtrl; -////@end forward declarations - -/*! - * Control identifiers - */ - -////@begin control identifiers -#define ID_RADIOBOX 10001 -#define ID_RADIOBOX1 10002 -#define ID_RADIOBOX2 10003 -#define ID_SPINCTRL1 10005 -#define ID_SPINCTRL2 10006 -#define ID_SPINCTRL3 10004 -#define ID_CHECKBOX 10007 -#define ID_CHECKBOX1 10008 -#define ID_CHECKBOX2 10009 -#define ID_CHECKBOX3 10010 -#define ID_CHECKBOX4 10011 -#define ID_CHECKBOX5 10012 -#define ID_CHECKBOX6 10013 -#define ID_CHECKBOX7 10014 -#define ID_RADIOBOX4 10016 -#define ID_RADIOBOX3 10015 -#define SYMBOL_WINEDA_PCBGENERALOPTIONSFRAME_STYLE wxCAPTION|wxSYSTEM_MENU|wxCLOSE_BOX|MAYBE_RESIZE_BORDER -#define SYMBOL_WINEDA_PCBGENERALOPTIONSFRAME_TITLE _("General Options") -#define SYMBOL_WINEDA_PCBGENERALOPTIONSFRAME_IDNAME wxID_CANCEL -#define SYMBOL_WINEDA_PCBGENERALOPTIONSFRAME_SIZE wxSize(400, 300) -#define SYMBOL_WINEDA_PCBGENERALOPTIONSFRAME_POSITION wxDefaultPosition -////@end control identifiers - -/*! - * Compatibility - */ - -#ifndef wxCLOSE_BOX -#define wxCLOSE_BOX 0x1000 -#endif - -/*! - * WinEDA_PcbGeneralOptionsFrame class declaration - */ - -class WinEDA_PcbGeneralOptionsFrame: public wxDialog -{ - DECLARE_DYNAMIC_CLASS( WinEDA_PcbGeneralOptionsFrame ) - DECLARE_EVENT_TABLE() - -public: - /// Constructors - WinEDA_PcbGeneralOptionsFrame( ); - WinEDA_PcbGeneralOptionsFrame( WinEDA_PcbFrame* parent, wxDC * DC, - wxWindowID id = SYMBOL_WINEDA_PCBGENERALOPTIONSFRAME_IDNAME, const wxString& caption = SYMBOL_WINEDA_PCBGENERALOPTIONSFRAME_TITLE, const wxPoint& pos = SYMBOL_WINEDA_PCBGENERALOPTIONSFRAME_POSITION, const wxSize& size = SYMBOL_WINEDA_PCBGENERALOPTIONSFRAME_SIZE, long style = SYMBOL_WINEDA_PCBGENERALOPTIONSFRAME_STYLE ); - - /// Creation - bool Create( wxWindow* parent, wxWindowID id = SYMBOL_WINEDA_PCBGENERALOPTIONSFRAME_IDNAME, const wxString& caption = SYMBOL_WINEDA_PCBGENERALOPTIONSFRAME_TITLE, const wxPoint& pos = SYMBOL_WINEDA_PCBGENERALOPTIONSFRAME_POSITION, const wxSize& size = SYMBOL_WINEDA_PCBGENERALOPTIONSFRAME_SIZE, long style = SYMBOL_WINEDA_PCBGENERALOPTIONSFRAME_STYLE ); - - /// Creates the controls and sizers - void CreateControls(); - -////@begin WinEDA_PcbGeneralOptionsFrame event handler declarations - - /// wxEVT_COMMAND_BUTTON_CLICKED event handler for wxID_OK - void OnOkClick( wxCommandEvent& event ); - - /// wxEVT_COMMAND_BUTTON_CLICKED event handler for wxID_CANCEL - void OnCancelClick( wxCommandEvent& event ); - -////@end WinEDA_PcbGeneralOptionsFrame event handler declarations - - void AcceptPcbOptions(wxCommandEvent& event); - -////@begin WinEDA_PcbGeneralOptionsFrame member function declarations - - /// Retrieves bitmap resources - wxBitmap GetBitmapResource( const wxString& name ); - - /// Retrieves icon resources - wxIcon GetIconResource( const wxString& name ); -////@end WinEDA_PcbGeneralOptionsFrame member function declarations - - /// Should we show tooltips? - static bool ShowToolTips(); - -////@begin WinEDA_PcbGeneralOptionsFrame member variables - wxRadioBox* m_PolarDisplay; - wxRadioBox* m_BoxUnits; - wxRadioBox* m_CursorShape; - wxSpinCtrl* m_LayerNumber; - wxSpinCtrl* m_MaxShowLinks; - wxSpinCtrl* m_SaveTime; - wxCheckBox* m_DrcOn; - wxCheckBox* m_ShowGlobalRatsnest; - wxCheckBox* m_ShowModuleRatsnest; - wxCheckBox* m_TrackAutodel; - wxCheckBox* m_Track_45_Only_Ctrl; - wxCheckBox* m_Segments_45_Only_Ctrl; - wxCheckBox* m_AutoPANOpt; - wxCheckBox* m_Track_DoubleSegm_Ctrl; - wxRadioBox* m_MagneticPadOptCtrl; - wxRadioBox* m_MagneticTrackOptCtrl; -////@end WinEDA_PcbGeneralOptionsFrame member variables - WinEDA_PcbFrame * m_Parent; - wxDC * m_DC; -}; - -#endif - // _DIALOG_GENERAL_OPTIONS_H_ diff --git a/pcbnew/dialog_general_options.pjd b/pcbnew/dialog_general_options.pjd deleted file mode 100644 index 612123afac..0000000000 --- a/pcbnew/dialog_general_options.pjd +++ /dev/null @@ -1,1819 +0,0 @@ - - -
- 0 - "" - "" - "" - "" - "" - 0 - 0 - 0 - 1 - 1 - 1 - 1 - 0 - "jean-pierre Charras" - "License GNU" - "" - 0 - 0 - "<All platforms>" - "<Any>" - "///////////////////////////////////////////////////////////////////////////// -// Name: %HEADER-FILENAME% -// Purpose: -// Author: %AUTHOR% -// Modified by: -// Created: %DATE% -// RCS-ID: -// Copyright: %COPYRIGHT% -// Licence: -///////////////////////////////////////////////////////////////////////////// - -" - "///////////////////////////////////////////////////////////////////////////// -// Name: %SOURCE-FILENAME% -// Purpose: -// Author: %AUTHOR% -// Modified by: -// Created: %DATE% -// RCS-ID: -// Copyright: %COPYRIGHT% -// Licence: -///////////////////////////////////////////////////////////////////////////// - -" - "///////////////////////////////////////////////////////////////////////////// -// Name: %SYMBOLS-FILENAME% -// Purpose: Symbols file -// Author: %AUTHOR% -// Modified by: -// Created: %DATE% -// RCS-ID: -// Copyright: %COPYRIGHT% -// Licence: -///////////////////////////////////////////////////////////////////////////// - -" - "#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) -#pragma interface "%HEADER-FILENAME%" -#endif - -" - "#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) -#pragma implementation "%HEADER-FILENAME%" -#endif - -// For compilers that support precompilation, includes "wx/wx.h". -#include "wx/wxprec.h" - -#ifdef __BORLANDC__ -#pragma hdrstop -#endif - -#ifndef WX_PRECOMP -#include "wx/wx.h" -#endif - -" - " /// %BODY% -" - " -/*! - * %BODY% - */ - -" - "app_resources.h" - "app_resources.cpp" - "AppResources" - "app.h" - "app.cpp" - "Application" - 0 - "" - "<None>" - "<System>" - "utf-8" - "<System>" - "" - 0 - 0 - 4 - " " - "" - 0 - 0 - 1 - 0 - 1 - 1 - 0 - 1 - 0 -
- - - "" - "data-document" - "" - "" - 0 - 1 - 0 - 0 - - "Configurations" - "config-data-document" - "" - "" - 0 - 1 - 0 - 0 - "" - 1 - 0 - "" - "Debug" - "ANSI" - "Static" - "Modular" - "GUI" - "wxMSW" - "Dynamic" - "Yes" - "No" - "No" - "%WXVERSION%" - "%EXECUTABLE%" - "" - "%AUTO%" - "%AUTO%" - "%AUTO%" - "%AUTO%" - "%AUTO%" - "%AUTO%" - "%AUTO%" - "%AUTO%" - "%AUTO%" - "%AUTO%" - "%AUTO%" - "%AUTO%" - "%AUTO%" - "%AUTO%" - "%AUTO%" - "%AUTO%" - "%AUTO%" - "%AUTO%" - "%AUTO%" - "%AUTO%" - "%AUTO%" - "%AUTO%" - "%AUTO%" - "%AUTO%" - "%AUTO%" - "%AUTO%" - "%AUTO%" - 0 - 1 - - "GCC Release" - "gcc-config-data-document" - "" - "" - 0 - 1 - 0 - 0 - "GCC" - 1 - 0 - "GCC" - "Release" - "ANSI" - "Static" - "Modular" - "GUI" - "wxMSW" - "Dynamic" - "Yes" - "No" - "No" - "Yes" - "No" - "No" - "%WXVERSION%" - "%EXECUTABLE%" - "" - "%AUTO%" - "%AUTO%" - "%AUTO%" - "%AUTO%" - "%AUTO%" - "%AUTO%" - "%AUTO%" - "%AUTO%" - "%AUTO%" - "%AUTO%" - "%AUTO%" - "%AUTO%" - "%AUTO%" - "%AUTO%" - "%AUTO%" - "%AUTO%" - "%AUTO%" - "%AUTO%" - "%AUTO%" - "%AUTO%" - "%AUTO%" - "%AUTO%" - "%AUTO%" - "%AUTO%" - "%AUTO%" - "%AUTO%" - "%AUTO%" - 0 - 1 - "%AUTO%" - "%AUTO%" - "%AUTO%" - "%AUTO%" - "%AUTO%" - - - - - - - - "Projects" - "root-document" - "" - "project" - 1 - 1 - 0 - 1 - - "Windows" - "html-document" - "" - "dialogsfolder" - 1 - 1 - 0 - 1 - - "General Options" - "dialog-document" - "" - "dialog" - 0 - 1 - 0 - 0 - "21/6/2006" - "wbDialogProxy" - 10000 - 0 - "" - 0 - "" - 0 - 0 - "wxID_CANCEL" - 5101 - "WinEDA_PcbGeneralOptionsFrame" - "wxDialog" - "wxDialog" - "dialog_general_options.cpp" - "dialog_general_options.h" - "" - "General Options" - 1 - "" - 0 - "" - "" - "" - "" - "" - 0 - 1 - "<Any platform>" - "" - "" - "" - "" - "" - "" - "Tiled" - 0 - 1 - 0 - 1 - 0 - 0 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 1 - 0 - "MAYBE_RESIZE_BORDER" - 0 - 1 - -1 - -1 - 400 - 300 - 0 - "" - - "wxBoxSizer H" - "dialog-control-document" - "" - "sizer" - 0 - 1 - 0 - 0 - "wbBoxSizerProxy" - "Horizontal" - "" - 0 - 0 - 0 - "<Any platform>" - - "wxBoxSizer V" - "dialog-control-document" - "" - "sizer" - 0 - 1 - 0 - 0 - "21/6/2006" - "wbBoxSizerProxy" - "Vertical" - "" - "Centre" - "Expand" - 0 - 5 - 1 - 1 - 1 - 1 - 0 - 0 - 0 - "<Any platform>" - - "wxRadioBox: ID_RADIOBOX" - "dialog-control-document" - "" - "radiobox" - 0 - 1 - 0 - 0 - "21/6/2006" - "wbRadioBoxProxy" - "ID_RADIOBOX" - 10001 - "" - "wxRadioBox" - "wxRadioBox" - 1 - 0 - "" - "" - "m_PolarDisplay" - "Display Polar Coord" - 1 - "No Display|Display" - 0 - "" - "" - "" - "" - "" - 0 - 1 - "<Any platform>" - "" - "" - "" - "" - "" - "" - "" - 0 - 1 - 0 - 0 - 0 - "" - -1 - -1 - -1 - -1 - "Left" - "Centre" - 0 - 5 - 1 - 1 - 1 - 1 - 0 - 0 - 0 - "" - "" - - - "wxRadioBox: ID_RADIOBOX1" - "dialog-control-document" - "" - "radiobox" - 0 - 1 - 0 - 0 - "21/6/2006" - "wbRadioBoxProxy" - "ID_RADIOBOX1" - 10002 - "" - "wxRadioBox" - "wxRadioBox" - 1 - 0 - "" - "" - "m_BoxUnits" - "Units" - 1 - "Inches|millimeters" - 0 - "" - "" - "" - "" - "" - 0 - 1 - "<Any platform>" - "" - "" - "" - "" - "" - "" - "" - 0 - 1 - 0 - 0 - 0 - "" - -1 - -1 - -1 - -1 - "Left" - "Centre" - 0 - 5 - 1 - 1 - 1 - 1 - 0 - 0 - 0 - "" - "" - - - "wxRadioBox: ID_RADIOBOX2" - "dialog-control-document" - "" - "radiobox" - 0 - 1 - 0 - 0 - "21/6/2006" - "wbRadioBoxProxy" - "ID_RADIOBOX2" - 10003 - "" - "wxRadioBox" - "wxRadioBox" - 1 - 0 - "" - "" - "m_CursorShape" - "Cursor" - 1 - "Small|Big" - 0 - "" - "" - "" - "" - "" - 0 - 1 - "<Any platform>" - "" - "" - "" - "" - "" - "" - "" - 0 - 1 - 0 - 0 - 0 - "" - -1 - -1 - -1 - -1 - "Left" - "Centre" - 0 - 5 - 1 - 1 - 1 - 1 - 0 - 0 - 0 - "" - "" - - - - "wxBoxSizer V" - "dialog-control-document" - "" - "sizer" - 0 - 1 - 0 - 0 - "21/6/2006" - "wbBoxSizerProxy" - "Vertical" - "" - "Centre" - "Expand" - 0 - 5 - 1 - 1 - 1 - 1 - 0 - 0 - 0 - "<Any platform>" - - "wxStaticBoxSizer V" - "dialog-control-document" - "" - "sizer" - 0 - 1 - 0 - 0 - "21/6/2006" - "wbStaticBoxSizerProxy" - "wxID_ANY" - -1 - "Number of Layers:" - "" - "" - "" - "" - 0 - 1 - "wxStaticBox" - "Vertical" - "Centre" - "Centre" - 0 - 5 - 1 - 1 - 1 - 1 - 0 - 0 - 0 - "<Any platform>" - - "wxSpinCtrl: ID_SPINCTRL1" - "dialog-control-document" - "" - "spinctrl" - 0 - 1 - 0 - 0 - "21/6/2006" - "wbSpinCtrlProxy" - "ID_SPINCTRL1" - 10005 - "" - "wxSpinCtrl" - "wxSpinCtrl" - 1 - 0 - "" - "" - "m_LayerNumber" - 1 - 16 - 0 - "" - "" - "" - "" - "" - 0 - 1 - "<Any platform>" - "" - "" - "" - "" - "" - "" - "" - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - "" - -1 - -1 - -1 - -1 - "Centre" - "Centre" - 0 - 5 - 1 - 1 - 1 - 1 - 0 - 0 - 0 - "" - "" - - - - "wxStaticBoxSizer V" - "dialog-control-document" - "" - "sizer" - 0 - 1 - 0 - 0 - "21/6/2006" - "wbStaticBoxSizerProxy" - "wxID_ANY" - -1 - "Max Links:" - "" - "" - "" - "" - 0 - 1 - "wxStaticBox" - "Vertical" - "Centre" - "Centre" - 0 - 5 - 1 - 1 - 1 - 1 - 0 - 0 - 0 - "<Any platform>" - - "wxSpinCtrl: ID_SPINCTRL2" - "dialog-control-document" - "" - "spinctrl" - 0 - 1 - 0 - 0 - "21/6/2006" - "wbSpinCtrlProxy" - "ID_SPINCTRL2" - 10006 - "" - "wxSpinCtrl" - "wxSpinCtrl" - 1 - 0 - "" - "" - "m_MaxShowLinks" - 1 - 5 - 0 - "" - "" - "" - "" - "" - 0 - 1 - "<Any platform>" - "" - "" - "" - "" - "" - "" - "" - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - "" - -1 - -1 - -1 - -1 - "Centre" - "Centre" - 0 - 5 - 1 - 1 - 1 - 1 - 0 - 0 - 0 - "" - "" - - - - "wxStaticBoxSizer V" - "dialog-control-document" - "" - "sizer" - 0 - 1 - 0 - 0 - "21/6/2006" - "wbStaticBoxSizerProxy" - "wxID_ANY" - -1 - "Auto Save (minuts):" - "" - "" - "" - "" - 0 - 1 - "wxStaticBox" - "Vertical" - "Centre" - "Centre" - 0 - 5 - 1 - 1 - 1 - 1 - 0 - 0 - 0 - "<Any platform>" - - "wxSpinCtrl: ID_SPINCTRL3" - "dialog-control-document" - "" - "spinctrl" - 0 - 1 - 0 - 0 - "21/6/2006" - "wbSpinCtrlProxy" - "ID_SPINCTRL3" - 10004 - "" - "wxSpinCtrl" - "wxSpinCtrl" - 1 - 0 - "" - "" - "m_SaveTime" - 0 - 60 - 0 - "" - "" - "" - "" - "" - 0 - 1 - "<Any platform>" - "" - "" - "" - "" - "" - "" - "" - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - "" - -1 - -1 - -1 - -1 - "Centre" - "Centre" - 0 - 5 - 1 - 1 - 1 - 1 - 0 - 0 - 0 - "" - "" - - - - - "wxBoxSizer V" - "dialog-control-document" - "" - "sizer" - 0 - 1 - 0 - 0 - "21/6/2006" - "wbBoxSizerProxy" - "Vertical" - "" - "Centre" - "Expand" - 0 - 5 - 1 - 1 - 1 - 1 - 0 - 0 - 0 - "<Any platform>" - - "wxStaticBoxSizer V" - "dialog-control-document" - "" - "sizer" - 0 - 1 - 0 - 0 - "21/6/2006" - "wbStaticBoxSizerProxy" - "wxID_ANY" - -1 - "Options:" - "" - "" - "" - "" - 0 - 1 - "wxStaticBox" - "Vertical" - "Centre" - "Centre" - 0 - 5 - 1 - 1 - 1 - 1 - 0 - 0 - 0 - "<Any platform>" - - "wxCheckBox: ID_CHECKBOX" - "dialog-control-document" - "" - "checkbox" - 0 - 1 - 0 - 0 - "21/6/2006" - "wbCheckBoxProxy" - "ID_CHECKBOX" - 10007 - "" - "wxCheckBox" - "wxCheckBox" - 1 - 0 - "" - "" - "m_DrcOn" - "Drc ON" - 0 - "" - "" - "" - "" - "" - "" - "" - "" - "" - "" - "C60000" - "" - 0 - 1 - "<Any platform>" - 0 - 1 - 0 - 0 - 0 - 0 - 0 - "" - -1 - -1 - -1 - -1 - "Left" - "Centre" - 0 - 5 - 1 - 1 - 1 - 1 - 0 - 0 - 0 - "" - "" - - - "wxCheckBox: ID_CHECKBOX1" - "dialog-control-document" - "" - "checkbox" - 0 - 1 - 0 - 0 - "21/6/2006" - "wbCheckBoxProxy" - "ID_CHECKBOX1" - 10008 - "" - "wxCheckBox" - "wxCheckBox" - 1 - 0 - "" - "" - "m_ShowGlobalRatsnest" - "Show Ratsnest" - 0 - "" - "" - "" - "" - "" - "" - "" - "" - "" - "" - "" - "" - 0 - 1 - "<Any platform>" - 0 - 1 - 0 - 0 - 0 - 0 - 0 - "" - -1 - -1 - -1 - -1 - "Left" - "Centre" - 0 - 5 - 1 - 1 - 1 - 1 - 0 - 0 - 0 - "" - "" - - - "wxCheckBox: ID_CHECKBOX2" - "dialog-control-document" - "" - "checkbox" - 0 - 1 - 0 - 0 - "21/6/2006" - "wbCheckBoxProxy" - "ID_CHECKBOX2" - 10009 - "" - "wxCheckBox" - "wxCheckBox" - 1 - 0 - "" - "" - "m_ShowModuleRatsnest" - "Show Mod Ratsnest" - 0 - "" - "" - "" - "" - "" - "" - "" - "" - "" - "" - "" - "" - 0 - 1 - "<Any platform>" - 0 - 1 - 0 - 0 - 0 - 0 - 0 - "" - -1 - -1 - -1 - -1 - "Left" - "Centre" - 0 - 5 - 1 - 1 - 1 - 1 - 0 - 0 - 0 - "" - "" - - - "wxCheckBox: ID_CHECKBOX3" - "dialog-control-document" - "" - "checkbox" - 0 - 1 - 0 - 0 - "21/6/2006" - "wbCheckBoxProxy" - "ID_CHECKBOX3" - 10010 - "" - "wxCheckBox" - "wxCheckBox" - 1 - 0 - "" - "" - "m_TrackAutodel" - "Tracks Auto Del" - 0 - "" - "" - "" - "" - "" - "" - "" - "" - "" - "" - "" - "" - 0 - 1 - "<Any platform>" - 0 - 1 - 0 - 0 - 0 - 0 - 0 - "" - -1 - -1 - -1 - -1 - "Left" - "Centre" - 0 - 5 - 1 - 1 - 1 - 1 - 0 - 0 - 0 - "" - "" - - - "wxCheckBox: ID_CHECKBOX4" - "dialog-control-document" - "" - "checkbox" - 0 - 1 - 0 - 0 - "21/6/2006" - "wbCheckBoxProxy" - "ID_CHECKBOX4" - 10011 - "" - "wxCheckBox" - "wxCheckBox" - 1 - 0 - "" - "" - "m_Track_45_Only_Ctrl" - "Track 45 Only" - 0 - "" - "" - "" - "" - "" - "" - "" - "" - "" - "" - "" - "" - 0 - 1 - "<Any platform>" - 0 - 1 - 0 - 0 - 0 - 0 - 0 - "" - -1 - -1 - -1 - -1 - "Left" - "Centre" - 0 - 5 - 1 - 1 - 1 - 1 - 0 - 0 - 0 - "" - "" - - - "wxCheckBox: ID_CHECKBOX5" - "dialog-control-document" - "" - "checkbox" - 0 - 1 - 0 - 0 - "21/6/2006" - "wbCheckBoxProxy" - "ID_CHECKBOX5" - 10012 - "" - "wxCheckBox" - "wxCheckBox" - 1 - 0 - "" - "" - "m_Segments_45_Only_Ctrl" - "Segments 45 Only" - 0 - "" - "" - "" - "" - "" - "" - "" - "" - "" - "" - "" - "" - 0 - 1 - "<Any platform>" - 0 - 1 - 0 - 0 - 0 - 0 - 0 - "" - -1 - -1 - -1 - -1 - "Left" - "Centre" - 0 - 5 - 1 - 1 - 1 - 1 - 0 - 0 - 0 - "" - "" - - - "wxCheckBox: ID_CHECKBOX6" - "dialog-control-document" - "" - "checkbox" - 0 - 1 - 0 - 0 - "21/6/2006" - "wbCheckBoxProxy" - "ID_CHECKBOX6" - 10013 - "" - "wxCheckBox" - "wxCheckBox" - 1 - 0 - "" - "" - "m_AutoPANOpt" - "Auto PAN" - 0 - "" - "" - "" - "" - "" - "" - "" - "" - "" - "" - "0000FF" - "" - 0 - 1 - "<Any platform>" - 0 - 1 - 0 - 0 - 0 - 0 - 0 - "" - -1 - -1 - -1 - -1 - "Left" - "Centre" - 0 - 5 - 1 - 1 - 1 - 1 - 0 - 0 - 0 - "" - "" - - - "wxCheckBox: ID_CHECKBOX7" - "dialog-control-document" - "" - "checkbox" - 0 - 1 - 0 - 0 - "21/6/2006" - "wbCheckBoxProxy" - "ID_CHECKBOX7" - 10014 - "" - "wxCheckBox" - "wxCheckBox" - 1 - 0 - "" - "" - "m_Track_DoubleSegm_Ctrl" - "Double Segm Track" - 0 - "" - "" - "" - "" - "" - "" - "" - "" - "" - "" - "009000" - "" - 0 - 1 - "<Any platform>" - 0 - 1 - 0 - 0 - 0 - 0 - 0 - "" - -1 - -1 - -1 - -1 - "Left" - "Centre" - 0 - 5 - 1 - 1 - 1 - 1 - 0 - 0 - 0 - "" - "" - - - - - "wxBoxSizer V" - "dialog-control-document" - "" - "sizer" - 0 - 1 - 0 - 0 - "21/6/2006" - "wbBoxSizerProxy" - "Vertical" - "" - "Centre" - "Top" - 0 - 5 - 1 - 1 - 1 - 1 - 0 - 0 - 0 - "<Any platform>" - - "wxRadioBox: ID_RADIOBOX4" - "dialog-control-document" - "" - "radiobox" - 0 - 1 - 0 - 0 - "3/3/2008" - "wbRadioBoxProxy" - "ID_RADIOBOX4" - 10016 - "" - "wxRadioBox" - "wxRadioBox" - 1 - 0 - "" - "" - "m_MagneticPadOptCtrl" - "Magnetic Pads" - 1 - "Never|When creating tracks|Always" - 0 - "" - "control the capture of the pcb cursor when the mouse cursor enters a pad area" - "" - "" - "" - 0 - 1 - "<Any platform>" - "g_MagneticPadOption" - "wxGenericValidator(& %VARIABLE%)" - "" - "" - "" - "" - "" - 0 - 1 - 0 - 0 - 0 - "" - -1 - -1 - -1 - -1 - "Expand" - "Centre" - 0 - 5 - 1 - 1 - 1 - 1 - 0 - 0 - 0 - "" - "" - - - "wxRadioBox: ID_RADIOBOX3" - "dialog-control-document" - "" - "radiobox" - 0 - 1 - 0 - 0 - "3/3/2008" - "wbRadioBoxProxy" - "ID_RADIOBOX3" - 10015 - "" - "wxRadioBox" - "wxRadioBox" - 1 - 0 - "" - "" - "m_MagneticTrackOptCtrl" - "Magnetic Tracks" - 1 - "Never|When creating tracks|Always" - 0 - "" - "control the capture of the pcb cursor when the mouse cursor enters a track" - "" - "" - "" - 0 - 1 - "<Any platform>" - "g_MagneticTrackOption" - "wxGenericValidator(& %VARIABLE%)" - "" - "" - "" - "" - "" - 0 - 1 - 0 - 0 - 0 - "" - -1 - -1 - -1 - -1 - "Expand" - "Centre" - 0 - 5 - 1 - 1 - 1 - 1 - 0 - 0 - 0 - "" - "" - - - "wxButton: wxID_OK" - "dialog-control-document" - "" - "dialogcontrol" - 0 - 1 - 0 - 0 - "21/6/2006" - "wbButtonProxy" - "wxEVT_COMMAND_BUTTON_CLICKED|OnOkClick" - "wxID_OK" - 5100 - "" - "wxButton" - "wxButton" - 1 - 0 - "" - "" - "" - "&OK" - 0 - "" - "" - "" - "" - "" - "" - "" - "" - "" - "" - "DD0000" - "" - 0 - 1 - "<Any platform>" - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - "" - -1 - -1 - -1 - -1 - "Expand" - "Centre" - 0 - 5 - 1 - 1 - 1 - 1 - 0 - 0 - 0 - "" - "" - - - "wxButton: wxID_CANCEL" - "dialog-control-document" - "" - "dialogcontrol" - 0 - 1 - 0 - 0 - "22/8/2006" - "wbButtonProxy" - "wxEVT_COMMAND_BUTTON_CLICKED|OnCancelClick" - "wxID_CANCEL" - 5101 - "" - "wxButton" - "wxButton" - 1 - 0 - "" - "" - "" - "&Cancel" - 0 - "" - "" - "" - "" - "" - "" - "" - "" - "" - "" - "0000FF" - "" - 0 - 1 - "<Any platform>" - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - "" - -1 - -1 - -1 - -1 - "Expand" - "Centre" - 0 - 5 - 1 - 1 - 1 - 1 - 0 - 0 - 0 - "" - "" - - - - - - - "Sources" - "html-document" - "" - "sourcesfolder" - 1 - 1 - 0 - 1 - - "dialog_general_options.rc" - "source-editor-document" - "dialog_general_options.rc" - "source-editor" - 0 - 0 - 1 - 0 - "21/6/2006" - "" - - - - "Images" - "html-document" - "" - "bitmapsfolder" - 1 - 1 - 0 - 1 - - - - -
diff --git a/pcbnew/dialog_general_options.rc b/pcbnew/dialog_general_options.rc deleted file mode 100644 index b86c4e2265..0000000000 --- a/pcbnew/dialog_general_options.rc +++ /dev/null @@ -1 +0,0 @@ -#include "wx/msw/wx.rc" diff --git a/pcbnew/dialog_generaloptions_BoardEditor_base.cpp b/pcbnew/dialog_generaloptions_BoardEditor_base.cpp new file mode 100644 index 0000000000..0fae041937 --- /dev/null +++ b/pcbnew/dialog_generaloptions_BoardEditor_base.cpp @@ -0,0 +1,180 @@ +/////////////////////////////////////////////////////////////////////////// +// C++ code generated with wxFormBuilder (version Apr 16 2008) +// http://www.wxformbuilder.org/ +// +// PLEASE DO "NOT" EDIT THIS FILE! +/////////////////////////////////////////////////////////////////////////// + +#include "dialog_generaloptions_BoardEditor_base.h" + +/////////////////////////////////////////////////////////////////////////// + +DialogGeneralOptionsBoardEditor_base::DialogGeneralOptionsBoardEditor_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 ); + + wxBoxSizer* bMainSizer; + bMainSizer = new wxBoxSizer( wxHORIZONTAL ); + + wxBoxSizer* bLeftSizer; + bLeftSizer = new wxBoxSizer( wxVERTICAL ); + + wxString m_PolarDisplayChoices[] = { _("No Display"), _("Display") }; + int m_PolarDisplayNChoices = sizeof( m_PolarDisplayChoices ) / sizeof( wxString ); + m_PolarDisplay = new wxRadioBox( this, wxID_POLAR_CTRL, _("Display Polar Coord"), wxDefaultPosition, wxDefaultSize, m_PolarDisplayNChoices, m_PolarDisplayChoices, 1, wxRA_SPECIFY_COLS ); + m_PolarDisplay->SetSelection( 1 ); + m_PolarDisplay->SetToolTip( _("Activates the display of relative coordinates from relative origin (set by the space key)\nto the cursor, in polar coordinates (angle and distance)") ); + + bLeftSizer->Add( m_PolarDisplay, 0, wxALL|wxEXPAND, 5 ); + + wxString m_UnitsSelectionChoices[] = { _("Inches"), _("Millimeters") }; + int m_UnitsSelectionNChoices = sizeof( m_UnitsSelectionChoices ) / sizeof( wxString ); + m_UnitsSelection = new wxRadioBox( this, wxID_UNITS, _("Units"), wxDefaultPosition, wxDefaultSize, m_UnitsSelectionNChoices, m_UnitsSelectionChoices, 1, wxRA_SPECIFY_COLS ); + m_UnitsSelection->SetSelection( 0 ); + m_UnitsSelection->SetToolTip( _("Selection of units used for display diemsions and positions") ); + + bLeftSizer->Add( m_UnitsSelection, 0, wxALL|wxEXPAND, 5 ); + + wxString m_CursorShapeChoices[] = { _("Smass cross"), _("Full screen cursor") }; + int m_CursorShapeNChoices = sizeof( m_CursorShapeChoices ) / sizeof( wxString ); + m_CursorShape = new wxRadioBox( this, wxID_CURSOR_SHAPE, _("Cursor"), wxDefaultPosition, wxDefaultSize, m_CursorShapeNChoices, m_CursorShapeChoices, 1, wxRA_SPECIFY_COLS ); + m_CursorShape->SetSelection( 1 ); + m_CursorShape->SetToolTip( _("Main cursor shape selection (small cross or large cursor)") ); + + bLeftSizer->Add( m_CursorShape, 0, wxALL|wxEXPAND, 5 ); + + bMainSizer->Add( bLeftSizer, 1, wxEXPAND, 5 ); + + wxBoxSizer* bMiddleLeftSizer; + bMiddleLeftSizer = new wxBoxSizer( wxVERTICAL ); + + wxString m_LayerNumberChoices[] = { _("1"), _("2"), _("4"), _("6"), _("8"), _("10"), _("12"), _("14"), _("16") }; + int m_LayerNumberNChoices = sizeof( m_LayerNumberChoices ) / sizeof( wxString ); + m_LayerNumber = new wxRadioBox( this, wxID_LAYER_NUMBER, _("Layers:"), wxDefaultPosition, wxDefaultSize, m_LayerNumberNChoices, m_LayerNumberChoices, 3, wxRA_SPECIFY_COLS ); + m_LayerNumber->SetSelection( 1 ); + m_LayerNumber->SetToolTip( _("Active copper layers count selection") ); + + bMiddleLeftSizer->Add( m_LayerNumber, 0, wxALL|wxEXPAND, 5 ); + + m_staticTextmaxlinks = new wxStaticText( this, wxID_ANY, _("Max Links:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextmaxlinks->Wrap( -1 ); + bMiddleLeftSizer->Add( m_staticTextmaxlinks, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); + + m_MaxShowLinks = new wxSpinCtrl( this, wxID_ANY, wxT("1"), wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, 1, 5, 1 ); + m_MaxShowLinks->SetToolTip( _("Adjust the number of ratsnets shown from cursor to closest pads") ); + + bMiddleLeftSizer->Add( m_MaxShowLinks, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 ); + + m_staticTextautosave = new wxStaticText( this, wxID_ANY, _("Auto Save (minuts):"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextautosave->Wrap( -1 ); + bMiddleLeftSizer->Add( m_staticTextautosave, 0, wxTOP|wxRIGHT|wxLEFT|wxEXPAND, 5 ); + + m_SaveTime = new wxSpinCtrl( this, wxID_ANY, wxT("0"), wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, 0, 60, 0 ); + m_SaveTime->SetToolTip( _("Delay after the first change to create a backup file of the board on disk.") ); + + bMiddleLeftSizer->Add( m_SaveTime, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 ); + + bMainSizer->Add( bMiddleLeftSizer, 1, wxEXPAND, 5 ); + + wxStaticBoxSizer* bMiddleRightBoxSizer; + bMiddleRightBoxSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Options:") ), wxVERTICAL ); + + m_DrcOn = new wxCheckBox( this, wxID_DRC_ONOFF, _("Drc ON"), wxDefaultPosition, wxDefaultSize, 0 ); + m_DrcOn->SetValue(true); + + m_DrcOn->SetToolTip( _("Enable/disable the DRC control.\nWhen DRC is disable, all connections are allowed.") ); + + bMiddleRightBoxSizer->Add( m_DrcOn, 0, wxALL|wxEXPAND, 5 ); + + m_ShowGlobalRatsnest = new wxCheckBox( this, wxID_GENERAL_RATSNEST, _("Show Ratsnest"), wxDefaultPosition, wxDefaultSize, 0 ); + + m_ShowGlobalRatsnest->SetToolTip( _("Show (or not) the full rastnest.") ); + + bMiddleRightBoxSizer->Add( m_ShowGlobalRatsnest, 0, wxALL, 5 ); + + m_ShowModuleRatsnest = new wxCheckBox( this, wxID_RATSNEST_MODULE, _("Show Mod Ratsnest"), wxDefaultPosition, wxDefaultSize, 0 ); + + m_ShowModuleRatsnest->SetToolTip( _("Shows (or not) the local ratsnest relative to a footprint, when moving it.\nThis ratsnest is useful to place a footprint.") ); + + bMiddleRightBoxSizer->Add( m_ShowModuleRatsnest, 0, wxALL, 5 ); + + m_TrackAutodel = new wxCheckBox( this, wxID_TRACK_AUTODEL, _("Tracks Auto Del"), wxDefaultPosition, wxDefaultSize, 0 ); + + m_TrackAutodel->SetToolTip( _("Enable/disable the automatic track deletion when recreating a track.") ); + + bMiddleRightBoxSizer->Add( m_TrackAutodel, 0, wxALL, 5 ); + + m_Track_45_Only_Ctrl = new wxCheckBox( this, wxID_TRACKS45, _("Track only 45 degrees"), wxDefaultPosition, wxDefaultSize, 0 ); + + m_Track_45_Only_Ctrl->SetToolTip( _("If enabled, force tracks directions to H, V or 40 degrees, when creating a track.") ); + + bMiddleRightBoxSizer->Add( m_Track_45_Only_Ctrl, 0, wxALL, 5 ); + + m_Segments_45_Only_Ctrl = new wxCheckBox( this, wxID_SEGMENTS45, _("Segments 45 Only"), wxDefaultPosition, wxDefaultSize, 0 ); + + m_Segments_45_Only_Ctrl->SetToolTip( _("If enabled, force segments directions to H, V or 40 degrees, when creatine a segment on technical layers.") ); + + bMiddleRightBoxSizer->Add( m_Segments_45_Only_Ctrl, 0, wxALL, 5 ); + + m_AutoPANOpt = new wxCheckBox( this, wxID_AUTOPAN, _("Auto PAN"), wxDefaultPosition, wxDefaultSize, 0 ); + + m_AutoPANOpt->SetToolTip( _("Allows auto pan when creating a track, or moving an item.") ); + + bMiddleRightBoxSizer->Add( m_AutoPANOpt, 0, wxALL, 5 ); + + m_Track_DoubleSegm_Ctrl = new wxCheckBox( this, wxID_ANY, _("Double Segm Track"), wxDefaultPosition, wxDefaultSize, 0 ); + + m_Track_DoubleSegm_Ctrl->SetToolTip( _("If enabled, uses two track segments, with 45 degrees angle between them when creating a new track ") ); + + bMiddleRightBoxSizer->Add( m_Track_DoubleSegm_Ctrl, 0, wxALL, 5 ); + + bMainSizer->Add( bMiddleRightBoxSizer, 1, 0, 5 ); + + wxBoxSizer* bRightSizer; + bRightSizer = new wxBoxSizer( wxVERTICAL ); + + wxString m_MagneticPadOptCtrlChoices[] = { _("Never"), _("When creating tracks"), _("Always") }; + int m_MagneticPadOptCtrlNChoices = sizeof( m_MagneticPadOptCtrlChoices ) / sizeof( wxString ); + m_MagneticPadOptCtrl = new wxRadioBox( this, wxID_ANY, _("Magnetic Pads"), wxDefaultPosition, wxDefaultSize, m_MagneticPadOptCtrlNChoices, m_MagneticPadOptCtrlChoices, 1, wxRA_SPECIFY_COLS ); + m_MagneticPadOptCtrl->SetSelection( 0 ); + m_MagneticPadOptCtrl->SetToolTip( _("control the capture of the pcb cursor when the mouse cursor enters a pad area") ); + + bRightSizer->Add( m_MagneticPadOptCtrl, 0, wxALL|wxEXPAND, 5 ); + + wxString m_MagneticTrackOptCtrlChoices[] = { _("Never"), _("When creating tracks"), _("Always") }; + int m_MagneticTrackOptCtrlNChoices = sizeof( m_MagneticTrackOptCtrlChoices ) / sizeof( wxString ); + m_MagneticTrackOptCtrl = new wxRadioBox( this, wxID_MAGNETIC_TRACKS, _("Magnetic Tracks"), wxDefaultPosition, wxDefaultSize, m_MagneticTrackOptCtrlNChoices, m_MagneticTrackOptCtrlChoices, 1, wxRA_SPECIFY_COLS ); + m_MagneticTrackOptCtrl->SetSelection( 0 ); + m_MagneticTrackOptCtrl->SetToolTip( _("Control the capture of the pcb cursor when the mouse cursor enters a track") ); + + bRightSizer->Add( m_MagneticTrackOptCtrl, 0, wxALL|wxEXPAND, 5 ); + + m_buttonOK = new wxButton( this, wxID_OK, _("OK"), wxDefaultPosition, wxDefaultSize, 0 ); + m_buttonOK->SetDefault(); + m_buttonOK->SetForegroundColour( wxColour( 174, 0, 0 ) ); + + bRightSizer->Add( m_buttonOK, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5 ); + + m_buttonCANCEL = new wxButton( this, wxID_CANCEL, _("Cancel"), wxDefaultPosition, wxDefaultSize, 0 ); + m_buttonCANCEL->SetForegroundColour( wxColour( 0, 0, 200 ) ); + + bRightSizer->Add( m_buttonCANCEL, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5 ); + + bMainSizer->Add( bRightSizer, 1, wxEXPAND, 5 ); + + this->SetSizer( bMainSizer ); + this->Layout(); + + // Connect Events + this->Connect( wxEVT_INIT_DIALOG, wxInitDialogEventHandler( DialogGeneralOptionsBoardEditor_base::OnInitDialog ) ); + m_buttonOK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DialogGeneralOptionsBoardEditor_base::OnOkClick ), NULL, this ); + m_buttonCANCEL->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DialogGeneralOptionsBoardEditor_base::OnCancelClick ), NULL, this ); +} + +DialogGeneralOptionsBoardEditor_base::~DialogGeneralOptionsBoardEditor_base() +{ + // Disconnect Events + this->Disconnect( wxEVT_INIT_DIALOG, wxInitDialogEventHandler( DialogGeneralOptionsBoardEditor_base::OnInitDialog ) ); + m_buttonOK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DialogGeneralOptionsBoardEditor_base::OnOkClick ), NULL, this ); + m_buttonCANCEL->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DialogGeneralOptionsBoardEditor_base::OnCancelClick ), NULL, this ); +} diff --git a/pcbnew/dialog_generaloptions_BoardEditor_base.fbp b/pcbnew/dialog_generaloptions_BoardEditor_base.fbp new file mode 100644 index 0000000000..0b30cc48ec --- /dev/null +++ b/pcbnew/dialog_generaloptions_BoardEditor_base.fbp @@ -0,0 +1,1184 @@ + + + + + + C++ + 1 + UTF-8 + connect + dialog_generaloptions_BoardEditor_base + 1000 + none + 1 + DialogGeneralOptionsBoardEditor_base + + . + + 1 + 1 + 0 + + + + + 1 + + + + 0 + wxID_ANY + + + DialogGeneralOptionsBoardEditor_base + + 585,272 + wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER + + General settings + + + + + + + + + + + + + + OnInitDialog + + + + + + + + + + + + + + + + + + + + + + + bMainSizer + wxHORIZONTAL + none + + 5 + wxEXPAND + 1 + + + bLeftSizer + wxVERTICAL + none + + 5 + wxALL|wxEXPAND + 0 + + + "No Display" "Display" + + 1 + + + 0 + wxID_POLAR_CTRL + Display Polar Coord + 1 + + + m_PolarDisplay + protected + + 1 + + wxRA_SPECIFY_COLS + + Activates the display of relative coordinates from relative origin (set by the space key) to the cursor, in polar coordinates (angle and distance) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL|wxEXPAND + 0 + + + "Inches" "Millimeters" + + 1 + + + 0 + wxID_UNITS + Units + 1 + + + m_UnitsSelection + protected + + 0 + + wxRA_SPECIFY_COLS + + Selection of units used for display diemsions and positions + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL|wxEXPAND + 0 + + + "Smass cross" "Full screen cursor" + + 1 + + + 0 + wxID_CURSOR_SHAPE + Cursor + 1 + + + m_CursorShape + protected + + 1 + + wxRA_SPECIFY_COLS + + Main cursor shape selection (small cross or large cursor) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND + 1 + + + bMiddleLeftSizer + wxVERTICAL + none + + 5 + wxALL|wxEXPAND + 0 + + + "1" "2" "4" "6" "8" "10" "12" "14" "16" + + 1 + + + 0 + wxID_LAYER_NUMBER + Layers: + 3 + + + m_LayerNumber + protected + + 1 + + wxRA_SPECIFY_COLS + + Active copper layers count selection + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxTOP|wxRIGHT|wxLEFT + 0 + + + + 1 + + + 0 + wxID_ANY + Max Links: + + + m_staticTextmaxlinks + protected + + + + + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND + 0 + + + + 1 + + + 0 + wxID_ANY + 1 + 5 + + 1 + + m_MaxShowLinks + protected + + + wxSP_ARROW_KEYS + + Adjust the number of ratsnets shown from cursor to closest pads + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxTOP|wxRIGHT|wxLEFT|wxEXPAND + 0 + + + + 1 + + + 0 + wxID_ANY + Auto Save (minuts): + + + m_staticTextautosave + protected + + + + + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND + 0 + + + + 1 + + + 0 + wxID_ANY + 0 + 60 + + 0 + + m_SaveTime + protected + + + wxSP_ARROW_KEYS + + Delay after the first change to create a backup file of the board on disk. + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + + 1 + + wxID_ANY + Options: + + bMiddleRightBoxSizer + wxVERTICAL + none + + + 5 + wxALL|wxEXPAND + 0 + + + 1 + + 1 + + + 0 + wxID_DRC_ONOFF + Drc ON + + + m_DrcOn + protected + + + + + Enable/disable the DRC control. When DRC is disable, all connections are allowed. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL + 0 + + + 0 + + 1 + + + 0 + wxID_GENERAL_RATSNEST + Show Ratsnest + + + m_ShowGlobalRatsnest + protected + + + + + Show (or not) the full rastnest. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL + 0 + + + 0 + + 1 + + + 0 + wxID_RATSNEST_MODULE + Show Mod Ratsnest + + + m_ShowModuleRatsnest + protected + + + + + Shows (or not) the local ratsnest relative to a footprint, when moving it. This ratsnest is useful to place a footprint. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL + 0 + + + 0 + + 1 + + + 0 + wxID_TRACK_AUTODEL + Tracks Auto Del + + + m_TrackAutodel + protected + + + + + Enable/disable the automatic track deletion when recreating a track. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL + 0 + + + 0 + + 1 + + + 0 + wxID_TRACKS45 + Track only 45 degrees + + + m_Track_45_Only_Ctrl + protected + + + + + If enabled, force tracks directions to H, V or 40 degrees, when creating a track. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL + 0 + + + 0 + + 1 + + + 0 + wxID_SEGMENTS45 + Segments 45 Only + + + m_Segments_45_Only_Ctrl + protected + + + + + If enabled, force segments directions to H, V or 40 degrees, when creatine a segment on technical layers. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL + 0 + + + 0 + + 1 + + + 0 + wxID_AUTOPAN + Auto PAN + + + m_AutoPANOpt + protected + + + + + Allows auto pan when creating a track, or moving an item. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL + 0 + + + 0 + + 1 + + + 0 + wxID_ANY + Double Segm Track + + + m_Track_DoubleSegm_Ctrl + protected + + + + + If enabled, uses two track segments, with 45 degrees angle between them when creating a new track + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND + 1 + + + bRightSizer + wxVERTICAL + none + + 5 + wxALL|wxEXPAND + 0 + + + "Never" "When creating tracks" "Always" + + 1 + + + 0 + wxID_ANY + Magnetic Pads + 1 + + + m_MagneticPadOptCtrl + protected + + 0 + + wxRA_SPECIFY_COLS + + control the capture of the pcb cursor when the mouse cursor enters a pad area + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL|wxEXPAND + 0 + + + "Never" "When creating tracks" "Always" + + 1 + + + 0 + wxID_MAGNETIC_TRACKS + Magnetic Tracks + 1 + + + m_MagneticTrackOptCtrl + protected + + 0 + + wxRA_SPECIFY_COLS + + Control the capture of the pcb cursor when the mouse cursor enters a track + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL|wxALIGN_CENTER_HORIZONTAL + 0 + + + + 1 + 1 + 174,0,0 + + 0 + wxID_OK + OK + + + m_buttonOK + protected + + + + + + + + + OnOkClick + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALIGN_CENTER_HORIZONTAL|wxALL + 0 + + + + 0 + 1 + 0,0,200 + + 0 + wxID_CANCEL + Cancel + + + m_buttonCANCEL + protected + + + + + + + + + OnCancelClick + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/pcbnew/dialog_generaloptions_BoardEditor_base.h b/pcbnew/dialog_generaloptions_BoardEditor_base.h new file mode 100644 index 0000000000..bee89fcad6 --- /dev/null +++ b/pcbnew/dialog_generaloptions_BoardEditor_base.h @@ -0,0 +1,86 @@ +/////////////////////////////////////////////////////////////////////////// +// C++ code generated with wxFormBuilder (version Apr 16 2008) +// http://www.wxformbuilder.org/ +// +// PLEASE DO "NOT" EDIT THIS FILE! +/////////////////////////////////////////////////////////////////////////// + +#ifndef __dialog_generaloptions_BoardEditor_base__ +#define __dialog_generaloptions_BoardEditor_base__ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +/////////////////////////////////////////////////////////////////////////// + +/////////////////////////////////////////////////////////////////////////////// +/// Class DialogGeneralOptionsBoardEditor_base +/////////////////////////////////////////////////////////////////////////////// +class DialogGeneralOptionsBoardEditor_base : public wxDialog +{ + private: + + protected: + enum + { + wxID_POLAR_CTRL = 1000, + wxID_UNITS, + wxID_CURSOR_SHAPE, + wxID_LAYER_NUMBER, + wxID_DRC_ONOFF, + wxID_GENERAL_RATSNEST, + wxID_RATSNEST_MODULE, + wxID_TRACK_AUTODEL, + wxID_TRACKS45, + wxID_SEGMENTS45, + wxID_AUTOPAN, + wxID_MAGNETIC_TRACKS, + }; + + wxRadioBox* m_PolarDisplay; + wxRadioBox* m_UnitsSelection; + wxRadioBox* m_CursorShape; + wxRadioBox* m_LayerNumber; + wxStaticText* m_staticTextmaxlinks; + wxSpinCtrl* m_MaxShowLinks; + wxStaticText* m_staticTextautosave; + wxSpinCtrl* m_SaveTime; + wxCheckBox* m_DrcOn; + wxCheckBox* m_ShowGlobalRatsnest; + wxCheckBox* m_ShowModuleRatsnest; + wxCheckBox* m_TrackAutodel; + wxCheckBox* m_Track_45_Only_Ctrl; + wxCheckBox* m_Segments_45_Only_Ctrl; + wxCheckBox* m_AutoPANOpt; + wxCheckBox* m_Track_DoubleSegm_Ctrl; + wxRadioBox* m_MagneticPadOptCtrl; + wxRadioBox* m_MagneticTrackOptCtrl; + wxButton* m_buttonOK; + wxButton* m_buttonCANCEL; + + // Virtual event handlers, overide them in your derived class + virtual void OnInitDialog( wxInitDialogEvent& event ){ event.Skip(); } + virtual void OnOkClick( wxCommandEvent& event ){ event.Skip(); } + virtual void OnCancelClick( wxCommandEvent& event ){ event.Skip(); } + + + public: + DialogGeneralOptionsBoardEditor_base( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("General settings"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 585,272 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); + ~DialogGeneralOptionsBoardEditor_base(); + +}; + +#endif //__dialog_generaloptions_BoardEditor_base__ diff --git a/pcbnew/makefile.include b/pcbnew/makefile.include index c4e9c5b48c..8a65d8c2e5 100644 --- a/pcbnew/makefile.include +++ b/pcbnew/makefile.include @@ -79,6 +79,7 @@ OBJECTS= $(TARGET).o classpcb.o\ loadcmp.o \ dialog_setup_libs.o \ dialog_general_options.o \ + dialog_generaloptions_BoardEditor_base.o\ dialog_orient_footprints.o\ muwave_command.o \ initpcb.o\ @@ -139,7 +140,9 @@ setpage.o: ../share/setpage.cpp menubarpcb.o: menubarpcb.cpp dialog_general_options.o: dialog_general_options.cpp dialog_track_options.cpp dialog_display_options.cpp\ - dialog_graphic_items_options.cpp + dialog_graphic_items_options.cpp dialog_generaloptions_BoardEditor_base.h + +dialog_generaloptions_BoardEditor_base.o: dialog_generaloptions_BoardEditor_base.cpp dialog_generaloptions_BoardEditor_base.h menubarmodedit.o: menubarmodedit.cpp