diff --git a/common/widgets/gal_options_panel.cpp b/common/widgets/gal_options_panel.cpp
index 1b7d810cda..9039b99a06 100644
--- a/common/widgets/gal_options_panel.cpp
+++ b/common/widgets/gal_options_panel.cpp
@@ -113,7 +113,7 @@ GAL_OPTIONS_PANEL::GAL_OPTIONS_PANEL( wxWindow* aParent, KIGFX::GAL_DISPLAY_OPTI
};
int m_gridStyleNChoices = sizeof( m_gridStyleChoices ) / sizeof( wxString );
m_gridStyle = new wxRadioBox( sGridSettings->GetStaticBox(),
- wxID_ANY, _( "Grid Style" ),
+ wxID_ANY, _( "Grid style:" ),
wxDefaultPosition, wxDefaultSize,
m_gridStyleNChoices, m_gridStyleChoices, 1, wxRA_SPECIFY_COLS );
sGridSettings->Add( m_gridStyle, 0, wxALL|wxEXPAND, 5 );
@@ -197,7 +197,7 @@ GAL_OPTIONS_PANEL::GAL_OPTIONS_PANEL( wxWindow* aParent, KIGFX::GAL_DISPLAY_OPTI
_( "Full window crosshair" )
};
- wxString cursorShapeTitle = _( "Cursor Shape" );
+ wxString cursorShapeTitle = _( "Cursor shape:" );
int m_CursorShapeNChoices = sizeof( m_CursorShapeChoices ) / sizeof( wxString );
m_cursorShape = new wxRadioBox( this, wxID_ANY,
diff --git a/pcbnew/dialogs/dialog_display_options.cpp b/pcbnew/dialogs/dialog_display_options.cpp
index b236134d8e..2711f4d11d 100644
--- a/pcbnew/dialogs/dialog_display_options.cpp
+++ b/pcbnew/dialogs/dialog_display_options.cpp
@@ -61,16 +61,13 @@ void PCB_EDIT_FRAME::InstallDisplayOptionsDialog( wxCommandEvent& aEvent )
DIALOG_DISPLAY_OPTIONS::DIALOG_DISPLAY_OPTIONS( PCB_EDIT_FRAME* parent ) :
DIALOG_DISPLAY_OPTIONS_BASE( parent ),
- m_parent( parent ),
- m_last_scale( -1 )
+ m_parent( parent )
{
KIGFX::GAL_DISPLAY_OPTIONS& galOptions = m_parent->GetGalDisplayOptions();
m_galOptsPanel = new GAL_OPTIONS_PANEL( this, galOptions );
sLeftSizer->Add( m_galOptsPanel, 1, wxEXPAND, 0 );
- m_scaleSlider->SetStep( 25 );
-
SetFocus();
m_sdbSizerOK->SetDefault();
@@ -84,37 +81,14 @@ bool DIALOG_DISPLAY_OPTIONS::TransferDataToWindow()
{
const PCB_DISPLAY_OPTIONS* displ_opts = (PCB_DISPLAY_OPTIONS*) m_parent->GetDisplayOptions();
- m_OptDisplayTracks->SetValue( displ_opts->m_DisplayPcbTrackFill == SKETCH );
-
m_OptDisplayTracksClearance->SetSelection( UTIL::GetConfigForVal(
traceClearanceSelectMap, displ_opts->m_ShowTrackClearanceMode ) );
- m_OptDisplayPads->SetValue( displ_opts->m_DisplayPadFill == SKETCH );
- m_OptDisplayVias->SetValue( displ_opts->m_DisplayViaFill == SKETCH );
-
- m_Show_Page_Limits->SetValue( m_parent->ShowPageLimits() );
-
- m_OptDisplayModTexts->SetValue( displ_opts->m_DisplayModTextFill == SKETCH );
- m_OptDisplayModOutlines->SetValue( displ_opts->m_DisplayModEdgeFill == SKETCH );
m_OptDisplayPadClearence->SetValue( displ_opts->m_DisplayPadIsol );
m_OptDisplayPadNumber->SetValue( displ_opts->m_DisplayPadNum );
m_OptDisplayPadNoConn->SetValue( m_parent->IsElementVisible( LAYER_NO_CONNECTS ) );
- m_OptDisplayDrawings->SetValue( displ_opts->m_DisplayDrawItemsFill == SKETCH );
m_ShowNetNamesOption->SetSelection( displ_opts->m_DisplayNetNamesMode );
- const int scale_fourths = m_parent->GetIconScale();
-
- if( scale_fourths <= 0 )
- {
- m_scaleAuto->SetValue( true );
- m_scaleSlider->SetValue( 25 * KiIconScale( m_parent ) );
- }
- else
- {
- m_scaleAuto->SetValue( false );
- m_scaleSlider->SetValue( scale_fourths * 25 );
- }
-
m_galOptsPanel->TransferDataToWindow();
return true;
@@ -128,19 +102,9 @@ bool DIALOG_DISPLAY_OPTIONS::TransferDataFromWindow()
{
PCB_DISPLAY_OPTIONS* displ_opts = (PCB_DISPLAY_OPTIONS*) m_parent->GetDisplayOptions();
- m_parent->SetShowPageLimits( m_Show_Page_Limits->GetValue() );
-
- displ_opts->m_DisplayPcbTrackFill = not m_OptDisplayTracks->GetValue();
-
displ_opts->m_ShowTrackClearanceMode = UTIL::GetValFromConfig(
traceClearanceSelectMap, m_OptDisplayTracksClearance->GetSelection() );
- displ_opts->m_DisplayModTextFill = not m_OptDisplayModTexts->GetValue();
- displ_opts->m_DisplayModEdgeFill = not m_OptDisplayModOutlines->GetValue();
-
- displ_opts->m_DisplayPadFill = not m_OptDisplayPads->GetValue();
- displ_opts->m_DisplayViaFill = not m_OptDisplayVias->GetValue();
-
displ_opts->m_DisplayPadIsol = m_OptDisplayPadClearence->GetValue();
displ_opts->m_DisplayPadNum = m_OptDisplayPadNumber->GetValue();
@@ -148,7 +112,6 @@ bool DIALOG_DISPLAY_OPTIONS::TransferDataFromWindow()
m_parent->SetElementVisibility( LAYER_NO_CONNECTS,
m_OptDisplayPadNoConn->GetValue() );
- displ_opts->m_DisplayDrawItemsFill = not m_OptDisplayDrawings->GetValue();
displ_opts->m_DisplayNetNamesMode = m_ShowNetNamesOption->GetSelection();
m_galOptsPanel->TransferDataFromWindow();
@@ -162,34 +125,9 @@ bool DIALOG_DISPLAY_OPTIONS::TransferDataFromWindow()
view->RecacheAllItems();
view->MarkTargetDirty( KIGFX::TARGET_NONCACHED );
- const int scale_fourths = m_scaleAuto->GetValue() ? -1 : m_scaleSlider->GetValue() / 25;
-
- if( m_parent->GetIconScale() != scale_fourths )
- m_parent->SetIconScale( scale_fourths );
-
m_parent->GetCanvas()->Refresh();
return true;
}
-void DIALOG_DISPLAY_OPTIONS::OnScaleSlider( wxScrollEvent& aEvent )
-{
- m_scaleAuto->SetValue( false );
- aEvent.Skip();
-}
-
-
-void DIALOG_DISPLAY_OPTIONS::OnScaleAuto( wxCommandEvent& aEvent )
-{
- if( m_scaleAuto->GetValue() )
- {
- m_last_scale = m_scaleSlider->GetValue();
- m_scaleSlider->SetValue( 25 * KiIconScale( GetParent() ) );
- }
- else
- {
- if( m_last_scale >= 0 )
- m_scaleSlider->SetValue( m_last_scale );
- }
-}
diff --git a/pcbnew/dialogs/dialog_display_options.h b/pcbnew/dialogs/dialog_display_options.h
index e2d8cb1f99..f6bac18a47 100644
--- a/pcbnew/dialogs/dialog_display_options.h
+++ b/pcbnew/dialogs/dialog_display_options.h
@@ -34,13 +34,8 @@ public:
bool TransferDataFromWindow() override;
bool TransferDataToWindow() override;
-protected:
- void OnScaleSlider( wxScrollEvent& aEvent ) override;
- void OnScaleAuto( wxCommandEvent& aEvent ) override;
-
private:
PCB_EDIT_FRAME* m_parent;
- int m_last_scale;
GAL_OPTIONS_PANEL* m_galOptsPanel;
};
diff --git a/pcbnew/dialogs/dialog_display_options_base.cpp b/pcbnew/dialogs/dialog_display_options_base.cpp
index a479dd0329..851f975a76 100644
--- a/pcbnew/dialogs/dialog_display_options_base.cpp
+++ b/pcbnew/dialogs/dialog_display_options_base.cpp
@@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////////
-// C++ code generated with wxFormBuilder (version Jan 2 2018)
+// C++ code generated with wxFormBuilder (version Dec 30 2017)
// http://www.wxformbuilder.org/
//
// PLEASE DO *NOT* EDIT THIS FILE!
@@ -24,122 +24,50 @@ DIALOG_DISPLAY_OPTIONS_BASE::DIALOG_DISPLAY_OPTIONS_BASE( wxWindow* parent, wxWi
bupperSizer->Add( sLeftSizer, 1, wxEXPAND, 5 );
- wxBoxSizer* bSizer5;
- bSizer5 = new wxBoxSizer( wxVERTICAL );
+ wxBoxSizer* bRightSizer;
+ bRightSizer = new wxBoxSizer( wxVERTICAL );
+
+ wxStaticBoxSizer* sbAnnotations;
+ sbAnnotations = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Annotations") ), 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 = new wxRadioBox( sbAnnotations->GetStaticBox(), wxID_ANY, _("Show net names:"), wxDefaultPosition, wxDefaultSize, m_ShowNetNamesOptionNChoices, m_ShowNetNamesOptionChoices, 1, wxRA_SPECIFY_COLS );
m_ShowNetNamesOption->SetSelection( 0 );
m_ShowNetNamesOption->SetToolTip( _("Show or hide net names on pads and/or tracks.") );
- bSizer5->Add( m_ShowNetNamesOption, 1, wxALL|wxEXPAND, 5 );
+ sbAnnotations->Add( m_ShowNetNamesOption, 0, wxEXPAND|wxLEFT|wxRIGHT|wxTOP, 5 );
+
+ m_OptDisplayPadNumber = new wxCheckBox( sbAnnotations->GetStaticBox(), wxID_ANY, _("Show pad numbers"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_OptDisplayPadNumber->SetValue(true);
+ sbAnnotations->Add( m_OptDisplayPadNumber, 0, wxALL, 10 );
+
+ m_OptDisplayPadNoConn = new wxCheckBox( sbAnnotations->GetStaticBox(), wxID_ANY, _("Show pad no net connection indicator"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_OptDisplayPadNoConn->SetValue(true);
+ sbAnnotations->Add( m_OptDisplayPadNoConn, 0, wxBOTTOM|wxLEFT|wxRIGHT, 10 );
+
+
+ bRightSizer->Add( sbAnnotations, 0, wxALL|wxEXPAND, 5 );
+
+ wxStaticBoxSizer* sbClearance;
+ sbClearance = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Clearance Outlines") ), wxVERTICAL );
wxString m_OptDisplayTracksClearanceChoices[] = { _("Never"), _("New track"), _("New track with via area"), _("New and edited tracks with via area"), _("Always") };
int m_OptDisplayTracksClearanceNChoices = sizeof( m_OptDisplayTracksClearanceChoices ) / sizeof( wxString );
- m_OptDisplayTracksClearance = new wxRadioBox( this, ID_SHOW_CLEARANCE, _("Show Track Clearance:"), wxDefaultPosition, wxDefaultSize, m_OptDisplayTracksClearanceNChoices, m_OptDisplayTracksClearanceChoices, 1, wxRA_SPECIFY_COLS );
- m_OptDisplayTracksClearance->SetSelection( 0 );
+ m_OptDisplayTracksClearance = new wxRadioBox( sbClearance->GetStaticBox(), ID_SHOW_CLEARANCE, _("Show track clearance:"), wxDefaultPosition, wxDefaultSize, m_OptDisplayTracksClearanceNChoices, m_OptDisplayTracksClearanceChoices, 1, wxRA_SPECIFY_COLS );
+ m_OptDisplayTracksClearance->SetSelection( 1 );
m_OptDisplayTracksClearance->SetToolTip( _("Show or hide the track and via clearance area. If \"New track\" is selected, track clearance area is shown only when creating the track.") );
- bSizer5->Add( m_OptDisplayTracksClearance, 1, wxALL|wxEXPAND, 5 );
+ sbClearance->Add( m_OptDisplayTracksClearance, 0, wxEXPAND|wxLEFT|wxRIGHT|wxTOP, 5 );
- wxStaticBoxSizer* sbSizer5;
- sbSizer5 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("User Interface:") ), wxVERTICAL );
-
- wxFlexGridSizer* fgSizer1;
- fgSizer1 = new wxFlexGridSizer( 0, 3, 0, 0 );
- fgSizer1->AddGrowableCol( 1 );
- fgSizer1->SetFlexibleDirection( wxBOTH );
- fgSizer1->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
-
- m_staticText1 = new wxStaticText( sbSizer5->GetStaticBox(), wxID_ANY, _("Icon scale:"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticText1->Wrap( -1 );
- fgSizer1->Add( m_staticText1, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 3 );
-
- m_scaleSlider = new STEPPED_SLIDER( sbSizer5->GetStaticBox(), wxID_ANY, 50, 50, 275, wxDefaultPosition, wxDefaultSize, wxSL_AUTOTICKS|wxSL_HORIZONTAL|wxSL_LABELS );
- fgSizer1->Add( m_scaleSlider, 0, wxEXPAND|wxLEFT|wxRIGHT, 3 );
-
- m_staticText2 = new wxStaticText( sbSizer5->GetStaticBox(), wxID_ANY, _("%"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticText2->Wrap( -1 );
- fgSizer1->Add( m_staticText2, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 3 );
+ m_OptDisplayPadClearence = new wxCheckBox( sbClearance->GetStaticBox(), wxID_ANY, _("Show pad clearance"), wxDefaultPosition, wxDefaultSize, 0 );
+ sbClearance->Add( m_OptDisplayPadClearence, 0, wxALL, 10 );
- fgSizer1->Add( 0, 0, 1, wxEXPAND, 5 );
-
- m_scaleAuto = new wxCheckBox( sbSizer5->GetStaticBox(), wxID_ANY, _("Auto"), wxDefaultPosition, wxDefaultSize, 0 );
- fgSizer1->Add( m_scaleAuto, 0, wxALL, 5 );
+ bRightSizer->Add( sbClearance, 1, wxALL|wxEXPAND, 5 );
- fgSizer1->Add( 0, 0, 1, wxEXPAND, 5 );
-
-
- sbSizer5->Add( fgSizer1, 1, wxALL|wxEXPAND, 5 );
-
-
- bSizer5->Add( sbSizer5, 1, wxALL|wxEXPAND, 5 );
-
-
- bupperSizer->Add( bSizer5, 1, wxEXPAND, 5 );
-
- wxBoxSizer* sRightSizer;
- sRightSizer = new wxBoxSizer( wxVERTICAL );
-
- wxStaticBoxSizer* sSketchModeSizer;
- sSketchModeSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Tracks and Vias:") ), wxVERTICAL );
-
- m_OptDisplayTracks = new wxCheckBox( sSketchModeSizer->GetStaticBox(), wxID_ANY, _("Show tracks in sketch mode"), wxDefaultPosition, wxDefaultSize, 0 );
- sSketchModeSizer->Add( m_OptDisplayTracks, 0, wxALL, 5 );
-
- m_OptDisplayVias = new wxCheckBox( sSketchModeSizer->GetStaticBox(), wxID_ANY, _("Show vias in sketch mode"), wxDefaultPosition, wxDefaultSize, 0 );
- sSketchModeSizer->Add( m_OptDisplayVias, 0, wxALL, 5 );
-
-
- sRightSizer->Add( sSketchModeSizer, 0, wxALL|wxEXPAND, 5 );
-
- wxStaticBoxSizer* sfootprintSizer;
- sfootprintSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Footprints:") ), wxVERTICAL );
-
- m_OptDisplayModOutlines = new wxCheckBox( sfootprintSizer->GetStaticBox(), wxID_ANY, _("Show outlines in sketch mode"), wxDefaultPosition, wxDefaultSize, 0 );
- sfootprintSizer->Add( m_OptDisplayModOutlines, 0, wxALL, 5 );
-
- m_OptDisplayModTexts
- = new wxCheckBox( sfootprintSizer->GetStaticBox(), wxID_ANY, _("Show text in sketch mode"), wxDefaultPosition, wxDefaultSize, 0 );
- sfootprintSizer->Add( m_OptDisplayModTexts
- , 0, wxALL, 5 );
-
- m_OptDisplayPads = new wxCheckBox( sfootprintSizer->GetStaticBox(), wxID_ANY, _("Show pads in sketch mode"), wxDefaultPosition, wxDefaultSize, 0 );
- sfootprintSizer->Add( m_OptDisplayPads, 0, wxALL, 5 );
-
- m_OptDisplayPadClearence = new wxCheckBox( sfootprintSizer->GetStaticBox(), wxID_ANY, _("Show pad clearance"), wxDefaultPosition, wxDefaultSize, 0 );
- sfootprintSizer->Add( m_OptDisplayPadClearence, 0, wxALL, 5 );
-
- m_OptDisplayPadNumber = new wxCheckBox( sfootprintSizer->GetStaticBox(), wxID_ANY, _("Show pad number"), wxDefaultPosition, wxDefaultSize, 0 );
- m_OptDisplayPadNumber->SetValue(true);
- sfootprintSizer->Add( m_OptDisplayPadNumber, 0, wxALL, 5 );
-
- m_OptDisplayPadNoConn = new wxCheckBox( sfootprintSizer->GetStaticBox(), wxID_ANY, _("Show pad no net connection indicator"), wxDefaultPosition, wxDefaultSize, 0 );
- m_OptDisplayPadNoConn->SetValue(true);
- sfootprintSizer->Add( m_OptDisplayPadNoConn, 0, wxALL, 5 );
-
-
- sRightSizer->Add( sfootprintSizer, 0, wxEXPAND|wxALL, 5 );
-
- wxStaticBoxSizer* s_otherSizer;
- s_otherSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Other:") ), wxVERTICAL );
-
- m_OptDisplayDrawings = new wxCheckBox( s_otherSizer->GetStaticBox(), wxID_ANY, _("Show graphic items in sketch mode"), wxDefaultPosition, wxDefaultSize, 0 );
- m_OptDisplayDrawings->SetValue(true);
- s_otherSizer->Add( m_OptDisplayDrawings, 0, wxALL, 5 );
-
- m_Show_Page_Limits = new wxCheckBox( s_otherSizer->GetStaticBox(), wxID_ANY, _("Show page limits"), wxDefaultPosition, wxDefaultSize, 0 );
- m_Show_Page_Limits->SetValue(true);
- s_otherSizer->Add( m_Show_Page_Limits, 0, wxALL, 5 );
-
-
- sRightSizer->Add( s_otherSizer, 1, wxEXPAND|wxALL, 5 );
-
-
- bupperSizer->Add( sRightSizer, 0, wxEXPAND, 5 );
+ bupperSizer->Add( bRightSizer, 1, wxEXPAND, 5 );
bMainSizer->Add( bupperSizer, 1, wxEXPAND, 5 );
@@ -157,32 +85,8 @@ DIALOG_DISPLAY_OPTIONS_BASE::DIALOG_DISPLAY_OPTIONS_BASE( wxWindow* parent, wxWi
this->SetSizer( bMainSizer );
this->Layout();
bMainSizer->Fit( this );
-
- // Connect Events
- m_scaleSlider->Connect( wxEVT_SCROLL_TOP, wxScrollEventHandler( DIALOG_DISPLAY_OPTIONS_BASE::OnScaleSlider ), NULL, this );
- m_scaleSlider->Connect( wxEVT_SCROLL_BOTTOM, wxScrollEventHandler( DIALOG_DISPLAY_OPTIONS_BASE::OnScaleSlider ), NULL, this );
- m_scaleSlider->Connect( wxEVT_SCROLL_LINEUP, wxScrollEventHandler( DIALOG_DISPLAY_OPTIONS_BASE::OnScaleSlider ), NULL, this );
- m_scaleSlider->Connect( wxEVT_SCROLL_LINEDOWN, wxScrollEventHandler( DIALOG_DISPLAY_OPTIONS_BASE::OnScaleSlider ), NULL, this );
- m_scaleSlider->Connect( wxEVT_SCROLL_PAGEUP, wxScrollEventHandler( DIALOG_DISPLAY_OPTIONS_BASE::OnScaleSlider ), NULL, this );
- m_scaleSlider->Connect( wxEVT_SCROLL_PAGEDOWN, wxScrollEventHandler( DIALOG_DISPLAY_OPTIONS_BASE::OnScaleSlider ), NULL, this );
- m_scaleSlider->Connect( wxEVT_SCROLL_THUMBTRACK, wxScrollEventHandler( DIALOG_DISPLAY_OPTIONS_BASE::OnScaleSlider ), NULL, this );
- m_scaleSlider->Connect( wxEVT_SCROLL_THUMBRELEASE, wxScrollEventHandler( DIALOG_DISPLAY_OPTIONS_BASE::OnScaleSlider ), NULL, this );
- m_scaleSlider->Connect( wxEVT_SCROLL_CHANGED, wxScrollEventHandler( DIALOG_DISPLAY_OPTIONS_BASE::OnScaleSlider ), NULL, this );
- m_scaleAuto->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_DISPLAY_OPTIONS_BASE::OnScaleAuto ), NULL, this );
}
DIALOG_DISPLAY_OPTIONS_BASE::~DIALOG_DISPLAY_OPTIONS_BASE()
{
- // Disconnect Events
- m_scaleSlider->Disconnect( wxEVT_SCROLL_TOP, wxScrollEventHandler( DIALOG_DISPLAY_OPTIONS_BASE::OnScaleSlider ), NULL, this );
- m_scaleSlider->Disconnect( wxEVT_SCROLL_BOTTOM, wxScrollEventHandler( DIALOG_DISPLAY_OPTIONS_BASE::OnScaleSlider ), NULL, this );
- m_scaleSlider->Disconnect( wxEVT_SCROLL_LINEUP, wxScrollEventHandler( DIALOG_DISPLAY_OPTIONS_BASE::OnScaleSlider ), NULL, this );
- m_scaleSlider->Disconnect( wxEVT_SCROLL_LINEDOWN, wxScrollEventHandler( DIALOG_DISPLAY_OPTIONS_BASE::OnScaleSlider ), NULL, this );
- m_scaleSlider->Disconnect( wxEVT_SCROLL_PAGEUP, wxScrollEventHandler( DIALOG_DISPLAY_OPTIONS_BASE::OnScaleSlider ), NULL, this );
- m_scaleSlider->Disconnect( wxEVT_SCROLL_PAGEDOWN, wxScrollEventHandler( DIALOG_DISPLAY_OPTIONS_BASE::OnScaleSlider ), NULL, this );
- m_scaleSlider->Disconnect( wxEVT_SCROLL_THUMBTRACK, wxScrollEventHandler( DIALOG_DISPLAY_OPTIONS_BASE::OnScaleSlider ), NULL, this );
- m_scaleSlider->Disconnect( wxEVT_SCROLL_THUMBRELEASE, wxScrollEventHandler( DIALOG_DISPLAY_OPTIONS_BASE::OnScaleSlider ), NULL, this );
- m_scaleSlider->Disconnect( wxEVT_SCROLL_CHANGED, wxScrollEventHandler( DIALOG_DISPLAY_OPTIONS_BASE::OnScaleSlider ), NULL, this );
- m_scaleAuto->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_DISPLAY_OPTIONS_BASE::OnScaleAuto ), NULL, this );
-
}
diff --git a/pcbnew/dialogs/dialog_display_options_base.fbp b/pcbnew/dialogs/dialog_display_options_base.fbp
index 9a1e4d3aef..b29d15379a 100644
--- a/pcbnew/dialogs/dialog_display_options_base.fbp
+++ b/pcbnew/dialogs/dialog_display_options_base.fbp
@@ -119,613 +119,7 @@
1
-
-
- 5
- wxEXPAND
- 0
-
-
- sRightSizer
+ bRightSizer
wxVERTICAL
none
@@ -734,18 +128,18 @@
0
wxID_ANY
- Tracks and Vias:
+ Annotations
- sSketchModeSizer
+ sbAnnotations
wxVERTICAL
1
none
5
- wxALL
+ wxEXPAND|wxLEFT|wxRIGHT|wxTOP
0
-
+
1
1
1
@@ -759,7 +153,7 @@
1
0
- 0
+ "Do not show" "On pads" "On tracks" "On pads and tracks"
1
1
@@ -774,7 +168,8 @@
0
0
wxID_ANY
- Show tracks in sketch mode
+ Show net names:
+ 1
0
@@ -782,7 +177,7 @@
0
1
- m_OptDisplayTracks
+ m_ShowNetNamesOption
1
@@ -790,12 +185,13 @@
1
Resizable
+ 0
1
-
+ wxRA_SPECIFY_COLS
0
-
+ Show or hide net names on pads and/or tracks.
wxFILTER_NONE
wxDefaultValidator
@@ -804,7 +200,6 @@
-
@@ -821,6 +216,7 @@
+
@@ -830,462 +226,7 @@
- 5
- wxALL
- 0
-
- 1
- 1
- 1
- 1
-
-
-
-
-
-
-
- 1
- 0
- 0
- 1
-
- 1
- 0
- Dock
- 0
- Left
- 1
-
- 1
-
- 0
- 0
- wxID_ANY
- Show vias in sketch mode
-
- 0
-
-
- 0
-
- 1
- m_OptDisplayVias
- 1
-
-
- protected
- 1
-
- Resizable
- 1
-
-
-
- 0
-
-
- wxFILTER_NONE
- wxDefaultValidator
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 5
- wxEXPAND|wxALL
- 0
-
- wxID_ANY
- Footprints:
-
- sfootprintSizer
- wxVERTICAL
- 1
- none
-
-
- 5
- wxALL
- 0
-
- 1
- 1
- 1
- 1
-
-
-
-
-
-
-
- 1
- 0
- 0
- 1
-
- 1
- 0
- Dock
- 0
- Left
- 1
-
- 1
-
- 0
- 0
- wxID_ANY
- Show outlines in sketch mode
-
- 0
-
-
- 0
-
- 1
- m_OptDisplayModOutlines
- 1
-
-
- protected
- 1
-
- Resizable
- 1
-
-
-
- 0
-
-
- wxFILTER_NONE
- wxDefaultValidator
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 5
- wxALL
- 0
-
- 1
- 1
- 1
- 1
-
-
-
-
-
-
-
- 1
- 0
- 0
- 1
-
- 1
- 0
- Dock
- 0
- Left
- 1
-
- 1
-
- 0
- 0
- wxID_ANY
- Show text in sketch mode
-
- 0
-
-
- 0
-
- 1
- m_OptDisplayModTexts
- 1
-
-
- protected
- 1
-
- Resizable
- 1
-
-
-
- 0
-
-
- wxFILTER_NONE
- wxDefaultValidator
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 5
- wxALL
- 0
-
- 1
- 1
- 1
- 1
-
-
-
-
-
-
-
- 1
- 0
- 0
- 1
-
- 1
- 0
- Dock
- 0
- Left
- 1
-
- 1
-
- 0
- 0
- wxID_ANY
- Show pads in sketch mode
-
- 0
-
-
- 0
-
- 1
- m_OptDisplayPads
- 1
-
-
- protected
- 1
-
- Resizable
- 1
-
-
-
- 0
-
-
- wxFILTER_NONE
- wxDefaultValidator
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 5
- 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
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 5
+ 10
wxALL
0
@@ -1317,7 +258,7 @@
0
0
wxID_ANY
- Show pad number
+ Show pad numbers
0
@@ -1373,8 +314,8 @@
- 5
- wxALL
+ 10
+ wxBOTTOM|wxLEFT|wxRIGHT
0
1
@@ -1464,22 +405,22 @@
5
- wxEXPAND|wxALL
+ wxALL|wxEXPAND
1
wxID_ANY
- Other:
+ Clearance Outlines
- s_otherSizer
+ sbClearance
wxVERTICAL
1
none
5
- wxALL
+ wxEXPAND|wxLEFT|wxRIGHT|wxTOP
0
-
+
1
1
1
@@ -1493,7 +434,7 @@
1
0
- 1
+ "Never" "New track" "New track with via area" "New and edited tracks with via area" "Always"
1
1
@@ -1507,8 +448,9 @@
0
0
- wxID_ANY
- Show graphic items in sketch mode
+ ID_SHOW_CLEARANCE
+ Show track clearance:
+ 1
0
@@ -1516,7 +458,7 @@
0
1
- m_OptDisplayDrawings
+ m_OptDisplayTracksClearance
1
@@ -1524,12 +466,13 @@
1
Resizable
+ 1
1
-
+ wxRA_SPECIFY_COLS
0
-
+ Show or hide the track and via clearance area. If "New track" is selected, track clearance area is shown only when creating the track.
wxFILTER_NONE
wxDefaultValidator
@@ -1538,7 +481,6 @@
-
@@ -1555,6 +497,7 @@
+
@@ -1564,7 +507,7 @@
- 5
+ 10
wxALL
0
@@ -1581,7 +524,7 @@
1
0
- 1
+ 0
1
1
@@ -1596,7 +539,7 @@
0
0
wxID_ANY
- Show page limits
+ Show pad clearance
0
@@ -1604,7 +547,7 @@
0
1
- m_Show_Page_Limits
+ m_OptDisplayPadClearence
1
diff --git a/pcbnew/dialogs/dialog_display_options_base.h b/pcbnew/dialogs/dialog_display_options_base.h
index 7326899b07..510aed27d5 100644
--- a/pcbnew/dialogs/dialog_display_options_base.h
+++ b/pcbnew/dialogs/dialog_display_options_base.h
@@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////////
-// C++ code generated with wxFormBuilder (version Jan 2 2018)
+// C++ code generated with wxFormBuilder (version Dec 30 2017)
// http://www.wxformbuilder.org/
//
// PLEASE DO *NOT* EDIT THIS FILE!
@@ -11,7 +11,6 @@
#include
#include
#include
-#include "widgets/stepped_slider.h"
#include "dialog_shim.h"
#include
#include
@@ -20,8 +19,6 @@
#include
#include
#include
-#include
-#include
#include
#include
#include
@@ -44,30 +41,13 @@ class DIALOG_DISPLAY_OPTIONS_BASE : public DIALOG_SHIM
wxBoxSizer* sLeftSizer;
wxRadioBox* m_ShowNetNamesOption;
- wxRadioBox* m_OptDisplayTracksClearance;
- wxStaticText* m_staticText1;
- STEPPED_SLIDER* m_scaleSlider;
- wxStaticText* m_staticText2;
- wxCheckBox* m_scaleAuto;
- wxCheckBox* m_OptDisplayTracks;
- wxCheckBox* m_OptDisplayVias;
- wxCheckBox* m_OptDisplayModOutlines;
- wxCheckBox* m_OptDisplayModTexts
- ;
- wxCheckBox* m_OptDisplayPads;
- wxCheckBox* m_OptDisplayPadClearence;
wxCheckBox* m_OptDisplayPadNumber;
wxCheckBox* m_OptDisplayPadNoConn;
- wxCheckBox* m_OptDisplayDrawings;
- wxCheckBox* m_Show_Page_Limits;
+ wxRadioBox* m_OptDisplayTracksClearance;
+ wxCheckBox* m_OptDisplayPadClearence;
wxStdDialogButtonSizer* m_sdbSizer;
wxButton* m_sdbSizerOK;
wxButton* m_sdbSizerCancel;
-
- // Virtual event handlers, overide them in your derived class
- virtual void OnScaleSlider( wxScrollEvent& event ) { event.Skip(); }
- virtual void OnScaleAuto( wxCommandEvent& event ) { event.Skip(); }
-
public:
diff --git a/pcbnew/dialogs/dialog_general_options.cpp b/pcbnew/dialogs/dialog_general_options.cpp
index 0dd1ce957a..13a6ee805c 100644
--- a/pcbnew/dialogs/dialog_general_options.cpp
+++ b/pcbnew/dialogs/dialog_general_options.cpp
@@ -40,14 +40,18 @@
#include
#include
#include
+#include
#include
DIALOG_GENERALOPTIONS::DIALOG_GENERALOPTIONS( PCB_EDIT_FRAME* parent ) :
- DIALOG_GENERALOPTIONS_BOARDEDITOR_BASE( parent )
+ DIALOG_GENERALOPTIONS_BOARDEDITOR_BASE( parent ),
+ m_last_scale( -1 )
{
init();
+ m_scaleSlider->SetStep( 25 );
+
GetSizer()->SetSizeHints( this );
Center();
}
@@ -85,6 +89,45 @@ void DIALOG_GENERALOPTIONS::init()
m_MagneticPadOptCtrl->SetSelection( GetParent()->Settings().m_magneticPads );
m_MagneticTrackOptCtrl->SetSelection( GetParent()->Settings().m_magneticTracks );
m_UseEditKeyForWidth->SetValue( GetParent()->Settings().m_editActionChangesTrackWidth );
+
+ m_Show_Page_Limits->SetValue( GetParent()->ShowPageLimits() );
+
+ const int scale_fourths = GetParent()->GetIconScale();
+
+ if( scale_fourths <= 0 )
+ {
+ m_scaleAuto->SetValue( true );
+ m_scaleSlider->SetValue( 25 * KiIconScale( GetParent() ) );
+ }
+ else
+ {
+ m_scaleAuto->SetValue( false );
+ m_scaleSlider->SetValue( scale_fourths * 25 );
+ }
+
+ m_checkBoxIconsInMenus->SetValue( Pgm().GetUseIconsInMenus() );
+}
+
+
+void DIALOG_GENERALOPTIONS::OnScaleSlider( wxScrollEvent& aEvent )
+{
+ m_scaleAuto->SetValue( false );
+ aEvent.Skip();
+}
+
+
+void DIALOG_GENERALOPTIONS::OnScaleAuto( wxCommandEvent& aEvent )
+{
+ if( m_scaleAuto->GetValue() )
+ {
+ m_last_scale = m_scaleSlider->GetValue();
+ m_scaleSlider->SetValue( 25 * KiIconScale( GetParent() ) );
+ }
+ else
+ {
+ if( m_last_scale >= 0 )
+ m_scaleSlider->SetValue( m_last_scale );
+ }
}
@@ -132,5 +175,20 @@ void DIALOG_GENERALOPTIONS::OnOkClick( wxCommandEvent& event )
GetParent()->Settings().m_magneticTracks = (MAGNETIC_PAD_OPTION_VALUES) m_MagneticTrackOptCtrl->GetSelection();
GetParent()->Settings().m_editActionChangesTrackWidth = m_UseEditKeyForWidth->GetValue();
+ GetParent()->SetShowPageLimits( m_Show_Page_Limits->GetValue() );
+
+ const int scale_fourths = m_scaleAuto->GetValue() ? -1 : m_scaleSlider->GetValue() / 25;
+
+ if( GetParent()->GetIconScale() != scale_fourths )
+ GetParent()->SetIconScale( scale_fourths );
+
+ if( Pgm().GetUseIconsInMenus() != m_checkBoxIconsInMenus->GetValue() )
+ {
+ Pgm().SetUseIconsInMenus( m_checkBoxIconsInMenus->GetValue() );
+ GetParent()->ReCreateMenuBar();
+ }
+
EndModal( wxID_OK );
}
+
+
diff --git a/pcbnew/dialogs/dialog_general_options.h b/pcbnew/dialogs/dialog_general_options.h
index ab2914968a..cd1ec01ad1 100644
--- a/pcbnew/dialogs/dialog_general_options.h
+++ b/pcbnew/dialogs/dialog_general_options.h
@@ -31,12 +31,18 @@ class DIALOG_GENERALOPTIONS : public DIALOG_GENERALOPTIONS_BOARDEDITOR_BASE
{
private:
BOARD* m_Board;
+ int m_last_scale;
void init();
public:
DIALOG_GENERALOPTIONS( PCB_EDIT_FRAME* parent );
~DIALOG_GENERALOPTIONS() {};
+
+protected:
+ void OnScaleSlider( wxScrollEvent& aEvent ) override;
+ void OnScaleAuto( wxCommandEvent& aEvent ) override;
+
void OnOkClick( wxCommandEvent& event ) override;
void OnCancelClick( wxCommandEvent& event ) override;
diff --git a/pcbnew/dialogs/dialog_general_options_BoardEditor_base.cpp b/pcbnew/dialogs/dialog_general_options_BoardEditor_base.cpp
index 5ef7332473..1022a0ee00 100644
--- a/pcbnew/dialogs/dialog_general_options_BoardEditor_base.cpp
+++ b/pcbnew/dialogs/dialog_general_options_BoardEditor_base.cpp
@@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////////
-// C++ code generated with wxFormBuilder (version Nov 22 2017)
+// C++ code generated with wxFormBuilder (version Dec 30 2017)
// http://www.wxformbuilder.org/
//
// PLEASE DO *NOT* EDIT THIS FILE!
@@ -22,30 +22,9 @@ DIALOG_GENERALOPTIONS_BOARDEDITOR_BASE::DIALOG_GENERALOPTIONS_BOARDEDITOR_BASE(
wxBoxSizer* bLeftSizer;
bLeftSizer = new wxBoxSizer( wxVERTICAL );
- wxString m_PolarDisplayChoices[] = { _("Cartesian coordinates"), _("Polar coordinates") };
- int m_PolarDisplayNChoices = sizeof( m_PolarDisplayChoices ) / sizeof( wxString );
- m_PolarDisplay = new wxRadioBox( this, wxID_POLAR_CTRL, _("Coordinates"), wxDefaultPosition, wxDefaultSize, m_PolarDisplayNChoices, m_PolarDisplayChoices, 1, wxRA_SPECIFY_COLS );
- m_PolarDisplay->SetSelection( 0 );
- m_PolarDisplay->SetToolTip( _("Set display of relative (dx/dy) coordinates to Cartesian (rectangular) or polar (angle/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( 1 );
- m_UnitsSelection->SetToolTip( _("Set units used to display dimensions and positions.") );
-
- bLeftSizer->Add( m_UnitsSelection, 0, wxALL|wxEXPAND, 5 );
-
-
- bSizerUpper->Add( bLeftSizer, 2, wxALL|wxEXPAND, 5 );
-
- wxBoxSizer* bMiddleLeftSizer;
- bMiddleLeftSizer = new wxBoxSizer( wxVERTICAL );
-
wxFlexGridSizer* fgSizer1;
fgSizer1 = new wxFlexGridSizer( 0, 2, 0, 0 );
+ fgSizer1->AddGrowableCol( 1 );
fgSizer1->SetFlexibleDirection( wxBOTH );
fgSizer1->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
@@ -56,19 +35,91 @@ DIALOG_GENERALOPTIONS_BOARDEDITOR_BASE::DIALOG_GENERALOPTIONS_BOARDEDITOR_BASE(
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. If set to 0, auto backup is disabled.") );
- fgSizer1->Add( m_SaveTime, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
-
- m_staticTextRotationAngle = new wxStaticText( this, wxID_ANY, _("&Rotation angle:"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticTextRotationAngle->Wrap( -1 );
- fgSizer1->Add( m_staticTextRotationAngle, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
-
- m_RotationAngle = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
- m_RotationAngle->SetToolTip( _("Set increment (in degrees) for context menu and hotkey rotation.") );
-
- fgSizer1->Add( m_RotationAngle, 0, wxALIGN_CENTER_VERTICAL|wxALL|wxEXPAND, 5 );
+ fgSizer1->Add( m_SaveTime, 0, wxALIGN_CENTER_VERTICAL|wxALL|wxEXPAND, 5 );
- bMiddleLeftSizer->Add( fgSizer1, 0, wxEXPAND, 5 );
+ bLeftSizer->Add( fgSizer1, 0, wxALL|wxEXPAND, 5 );
+
+ wxStaticBoxSizer* sbSizer5;
+ sbSizer5 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("User Interface:") ), wxVERTICAL );
+
+ wxFlexGridSizer* fgSizer11;
+ fgSizer11 = new wxFlexGridSizer( 0, 3, 0, 0 );
+ fgSizer11->AddGrowableCol( 1 );
+ fgSizer11->SetFlexibleDirection( wxBOTH );
+ fgSizer11->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
+
+ m_staticText1 = new wxStaticText( sbSizer5->GetStaticBox(), wxID_ANY, _("Icon scale:"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticText1->Wrap( -1 );
+ fgSizer11->Add( m_staticText1, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 3 );
+
+ m_scaleSlider = new STEPPED_SLIDER( sbSizer5->GetStaticBox(), wxID_ANY, 50, 50, 275, wxDefaultPosition, wxDefaultSize, wxSL_AUTOTICKS|wxSL_HORIZONTAL|wxSL_LABELS );
+ fgSizer11->Add( m_scaleSlider, 0, wxBOTTOM|wxEXPAND, 4 );
+
+ m_staticText2 = new wxStaticText( sbSizer5->GetStaticBox(), wxID_ANY, _("%"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticText2->Wrap( -1 );
+ fgSizer11->Add( m_staticText2, 0, wxALIGN_BOTTOM|wxBOTTOM, 2 );
+
+
+ fgSizer11->Add( 0, 0, 1, wxEXPAND, 5 );
+
+ m_scaleAuto = new wxCheckBox( sbSizer5->GetStaticBox(), wxID_ANY, _("Auto"), wxDefaultPosition, wxDefaultSize, 0 );
+ fgSizer11->Add( m_scaleAuto, 0, wxLEFT, 9 );
+
+
+ fgSizer11->Add( 0, 0, 1, wxEXPAND, 5 );
+
+
+ sbSizer5->Add( fgSizer11, 0, wxALL|wxEXPAND, 5 );
+
+ m_checkBoxIconsInMenus = new wxCheckBox( sbSizer5->GetStaticBox(), wxID_ANY, _("Show icons in menus"), wxDefaultPosition, wxDefaultSize, 0 );
+ sbSizer5->Add( m_checkBoxIconsInMenus, 0, wxALL, 5 );
+
+
+ bLeftSizer->Add( sbSizer5, 1, wxALL|wxEXPAND, 5 );
+
+ wxStaticBoxSizer* sbSizer2PAN;
+ sbSizer2PAN = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Pan and Zoom") ), wxVERTICAL );
+
+ m_ZoomCenterOpt = new wxCheckBox( sbSizer2PAN->GetStaticBox(), wxID_ANY, _("Ce&nter and warp cursor on zoom"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_ZoomCenterOpt->SetToolTip( _("Center the cursor on screen when zooming.") );
+
+ sbSizer2PAN->Add( m_ZoomCenterOpt, 0, wxLEFT|wxRIGHT|wxTOP, 5 );
+
+ m_MousewheelPANOpt = new wxCheckBox( sbSizer2PAN->GetStaticBox(), wxID_ANY, _("Use touchpad to pan"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_MousewheelPANOpt->SetToolTip( _("Enable touchpad-friendly controls (pan with scroll action, zoom with Ctrl+scroll).") );
+
+ sbSizer2PAN->Add( m_MousewheelPANOpt, 0, wxLEFT|wxRIGHT|wxTOP, 5 );
+
+ m_AutoPANOpt = new wxCheckBox( sbSizer2PAN->GetStaticBox(), wxID_AUTOPAN, _("&Pan while moving object"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_AutoPANOpt->SetToolTip( _("When drawing a track or moving an item, pan when approaching the edge of the display.") );
+
+ sbSizer2PAN->Add( m_AutoPANOpt, 0, wxALL, 5 );
+
+
+ bLeftSizer->Add( sbSizer2PAN, 1, wxEXPAND|wxALL, 5 );
+
+
+ bSizerUpper->Add( bLeftSizer, 2, wxALL|wxEXPAND, 5 );
+
+ wxBoxSizer* bMiddleLeftSizer;
+ bMiddleLeftSizer = new wxBoxSizer( wxVERTICAL );
+
+ wxString m_PolarDisplayChoices[] = { _("Cartesian coordinates"), _("Polar coordinates") };
+ int m_PolarDisplayNChoices = sizeof( m_PolarDisplayChoices ) / sizeof( wxString );
+ m_PolarDisplay = new wxRadioBox( this, wxID_POLAR_CTRL, _("Coordinates"), wxDefaultPosition, wxDefaultSize, m_PolarDisplayNChoices, m_PolarDisplayChoices, 1, wxRA_SPECIFY_COLS );
+ m_PolarDisplay->SetSelection( 0 );
+ m_PolarDisplay->SetToolTip( _("Set display of relative (dx/dy) coordinates to Cartesian (rectangular) or polar (angle/distance).") );
+
+ bMiddleLeftSizer->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( _("Set units used to display dimensions and positions.") );
+
+ bMiddleLeftSizer->Add( m_UnitsSelection, 0, wxALL|wxEXPAND, 5 );
wxStaticBoxSizer* bOptionsSizer;
bOptionsSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Options") ), wxVERTICAL );
@@ -79,6 +130,13 @@ DIALOG_GENERALOPTIONS_BOARDEDITOR_BASE::DIALOG_GENERALOPTIONS_BOARDEDITOR_BASE(
bOptionsSizer->Add( m_ShowGlobalRatsnest, 0, wxALL, 5 );
+ m_Show_Page_Limits = new wxCheckBox( bOptionsSizer->GetStaticBox(), wxID_ANY, _("Show page limits"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_Show_Page_Limits->SetValue(true);
+ bOptionsSizer->Add( m_Show_Page_Limits, 0, wxBOTTOM|wxLEFT|wxRIGHT, 5 );
+
+
+ bOptionsSizer->Add( 0, 0, 0, wxALL|wxEXPAND, 5 );
+
m_Segments_45_Only_Ctrl = new wxCheckBox( bOptionsSizer->GetStaticBox(), wxID_SEGMENTS45, _("L&imit graphic lines to 45 degrees"), wxDefaultPosition, wxDefaultSize, 0 );
m_Segments_45_Only_Ctrl->SetToolTip( _("Force line segment directions to H, V or 45 degrees when drawing on technical layers.") );
@@ -89,9 +147,49 @@ DIALOG_GENERALOPTIONS_BOARDEDITOR_BASE::DIALOG_GENERALOPTIONS_BOARDEDITOR_BASE(
bOptionsSizer->Add( m_UseEditKeyForWidth, 0, wxBOTTOM|wxLEFT|wxRIGHT, 5 );
+ wxFlexGridSizer* fgSizer12;
+ fgSizer12 = new wxFlexGridSizer( 0, 2, 0, 0 );
+ fgSizer12->AddGrowableCol( 1 );
+ fgSizer12->SetFlexibleDirection( wxBOTH );
+ fgSizer12->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
+
+ m_staticTextRotationAngle = new wxStaticText( bOptionsSizer->GetStaticBox(), wxID_ANY, _("&Rotation angle:"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextRotationAngle->Wrap( -1 );
+ fgSizer12->Add( m_staticTextRotationAngle, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+
+ m_RotationAngle = new wxTextCtrl( bOptionsSizer->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
+ m_RotationAngle->SetToolTip( _("Set increment (in degrees) for context menu and hotkey rotation.") );
+
+ fgSizer12->Add( m_RotationAngle, 0, wxALIGN_CENTER_VERTICAL|wxALL|wxEXPAND, 5 );
+
+
+ bOptionsSizer->Add( fgSizer12, 1, wxEXPAND, 5 );
+
bMiddleLeftSizer->Add( bOptionsSizer, 1, wxEXPAND|wxALL, 5 );
+
+ bSizerUpper->Add( bMiddleLeftSizer, 0, wxALL|wxEXPAND, 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( 2 );
+ m_MagneticPadOptCtrl->SetToolTip( _("Control capture of the cursor when the mouse 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 capture of the cursor when the mouse approaches a track.") );
+
+ bRightSizer->Add( m_MagneticTrackOptCtrl, 0, wxALL|wxEXPAND, 5 );
+
wxStaticBoxSizer* bLegacyOptionsSizer;
bLegacyOptionsSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Legacy Routing Options") ), wxVERTICAL );
@@ -120,50 +218,7 @@ DIALOG_GENERALOPTIONS_BOARDEDITOR_BASE::DIALOG_GENERALOPTIONS_BOARDEDITOR_BASE(
bLegacyOptionsSizer->Add( m_Track_DoubleSegm_Ctrl, 0, wxBOTTOM|wxLEFT|wxRIGHT, 5 );
- bMiddleLeftSizer->Add( bLegacyOptionsSizer, 0, wxEXPAND|wxALL, 5 );
-
-
- bSizerUpper->Add( bMiddleLeftSizer, 0, wxALL|wxEXPAND, 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( 2 );
- m_MagneticPadOptCtrl->SetToolTip( _("Control capture of the cursor when the mouse 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 capture of the cursor when the mouse approaches a track.") );
-
- bRightSizer->Add( m_MagneticTrackOptCtrl, 0, wxALL|wxEXPAND, 5 );
-
- wxStaticBoxSizer* sbSizer2PAN;
- sbSizer2PAN = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Pan and Zoom") ), wxVERTICAL );
-
- m_ZoomCenterOpt = new wxCheckBox( sbSizer2PAN->GetStaticBox(), wxID_ANY, _("Ce&nter and warp cursor on zoom"), wxDefaultPosition, wxDefaultSize, 0 );
- m_ZoomCenterOpt->SetToolTip( _("Center the cursor on screen when zooming.") );
-
- sbSizer2PAN->Add( m_ZoomCenterOpt, 0, wxLEFT|wxRIGHT|wxTOP, 5 );
-
- m_MousewheelPANOpt = new wxCheckBox( sbSizer2PAN->GetStaticBox(), wxID_ANY, _("Use touchpad to pan"), wxDefaultPosition, wxDefaultSize, 0 );
- m_MousewheelPANOpt->SetToolTip( _("Enable touchpad-friendly controls (pan with scroll action, zoom with Ctrl+scroll).") );
-
- sbSizer2PAN->Add( m_MousewheelPANOpt, 0, wxLEFT|wxRIGHT|wxTOP, 5 );
-
- m_AutoPANOpt = new wxCheckBox( sbSizer2PAN->GetStaticBox(), wxID_AUTOPAN, _("&Pan while moving object"), wxDefaultPosition, wxDefaultSize, 0 );
- m_AutoPANOpt->SetToolTip( _("When drawing a track or moving an item, pan when approaching the edge of the display.") );
-
- sbSizer2PAN->Add( m_AutoPANOpt, 0, wxALL, 5 );
-
-
- bRightSizer->Add( sbSizer2PAN, 1, wxEXPAND|wxALL, 5 );
+ bRightSizer->Add( bLegacyOptionsSizer, 1, wxEXPAND|wxALL, 5 );
bSizerUpper->Add( bRightSizer, 0, wxALL|wxEXPAND, 5 );
@@ -189,6 +244,16 @@ DIALOG_GENERALOPTIONS_BOARDEDITOR_BASE::DIALOG_GENERALOPTIONS_BOARDEDITOR_BASE(
bMainSizer->Fit( this );
// Connect Events
+ m_scaleSlider->Connect( wxEVT_SCROLL_TOP, wxScrollEventHandler( DIALOG_GENERALOPTIONS_BOARDEDITOR_BASE::OnScaleSlider ), NULL, this );
+ m_scaleSlider->Connect( wxEVT_SCROLL_BOTTOM, wxScrollEventHandler( DIALOG_GENERALOPTIONS_BOARDEDITOR_BASE::OnScaleSlider ), NULL, this );
+ m_scaleSlider->Connect( wxEVT_SCROLL_LINEUP, wxScrollEventHandler( DIALOG_GENERALOPTIONS_BOARDEDITOR_BASE::OnScaleSlider ), NULL, this );
+ m_scaleSlider->Connect( wxEVT_SCROLL_LINEDOWN, wxScrollEventHandler( DIALOG_GENERALOPTIONS_BOARDEDITOR_BASE::OnScaleSlider ), NULL, this );
+ m_scaleSlider->Connect( wxEVT_SCROLL_PAGEUP, wxScrollEventHandler( DIALOG_GENERALOPTIONS_BOARDEDITOR_BASE::OnScaleSlider ), NULL, this );
+ m_scaleSlider->Connect( wxEVT_SCROLL_PAGEDOWN, wxScrollEventHandler( DIALOG_GENERALOPTIONS_BOARDEDITOR_BASE::OnScaleSlider ), NULL, this );
+ m_scaleSlider->Connect( wxEVT_SCROLL_THUMBTRACK, wxScrollEventHandler( DIALOG_GENERALOPTIONS_BOARDEDITOR_BASE::OnScaleSlider ), NULL, this );
+ m_scaleSlider->Connect( wxEVT_SCROLL_THUMBRELEASE, wxScrollEventHandler( DIALOG_GENERALOPTIONS_BOARDEDITOR_BASE::OnScaleSlider ), NULL, this );
+ m_scaleSlider->Connect( wxEVT_SCROLL_CHANGED, wxScrollEventHandler( DIALOG_GENERALOPTIONS_BOARDEDITOR_BASE::OnScaleSlider ), NULL, this );
+ m_scaleAuto->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_GENERALOPTIONS_BOARDEDITOR_BASE::OnScaleAuto ), NULL, this );
m_sdbSizerCancel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_GENERALOPTIONS_BOARDEDITOR_BASE::OnCancelClick ), NULL, this );
m_sdbSizerOK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_GENERALOPTIONS_BOARDEDITOR_BASE::OnOkClick ), NULL, this );
}
@@ -196,6 +261,16 @@ DIALOG_GENERALOPTIONS_BOARDEDITOR_BASE::DIALOG_GENERALOPTIONS_BOARDEDITOR_BASE(
DIALOG_GENERALOPTIONS_BOARDEDITOR_BASE::~DIALOG_GENERALOPTIONS_BOARDEDITOR_BASE()
{
// Disconnect Events
+ m_scaleSlider->Disconnect( wxEVT_SCROLL_TOP, wxScrollEventHandler( DIALOG_GENERALOPTIONS_BOARDEDITOR_BASE::OnScaleSlider ), NULL, this );
+ m_scaleSlider->Disconnect( wxEVT_SCROLL_BOTTOM, wxScrollEventHandler( DIALOG_GENERALOPTIONS_BOARDEDITOR_BASE::OnScaleSlider ), NULL, this );
+ m_scaleSlider->Disconnect( wxEVT_SCROLL_LINEUP, wxScrollEventHandler( DIALOG_GENERALOPTIONS_BOARDEDITOR_BASE::OnScaleSlider ), NULL, this );
+ m_scaleSlider->Disconnect( wxEVT_SCROLL_LINEDOWN, wxScrollEventHandler( DIALOG_GENERALOPTIONS_BOARDEDITOR_BASE::OnScaleSlider ), NULL, this );
+ m_scaleSlider->Disconnect( wxEVT_SCROLL_PAGEUP, wxScrollEventHandler( DIALOG_GENERALOPTIONS_BOARDEDITOR_BASE::OnScaleSlider ), NULL, this );
+ m_scaleSlider->Disconnect( wxEVT_SCROLL_PAGEDOWN, wxScrollEventHandler( DIALOG_GENERALOPTIONS_BOARDEDITOR_BASE::OnScaleSlider ), NULL, this );
+ m_scaleSlider->Disconnect( wxEVT_SCROLL_THUMBTRACK, wxScrollEventHandler( DIALOG_GENERALOPTIONS_BOARDEDITOR_BASE::OnScaleSlider ), NULL, this );
+ m_scaleSlider->Disconnect( wxEVT_SCROLL_THUMBRELEASE, wxScrollEventHandler( DIALOG_GENERALOPTIONS_BOARDEDITOR_BASE::OnScaleSlider ), NULL, this );
+ m_scaleSlider->Disconnect( wxEVT_SCROLL_CHANGED, wxScrollEventHandler( DIALOG_GENERALOPTIONS_BOARDEDITOR_BASE::OnScaleSlider ), NULL, this );
+ m_scaleAuto->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_GENERALOPTIONS_BOARDEDITOR_BASE::OnScaleAuto ), NULL, this );
m_sdbSizerCancel->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_GENERALOPTIONS_BOARDEDITOR_BASE::OnCancelClick ), NULL, this );
m_sdbSizerOK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_GENERALOPTIONS_BOARDEDITOR_BASE::OnOkClick ), NULL, this );
diff --git a/pcbnew/dialogs/dialog_general_options_BoardEditor_base.fbp b/pcbnew/dialogs/dialog_general_options_BoardEditor_base.fbp
index 5b7e7b5888..6dee0e7758 100644
--- a/pcbnew/dialogs/dialog_general_options_BoardEditor_base.fbp
+++ b/pcbnew/dialogs/dialog_general_options_BoardEditor_base.fbp
@@ -111,6 +111,988 @@
bLeftSizer
wxVERTICAL
none
+
+ 5
+ wxALL|wxEXPAND
+ 0
+
+ 2
+ wxBOTH
+ 1
+
+ 0
+
+ fgSizer1
+ wxFLEX_GROWMODE_SPECIFIED
+ none
+ 0
+ 0
+
+ 5
+ wxALIGN_CENTER_VERTICAL|wxALL
+ 0
+
+ 1
+ 1
+ 1
+ 1
+
+
+
+
+
+
+
+ 1
+ 0
+ 1
+
+ 1
+ 0
+ Dock
+ 0
+ Left
+ 1
+
+ 1
+
+ 0
+ 0
+ wxID_ANY
+ &Auto save (minutes):
+
+ 0
+
+
+ 0
+
+ 1
+ m_staticTextautosave
+ 1
+
+
+ protected
+ 1
+
+ Resizable
+ 1
+
+
+
+ 0
+
+
+
+
+ -1
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 5
+ wxALIGN_CENTER_VERTICAL|wxALL|wxEXPAND
+ 0
+
+ 1
+ 1
+ 1
+ 1
+
+
+
+
+
+
+
+ 1
+ 0
+ 1
+
+ 1
+ 0
+ Dock
+ 0
+ Left
+ 1
+
+ 1
+
+ 0
+ 0
+ wxID_ANY
+ 0
+ 60
+
+ 0
+
+ 0
+
+ 0
+
+ 1
+ m_SaveTime
+ 1
+
+
+ protected
+ 1
+
+ Resizable
+ 1
+
+ wxSP_ARROW_KEYS
+
+ 0
+ Delay after the first change to create a backup file of the board on disk. If set to 0, auto backup is disabled.
+ 0
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 5
+ wxALL|wxEXPAND
+ 1
+
+ wxID_ANY
+ User Interface:
+
+ sbSizer5
+ wxVERTICAL
+ 1
+ none
+
+
+ 5
+ wxALL|wxEXPAND
+ 0
+
+ 3
+ wxBOTH
+ 1
+
+ 0
+
+ fgSizer11
+ wxFLEX_GROWMODE_SPECIFIED
+ none
+ 0
+ 0
+
+ 3
+ wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT
+ 0
+
+ 1
+ 1
+ 1
+ 1
+
+
+
+
+
+
+
+ 1
+ 0
+ 1
+
+ 1
+ 0
+ Dock
+ 0
+ Left
+ 1
+
+ 1
+
+ 0
+ 0
+ wxID_ANY
+ Icon scale:
+
+ 0
+
+
+ 0
+
+ 1
+ m_staticText1
+ 1
+
+
+ protected
+ 1
+
+ Resizable
+ 1
+
+
+ ; forward_declare
+ 0
+
+
+
+
+ -1
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 4
+ wxBOTTOM|wxEXPAND
+ 0
+
+ 1
+ 1
+ 1
+ 1
+
+
+
+
+
+
+
+ 1
+ 0
+ 1
+
+ 1
+ 0
+ Dock
+ 0
+ Left
+ 1
+
+ 1
+
+ 0
+ 0
+ wxID_ANY
+ 275
+
+ 0
+
+ 50
+
+ 0
+
+ 1
+ m_scaleSlider
+ 1
+
+
+ protected
+ 1
+
+ Resizable
+ 1
+
+ wxSL_AUTOTICKS|wxSL_HORIZONTAL|wxSL_LABELS
+ STEPPED_SLIDER; widgets/stepped_slider.h; Not forward_declare
+ 0
+
+
+ wxFILTER_NONE
+ wxDefaultValidator
+
+ 50
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ OnScaleSlider
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 2
+ wxALIGN_BOTTOM|wxBOTTOM
+ 0
+
+ 1
+ 1
+ 1
+ 1
+
+
+
+
+
+
+
+ 1
+ 0
+ 1
+
+ 1
+ 0
+ Dock
+ 0
+ Left
+ 1
+
+ 1
+
+ 0
+ 0
+ wxID_ANY
+ %
+
+ 0
+
+
+ 0
+
+ 1
+ m_staticText2
+ 1
+
+
+ protected
+ 1
+
+ Resizable
+ 1
+
+
+ ; forward_declare
+ 0
+
+
+
+
+ -1
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 5
+ wxEXPAND
+ 1
+
+ 0
+ protected
+ 0
+
+
+
+ 9
+ wxLEFT
+ 0
+
+ 1
+ 1
+ 1
+ 1
+
+
+
+
+
+
+
+ 1
+ 0
+ 0
+ 1
+
+ 1
+ 0
+ Dock
+ 0
+ Left
+ 1
+
+ 1
+
+ 0
+ 0
+ wxID_ANY
+ Auto
+
+ 0
+
+
+ 0
+
+ 1
+ m_scaleAuto
+ 1
+
+
+ protected
+ 1
+
+ Resizable
+ 1
+
+
+ ; forward_declare
+ 0
+
+
+ wxFILTER_NONE
+ wxDefaultValidator
+
+
+
+
+
+ OnScaleAuto
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 5
+ wxEXPAND
+ 1
+
+ 0
+ protected
+ 0
+
+
+
+
+
+ 5
+ wxALL
+ 0
+
+ 1
+ 1
+ 1
+ 1
+
+
+
+
+
+
+
+ 1
+ 0
+ 0
+ 1
+
+ 1
+ 0
+ Dock
+ 0
+ Left
+ 1
+
+ 1
+
+ 0
+ 0
+ wxID_ANY
+ Show icons in menus
+
+ 0
+
+
+ 0
+
+ 1
+ m_checkBoxIconsInMenus
+ 1
+
+
+ protected
+ 1
+
+ Resizable
+ 1
+
+
+ ; forward_declare
+ 0
+
+
+ wxFILTER_NONE
+ wxDefaultValidator
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 5
+ wxEXPAND|wxALL
+ 1
+
+ wxID_ANY
+ Pan and Zoom
+
+ sbSizer2PAN
+ wxVERTICAL
+ 1
+ none
+
+
+ 5
+ wxLEFT|wxRIGHT|wxTOP
+ 0
+
+ 1
+ 1
+ 1
+ 1
+
+
+
+
+
+
+
+ 1
+ 0
+ 0
+ 1
+
+ 1
+ 0
+ Dock
+ 0
+ Left
+ 1
+
+ 1
+
+ 0
+ 0
+ wxID_ANY
+ Ce&nter and warp cursor on zoom
+
+ 0
+
+
+ 0
+
+ 1
+ m_ZoomCenterOpt
+ 1
+
+
+ protected
+ 1
+
+ Resizable
+ 1
+
+
+
+ 0
+ Center the cursor on screen when zooming.
+
+ wxFILTER_NONE
+ wxDefaultValidator
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 5
+ wxLEFT|wxRIGHT|wxTOP
+ 0
+
+ 1
+ 1
+ 1
+ 1
+
+
+
+
+
+
+
+ 1
+ 0
+ 0
+ 1
+
+ 1
+ 0
+ Dock
+ 0
+ Left
+ 1
+
+ 1
+
+ 0
+ 0
+ wxID_ANY
+ Use touchpad to pan
+
+ 0
+
+
+ 0
+
+ 1
+ m_MousewheelPANOpt
+ 1
+
+
+ protected
+ 1
+
+ Resizable
+ 1
+
+
+
+ 0
+ Enable touchpad-friendly controls (pan with scroll action, zoom with Ctrl+scroll).
+
+ wxFILTER_NONE
+ wxDefaultValidator
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 5
+ wxALL
+ 0
+
+ 1
+ 1
+ 1
+ 1
+
+
+
+
+
+
+
+ 1
+ 0
+ 0
+ 1
+
+ 1
+ 0
+ Dock
+ 0
+ Left
+ 1
+
+ 1
+
+ 0
+ 0
+ wxID_AUTOPAN
+ &Pan while moving object
+
+ 0
+
+
+ 0
+
+ 1
+ m_AutoPANOpt
+ 1
+
+
+ protected
+ 1
+
+ Resizable
+ 1
+
+
+
+ 0
+ When drawing a track or moving an item, pan when approaching the edge of the display.
+
+ wxFILTER_NONE
+ wxDefaultValidator
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 5
+ wxALL|wxEXPAND
+ 0
+
+
+ bMiddleLeftSizer
+ wxVERTICAL
+ none
5
wxALL|wxEXPAND
@@ -251,7 +1233,7 @@
1
Resizable
- 1
+ 0
1
wxRA_SPECIFY_COLS
@@ -291,380 +1273,6 @@
-
-
-
- 5
- wxALL|wxEXPAND
- 0
-
-
- bMiddleLeftSizer
- wxVERTICAL
- none
-
- 5
- wxEXPAND
- 0
-
- 2
- wxBOTH
-
-
- 0
-
- fgSizer1
- wxFLEX_GROWMODE_SPECIFIED
- none
- 0
- 0
-
- 5
- wxALIGN_CENTER_VERTICAL|wxALL
- 0
-
- 1
- 1
- 1
- 1
-
-
-
-
-
-
-
- 1
- 0
- 1
-
- 1
- 0
- Dock
- 0
- Left
- 1
-
- 1
-
- 0
- 0
- wxID_ANY
- &Auto save (minutes):
-
- 0
-
-
- 0
-
- 1
- m_staticTextautosave
- 1
-
-
- protected
- 1
-
- Resizable
- 1
-
-
-
- 0
-
-
-
-
- -1
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 5
- wxALIGN_CENTER_VERTICAL|wxALL
- 0
-
- 1
- 1
- 1
- 1
-
-
-
-
-
-
-
- 1
- 0
- 1
-
- 1
- 0
- Dock
- 0
- Left
- 1
-
- 1
-
- 0
- 0
- wxID_ANY
- 0
- 60
-
- 0
-
- 0
-
- 0
-
- 1
- m_SaveTime
- 1
-
-
- protected
- 1
-
- Resizable
- 1
-
- wxSP_ARROW_KEYS
-
- 0
- Delay after the first change to create a backup file of the board on disk. If set to 0, auto backup is disabled.
- 0
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 5
- wxALIGN_CENTER_VERTICAL|wxALL
- 0
-
- 1
- 1
- 1
- 1
-
-
-
-
-
-
-
- 1
- 0
- 1
-
- 1
- 0
- Dock
- 0
- Left
- 1
-
- 1
-
- 0
- 0
- wxID_ANY
- &Rotation angle:
-
- 0
-
-
- 0
-
- 1
- m_staticTextRotationAngle
- 1
-
-
- protected
- 1
-
- Resizable
- 1
-
-
-
- 0
-
-
-
-
- -1
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 5
- wxALIGN_CENTER_VERTICAL|wxALL|wxEXPAND
- 0
-
- 1
- 1
- 1
- 1
-
-
-
-
-
-
-
- 1
- 0
- 1
-
- 1
- 0
- Dock
- 0
- Left
- 1
-
- 1
-
- 0
- 0
- wxID_ANY
-
- 0
-
-
-
- 0
-
- 1
- m_RotationAngle
- 1
-
-
- protected
- 1
-
- Resizable
- 1
-
-
-
- 0
- Set increment (in degrees) for context menu and hotkey rotation.
-
- wxFILTER_NONE
- wxDefaultValidator
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
5
wxEXPAND|wxALL
@@ -766,6 +1374,104 @@
+
+ 5
+ wxBOTTOM|wxLEFT|wxRIGHT
+ 0
+
+ 1
+ 1
+ 1
+ 1
+
+
+
+
+
+
+
+ 1
+ 0
+ 1
+ 1
+
+ 1
+ 0
+ Dock
+ 0
+ Left
+ 1
+
+ 1
+
+ 0
+ 0
+ wxID_ANY
+ Show page limits
+
+ 0
+
+
+ 0
+
+ 1
+ m_Show_Page_Limits
+ 1
+
+
+ protected
+ 1
+
+ Resizable
+ 1
+
+
+
+ 0
+
+
+ wxFILTER_NONE
+ wxDefaultValidator
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 5
+ wxALL|wxEXPAND
+ 0
+
+ 0
+ protected
+ 0
+
+
5
wxBOTTOM|wxLEFT|wxRIGHT
@@ -942,12 +1648,395 @@
+
+ 5
+ wxEXPAND
+ 1
+
+ 2
+ wxBOTH
+ 1
+
+ 0
+
+ fgSizer12
+ wxFLEX_GROWMODE_SPECIFIED
+ none
+ 0
+ 0
+
+ 5
+ wxALIGN_CENTER_VERTICAL|wxALL
+ 0
+
+ 1
+ 1
+ 1
+ 1
+
+
+
+
+
+
+
+ 1
+ 0
+ 1
+
+ 1
+ 0
+ Dock
+ 0
+ Left
+ 1
+
+ 1
+
+ 0
+ 0
+ wxID_ANY
+ &Rotation angle:
+
+ 0
+
+
+ 0
+
+ 1
+ m_staticTextRotationAngle
+ 1
+
+
+ protected
+ 1
+
+ Resizable
+ 1
+
+
+
+ 0
+
+
+
+
+ -1
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 5
+ wxALIGN_CENTER_VERTICAL|wxALL|wxEXPAND
+ 0
+
+ 1
+ 1
+ 1
+ 1
+
+
+
+
+
+
+
+ 1
+ 0
+ 1
+
+ 1
+ 0
+ Dock
+ 0
+ Left
+ 1
+
+ 1
+
+ 0
+ 0
+ wxID_ANY
+
+ 0
+
+
+
+ 0
+
+ 1
+ m_RotationAngle
+ 1
+
+
+ protected
+ 1
+
+ Resizable
+ 1
+
+
+
+ 0
+ Set increment (in degrees) for context menu and hotkey rotation.
+
+ wxFILTER_NONE
+ wxDefaultValidator
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 5
+ wxALL|wxEXPAND
+ 0
+
+
+ bRightSizer
+ wxVERTICAL
+ none
+
+ 5
+ wxALL|wxEXPAND
+ 0
+
+ 1
+ 1
+ 1
+ 1
+
+
+
+
+
+
+
+ 1
+ 0
+ "Never" "When creating tracks" "Always"
+ 1
+
+ 1
+ 0
+ Dock
+ 0
+ Left
+ 1
+
+ 1
+
+ 0
+ 0
+ wxID_ANY
+ Magnetic Pads
+ 1
+
+ 0
+
+
+ 0
+
+ 1
+ m_MagneticPadOptCtrl
+ 1
+
+
+ protected
+ 1
+
+ Resizable
+ 2
+ 1
+
+ wxRA_SPECIFY_COLS
+
+ 0
+ Control capture of the cursor when the mouse enters a pad area.
+
+ wxFILTER_NONE
+ wxDefaultValidator
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 5
+ wxALL|wxEXPAND
+ 0
+
+ 1
+ 1
+ 1
+ 1
+
+
+
+
+
+
+
+ 1
+ 0
+ "Never" "When creating tracks" "Always"
+ 1
+
+ 1
+ 0
+ Dock
+ 0
+ Left
+ 1
+
+ 1
+
+ 0
+ 0
+ wxID_MAGNETIC_TRACKS
+ Magnetic Tracks
+ 1
+
+ 0
+
+
+ 0
+
+ 1
+ m_MagneticTrackOptCtrl
+ 1
+
+
+ protected
+ 1
+
+ Resizable
+ 0
+ 1
+
+ wxRA_SPECIFY_COLS
+
+ 0
+ Control capture of the cursor when the mouse approaches a track.
+
+ wxFILTER_NONE
+ wxDefaultValidator
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
5
wxEXPAND|wxALL
- 0
+ 1
wxID_ANY
Legacy Routing Options
@@ -1313,476 +2402,6 @@
-
- 5
- wxALL|wxEXPAND
- 0
-
-
- bRightSizer
- wxVERTICAL
- none
-
- 5
- wxALL|wxEXPAND
- 0
-
- 1
- 1
- 1
- 1
-
-
-
-
-
-
-
- 1
- 0
- "Never" "When creating tracks" "Always"
- 1
-
- 1
- 0
- Dock
- 0
- Left
- 1
-
- 1
-
- 0
- 0
- wxID_ANY
- Magnetic Pads
- 1
-
- 0
-
-
- 0
-
- 1
- m_MagneticPadOptCtrl
- 1
-
-
- protected
- 1
-
- Resizable
- 2
- 1
-
- wxRA_SPECIFY_COLS
-
- 0
- Control capture of the cursor when the mouse enters a pad area.
-
- wxFILTER_NONE
- wxDefaultValidator
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 5
- wxALL|wxEXPAND
- 0
-
- 1
- 1
- 1
- 1
-
-
-
-
-
-
-
- 1
- 0
- "Never" "When creating tracks" "Always"
- 1
-
- 1
- 0
- Dock
- 0
- Left
- 1
-
- 1
-
- 0
- 0
- wxID_MAGNETIC_TRACKS
- Magnetic Tracks
- 1
-
- 0
-
-
- 0
-
- 1
- m_MagneticTrackOptCtrl
- 1
-
-
- protected
- 1
-
- Resizable
- 0
- 1
-
- wxRA_SPECIFY_COLS
-
- 0
- Control capture of the cursor when the mouse approaches a track.
-
- wxFILTER_NONE
- wxDefaultValidator
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 5
- wxEXPAND|wxALL
- 1
-
- wxID_ANY
- Pan and Zoom
-
- sbSizer2PAN
- wxVERTICAL
- 1
- none
-
-
- 5
- wxLEFT|wxRIGHT|wxTOP
- 0
-
- 1
- 1
- 1
- 1
-
-
-
-
-
-
-
- 1
- 0
- 0
- 1
-
- 1
- 0
- Dock
- 0
- Left
- 1
-
- 1
-
- 0
- 0
- wxID_ANY
- Ce&nter and warp cursor on zoom
-
- 0
-
-
- 0
-
- 1
- m_ZoomCenterOpt
- 1
-
-
- protected
- 1
-
- Resizable
- 1
-
-
-
- 0
- Center the cursor on screen when zooming.
-
- wxFILTER_NONE
- wxDefaultValidator
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 5
- wxLEFT|wxRIGHT|wxTOP
- 0
-
- 1
- 1
- 1
- 1
-
-
-
-
-
-
-
- 1
- 0
- 0
- 1
-
- 1
- 0
- Dock
- 0
- Left
- 1
-
- 1
-
- 0
- 0
- wxID_ANY
- Use touchpad to pan
-
- 0
-
-
- 0
-
- 1
- m_MousewheelPANOpt
- 1
-
-
- protected
- 1
-
- Resizable
- 1
-
-
-
- 0
- Enable touchpad-friendly controls (pan with scroll action, zoom with Ctrl+scroll).
-
- wxFILTER_NONE
- wxDefaultValidator
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 5
- wxALL
- 0
-
- 1
- 1
- 1
- 1
-
-
-
-
-
-
-
- 1
- 0
- 0
- 1
-
- 1
- 0
- Dock
- 0
- Left
- 1
-
- 1
-
- 0
- 0
- wxID_AUTOPAN
- &Pan while moving object
-
- 0
-
-
- 0
-
- 1
- m_AutoPANOpt
- 1
-
-
- protected
- 1
-
- Resizable
- 1
-
-
-
- 0
- When drawing a track or moving an item, pan when approaching the edge of the display.
-
- wxFILTER_NONE
- wxDefaultValidator
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/pcbnew/dialogs/dialog_general_options_BoardEditor_base.h b/pcbnew/dialogs/dialog_general_options_BoardEditor_base.h
index 8f84fd40f2..9cb869c289 100644
--- a/pcbnew/dialogs/dialog_general_options_BoardEditor_base.h
+++ b/pcbnew/dialogs/dialog_general_options_BoardEditor_base.h
@@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////////
-// C++ code generated with wxFormBuilder (version Nov 22 2017)
+// C++ code generated with wxFormBuilder (version Dec 30 2017)
// http://www.wxformbuilder.org/
//
// PLEASE DO *NOT* EDIT THIS FILE!
@@ -11,19 +11,21 @@
#include
#include
#include
+#include "widgets/stepped_slider.h"
#include "dialog_shim.h"
#include
-#include
+#include
#include
#include
#include
#include
-#include
-#include
#include
-#include
+#include
+#include
#include
#include
+#include
+#include
#include
#include
#include
@@ -40,41 +42,49 @@ class DIALOG_GENERALOPTIONS_BOARDEDITOR_BASE : public DIALOG_SHIM
protected:
enum
{
- wxID_POLAR_CTRL = 1000,
+ wxID_AUTOPAN = 1000,
+ wxID_POLAR_CTRL,
wxID_UNITS,
wxID_GENERAL_RATSNEST,
wxID_SEGMENTS45,
+ wxID_MAGNETIC_TRACKS,
wxID_DRC_ONOFF,
wxID_TRACK_AUTODEL,
- wxID_TRACKS45,
- wxID_MAGNETIC_TRACKS,
- wxID_AUTOPAN
+ wxID_TRACKS45
};
- wxRadioBox* m_PolarDisplay;
- wxRadioBox* m_UnitsSelection;
wxStaticText* m_staticTextautosave;
wxSpinCtrl* m_SaveTime;
- wxStaticText* m_staticTextRotationAngle;
- wxTextCtrl* m_RotationAngle;
+ wxStaticText* m_staticText1;
+ STEPPED_SLIDER* m_scaleSlider;
+ wxStaticText* m_staticText2;
+ wxCheckBox* m_scaleAuto;
+ wxCheckBox* m_checkBoxIconsInMenus;
+ wxCheckBox* m_ZoomCenterOpt;
+ wxCheckBox* m_MousewheelPANOpt;
+ wxCheckBox* m_AutoPANOpt;
+ wxRadioBox* m_PolarDisplay;
+ wxRadioBox* m_UnitsSelection;
wxCheckBox* m_ShowGlobalRatsnest;
+ wxCheckBox* m_Show_Page_Limits;
wxCheckBox* m_Segments_45_Only_Ctrl;
wxCheckBox* m_UseEditKeyForWidth;
+ wxStaticText* m_staticTextRotationAngle;
+ wxTextCtrl* m_RotationAngle;
+ wxRadioBox* m_MagneticPadOptCtrl;
+ wxRadioBox* m_MagneticTrackOptCtrl;
wxCheckBox* m_DrcOn;
wxCheckBox* m_TrackAutodel;
wxCheckBox* m_Track_45_Only_Ctrl;
wxCheckBox* m_Track_DoubleSegm_Ctrl;
- wxRadioBox* m_MagneticPadOptCtrl;
- wxRadioBox* m_MagneticTrackOptCtrl;
- wxCheckBox* m_ZoomCenterOpt;
- wxCheckBox* m_MousewheelPANOpt;
- wxCheckBox* m_AutoPANOpt;
wxStaticLine* m_staticline1;
wxStdDialogButtonSizer* m_sdbSizer;
wxButton* m_sdbSizerOK;
wxButton* m_sdbSizerCancel;
// Virtual event handlers, overide them in your derived class
+ virtual void OnScaleSlider( wxScrollEvent& event ) { event.Skip(); }
+ virtual void OnScaleAuto( wxCommandEvent& event ) { event.Skip(); }
virtual void OnCancelClick( wxCommandEvent& event ) { event.Skip(); }
virtual void OnOkClick( wxCommandEvent& event ) { event.Skip(); }