diff --git a/3d-viewer/3d_canvas.cpp b/3d-viewer/3d_canvas.cpp index a8080354d7..da8f6ea51e 100644 --- a/3d-viewer/3d_canvas.cpp +++ b/3d-viewer/3d_canvas.cpp @@ -31,7 +31,7 @@ void CheckGLError() { GLenum errLast = GL_NO_ERROR; - for ( ;; ) + for ( ; ; ) { GLenum err = glGetError(); if ( err == GL_NO_ERROR ) diff --git a/common/common_plot_functions.cpp b/common/common_plot_functions.cpp index 587c3e35f0..5b3a08bbbd 100644 --- a/common/common_plot_functions.cpp +++ b/common/common_plot_functions.cpp @@ -547,8 +547,8 @@ void EDA_DRAW_FRAME::PlotWorkSheet( PLOTTER* plotter, BASE_SCREEN* screen ) case WS_SEGMENT: { wxPoint auxpos; - auxpos.x = ( ref.x - WsItem->m_Endx ) * conv_unit;; - auxpos.y = ( ref.y - WsItem->m_Endy ) * conv_unit;; + auxpos.x = ( ref.x - WsItem->m_Endx ) * conv_unit; + auxpos.y = ( ref.y - WsItem->m_Endy ) * conv_unit; plotter->move_to( pos ); plotter->finish_to( auxpos ); } diff --git a/common/drawtxt.cpp b/common/drawtxt.cpp index 659eee3428..580139bf34 100644 --- a/common/drawtxt.cpp +++ b/common/drawtxt.cpp @@ -68,7 +68,7 @@ int Clamp_Text_PenSize( int aPenSize, wxSize aSize, bool aBold ) { int size = MIN( ABS( aSize.x ), ABS( aSize.y ) ); - return Clamp_Text_PenSize( aPenSize, size, aBold );; + return Clamp_Text_PenSize( aPenSize, size, aBold ); } diff --git a/cvpcb/cvframe.cpp b/cvpcb/cvframe.cpp index 595070a6f5..c93d07daab 100644 --- a/cvpcb/cvframe.cpp +++ b/cvpcb/cvframe.cpp @@ -321,7 +321,7 @@ void CVPCB_MAINFRAME::OnChar( wxKeyEvent& event ) case WXK_RIGHT: case WXK_NUMPAD_RIGHT: - m_FootprintList->SetFocus();; + m_FootprintList->SetFocus(); break; default: diff --git a/eeschema/block.cpp b/eeschema/block.cpp index 4c638315af..785ce3415f 100644 --- a/eeschema/block.cpp +++ b/eeschema/block.cpp @@ -491,7 +491,7 @@ static void DrawMovingBlockOutlines( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wx bool aErase ) { BASE_SCREEN* screen = aPanel->GetScreen(); - BLOCK_SELECTOR* block = &screen->m_BlockLocate;; + BLOCK_SELECTOR* block = &screen->m_BlockLocate; SCH_ITEM* schitem; /* Erase old block contents. */ diff --git a/eeschema/busentry.cpp b/eeschema/busentry.cpp index c35b767fd1..3963f03eea 100644 --- a/eeschema/busentry.cpp +++ b/eeschema/busentry.cpp @@ -74,7 +74,7 @@ SCH_BUS_ENTRY* SCH_EDIT_FRAME::CreateBusEntry( wxDC* DC, int entry_type ) SCH_BUS_ENTRY* BusEntry = new SCH_BUS_ENTRY( GetScreen()->GetCrossHairPosition(), s_LastShape, entry_type ); BusEntry->m_Flags = IS_NEW; - BusEntry->Place( this, DC );; + BusEntry->Place( this, DC ); OnModify(); return BusEntry; } diff --git a/eeschema/class_library.cpp b/eeschema/class_library.cpp index ba9f60d6a1..c1854ac6ff 100644 --- a/eeschema/class_library.cpp +++ b/eeschema/class_library.cpp @@ -636,7 +636,7 @@ bool CMP_LIBRARY::LoadDocs( wxString& aErrorMsg ) { if( strncmp( line, "$ENDCMP", 7 ) == 0 ) break; - text = strtok( line + 2, "\n\r" );; + text = strtok( line + 2, "\n\r" ); if( entry ) { diff --git a/eeschema/netlist.cpp b/eeschema/netlist.cpp index e6b9b489e1..f7efa9f31c 100644 --- a/eeschema/netlist.cpp +++ b/eeschema/netlist.cpp @@ -225,7 +225,7 @@ void SCH_EDIT_FRAME::BuildNetListBase() /* Updating the Bus Labels Netcode connected by Bus */ ConnectBusLabels( g_NetObjectslist ); - activity << wxT( ", " ) << _( "bus labels" ) << wxT( "..." );; + activity << wxT( ", " ) << _( "bus labels" ) << wxT( "..." ); SetStatusText( activity ); /* Group objects by label. */ @@ -804,7 +804,7 @@ int IsBusLabel( const wxString& LabelDrawList ) } if( !BufLine.ToLong( &tmp ) ) - error = TRUE; + error = true; FirstNumWireBus = tmp; while( LabelDrawList[Num] == '.' && Num < LabelDrawList.Len() ) @@ -818,7 +818,7 @@ int IsBusLabel( const wxString& LabelDrawList ) } if( !BufLine.ToLong( &tmp ) ) - error = TRUE;; + error = true; LastNumWireBus = tmp; if( FirstNumWireBus < 0 ) diff --git a/eeschema/plot.cpp b/eeschema/plot.cpp index 031bba993d..82c7c0c327 100644 --- a/eeschema/plot.cpp +++ b/eeschema/plot.cpp @@ -52,7 +52,7 @@ static void PlotLibPart( PLOTTER* plotter, SCH_COMPONENT* DrawLibItem ) Entry = CMP_LIBRARY::FindLibraryComponent( DrawLibItem->GetLibName() ); if( Entry == NULL ) - return;; + return; temp = DrawLibItem->GetTransform(); diff --git a/eeschema/sch_text.cpp b/eeschema/sch_text.cpp index 5f8057f830..f49281454e 100644 --- a/eeschema/sch_text.cpp +++ b/eeschema/sch_text.cpp @@ -479,7 +479,7 @@ bool SCH_TEXT::Load( LINE_READER& aLine, wxString& aErrorMsg ) } wxString val = FROM_UTF8( text ); - for( ;; ) + for( ; ; ) { int i = val.find( wxT( "\\n" ) ); diff --git a/gerbview/dcode.cpp b/gerbview/dcode.cpp index c690e4c4cc..efe76e8a6b 100644 --- a/gerbview/dcode.cpp +++ b/gerbview/dcode.cpp @@ -488,7 +488,7 @@ static void addHoleToPolygon( std::vector& aBuffer, void D_CODE::ConvertShapeToPolygon() { wxPoint initialpos; - wxPoint currpos;; + wxPoint currpos; m_PolyCorners.clear(); diff --git a/include/wxPcbStruct.h b/include/wxPcbStruct.h index defac2a734..60b579499b 100644 --- a/include/wxPcbStruct.h +++ b/include/wxPcbStruct.h @@ -167,6 +167,7 @@ public: void OnUpdateTraceDrawMode( wxUpdateUIEvent& aEvent ); void OnUpdateHighContrastDisplayMode( wxUpdateUIEvent& aEvent ); void OnUpdateShowLayerManager( wxUpdateUIEvent& aEvent ); + void OnUpdateShowMicrowaveToolbar( wxUpdateUIEvent& aEvent ); void OnUpdateVerticalToolbar( wxUpdateUIEvent& aEvent ); void OnUpdateSelectViaSize( wxUpdateUIEvent& aEvent ); void OnUpdateZoneDisplayStyle( wxUpdateUIEvent& aEvent ); @@ -215,7 +216,7 @@ public: virtual void SetGridColor(int aColor); // Configurations: - void InstallConfigFrame( const wxPoint& pos ); + void InstallConfigFrame( ); void Process_Config( wxCommandEvent& event ); PARAM_CFG_ARRAY& GetProjectFileParameters(); diff --git a/pcbnew/board_items_to_polygon_shape_transform.cpp b/pcbnew/board_items_to_polygon_shape_transform.cpp index a43148b2bc..c0968abf19 100644 --- a/pcbnew/board_items_to_polygon_shape_transform.cpp +++ b/pcbnew/board_items_to_polygon_shape_transform.cpp @@ -808,7 +808,7 @@ void CreateThermalReliefPadPolygon( std::vector& aCornerBuffer, aCornerBuffer.push_back( CPolyPt( cpos.x, cpos.y ) ); } - aCornerBuffer.back().end_contour = true;; + aCornerBuffer.back().end_contour = true; angle += 1800; // this is calculate hole 3 if( angle >= 3600 ) angle -= 3600; diff --git a/pcbnew/build_BOM_from_board.cpp b/pcbnew/build_BOM_from_board.cpp index 6bc7562271..de46aa7ab8 100644 --- a/pcbnew/build_BOM_from_board.cpp +++ b/pcbnew/build_BOM_from_board.cpp @@ -12,21 +12,21 @@ #include /* creates a BOM list rom board -The format is: -"Id";"Designator";"Package";"Number";"Designation";"Supplier and ref"; -1;"P1";"DB25FC";1;"DB25FEMELLE";;; -2;"U9";"PGA120";1;"4003APG120";;; -3;"JP1";"pin_array_8x2";1;"CONN_8X2";;; -4;"RR1";"r_pack9";1;"9x1K";;; -5;"X1";"HC-18UH";1;"8MHz";;; -6;"U8";"24dip300";1;"EP600";;; -7;"U5";"32dip600";1;"628128";;; -8;"C2,C3";"C1";2;"47pF";;; -9;"U1";"20dip300";1;"74LS245";;; -10;"U3";"20dip300";1;"74LS541";;; -11;"U2";"20dip300";1;"74LS688";;; -12;"C1,C4,C5,C6";"CP6";4;"47uF";;; -*/ + * The format is: + * "Id";"Designator";"Package";"Number";"Designation";"Supplier and ref"; + * 1;"P1";"DB25FC";1;"DB25FEMELLE";;; + * 2;"U9";"PGA120";1;"4003APG120";;; + * 3;"JP1";"pin_array_8x2";1;"CONN_8X2";;; + * 4;"RR1";"r_pack9";1;"9x1K";;; + * 5;"X1";"HC-18UH";1;"8MHz";;; + * 6;"U8";"24dip300";1;"EP600";;; + * 7;"U5";"32dip600";1;"628128";;; + * 8;"C2,C3";"C1";2;"47pF";;; + * 9;"U1";"20dip300";1;"74LS245";;; + * 10;"U3";"20dip300";1;"74LS541";;; + * 11;"U2";"20dip300";1;"74LS688";;; + * 12;"C1,C4,C5,C6";"CP6";4;"47uF";;; + */ const wxString CsvFileExtension( wxT( "csv" ) ); // BOM file extension @@ -83,13 +83,13 @@ void PCB_EDIT_FRAME::RecreateBOMFileFromBoard( wxCommandEvent& aEvent ) } // Write header: - msg = wxT( "\""); - msg << _("Id") << wxT("\";\""); - msg << _("Designator") << wxT("\";\""); - msg << _("Package") << wxT("\";\""); - msg << _("Quantity") << wxT("\";\""); - msg << _("Designation") << wxT("\";\""); - msg << _("Supplier and ref") << wxT("\";\n" ); + msg = wxT( "\"" ); + msg << _( "Id" ) << wxT( "\";\"" ); + msg << _( "Designator" ) << wxT( "\";\"" ); + msg << _( "Package" ) << wxT( "\";\"" ); + msg << _( "Quantity" ) << wxT( "\";\"" ); + msg << _( "Designation" ) << wxT( "\";\"" ); + msg << _( "Supplier and ref" ) << wxT( "\";\n" ); fprintf( FichBom, "%s", TO_UTF8( msg ) ); // Build list @@ -97,7 +97,7 @@ void PCB_EDIT_FRAME::RecreateBOMFileFromBoard( wxCommandEvent& aEvent ) cmp* comp = NULL; CmpList::iterator iter; int i = 1; - while (Module != NULL) + while( Module != NULL ) { bool valExist = false; @@ -119,11 +119,11 @@ void PCB_EDIT_FRAME::RecreateBOMFileFromBoard( wxCommandEvent& aEvent ) // If component does not exist yet, create new one and append it to the list. if( valExist == false ) { - comp = new cmp(); - comp->m_Id = i++; - comp->m_Val = Module->m_Value->m_Text; - comp->m_Ref = Module->m_Reference->m_Text; - comp->m_Pkg = Module->m_LibRef; + comp = new cmp(); + comp->m_Id = i++; + comp->m_Val = Module->m_Value->m_Text; + comp->m_Ref = Module->m_Reference->m_Text; + comp->m_Pkg = Module->m_LibRef; comp->m_CmpCount = 1; list.Append( comp ); } diff --git a/pcbnew/class_board_item.cpp b/pcbnew/class_board_item.cpp index 25c8d3e6b0..532f76d780 100644 --- a/pcbnew/class_board_item.cpp +++ b/pcbnew/class_board_item.cpp @@ -75,7 +75,7 @@ wxString BOARD_ITEM::MenuText( const BOARD* aPcb ) const break; case TYPE_TEXTE: - text << _( "Pcb Text" ) << wxT( " " );; + text << _( "Pcb Text" ) << wxT( " " ); if( ( (TEXTE_PCB*) item )->m_Text.Len() < 12 ) text << ( (TEXTE_PCB*) item )->m_Text; else diff --git a/pcbnew/class_module.cpp b/pcbnew/class_module.cpp index ba84e9d045..65a2ef7686 100644 --- a/pcbnew/class_module.cpp +++ b/pcbnew/class_module.cpp @@ -755,7 +755,7 @@ void MODULE::SetRectangleExinscrit() */ EDA_Rect MODULE::GetBoundingBox() const { - EDA_Rect area = GetFootPrintRect();; + EDA_Rect area = GetFootPrintRect(); // Calculate extended area including text field: EDA_Rect text_area; diff --git a/pcbnew/dialogs/dialog_display_options.cpp b/pcbnew/dialogs/dialog_display_options.cpp index 5065ae2e83..2b37746b3f 100644 --- a/pcbnew/dialogs/dialog_display_options.cpp +++ b/pcbnew/dialogs/dialog_display_options.cpp @@ -20,32 +20,33 @@ void PCB_EDIT_FRAME::InstallDisplayOptionsDialog( wxCommandEvent& aEvent ) { - Dialog_Display_Options* DisplayOptionsDialog = - new Dialog_Display_Options( this ); - - DisplayOptionsDialog->ShowModal(); - DisplayOptionsDialog->Destroy(); + DIALOG_DISPLAY_OPTIONS dlg( this ); + dlg.ShowModal(); } /*******************************************************************************/ -Dialog_Display_Options::Dialog_Display_Options( PCB_EDIT_FRAME* parent ) : - DialogDisplayOptions_base(parent) +DIALOG_DISPLAY_OPTIONS::DIALOG_DISPLAY_OPTIONS( PCB_EDIT_FRAME* parent ) : + DIALOG_DISPLAY_OPTIONS_BASE(parent) /*******************************************************************************/ { m_Parent = parent; init(); + + GetSizer()->SetSizeHints( this ); } /****************************************************************/ -void Dialog_Display_Options::init() +void DIALOG_DISPLAY_OPTIONS::init() /****************************************************************/ { SetFocus(); if ( DisplayOpt.DisplayPcbTrackFill ) m_OptDisplayTracks->SetSelection(1); + else + m_OptDisplayTracks->SetSelection(0); switch ( DisplayOpt.ShowTrackClearanceMode ) { @@ -84,31 +85,26 @@ void Dialog_Display_Options::init() m_OptDisplayPadNoConn->SetValue( m_Parent->IsElementVisible( PCB_VISIBLE(NO_CONNECTS_VISIBLE) ) ); m_OptDisplayDrawings->SetSelection( DisplayOpt.DisplayDrawItems ); m_ShowNetNamesOption->SetSelection( DisplayOpt.DisplayNetNamesMode); - - if( GetSizer() ) - { - GetSizer()->SetSizeHints( this ); - } } /*****************************************************************/ -void Dialog_Display_Options::OnCancelClick( wxCommandEvent& event ) +void DIALOG_DISPLAY_OPTIONS::OnCancelClick( wxCommandEvent& event ) /*****************************************************************/ { - event.Skip(); + EndModal(0); } /*************************************************************************/ -void Dialog_Display_Options::OnOkClick(wxCommandEvent& event) +void DIALOG_DISPLAY_OPTIONS::OnOkClick(wxCommandEvent& event) /*************************************************************************/ /* Update variables with new options */ { - if ( m_Show_Page_Limits->GetSelection() == 0 ) g_ShowPageLimits = TRUE; + if ( m_Show_Page_Limits->GetSelection() == 0 ) g_ShowPageLimits = true; else g_ShowPageLimits = FALSE; if ( m_OptDisplayTracks->GetSelection() == 1) - DisplayOpt.DisplayPcbTrackFill = TRUE; + DisplayOpt.DisplayPcbTrackFill = true; else DisplayOpt.DisplayPcbTrackFill = FALSE; m_Parent->m_DisplayPcbTrackFill = DisplayOpt.DisplayPcbTrackFill; @@ -158,7 +154,7 @@ void Dialog_Display_Options::OnOkClick(wxCommandEvent& event) DisplayOpt.DisplayDrawItems = m_OptDisplayDrawings->GetSelection(); DisplayOpt.DisplayNetNamesMode = m_ShowNetNamesOption->GetSelection(); - m_Parent->DrawPanel->Refresh(TRUE); + m_Parent->DrawPanel->Refresh(); EndModal(1); } diff --git a/pcbnew/dialogs/dialog_display_options.h b/pcbnew/dialogs/dialog_display_options.h index 20b82e5ee6..06952d90be 100644 --- a/pcbnew/dialogs/dialog_display_options.h +++ b/pcbnew/dialogs/dialog_display_options.h @@ -3,7 +3,7 @@ */ #include "dialog_display_options_base.h" -class Dialog_Display_Options : public DialogDisplayOptions_base +class DIALOG_DISPLAY_OPTIONS : public DIALOG_DISPLAY_OPTIONS_BASE { private: PCB_EDIT_FRAME* m_Parent; @@ -11,8 +11,8 @@ private: void init(); public: - Dialog_Display_Options( PCB_EDIT_FRAME* parent ); - ~Dialog_Display_Options( ) { }; + DIALOG_DISPLAY_OPTIONS( PCB_EDIT_FRAME* parent ); + ~DIALOG_DISPLAY_OPTIONS( ) { }; void OnOkClick( wxCommandEvent& event ); void OnCancelClick( wxCommandEvent& event ); }; diff --git a/pcbnew/dialogs/dialog_display_options_base.cpp b/pcbnew/dialogs/dialog_display_options_base.cpp index 5ce38f177b..d615b180ad 100644 --- a/pcbnew/dialogs/dialog_display_options_base.cpp +++ b/pcbnew/dialogs/dialog_display_options_base.cpp @@ -1,158 +1,156 @@ -/////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Apr 16 2008) -// http://www.wxformbuilder.org/ -// -// PLEASE DO "NOT" EDIT THIS FILE! -/////////////////////////////////////////////////////////////////////////// - -#include "dialog_display_options_base.h" - -/////////////////////////////////////////////////////////////////////////// - -DialogDisplayOptions_base::DialogDisplayOptions_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 ); - - wxStaticBoxSizer* sLeftBoxSizer; - sLeftBoxSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Tracks and vias:") ), wxVERTICAL ); - - wxString m_OptDisplayTracksChoices[] = { _("Sketch"), _("Filled") }; - int m_OptDisplayTracksNChoices = sizeof( m_OptDisplayTracksChoices ) / sizeof( wxString ); - m_OptDisplayTracks = new wxRadioBox( this, wxID_DISPLAY_TRACK, _("Tracks:"), wxDefaultPosition, wxDefaultSize, m_OptDisplayTracksNChoices, m_OptDisplayTracksChoices, 1, wxRA_SPECIFY_COLS ); - m_OptDisplayTracks->SetSelection( 1 ); - m_OptDisplayTracks->SetToolTip( _("Select how tracks are displayed") ); - - sLeftBoxSizer->Add( m_OptDisplayTracks, 0, wxALL|wxEXPAND, 5 ); - - wxString m_OptDisplayTracksClearanceChoices[] = { _("Never"), _("New track"), _("New track with via area"), _("Always") }; - int m_OptDisplayTracksClearanceNChoices = sizeof( m_OptDisplayTracksClearanceChoices ) / sizeof( wxString ); - m_OptDisplayTracksClearance = new wxRadioBox( this, ID_SHOW_CLEARANCE, _("Show Tracks Clearance:"), wxDefaultPosition, wxDefaultSize, m_OptDisplayTracksClearanceNChoices, m_OptDisplayTracksClearanceChoices, 1, wxRA_SPECIFY_COLS ); - m_OptDisplayTracksClearance->SetSelection( 0 ); - m_OptDisplayTracksClearance->SetToolTip( _("Show( or not) tracks clearance area.\nIf New track is selected, track clearance area is shown only when creating the track.") ); - - sLeftBoxSizer->Add( m_OptDisplayTracksClearance, 0, wxALL|wxEXPAND, 5 ); - - wxString m_OptDisplayViaHoleChoices[] = { _("Never"), _("Defined holes"), _("Always") }; - int m_OptDisplayViaHoleNChoices = sizeof( m_OptDisplayViaHoleChoices ) / sizeof( wxString ); - m_OptDisplayViaHole = new wxRadioBox( this, ID_VIAS_HOLES, _("Show Via Holes:"), wxDefaultPosition, wxDefaultSize, m_OptDisplayViaHoleNChoices, m_OptDisplayViaHoleChoices, 1, wxRA_SPECIFY_COLS ); - m_OptDisplayViaHole->SetSelection( 1 ); - m_OptDisplayViaHole->SetToolTip( _("Show (or not) via holes.\nIf Defined Holes is selected, only the non default size holes are shown") ); - - sLeftBoxSizer->Add( m_OptDisplayViaHole, 0, wxALL|wxEXPAND, 5 ); - - bMainSizer->Add( sLeftBoxSizer, 0, wxEXPAND|wxALL, 5 ); - - wxStaticBoxSizer* sbMiddleLeftSizer; - sbMiddleLeftSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Net Names:") ), wxVERTICAL ); - - wxString m_ShowNetNamesOptionChoices[] = { _("Do not show"), _("On pads"), _("On tracks"), _("On pads and tracks") }; - int m_ShowNetNamesOptionNChoices = sizeof( m_ShowNetNamesOptionChoices ) / sizeof( wxString ); - m_ShowNetNamesOption = new wxRadioBox( this, wxID_ANY, _("Show Net Names:"), wxDefaultPosition, wxDefaultSize, m_ShowNetNamesOptionNChoices, m_ShowNetNamesOptionChoices, 1, wxRA_SPECIFY_COLS ); - m_ShowNetNamesOption->SetSelection( 3 ); - m_ShowNetNamesOption->SetToolTip( _("Show or not net names on pads and/or tracks") ); - - sbMiddleLeftSizer->Add( m_ShowNetNamesOption, 0, wxALL, 5 ); - - bMainSizer->Add( sbMiddleLeftSizer, 0, wxALL|wxEXPAND, 5 ); - - wxStaticBoxSizer* sMiddleRightSizer; - sMiddleRightSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Footprints:") ), wxHORIZONTAL ); - - wxBoxSizer* bLModuleSizer; - bLModuleSizer = new wxBoxSizer( wxVERTICAL ); - - wxString m_OptDisplayModEdgesChoices[] = { _("Line"), _("Filled"), _("Sketch") }; - int m_OptDisplayModEdgesNChoices = sizeof( m_OptDisplayModEdgesChoices ) / sizeof( wxString ); - m_OptDisplayModEdges = new wxRadioBox( this, ID_EDGES_MODULES, _("Module Edges:"), wxDefaultPosition, wxDefaultSize, m_OptDisplayModEdgesNChoices, m_OptDisplayModEdgesChoices, 1, wxRA_SPECIFY_COLS ); - m_OptDisplayModEdges->SetSelection( 1 ); - bLModuleSizer->Add( m_OptDisplayModEdges, 0, wxALL|wxEXPAND, 5 ); - - wxString m_OptDisplayModTextsChoices[] = { _("Line"), _("Filled"), _("Sketch") }; - int m_OptDisplayModTextsNChoices = sizeof( m_OptDisplayModTextsChoices ) / sizeof( wxString ); - m_OptDisplayModTexts = new wxRadioBox( this, ID_TEXT_MODULES, _("Texts:"), wxDefaultPosition, wxDefaultSize, m_OptDisplayModTextsNChoices, m_OptDisplayModTextsChoices, 1, wxRA_SPECIFY_COLS ); - m_OptDisplayModTexts->SetSelection( 1 ); - bLModuleSizer->Add( m_OptDisplayModTexts, 0, wxALL|wxEXPAND, 5 ); - - sMiddleRightSizer->Add( bLModuleSizer, 0, 0, 5 ); - - wxStaticBoxSizer* bRModuleSizer; - bRModuleSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Pad Options:") ), wxVERTICAL ); - - wxString m_OptDisplayPadsChoices[] = { _("Sketch"), _("Filled") }; - int m_OptDisplayPadsNChoices = sizeof( m_OptDisplayPadsChoices ) / sizeof( wxString ); - m_OptDisplayPads = new wxRadioBox( this, ID_PADS_SHAPES, _("Pad Shapes:"), wxDefaultPosition, wxDefaultSize, m_OptDisplayPadsNChoices, m_OptDisplayPadsChoices, 1, wxRA_SPECIFY_COLS ); - m_OptDisplayPads->SetSelection( 1 ); - bRModuleSizer->Add( m_OptDisplayPads, 0, wxALL|wxEXPAND, 5 ); - - wxString m_OptDisplayViasChoices[] = { _("Sketch"), _("Filled") }; - int m_OptDisplayViasNChoices = sizeof( m_OptDisplayViasChoices ) / sizeof( wxString ); - m_OptDisplayVias = new wxRadioBox( this, ID_VIAS_SHAPES, _("Via Shapes:"), wxDefaultPosition, wxDefaultSize, m_OptDisplayViasNChoices, m_OptDisplayViasChoices, 1, wxRA_SPECIFY_COLS ); - m_OptDisplayVias->SetSelection( 1 ); - bRModuleSizer->Add( m_OptDisplayVias, 0, wxALL|wxEXPAND, 5 ); - - m_OptDisplayPadClearence = new wxCheckBox( this, wxID_ANY, _("Show pad clearance"), wxDefaultPosition, wxDefaultSize, 0 ); - - bRModuleSizer->Add( m_OptDisplayPadClearence, 0, wxALL, 5 ); - - m_OptDisplayPadNumber = new wxCheckBox( this, wxID_ANY, _("Show pad number"), wxDefaultPosition, wxDefaultSize, 0 ); - m_OptDisplayPadNumber->SetValue(true); - - bRModuleSizer->Add( m_OptDisplayPadNumber, 0, wxALL, 5 ); - - m_OptDisplayPadNoConn = new wxCheckBox( this, wxID_ANY, _("Show pad NoConnect"), wxDefaultPosition, wxDefaultSize, 0 ); - m_OptDisplayPadNoConn->SetValue(true); - - bRModuleSizer->Add( m_OptDisplayPadNoConn, 0, wxALL, 5 ); - - sMiddleRightSizer->Add( bRModuleSizer, 0, 0, 5 ); - - bMainSizer->Add( sMiddleRightSizer, 0, wxEXPAND|wxALL, 5 ); - - wxBoxSizer* bRightSizer; - bRightSizer = new wxBoxSizer( wxVERTICAL ); - - wxStaticBoxSizer* sRightUpperSizer; - sRightUpperSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Others:") ), wxVERTICAL ); - - wxString m_OptDisplayDrawingsChoices[] = { _("Line"), _("Filled"), _("Sketch") }; - int m_OptDisplayDrawingsNChoices = sizeof( m_OptDisplayDrawingsChoices ) / sizeof( wxString ); - m_OptDisplayDrawings = new wxRadioBox( this, wxID_ANY, _("Display other items:"), wxDefaultPosition, wxDefaultSize, m_OptDisplayDrawingsNChoices, m_OptDisplayDrawingsChoices, 1, wxRA_SPECIFY_COLS ); - m_OptDisplayDrawings->SetSelection( 1 ); - sRightUpperSizer->Add( m_OptDisplayDrawings, 0, wxALL|wxEXPAND, 5 ); - - wxString m_Show_Page_LimitsChoices[] = { _("Yes"), _("No") }; - int m_Show_Page_LimitsNChoices = sizeof( m_Show_Page_LimitsChoices ) / sizeof( wxString ); - m_Show_Page_Limits = new wxRadioBox( this, wxID_ANY, _("Show page limits"), wxDefaultPosition, wxDefaultSize, m_Show_Page_LimitsNChoices, m_Show_Page_LimitsChoices, 1, wxRA_SPECIFY_COLS ); - m_Show_Page_Limits->SetSelection( 0 ); - sRightUpperSizer->Add( m_Show_Page_Limits, 0, wxALL|wxEXPAND, 5 ); - - bRightSizer->Add( sRightUpperSizer, 1, wxEXPAND, 5 ); - - - bRightSizer->Add( 10, 10, 0, 0, 5 ); - - m_buttonOK = new wxButton( this, wxID_OK, _("OK"), wxDefaultPosition, wxDefaultSize, 0 ); - bRightSizer->Add( m_buttonOK, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 ); - - m_buttonCANCEL = new wxButton( this, wxID_CANCEL, _("Cancel"), wxDefaultPosition, wxDefaultSize, 0 ); - bRightSizer->Add( m_buttonCANCEL, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 ); - - bMainSizer->Add( bRightSizer, 0, wxEXPAND|wxALL, 5 ); - - this->SetSizer( bMainSizer ); - this->Layout(); - - // Connect Events - m_buttonOK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DialogDisplayOptions_base::OnOkClick ), NULL, this ); - m_buttonCANCEL->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DialogDisplayOptions_base::OnCancelClick ), NULL, this ); -} - -DialogDisplayOptions_base::~DialogDisplayOptions_base() -{ - // Disconnect Events - m_buttonOK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DialogDisplayOptions_base::OnOkClick ), NULL, this ); - m_buttonCANCEL->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DialogDisplayOptions_base::OnCancelClick ), NULL, this ); -} +/////////////////////////////////////////////////////////////////////////// +// C++ code generated with wxFormBuilder (version Nov 17 2010) +// http://www.wxformbuilder.org/ +// +// PLEASE DO "NOT" EDIT THIS FILE! +/////////////////////////////////////////////////////////////////////////// + +#include "dialog_display_options_base.h" + +/////////////////////////////////////////////////////////////////////////// + +DIALOG_DISPLAY_OPTIONS_BASE::DIALOG_DISPLAY_OPTIONS_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 ); + + wxStaticBoxSizer* sLeftBoxSizer; + sLeftBoxSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Tracks and vias:") ), wxVERTICAL ); + + wxString m_OptDisplayTracksChoices[] = { _("Sketch"), _("Filled") }; + int m_OptDisplayTracksNChoices = sizeof( m_OptDisplayTracksChoices ) / sizeof( wxString ); + m_OptDisplayTracks = new wxRadioBox( this, wxID_DISPLAY_TRACK, _("Tracks:"), wxDefaultPosition, wxDefaultSize, m_OptDisplayTracksNChoices, m_OptDisplayTracksChoices, 1, wxRA_SPECIFY_COLS ); + m_OptDisplayTracks->SetSelection( 1 ); + m_OptDisplayTracks->SetToolTip( _("Select how tracks are displayed") ); + + sLeftBoxSizer->Add( m_OptDisplayTracks, 0, wxALL|wxEXPAND, 5 ); + + wxString m_OptDisplayViasChoices[] = { _("Sketch"), _("Filled") }; + int m_OptDisplayViasNChoices = sizeof( m_OptDisplayViasChoices ) / sizeof( wxString ); + m_OptDisplayVias = new wxRadioBox( this, ID_VIAS_SHAPES, _("Via Shapes:"), wxDefaultPosition, wxDefaultSize, m_OptDisplayViasNChoices, m_OptDisplayViasChoices, 1, wxRA_SPECIFY_COLS ); + m_OptDisplayVias->SetSelection( 1 ); + sLeftBoxSizer->Add( m_OptDisplayVias, 0, wxALL|wxEXPAND, 5 ); + + wxString m_OptDisplayViaHoleChoices[] = { _("Never"), _("Defined holes"), _("Always") }; + int m_OptDisplayViaHoleNChoices = sizeof( m_OptDisplayViaHoleChoices ) / sizeof( wxString ); + m_OptDisplayViaHole = new wxRadioBox( this, ID_VIAS_HOLES, _("Show Via Holes:"), wxDefaultPosition, wxDefaultSize, m_OptDisplayViaHoleNChoices, m_OptDisplayViaHoleChoices, 1, wxRA_SPECIFY_COLS ); + m_OptDisplayViaHole->SetSelection( 1 ); + m_OptDisplayViaHole->SetToolTip( _("Show (or not) via holes.\nIf Defined Holes is selected, only the non default size holes are shown") ); + + sLeftBoxSizer->Add( m_OptDisplayViaHole, 0, wxALL|wxEXPAND, 5 ); + + bMainSizer->Add( sLeftBoxSizer, 0, wxEXPAND|wxALL, 5 ); + + wxStaticBoxSizer* sbMiddleLeftSizer; + sbMiddleLeftSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Routing help:") ), wxVERTICAL ); + + wxString m_ShowNetNamesOptionChoices[] = { _("Do not show"), _("On pads"), _("On tracks"), _("On pads and tracks") }; + int m_ShowNetNamesOptionNChoices = sizeof( m_ShowNetNamesOptionChoices ) / sizeof( wxString ); + m_ShowNetNamesOption = new wxRadioBox( this, wxID_ANY, _("Show Net Names:"), wxDefaultPosition, wxDefaultSize, m_ShowNetNamesOptionNChoices, m_ShowNetNamesOptionChoices, 1, wxRA_SPECIFY_COLS ); + m_ShowNetNamesOption->SetSelection( 3 ); + m_ShowNetNamesOption->SetToolTip( _("Show or not net names on pads and/or tracks") ); + + sbMiddleLeftSizer->Add( m_ShowNetNamesOption, 0, wxALL, 5 ); + + wxString m_OptDisplayTracksClearanceChoices[] = { _("Never"), _("New track"), _("New track with via area"), _("Always") }; + int m_OptDisplayTracksClearanceNChoices = sizeof( m_OptDisplayTracksClearanceChoices ) / sizeof( wxString ); + m_OptDisplayTracksClearance = new wxRadioBox( this, ID_SHOW_CLEARANCE, _("Show Tracks Clearance:"), wxDefaultPosition, wxDefaultSize, m_OptDisplayTracksClearanceNChoices, m_OptDisplayTracksClearanceChoices, 1, wxRA_SPECIFY_COLS ); + m_OptDisplayTracksClearance->SetSelection( 0 ); + m_OptDisplayTracksClearance->SetToolTip( _("Show( or not) tracks clearance area.\nIf New track is selected, track clearance area is shown only when creating the track.") ); + + sbMiddleLeftSizer->Add( m_OptDisplayTracksClearance, 0, wxALL|wxEXPAND, 5 ); + + bMainSizer->Add( sbMiddleLeftSizer, 0, wxALL|wxEXPAND, 5 ); + + wxStaticBoxSizer* sMiddleRightSizer; + sMiddleRightSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Footprints:") ), wxHORIZONTAL ); + + wxBoxSizer* bLModuleSizer; + bLModuleSizer = new wxBoxSizer( wxVERTICAL ); + + wxString m_OptDisplayModEdgesChoices[] = { _("Line"), _("Filled"), _("Sketch") }; + int m_OptDisplayModEdgesNChoices = sizeof( m_OptDisplayModEdgesChoices ) / sizeof( wxString ); + m_OptDisplayModEdges = new wxRadioBox( this, ID_EDGES_MODULES, _("Module Edges:"), wxDefaultPosition, wxDefaultSize, m_OptDisplayModEdgesNChoices, m_OptDisplayModEdgesChoices, 1, wxRA_SPECIFY_COLS ); + m_OptDisplayModEdges->SetSelection( 1 ); + bLModuleSizer->Add( m_OptDisplayModEdges, 0, wxALL|wxEXPAND, 5 ); + + wxString m_OptDisplayModTextsChoices[] = { _("Line"), _("Filled"), _("Sketch") }; + int m_OptDisplayModTextsNChoices = sizeof( m_OptDisplayModTextsChoices ) / sizeof( wxString ); + m_OptDisplayModTexts = new wxRadioBox( this, ID_TEXT_MODULES, _("Texts:"), wxDefaultPosition, wxDefaultSize, m_OptDisplayModTextsNChoices, m_OptDisplayModTextsChoices, 1, wxRA_SPECIFY_COLS ); + m_OptDisplayModTexts->SetSelection( 1 ); + bLModuleSizer->Add( m_OptDisplayModTexts, 0, wxALL|wxEXPAND, 5 ); + + sMiddleRightSizer->Add( bLModuleSizer, 0, 0, 5 ); + + wxStaticBoxSizer* bRModuleSizer; + bRModuleSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Pad Options:") ), wxVERTICAL ); + + wxString m_OptDisplayPadsChoices[] = { _("Sketch"), _("Filled") }; + int m_OptDisplayPadsNChoices = sizeof( m_OptDisplayPadsChoices ) / sizeof( wxString ); + m_OptDisplayPads = new wxRadioBox( this, ID_PADS_SHAPES, _("Pad Shapes:"), wxDefaultPosition, wxDefaultSize, m_OptDisplayPadsNChoices, m_OptDisplayPadsChoices, 1, wxRA_SPECIFY_COLS ); + m_OptDisplayPads->SetSelection( 1 ); + bRModuleSizer->Add( m_OptDisplayPads, 0, wxALL|wxEXPAND, 5 ); + + m_OptDisplayPadClearence = new wxCheckBox( this, wxID_ANY, _("Show pad clearance"), wxDefaultPosition, wxDefaultSize, 0 ); + bRModuleSizer->Add( m_OptDisplayPadClearence, 0, wxALL, 5 ); + + m_OptDisplayPadNumber = new wxCheckBox( this, wxID_ANY, _("Show pad number"), wxDefaultPosition, wxDefaultSize, 0 ); + m_OptDisplayPadNumber->SetValue(true); + bRModuleSizer->Add( m_OptDisplayPadNumber, 0, wxALL, 5 ); + + m_OptDisplayPadNoConn = new wxCheckBox( this, wxID_ANY, _("Show pad NoConnect"), wxDefaultPosition, wxDefaultSize, 0 ); + m_OptDisplayPadNoConn->SetValue(true); + bRModuleSizer->Add( m_OptDisplayPadNoConn, 0, wxALL, 5 ); + + sMiddleRightSizer->Add( bRModuleSizer, 0, 0, 5 ); + + bMainSizer->Add( sMiddleRightSizer, 0, wxEXPAND|wxALL, 5 ); + + wxBoxSizer* bRightSizer; + bRightSizer = new wxBoxSizer( wxVERTICAL ); + + wxStaticBoxSizer* sRightUpperSizer; + sRightUpperSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Others:") ), wxVERTICAL ); + + wxString m_OptDisplayDrawingsChoices[] = { _("Line"), _("Filled"), _("Sketch") }; + int m_OptDisplayDrawingsNChoices = sizeof( m_OptDisplayDrawingsChoices ) / sizeof( wxString ); + m_OptDisplayDrawings = new wxRadioBox( this, wxID_ANY, _("Display other items:"), wxDefaultPosition, wxDefaultSize, m_OptDisplayDrawingsNChoices, m_OptDisplayDrawingsChoices, 1, wxRA_SPECIFY_COLS ); + m_OptDisplayDrawings->SetSelection( 1 ); + sRightUpperSizer->Add( m_OptDisplayDrawings, 0, wxALL|wxEXPAND, 5 ); + + wxString m_Show_Page_LimitsChoices[] = { _("Yes"), _("No") }; + int m_Show_Page_LimitsNChoices = sizeof( m_Show_Page_LimitsChoices ) / sizeof( wxString ); + m_Show_Page_Limits = new wxRadioBox( this, wxID_ANY, _("Show page limits"), wxDefaultPosition, wxDefaultSize, m_Show_Page_LimitsNChoices, m_Show_Page_LimitsChoices, 1, wxRA_SPECIFY_COLS ); + m_Show_Page_Limits->SetSelection( 0 ); + sRightUpperSizer->Add( m_Show_Page_Limits, 0, wxALL|wxEXPAND, 5 ); + + bRightSizer->Add( sRightUpperSizer, 1, wxEXPAND, 5 ); + + + bRightSizer->Add( 10, 10, 0, 0, 5 ); + + m_buttonOK = new wxButton( this, wxID_OK, _("OK"), wxDefaultPosition, wxDefaultSize, 0 ); + bRightSizer->Add( m_buttonOK, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 ); + + m_buttonCANCEL = new wxButton( this, wxID_CANCEL, _("Cancel"), wxDefaultPosition, wxDefaultSize, 0 ); + bRightSizer->Add( m_buttonCANCEL, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 ); + + bMainSizer->Add( bRightSizer, 0, wxEXPAND|wxALL, 5 ); + + this->SetSizer( bMainSizer ); + this->Layout(); + + // Connect Events + m_buttonOK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_DISPLAY_OPTIONS_BASE::OnOkClick ), NULL, this ); + m_buttonCANCEL->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_DISPLAY_OPTIONS_BASE::OnCancelClick ), NULL, this ); +} + +DIALOG_DISPLAY_OPTIONS_BASE::~DIALOG_DISPLAY_OPTIONS_BASE() +{ + // Disconnect Events + m_buttonOK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_DISPLAY_OPTIONS_BASE::OnOkClick ), NULL, this ); + m_buttonCANCEL->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_DISPLAY_OPTIONS_BASE::OnCancelClick ), NULL, this ); + +} diff --git a/pcbnew/dialogs/dialog_display_options_base.fbp b/pcbnew/dialogs/dialog_display_options_base.fbp index c6cad95103..386fa1e56d 100644 --- a/pcbnew/dialogs/dialog_display_options_base.fbp +++ b/pcbnew/dialogs/dialog_display_options_base.fbp @@ -2,9 +2,11 @@ - + C++ 1 + source_name + 0 UTF-8 connect dialog_display_options_base @@ -12,66 +14,102 @@ none 1 DialogDisplayOptions_base - + . - + 1 + 1 1 0 - - - + 1 + 1 + 1 + 1 + 0 + + + + 1 + + 0 + 1 + + 1 + 0 + Dock + 0 + Left 1 - - - + impl_virtual + + + 1 + + 0 0 wxID_ANY - - - DialogDisplayOptions_base - - 731,331 + + 0 + + 0 + + 1 + DIALOG_DISPLAY_OPTIONS_BASE + 1 + + + 1 + + + Resizable + + 1 + 731,291 wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER - + Display options - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + bMainSizer wxHORIZONTAL none @@ -82,63 +120,96 @@ wxID_ANY Tracks and vias: - + sLeftBoxSizer wxVERTICAL none - + 5 wxALL|wxEXPAND 0 - + 1 + 1 + 1 + 1 + + + + 1 + 0 "Sketch" "Filled" - + 1 + + 1 + 0 + Dock + 0 + Left 1 - - + + 1 + + 0 0 wxID_DISPLAY_TRACK Tracks: + 1 - - + 0 + + 0 + + 1 m_OptDisplayTracks + 1 + + protected - + 1 + + + Resizable + 1 - + 1 + wxRA_SPECIFY_COLS - + + 0 Select how tracks are displayed - - - - - - - - - - - - - - - - - - - - - - - - - - - + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -146,53 +217,86 @@ wxALL|wxEXPAND 0 - - "Never" "New track" "New track with via area" "Always" - + 1 + 1 + 1 + 1 + + + + 1 + 0 + "Sketch" "Filled" + 1 + + 1 + 0 + Dock + 0 + Left 1 - - + + 1 + + 0 0 - ID_SHOW_CLEARANCE - Show Tracks Clearance: + ID_VIAS_SHAPES + Via Shapes: + 1 - - - m_OptDisplayTracksClearance + 0 + + 0 + + 1 + m_OptDisplayVias + 1 + + protected - - 0 - + 1 + + + Resizable + + 1 + 1 + wxRA_SPECIFY_COLS - - Show( or not) tracks clearance area. If New track is selected, track clearance area is shown only when creating the track. - - - - - - - - - - - - - - - - - - - - - - - - - - - + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -200,53 +304,86 @@ wxALL|wxEXPAND 0 - + 1 + 1 + 1 + 1 + + + + 1 + 0 "Never" "Defined holes" "Always" - + 1 + + 1 + 0 + Dock + 0 + Left 1 - - + + 1 + + 0 0 ID_VIAS_HOLES Show Via Holes: + 1 - - + 0 + + 0 + + 1 m_OptDisplayViaHole + 1 + + protected - + 1 + + + Resizable + 1 - + 1 + wxRA_SPECIFY_COLS - + + 0 Show (or not) via holes. If Defined Holes is selected, only the non default size holes are shown - - - - - - - - - - - - - - - - - - - - - - - - - - - + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -257,64 +394,184 @@ 0 wxID_ANY - Net Names: - + Routing help: + sbMiddleLeftSizer wxVERTICAL none - + 5 wxALL 0 - + 1 + 1 + 1 + 1 + + + + 1 + 0 "Do not show" "On pads" "On tracks" "On pads and tracks" - + 1 + + 1 + 0 + Dock + 0 + Left 1 - - + + 1 + + 0 0 wxID_ANY Show Net Names: + 1 - - + 0 + + 0 + + 1 m_ShowNetNamesOption + 1 + + protected - + 1 + + + Resizable + 3 - + 1 + wxRA_SPECIFY_COLS - + + 0 Show or not net names on pads and/or tracks - - - - - - - - - - - - - - - - - - - - - - - - - - - + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL|wxEXPAND + 0 + + 1 + 1 + 1 + 1 + + + + 1 + 0 + "Never" "New track" "New track with via area" "Always" + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + ID_SHOW_CLEARANCE + Show Tracks Clearance: + + 1 + 0 + + 0 + + 1 + m_OptDisplayTracksClearance + 1 + + + protected + 1 + + + Resizable + + 0 + 1 + + wxRA_SPECIFY_COLS + + 0 + Show( or not) tracks clearance area. If New track is selected, track clearance area is shown only when creating the track. + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -326,17 +583,17 @@ wxID_ANY Footprints: - + sMiddleRightSizer wxHORIZONTAL none - + 5 - + 0 - + bLModuleSizer wxVERTICAL none @@ -345,53 +602,86 @@ wxALL|wxEXPAND 0 - + 1 + 1 + 1 + 1 + + + + 1 + 0 "Line" "Filled" "Sketch" - + 1 + + 1 + 0 + Dock + 0 + Left 1 - - + + 1 + + 0 0 ID_EDGES_MODULES Module Edges: + 1 - - + 0 + + 0 + + 1 m_OptDisplayModEdges + 1 + + protected - + 1 + + + Resizable + 1 - + 1 + wxRA_SPECIFY_COLS - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -399,175 +689,187 @@ wxALL|wxEXPAND 0 - + 1 + 1 + 1 + 1 + + + + 1 + 0 "Line" "Filled" "Sketch" - + 1 + + 1 + 0 + Dock + 0 + Left 1 - - + + 1 + + 0 0 ID_TEXT_MODULES Texts: + 1 - - + 0 + + 0 + + 1 m_OptDisplayModTexts + 1 + + protected - + 1 + + + Resizable + 1 - + 1 + wxRA_SPECIFY_COLS - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 - + 0 wxID_ANY Pad Options: - + bRModuleSizer wxVERTICAL none - + 5 wxALL|wxEXPAND 0 - + 1 + 1 + 1 + 1 + + + + 1 + 0 "Sketch" "Filled" - + 1 + + 1 + 0 + Dock + 0 + Left 1 - - + + 1 + + 0 0 ID_PADS_SHAPES Pad Shapes: + 1 - - + 0 + + 0 + + 1 m_OptDisplayPads + 1 + + protected - + 1 + + + Resizable + 1 - + 1 + wxRA_SPECIFY_COLS - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxALL|wxEXPAND - 0 - - - "Sketch" "Filled" - - 1 - - - 0 - ID_VIAS_SHAPES - Via Shapes: - 1 - - - m_OptDisplayVias - protected - - 1 - - wxRA_SPECIFY_COLS - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -575,51 +877,84 @@ wxALL 0 - + 1 + 1 + 1 + 1 + + + + 1 + 0 0 - + 1 + + 1 + 0 + Dock + 0 + Left 1 - - + + 1 + + 0 0 wxID_ANY Show pad clearance - - + + 0 + + 0 + + 1 m_OptDisplayPadClearence + 1 + + protected - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + 1 + + + Resizable + + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -627,51 +962,84 @@ wxALL 0 - + 1 + 1 + 1 + 1 + + + + 1 + 0 1 - + 1 + + 1 + 0 + Dock + 0 + Left 1 - - + + 1 + + 0 0 wxID_ANY Show pad number - - + + 0 + + 0 + + 1 m_OptDisplayPadNumber + 1 + + protected - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + 1 + + + Resizable + + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -679,51 +1047,84 @@ wxALL 0 - + 1 + 1 + 1 + 1 + + + + 1 + 0 1 - + 1 + + 1 + 0 + Dock + 0 + Left 1 - - + + 1 + + 0 0 wxID_ANY Show pad NoConnect - - + + 0 + + 0 + + 1 m_OptDisplayPadNoConn + 1 + + protected - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + 1 + + + Resizable + + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -735,7 +1136,7 @@ wxEXPAND|wxALL 0 - + bRightSizer wxVERTICAL none @@ -746,63 +1147,96 @@ wxID_ANY Others: - + sRightUpperSizer wxVERTICAL none - + 5 wxALL|wxEXPAND 0 - + 1 + 1 + 1 + 1 + + + + 1 + 0 "Line" "Filled" "Sketch" - + 1 + + 1 + 0 + Dock + 0 + Left 1 - - + + 1 + + 0 0 wxID_ANY Display other items: + 1 - - + 0 + + 0 + + 1 m_OptDisplayDrawings + 1 + + protected - + 1 + + + Resizable + 1 - + 1 + wxRA_SPECIFY_COLS - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -810,60 +1244,93 @@ wxALL|wxEXPAND 0 - + 1 + 1 + 1 + 1 + + + + 1 + 0 "Yes" "No" - + 1 + + 1 + 0 + Dock + 0 + Left 1 - - + + 1 + + 0 0 wxID_ANY Show page limits + 1 - - + 0 + + 0 + + 1 m_Show_Page_Limits + 1 + + protected - + 1 + + + Resizable + 0 - + 1 + wxRA_SPECIFY_COLS - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 - + 0 10 @@ -876,51 +1343,84 @@ wxALL|wxALIGN_CENTER_HORIZONTAL|wxEXPAND 0 - - + 1 + 1 + 1 + 1 + + + + 1 + 0 + 1 + + 1 0 + 0 + Dock + 0 + Left 1 - - + + 1 + + 0 0 wxID_OK OK - - + + 0 + + 0 + + 1 m_buttonOK + 1 + + protected - - - - - - - - + 1 + + + Resizable + + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + OnOkClick - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + @@ -928,51 +1428,84 @@ wxALL|wxALIGN_CENTER_HORIZONTAL|wxEXPAND 0 - - + 1 + 1 + 1 + 1 + + + + 1 + 0 + 1 + + 1 0 + 0 + Dock + 0 + Left 1 - - + + 1 + + 0 0 wxID_CANCEL Cancel - - + + 0 + + 0 + + 1 m_buttonCANCEL + 1 + + protected - - - - - - - - + 1 + + + Resizable + + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + OnCancelClick - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + diff --git a/pcbnew/dialogs/dialog_display_options_base.h b/pcbnew/dialogs/dialog_display_options_base.h index 2ec311100e..0d03dd08f9 100644 --- a/pcbnew/dialogs/dialog_display_options_base.h +++ b/pcbnew/dialogs/dialog_display_options_base.h @@ -1,74 +1,75 @@ -/////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Apr 16 2008) -// http://www.wxformbuilder.org/ -// -// PLEASE DO "NOT" EDIT THIS FILE! -/////////////////////////////////////////////////////////////////////////// - -#ifndef __dialog_display_options_base__ -#define __dialog_display_options_base__ - -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -/////////////////////////////////////////////////////////////////////////// - -/////////////////////////////////////////////////////////////////////////////// -/// Class DialogDisplayOptions_base -/////////////////////////////////////////////////////////////////////////////// -class DialogDisplayOptions_base : public wxDialog -{ - private: - - protected: - enum - { - wxID_DISPLAY_TRACK = 1000, - ID_SHOW_CLEARANCE, - ID_VIAS_HOLES, - ID_EDGES_MODULES, - ID_TEXT_MODULES, - ID_PADS_SHAPES, - ID_VIAS_SHAPES, - }; - - wxRadioBox* m_OptDisplayTracks; - wxRadioBox* m_OptDisplayTracksClearance; - wxRadioBox* m_OptDisplayViaHole; - wxRadioBox* m_ShowNetNamesOption; - wxRadioBox* m_OptDisplayModEdges; - wxRadioBox* m_OptDisplayModTexts; - wxRadioBox* m_OptDisplayPads; - wxRadioBox* m_OptDisplayVias; - wxCheckBox* m_OptDisplayPadClearence; - wxCheckBox* m_OptDisplayPadNumber; - wxCheckBox* m_OptDisplayPadNoConn; - wxRadioBox* m_OptDisplayDrawings; - wxRadioBox* m_Show_Page_Limits; - - wxButton* m_buttonOK; - wxButton* m_buttonCANCEL; - - // Virtual event handlers, overide them in your derived class - virtual void OnOkClick( wxCommandEvent& event ){ event.Skip(); } - virtual void OnCancelClick( wxCommandEvent& event ){ event.Skip(); } - - - public: - DialogDisplayOptions_base( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Display options"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 731,331 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); - ~DialogDisplayOptions_base(); - -}; - -#endif //__dialog_display_options_base__ +/////////////////////////////////////////////////////////////////////////// +// C++ code generated with wxFormBuilder (version Nov 17 2010) +// http://www.wxformbuilder.org/ +// +// PLEASE DO "NOT" EDIT THIS FILE! +/////////////////////////////////////////////////////////////////////////// + +#ifndef __dialog_display_options_base__ +#define __dialog_display_options_base__ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +/////////////////////////////////////////////////////////////////////////// + +/////////////////////////////////////////////////////////////////////////////// +/// Class DIALOG_DISPLAY_OPTIONS_BASE +/////////////////////////////////////////////////////////////////////////////// +class DIALOG_DISPLAY_OPTIONS_BASE : public wxDialog +{ + private: + + protected: + enum + { + wxID_DISPLAY_TRACK = 1000, + ID_VIAS_SHAPES, + ID_VIAS_HOLES, + ID_SHOW_CLEARANCE, + ID_EDGES_MODULES, + ID_TEXT_MODULES, + ID_PADS_SHAPES, + }; + + wxRadioBox* m_OptDisplayTracks; + wxRadioBox* m_OptDisplayVias; + wxRadioBox* m_OptDisplayViaHole; + wxRadioBox* m_ShowNetNamesOption; + wxRadioBox* m_OptDisplayTracksClearance; + wxRadioBox* m_OptDisplayModEdges; + wxRadioBox* m_OptDisplayModTexts; + wxRadioBox* m_OptDisplayPads; + wxCheckBox* m_OptDisplayPadClearence; + wxCheckBox* m_OptDisplayPadNumber; + wxCheckBox* m_OptDisplayPadNoConn; + wxRadioBox* m_OptDisplayDrawings; + wxRadioBox* m_Show_Page_Limits; + + wxButton* m_buttonOK; + wxButton* m_buttonCANCEL; + + // Virtual event handlers, overide them in your derived class + virtual void OnOkClick( wxCommandEvent& event ) { event.Skip(); } + virtual void OnCancelClick( wxCommandEvent& event ) { event.Skip(); } + + + public: + + DIALOG_DISPLAY_OPTIONS_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Display options"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 731,291 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); + ~DIALOG_DISPLAY_OPTIONS_BASE(); + +}; + +#endif //__dialog_display_options_base__ diff --git a/pcbnew/dialogs/dialog_general_options.cpp b/pcbnew/dialogs/dialog_general_options.cpp index 70c8b400a4..cb2f229f26 100644 --- a/pcbnew/dialogs/dialog_general_options.cpp +++ b/pcbnew/dialogs/dialog_general_options.cpp @@ -172,12 +172,9 @@ void PCB_EDIT_FRAME::OnSelectOptionToolbar( wxCommandEvent& event ) m_auimgr.GetPane( wxT( "m_LayersManagerToolBar" ) ).Show( m_show_layer_manager_tools ); m_auimgr.Update(); - if( m_show_layer_manager_tools ) - GetMenuBar()->SetLabel( ID_MENU_PCB_SHOW_HIDE_LAYERS_MANAGER_DIALOG, - _("Hide &Layers Manager" ) ); - else - GetMenuBar()->SetLabel( ID_MENU_PCB_SHOW_HIDE_LAYERS_MANAGER_DIALOG, - _("Show &Layers Manager" ) ); + GetMenuBar()->SetLabel( ID_MENU_PCB_SHOW_HIDE_LAYERS_MANAGER_DIALOG, + m_show_layer_manager_tools ? + _("Hide &Layers Manager" ) : _("Show &Layers Manager" ) ); break; default: diff --git a/pcbnew/dialogs/dialog_pcbnew_config_libs_and_paths.cpp b/pcbnew/dialogs/dialog_pcbnew_config_libs_and_paths.cpp index a9889ba58a..8e09e54638 100644 --- a/pcbnew/dialogs/dialog_pcbnew_config_libs_and_paths.cpp +++ b/pcbnew/dialogs/dialog_pcbnew_config_libs_and_paths.cpp @@ -21,7 +21,7 @@ /*****************************************************************/ -void PCB_EDIT_FRAME::InstallConfigFrame( const wxPoint& pos ) +void PCB_EDIT_FRAME::InstallConfigFrame( ) /*****************************************************************/ { DIALOG_PCBNEW_CONFIG_LIBS dialog( this ); diff --git a/pcbnew/dimension.cpp b/pcbnew/dimension.cpp index cacd4e1b9d..af5ebd0da0 100644 --- a/pcbnew/dimension.cpp +++ b/pcbnew/dimension.cpp @@ -105,7 +105,7 @@ DIMENSION_EDITOR_DIALOG::DIMENSION_EDITOR_DIALOG( PCB_EDIT_FRAME* parent, wxDefaultPosition, wxSize( -1, -1 ), 2, display_msg, 1, wxRA_SPECIFY_COLS ); if( Dimension->m_Text->m_Mirror ) - m_Mirror->SetSelection( 1 );; + m_Mirror->SetSelection( 1 ); RightBoxSizer->Add( m_Mirror, 0, wxGROW | wxALL, 5 ); m_Name = new WinEDA_EnterText( this, wxT( "Text:" ), diff --git a/pcbnew/edit.cpp b/pcbnew/edit.cpp index b24edbdd41..dbc0e09e37 100644 --- a/pcbnew/edit.cpp +++ b/pcbnew/edit.cpp @@ -213,7 +213,7 @@ void PCB_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event ) break; case ID_DRC_CONTROL: - m_drc->ShowDialog();; + m_drc->ShowDialog(); break; case ID_GET_NETLIST: @@ -513,7 +513,7 @@ void PCB_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event ) { // Remove filled areas in zone ZONE_CONTAINER* zone_container = GetBoard()->GetArea( ii ); - zone_container->m_FilledPolysList.clear();; + zone_container->m_FilledPolysList.clear(); } SetCurItem( NULL ); // CurItem might be deleted by this command, clear the pointer diff --git a/pcbnew/edit_track_width.cpp b/pcbnew/edit_track_width.cpp index 95d4cad485..74f6a60311 100644 --- a/pcbnew/edit_track_width.cpp +++ b/pcbnew/edit_track_width.cpp @@ -241,7 +241,7 @@ bool PCB_EDIT_FRAME::Reset_All_Tracks_And_Vias_To_Netclass_Values( bool aTrack, if( (pt_segm->Type() == TYPE_TRACK ) && aTrack ) { if( SetTrackSegmentWidth( pt_segm, &itemsListPicker, true ) ) - change = true;; + change = true; } } diff --git a/pcbnew/export_gencad.cpp b/pcbnew/export_gencad.cpp index 625cbaf6ea..297cc9116e 100644 --- a/pcbnew/export_gencad.cpp +++ b/pcbnew/export_gencad.cpp @@ -494,7 +494,7 @@ void CreateSignalsSection( FILE* file, BOARD* pcb ) // connection) { wxString msg; msg << wxT( "NoConnection" ) << NbNoConn++; - net->SetNetname( msg );; + net->SetNetname( msg ); } if( net->GetNet() <= 0 ) // dummy netlist (no connection) diff --git a/pcbnew/gpcb_exchange.cpp b/pcbnew/gpcb_exchange.cpp index 1815e55879..2e72ab331e 100644 --- a/pcbnew/gpcb_exchange.cpp +++ b/pcbnew/gpcb_exchange.cpp @@ -225,7 +225,7 @@ bool MODULE::Read_GPCB_Descr( const wxString& CmpFullFileName ) } m_Reference->m_Pos.x = wxRound( ibuf[2] * conv_unit ); - m_Reference->m_Pos.y = wxRound( ibuf[3] * conv_unit );; + m_Reference->m_Pos.y = wxRound( ibuf[3] * conv_unit ); m_Reference->m_Orient = ibuf[4] * 900; // Calculate size: default is 40 mils (400 pcb units) diff --git a/pcbnew/graphpcb.cpp b/pcbnew/graphpcb.cpp index 0a5908d83f..9b3f677bd3 100644 --- a/pcbnew/graphpcb.cpp +++ b/pcbnew/graphpcb.cpp @@ -97,7 +97,7 @@ void Place_1_Pad_Board( BOARD* Pcb, int op_logique ) { int dx, dy; - wxPoint shape_pos = pt_pad->ReturnShapePos();; + wxPoint shape_pos = pt_pad->ReturnShapePos(); dx = pt_pad->m_Size.x / 2; dx += marge; diff --git a/pcbnew/ioascii.cpp b/pcbnew/ioascii.cpp index 2cc6fa8bf8..fa93564162 100644 --- a/pcbnew/ioascii.cpp +++ b/pcbnew/ioascii.cpp @@ -232,7 +232,7 @@ int PCB_BASE_FRAME::ReadGeneralDescrPcb( LINE_READER* aReader ) if( stricmp( data, "BoardThickness" ) == 0 ) { data = strtok( NULL, " =\n\r" ); - GetBoard()->GetBoardDesignSettings()->m_BoardThickness = atoi( data );; + GetBoard()->GetBoardDesignSettings()->m_BoardThickness = atoi( data ); continue; } @@ -269,7 +269,7 @@ int PCB_BASE_FRAME::ReadGeneralDescrPcb( LINE_READER* aReader ) if( stricmp( data, "Ndraw" ) == 0 ) { data = strtok( NULL, " =\n\r" ); - NbDraw = atoi( data );; + NbDraw = atoi( data ); continue; } diff --git a/pcbnew/menubar_pcbframe.cpp b/pcbnew/menubar_pcbframe.cpp index 82a1149e94..e2436943ae 100644 --- a/pcbnew/menubar_pcbframe.cpp +++ b/pcbnew/menubar_pcbframe.cpp @@ -476,7 +476,8 @@ void PCB_EDIT_FRAME::ReCreateMenuBar() // Colors and Visibility are also handled by the layers manager toolbar item = new wxMenuItem( configmenu, ID_MENU_PCB_SHOW_HIDE_LAYERS_MANAGER_DIALOG, - _( "Hide &Layers Manager" ), + m_show_layer_manager_tools ? + _( "Hide &Layers Manager" ) : _("Show &Layers Manager" ), HELP_SHOW_HIDE_LAYERMANAGER ); item->SetBitmap( layers_manager_xpm ); configmenu->Append( item ); diff --git a/pcbnew/modedit_undo_redo.cpp b/pcbnew/modedit_undo_redo.cpp index 1dfe40e023..33eb887a31 100644 --- a/pcbnew/modedit_undo_redo.cpp +++ b/pcbnew/modedit_undo_redo.cpp @@ -128,7 +128,7 @@ void WinEDA_ModuleEditFrame::GetComponentFromUndoList( wxCommandEvent& event ) GetBoard()->Add( module, ADD_APPEND ); - SetCurItem( NULL );; + SetCurItem( NULL ); OnModify(); DrawPanel->Refresh(); diff --git a/pcbnew/pcbframe.cpp b/pcbnew/pcbframe.cpp index 24a1838e69..a765b6a758 100644 --- a/pcbnew/pcbframe.cpp +++ b/pcbnew/pcbframe.cpp @@ -218,8 +218,10 @@ BEGIN_EVENT_TABLE( PCB_EDIT_FRAME, PCB_BASE_FRAME ) EVT_UPDATE_UI( ID_TB_OPTIONS_SHOW_TRACKS_SKETCH, PCB_EDIT_FRAME::OnUpdateTraceDrawMode ) EVT_UPDATE_UI( ID_TB_OPTIONS_SHOW_HIGH_CONTRAST_MODE, PCB_EDIT_FRAME::OnUpdateHighContrastDisplayMode ) - EVT_UPDATE_UI( ID_TB_OPTIONS_SHOW_EXTRA_VERTICAL_TOOLBAR1, + EVT_UPDATE_UI( ID_TB_OPTIONS_SHOW_MANAGE_LAYERS_VERTICAL_TOOLBAR, PCB_EDIT_FRAME::OnUpdateShowLayerManager ) + EVT_UPDATE_UI( ID_TB_OPTIONS_SHOW_EXTRA_VERTICAL_TOOLBAR1, + PCB_EDIT_FRAME::OnUpdateShowMicrowaveToolbar ) EVT_UPDATE_UI( ID_NO_TOOL_SELECTED, PCB_EDIT_FRAME::OnUpdateVerticalToolbar ) EVT_UPDATE_UI( ID_AUX_TOOLBAR_PCB_TRACK_WIDTH, PCB_EDIT_FRAME::OnUpdateSelectTrackWidth ) EVT_UPDATE_UI( ID_AUX_TOOLBAR_PCB_SELECT_AUTO_WIDTH, @@ -344,29 +346,30 @@ PCB_EDIT_FRAME::PCB_EDIT_FRAME( wxWindow* parent, const wxString& title, lyrs.IsFloatable(); - if( m_HToolBar ) + if( m_HToolBar ) // The main horizontal toolbar { m_auimgr.AddPane( m_HToolBar, wxAuiPaneInfo( horiz_tb ).Name( wxT( "m_HToolBar" ) ).Top().Row( 0 ) ); } - if( m_AuxiliaryToolBar ) + if( m_AuxiliaryToolBar ) // the auxiliary horizontal toolbar, that shows track and via sizes, zoom ...) { m_auimgr.AddPane( m_AuxiliaryToolBar, wxAuiPaneInfo( horiz_tb ).Name( wxT( "m_AuxiliaryToolBar" ) ).Top().Row( 1 ) ); } - if( m_AuxVToolBar ) + if( m_AuxVToolBar ) // The auxiliary vertical toolbar (currently microwave tools) m_auimgr.AddPane( m_AuxVToolBar, wxAuiPaneInfo( vert ).Name( wxT( "m_AuxVToolBar" ) ).Right().Row( 2 ).Hide() ); - if( m_VToolBar ) + if( m_VToolBar ) // The main right vertical toolbar m_auimgr.AddPane( m_VToolBar, wxAuiPaneInfo( vert ).Name( wxT( "m_VToolBar" ) ).Right().Row( 1 ) ); + // Add the layer manager (right side of pcbframe) m_auimgr.AddPane( m_Layers, lyrs.Name( wxT( "m_LayersManagerToolBar" ) ).Right().Row( 0 ) ); - if( m_OptionsToolBar ) + if( m_OptionsToolBar ) // The left vertical toolbar { m_auimgr.AddPane( m_OptionsToolBar, wxAuiPaneInfo( vert ).Name( wxT( "m_OptionsToolBar" ) ).Left() diff --git a/pcbnew/pcbnew_config.cpp b/pcbnew/pcbnew_config.cpp index 1f262e0daf..03c6f0d2ac 100644 --- a/pcbnew/pcbnew_config.cpp +++ b/pcbnew/pcbnew_config.cpp @@ -30,28 +30,18 @@ void PCB_EDIT_FRAME::Process_Config( wxCommandEvent& event ) { int id = event.GetId(); - wxPoint pos; - wxFileName fn; - pos = GetPosition(); - pos.x += 20; - pos.y += 20; - switch( id ) { case ID_MENU_PCB_SHOW_HIDE_LAYERS_MANAGER_DIALOG: - if( m_OptionsToolBar ) - { //This command is same as the Options Vertical Toolbar - // tool Show/hide layers manager - bool state = - m_OptionsToolBar->GetToolState( ID_TB_OPTIONS_SHOW_MANAGE_LAYERS_VERTICAL_TOOLBAR ); - m_OptionsToolBar->ToggleTool( ID_TB_OPTIONS_SHOW_MANAGE_LAYERS_VERTICAL_TOOLBAR, - !state ); - wxCommandEvent event( wxEVT_COMMAND_TOOL_CLICKED, - ID_TB_OPTIONS_SHOW_MANAGE_LAYERS_VERTICAL_TOOLBAR ); - wxPostEvent( this, event ); - } + m_show_layer_manager_tools = ! m_show_layer_manager_tools; + m_auimgr.GetPane( wxT( "m_LayersManagerToolBar" ) ).Show( m_show_layer_manager_tools ); + m_auimgr.Update(); + + GetMenuBar()->SetLabel( ID_MENU_PCB_SHOW_HIDE_LAYERS_MANAGER_DIALOG, + m_show_layer_manager_tools ? + _("Hide &Layers Manager" ) : _("Show &Layers Manager" )); break; case ID_PCB_LAYERS_SETUP: @@ -59,7 +49,7 @@ void PCB_EDIT_FRAME::Process_Config( wxCommandEvent& event ) break; case ID_CONFIG_REQ: - InstallConfigFrame( pos ); + InstallConfigFrame(); break; case ID_PCB_MASK_CLEARANCE: @@ -127,7 +117,7 @@ void PCB_EDIT_FRAME::Process_Config( wxCommandEvent& event ) break; default: - DisplayError( this, wxT( "PCB_EDIT_FRAME::Process_Config internal error" ) ); + DisplayError( this, wxT( "PCB_EDIT_FRAME::Process_Config error" ) ); } } @@ -152,7 +142,7 @@ bool PCB_EDIT_FRAME::LoadProjectSettings( const wxString& aProjectFileName ) /* Initialize default values. */ g_LibName_List.Clear(); - wxGetApp().ReadProjectConfig( fn.GetFullPath(), GROUP, GetProjectFileParameters(), FALSE ); + wxGetApp().ReadProjectConfig( fn.GetFullPath(), GROUP, GetProjectFileParameters(), false ); /* User library path takes precedent over default library search paths. */ wxGetApp().InsertLibraryPath( g_UserLibDirBuffer, 1 ); @@ -167,7 +157,7 @@ bool PCB_EDIT_FRAME::LoadProjectSettings( const wxString& aProjectFileName ) SetVisibleAlls(); SetElementVisibility( GRID_VISIBLE, showGrid ); SetElementVisibility( RATSNEST_VISIBLE, showRats ); - return TRUE; + return true; } @@ -215,8 +205,6 @@ PARAM_CFG_ARRAY& PCB_EDIT_FRAME::GetProjectFileParameters() m_projectFileParams.push_back( new PARAM_CFG_INT( wxT( "BoardThickness" ), &boardDesignSettings.m_BoardThickness, 630, 0, 0xFFFF ) ); - m_projectFileParams.push_back( new PARAM_CFG_BOOL( wxT( "SgPcb45" ), &Segments_45_Only, - TRUE ) ); m_projectFileParams.push_back( new PARAM_CFG_INT( wxT( "TxtPcbV" ), &boardDesignSettings.m_PcbTextSize.y, 600, TEXTS_MIN_SIZE, TEXTS_MAX_SIZE ) ); @@ -271,32 +259,39 @@ PARAM_CFG_ARRAY& PCB_EDIT_FRAME::GetConfigurationSettings() if( !m_configSettings.empty() ) return m_configSettings; - m_configSettings.push_back( new PARAM_CFG_INT( true, wxT( "ViaSHole" ), + // Units used in dialogs and toolbars + m_configSettings.push_back( new PARAM_CFG_INT( true, wxT( "Units" ), (int*)&g_UserUnit, MILLIMETRES ) ); + + m_configSettings.push_back( new PARAM_CFG_BOOL( true, wxT( "DisplayPolarCoords" ), + &DisplayOpt.DisplayPolarCood, false ) ); + // Display options and modes: + m_configSettings.push_back( new PARAM_CFG_INT( true, wxT( "ViaHoleDisplayMode" ), &DisplayOpt.m_DisplayViaMode, VIA_SPECIAL_HOLE_SHOW, VIA_HOLE_NOT_SHOW, OPT_VIA_HOLE_END - 1 ) ); m_configSettings.push_back( new PARAM_CFG_INT( true, wxT( "ShowNetNamesMode" ), &DisplayOpt.DisplayNetNamesMode, 3, 0, 3 ) ); - m_configSettings.push_back( new PARAM_CFG_INT( true, wxT( "Unite" ), (int*)&g_UserUnit, MILLIMETRES ) ); - m_configSettings.push_back( new PARAM_CFG_BOOL( true, wxT( "SegFill" ), - &DisplayOpt.DisplayPcbTrackFill, TRUE ) ); + m_configSettings.push_back( new PARAM_CFG_BOOL( true, wxT( "DisplayTrackFilled" ), + &DisplayOpt.DisplayPcbTrackFill, true ) ); m_configSettings.push_back( new PARAM_CFG_INT( true, wxT( "TrackDisplayClearance" ), &DisplayOpt.ShowTrackClearanceMode, SHOW_CLEARANCE_NEW_TRACKS_AND_VIA_AREAS ) ); m_configSettings.push_back( new PARAM_CFG_BOOL( true, wxT( "PadFill" ), - &DisplayOpt.DisplayPadFill, TRUE ) ); + &DisplayOpt.DisplayPadFill, true ) ); m_configSettings.push_back( new PARAM_CFG_BOOL( true, wxT( "ViaFill" ), - &DisplayOpt.DisplayViaFill, TRUE ) ); + &DisplayOpt.DisplayViaFill, true ) ); m_configSettings.push_back( new PARAM_CFG_BOOL( true, wxT( "PadAffG" ), - &DisplayOpt.DisplayPadIsol, TRUE ) ); + &DisplayOpt.DisplayPadIsol, true ) ); m_configSettings.push_back( new PARAM_CFG_BOOL( true, wxT( "PadSNum" ), - &DisplayOpt.DisplayPadNum, TRUE ) ); + &DisplayOpt.DisplayPadNum, true ) ); m_configSettings.push_back( new PARAM_CFG_INT( true, wxT( "ModAffC" ), &DisplayOpt.DisplayModEdge, FILLED, 0, 2 ) ); m_configSettings.push_back( new PARAM_CFG_INT( true, wxT( "ModAffT" ), &DisplayOpt.DisplayModText, FILLED, 0, 2 ) ); m_configSettings.push_back( new PARAM_CFG_INT( true, wxT( "PcbAffT" ), &DisplayOpt.DisplayDrawItems, FILLED, 0, 2 ) ); + + // Colors: m_configSettings.push_back( new PARAM_CFG_SETCOLOR( true, wxT( "ColLay0" ), LOC_COLOR( 0 ), GREEN ) ); m_configSettings.push_back( new PARAM_CFG_SETCOLOR( true, wxT( "ColLay1" ), LOC_COLOR( 1 ), @@ -388,15 +383,17 @@ PARAM_CFG_ARRAY& PCB_EDIT_FRAME::GetConfigurationSettings() m_configSettings.push_back( new PARAM_CFG_SETCOLOR( true, wxT( "CoRatsN" ), ITEM_COLOR( RATSNEST_VISIBLE ), WHITE ) ); + + // Miscellaneous: m_configSettings.push_back( new PARAM_CFG_INT( true, wxT( "TimeOut" ), &g_TimeOut, 600, 0, 60000 ) ); - m_configSettings.push_back( new PARAM_CFG_BOOL( true, wxT( "DPolair" ), - &DisplayOpt.DisplayPolarCood, FALSE ) ); m_configSettings.push_back( new PARAM_CFG_INT( true, wxT( "MaxLnkS" ), &g_MaxLinksShowed, 3, 0, 15 ) ); m_configSettings.push_back( new PARAM_CFG_BOOL( true, wxT( "ShowMRa" ), - &g_Show_Module_Ratsnest, TRUE ) ); + &g_Show_Module_Ratsnest, true ) ); m_configSettings.push_back( new PARAM_CFG_BOOL( true, wxT( "TwoSegT" ), - &g_TwoSegmentTrackBuild, TRUE ) ); + &g_TwoSegmentTrackBuild, true ) ); + m_configSettings.push_back( new PARAM_CFG_BOOL( true, wxT( "SegmPcb45Only" ), &Segments_45_Only, + true ) ); return m_configSettings; } diff --git a/pcbnew/toolbars_update_user_interface.cpp b/pcbnew/toolbars_update_user_interface.cpp index 979a0238d2..ea75869218 100644 --- a/pcbnew/toolbars_update_user_interface.cpp +++ b/pcbnew/toolbars_update_user_interface.cpp @@ -156,6 +156,11 @@ void PCB_EDIT_FRAME::OnUpdateHighContrastDisplayMode( wxUpdateUIEvent& aEvent ) void PCB_EDIT_FRAME::OnUpdateShowLayerManager( wxUpdateUIEvent& aEvent ) +{ + aEvent.Check( m_auimgr.GetPane( wxT( "m_LayersManagerToolBar" ) ).IsShown() ); +} + +void PCB_EDIT_FRAME::OnUpdateShowMicrowaveToolbar( wxUpdateUIEvent& aEvent ) { aEvent.Check( m_auimgr.GetPane( wxT( "m_AuxVToolBar" ) ).IsShown() ); } diff --git a/pcbnew/zones_by_polygon_fill_functions.cpp b/pcbnew/zones_by_polygon_fill_functions.cpp index 4af8336367..c6cef82877 100644 --- a/pcbnew/zones_by_polygon_fill_functions.cpp +++ b/pcbnew/zones_by_polygon_fill_functions.cpp @@ -143,12 +143,18 @@ int PCB_EDIT_FRAME::Fill_All_Zones( bool verbose ) int errorLevel = 0; int areaCount = GetBoard()->GetAreaCount(); wxBusyCursor dummyCursor; + wxString msg; + #define FORMAT_STRING _( "Filling zone %d out of %d (net %s)..." ) - wxProgressDialog progressDialog( wxT( "Fill All Zones" ), - wxT( "Starting zone fill..." ), + // Create a message with a long net name, and build a wxProgressDialog + // with a correct size to show this long net name + msg.Printf( FORMAT_STRING, + 000, 999, wxT("XXXXXXXXXXXXXXXXX" ) ); + wxProgressDialog progressDialog( _( "Fill All Zones" ), msg, areaCount+2, this, wxPD_AUTO_HIDE | wxPD_APP_MODAL | wxPD_CAN_ABORT ); - progressDialog.SetMinSize( wxSize( 400, 100 ) ); + // Display the actual message + progressDialog.Update( 0, _( "Starting zone fill..." ) ); // Remove segment zones GetBoard()->m_Zone.DeleteAll(); @@ -157,11 +163,10 @@ int PCB_EDIT_FRAME::Fill_All_Zones( bool verbose ) for( ii = 0; ii < areaCount; ii++ ) { ZONE_CONTAINER* zoneContainer = GetBoard()->GetArea( ii ); - wxString str; - str.Printf( wxT( "Filling zone %d out of %d (net %s)..." ), + msg.Printf( FORMAT_STRING, ii+1, areaCount, GetChars( zoneContainer->GetNetName() ) ); - if( !progressDialog.Update( ii+1, str ) ) + if( !progressDialog.Update( ii+1, msg ) ) break; errorLevel = Fill_Zone( zoneContainer, verbose ); @@ -169,7 +174,7 @@ int PCB_EDIT_FRAME::Fill_All_Zones( bool verbose ) if( errorLevel && !verbose ) break; } - progressDialog.Update( ii+2, wxT( "Updating ratsnest..." ) ); + progressDialog.Update( ii+2, _( "Updating ratsnest..." ) ); test_connexions( NULL ); // Recalculate the active ratsnest, i.e. the unconnected links