Dialog changes to go with new menu structure.
Move sketch mode stuff from Display Settings to View menu. Move Icons in Menus from View menu to General Preferences. Move Icon Scaling from Display Settings to General Preferences. Regroup some items in both dialogs for better comprehension.
This commit is contained in:
parent
af1281433b
commit
8b4e8fcd26
|
@ -113,7 +113,7 @@ GAL_OPTIONS_PANEL::GAL_OPTIONS_PANEL( wxWindow* aParent, KIGFX::GAL_DISPLAY_OPTI
|
||||||
};
|
};
|
||||||
int m_gridStyleNChoices = sizeof( m_gridStyleChoices ) / sizeof( wxString );
|
int m_gridStyleNChoices = sizeof( m_gridStyleChoices ) / sizeof( wxString );
|
||||||
m_gridStyle = new wxRadioBox( sGridSettings->GetStaticBox(),
|
m_gridStyle = new wxRadioBox( sGridSettings->GetStaticBox(),
|
||||||
wxID_ANY, _( "Grid Style" ),
|
wxID_ANY, _( "Grid style:" ),
|
||||||
wxDefaultPosition, wxDefaultSize,
|
wxDefaultPosition, wxDefaultSize,
|
||||||
m_gridStyleNChoices, m_gridStyleChoices, 1, wxRA_SPECIFY_COLS );
|
m_gridStyleNChoices, m_gridStyleChoices, 1, wxRA_SPECIFY_COLS );
|
||||||
sGridSettings->Add( m_gridStyle, 0, wxALL|wxEXPAND, 5 );
|
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" )
|
_( "Full window crosshair" )
|
||||||
};
|
};
|
||||||
|
|
||||||
wxString cursorShapeTitle = _( "Cursor Shape" );
|
wxString cursorShapeTitle = _( "Cursor shape:" );
|
||||||
|
|
||||||
int m_CursorShapeNChoices = sizeof( m_CursorShapeChoices ) / sizeof( wxString );
|
int m_CursorShapeNChoices = sizeof( m_CursorShapeChoices ) / sizeof( wxString );
|
||||||
m_cursorShape = new wxRadioBox( this, wxID_ANY,
|
m_cursorShape = new wxRadioBox( this, wxID_ANY,
|
||||||
|
|
|
@ -61,16 +61,13 @@ void PCB_EDIT_FRAME::InstallDisplayOptionsDialog( wxCommandEvent& aEvent )
|
||||||
|
|
||||||
DIALOG_DISPLAY_OPTIONS::DIALOG_DISPLAY_OPTIONS( PCB_EDIT_FRAME* parent ) :
|
DIALOG_DISPLAY_OPTIONS::DIALOG_DISPLAY_OPTIONS( PCB_EDIT_FRAME* parent ) :
|
||||||
DIALOG_DISPLAY_OPTIONS_BASE( parent ),
|
DIALOG_DISPLAY_OPTIONS_BASE( parent ),
|
||||||
m_parent( parent ),
|
m_parent( parent )
|
||||||
m_last_scale( -1 )
|
|
||||||
{
|
{
|
||||||
KIGFX::GAL_DISPLAY_OPTIONS& galOptions = m_parent->GetGalDisplayOptions();
|
KIGFX::GAL_DISPLAY_OPTIONS& galOptions = m_parent->GetGalDisplayOptions();
|
||||||
m_galOptsPanel = new GAL_OPTIONS_PANEL( this, galOptions );
|
m_galOptsPanel = new GAL_OPTIONS_PANEL( this, galOptions );
|
||||||
|
|
||||||
sLeftSizer->Add( m_galOptsPanel, 1, wxEXPAND, 0 );
|
sLeftSizer->Add( m_galOptsPanel, 1, wxEXPAND, 0 );
|
||||||
|
|
||||||
m_scaleSlider->SetStep( 25 );
|
|
||||||
|
|
||||||
SetFocus();
|
SetFocus();
|
||||||
|
|
||||||
m_sdbSizerOK->SetDefault();
|
m_sdbSizerOK->SetDefault();
|
||||||
|
@ -84,37 +81,14 @@ bool DIALOG_DISPLAY_OPTIONS::TransferDataToWindow()
|
||||||
{
|
{
|
||||||
const PCB_DISPLAY_OPTIONS* displ_opts = (PCB_DISPLAY_OPTIONS*) m_parent->GetDisplayOptions();
|
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(
|
m_OptDisplayTracksClearance->SetSelection( UTIL::GetConfigForVal(
|
||||||
traceClearanceSelectMap, displ_opts->m_ShowTrackClearanceMode ) );
|
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_OptDisplayPadClearence->SetValue( displ_opts->m_DisplayPadIsol );
|
||||||
m_OptDisplayPadNumber->SetValue( displ_opts->m_DisplayPadNum );
|
m_OptDisplayPadNumber->SetValue( displ_opts->m_DisplayPadNum );
|
||||||
m_OptDisplayPadNoConn->SetValue( m_parent->IsElementVisible( LAYER_NO_CONNECTS ) );
|
m_OptDisplayPadNoConn->SetValue( m_parent->IsElementVisible( LAYER_NO_CONNECTS ) );
|
||||||
m_OptDisplayDrawings->SetValue( displ_opts->m_DisplayDrawItemsFill == SKETCH );
|
|
||||||
m_ShowNetNamesOption->SetSelection( displ_opts->m_DisplayNetNamesMode );
|
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();
|
m_galOptsPanel->TransferDataToWindow();
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
@ -128,19 +102,9 @@ bool DIALOG_DISPLAY_OPTIONS::TransferDataFromWindow()
|
||||||
{
|
{
|
||||||
PCB_DISPLAY_OPTIONS* displ_opts = (PCB_DISPLAY_OPTIONS*) m_parent->GetDisplayOptions();
|
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(
|
displ_opts->m_ShowTrackClearanceMode = UTIL::GetValFromConfig(
|
||||||
traceClearanceSelectMap, m_OptDisplayTracksClearance->GetSelection() );
|
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_DisplayPadIsol = m_OptDisplayPadClearence->GetValue();
|
||||||
|
|
||||||
displ_opts->m_DisplayPadNum = m_OptDisplayPadNumber->GetValue();
|
displ_opts->m_DisplayPadNum = m_OptDisplayPadNumber->GetValue();
|
||||||
|
@ -148,7 +112,6 @@ bool DIALOG_DISPLAY_OPTIONS::TransferDataFromWindow()
|
||||||
m_parent->SetElementVisibility( LAYER_NO_CONNECTS,
|
m_parent->SetElementVisibility( LAYER_NO_CONNECTS,
|
||||||
m_OptDisplayPadNoConn->GetValue() );
|
m_OptDisplayPadNoConn->GetValue() );
|
||||||
|
|
||||||
displ_opts->m_DisplayDrawItemsFill = not m_OptDisplayDrawings->GetValue();
|
|
||||||
displ_opts->m_DisplayNetNamesMode = m_ShowNetNamesOption->GetSelection();
|
displ_opts->m_DisplayNetNamesMode = m_ShowNetNamesOption->GetSelection();
|
||||||
|
|
||||||
m_galOptsPanel->TransferDataFromWindow();
|
m_galOptsPanel->TransferDataFromWindow();
|
||||||
|
@ -162,34 +125,9 @@ bool DIALOG_DISPLAY_OPTIONS::TransferDataFromWindow()
|
||||||
view->RecacheAllItems();
|
view->RecacheAllItems();
|
||||||
view->MarkTargetDirty( KIGFX::TARGET_NONCACHED );
|
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();
|
m_parent->GetCanvas()->Refresh();
|
||||||
|
|
||||||
return true;
|
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 );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
|
@ -34,13 +34,8 @@ public:
|
||||||
bool TransferDataFromWindow() override;
|
bool TransferDataFromWindow() override;
|
||||||
bool TransferDataToWindow() override;
|
bool TransferDataToWindow() override;
|
||||||
|
|
||||||
protected:
|
|
||||||
void OnScaleSlider( wxScrollEvent& aEvent ) override;
|
|
||||||
void OnScaleAuto( wxCommandEvent& aEvent ) override;
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
PCB_EDIT_FRAME* m_parent;
|
PCB_EDIT_FRAME* m_parent;
|
||||||
int m_last_scale;
|
|
||||||
|
|
||||||
GAL_OPTIONS_PANEL* m_galOptsPanel;
|
GAL_OPTIONS_PANEL* m_galOptsPanel;
|
||||||
};
|
};
|
||||||
|
|
|
@ -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/
|
// http://www.wxformbuilder.org/
|
||||||
//
|
//
|
||||||
// PLEASE DO *NOT* EDIT THIS FILE!
|
// 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 );
|
bupperSizer->Add( sLeftSizer, 1, wxEXPAND, 5 );
|
||||||
|
|
||||||
wxBoxSizer* bSizer5;
|
wxBoxSizer* bRightSizer;
|
||||||
bSizer5 = new wxBoxSizer( wxVERTICAL );
|
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") };
|
wxString m_ShowNetNamesOptionChoices[] = { _("Do not show"), _("On pads"), _("On tracks"), _("On pads and tracks") };
|
||||||
int m_ShowNetNamesOptionNChoices = sizeof( m_ShowNetNamesOptionChoices ) / sizeof( wxString );
|
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->SetSelection( 0 );
|
||||||
m_ShowNetNamesOption->SetToolTip( _("Show or hide net names on pads and/or tracks.") );
|
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") };
|
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 );
|
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 = new wxRadioBox( sbClearance->GetStaticBox(), ID_SHOW_CLEARANCE, _("Show track clearance:"), wxDefaultPosition, wxDefaultSize, m_OptDisplayTracksClearanceNChoices, m_OptDisplayTracksClearanceChoices, 1, wxRA_SPECIFY_COLS );
|
||||||
m_OptDisplayTracksClearance->SetSelection( 0 );
|
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.") );
|
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;
|
m_OptDisplayPadClearence = new wxCheckBox( sbClearance->GetStaticBox(), wxID_ANY, _("Show pad clearance"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
sbSizer5 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("User Interface:") ), wxVERTICAL );
|
sbClearance->Add( m_OptDisplayPadClearence, 0, wxALL, 10 );
|
||||||
|
|
||||||
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 );
|
|
||||||
|
|
||||||
|
|
||||||
fgSizer1->Add( 0, 0, 1, wxEXPAND, 5 );
|
bRightSizer->Add( sbClearance, 1, wxALL|wxEXPAND, 5 );
|
||||||
|
|
||||||
m_scaleAuto = new wxCheckBox( sbSizer5->GetStaticBox(), wxID_ANY, _("Auto"), wxDefaultPosition, wxDefaultSize, 0 );
|
|
||||||
fgSizer1->Add( m_scaleAuto, 0, wxALL, 5 );
|
|
||||||
|
|
||||||
|
|
||||||
fgSizer1->Add( 0, 0, 1, wxEXPAND, 5 );
|
bupperSizer->Add( bRightSizer, 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 );
|
|
||||||
|
|
||||||
|
|
||||||
bMainSizer->Add( bupperSizer, 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->SetSizer( bMainSizer );
|
||||||
this->Layout();
|
this->Layout();
|
||||||
bMainSizer->Fit( this );
|
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()
|
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 );
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -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/
|
// http://www.wxformbuilder.org/
|
||||||
//
|
//
|
||||||
// PLEASE DO *NOT* EDIT THIS FILE!
|
// PLEASE DO *NOT* EDIT THIS FILE!
|
||||||
|
@ -11,7 +11,6 @@
|
||||||
#include <wx/artprov.h>
|
#include <wx/artprov.h>
|
||||||
#include <wx/xrc/xmlres.h>
|
#include <wx/xrc/xmlres.h>
|
||||||
#include <wx/intl.h>
|
#include <wx/intl.h>
|
||||||
#include "widgets/stepped_slider.h"
|
|
||||||
#include "dialog_shim.h"
|
#include "dialog_shim.h"
|
||||||
#include <wx/sizer.h>
|
#include <wx/sizer.h>
|
||||||
#include <wx/gdicmn.h>
|
#include <wx/gdicmn.h>
|
||||||
|
@ -20,8 +19,6 @@
|
||||||
#include <wx/font.h>
|
#include <wx/font.h>
|
||||||
#include <wx/colour.h>
|
#include <wx/colour.h>
|
||||||
#include <wx/settings.h>
|
#include <wx/settings.h>
|
||||||
#include <wx/stattext.h>
|
|
||||||
#include <wx/slider.h>
|
|
||||||
#include <wx/checkbox.h>
|
#include <wx/checkbox.h>
|
||||||
#include <wx/statbox.h>
|
#include <wx/statbox.h>
|
||||||
#include <wx/button.h>
|
#include <wx/button.h>
|
||||||
|
@ -44,30 +41,13 @@ class DIALOG_DISPLAY_OPTIONS_BASE : public DIALOG_SHIM
|
||||||
|
|
||||||
wxBoxSizer* sLeftSizer;
|
wxBoxSizer* sLeftSizer;
|
||||||
wxRadioBox* m_ShowNetNamesOption;
|
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_OptDisplayPadNumber;
|
||||||
wxCheckBox* m_OptDisplayPadNoConn;
|
wxCheckBox* m_OptDisplayPadNoConn;
|
||||||
wxCheckBox* m_OptDisplayDrawings;
|
wxRadioBox* m_OptDisplayTracksClearance;
|
||||||
wxCheckBox* m_Show_Page_Limits;
|
wxCheckBox* m_OptDisplayPadClearence;
|
||||||
wxStdDialogButtonSizer* m_sdbSizer;
|
wxStdDialogButtonSizer* m_sdbSizer;
|
||||||
wxButton* m_sdbSizerOK;
|
wxButton* m_sdbSizerOK;
|
||||||
wxButton* m_sdbSizerCancel;
|
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:
|
public:
|
||||||
|
|
||||||
|
|
|
@ -40,14 +40,18 @@
|
||||||
#include <pcbnew_id.h>
|
#include <pcbnew_id.h>
|
||||||
#include <class_board.h>
|
#include <class_board.h>
|
||||||
#include <collectors.h>
|
#include <collectors.h>
|
||||||
|
#include <pgm_base.h>
|
||||||
#include <dialog_general_options.h>
|
#include <dialog_general_options.h>
|
||||||
|
|
||||||
|
|
||||||
DIALOG_GENERALOPTIONS::DIALOG_GENERALOPTIONS( PCB_EDIT_FRAME* parent ) :
|
DIALOG_GENERALOPTIONS::DIALOG_GENERALOPTIONS( PCB_EDIT_FRAME* parent ) :
|
||||||
DIALOG_GENERALOPTIONS_BOARDEDITOR_BASE( parent )
|
DIALOG_GENERALOPTIONS_BOARDEDITOR_BASE( parent ),
|
||||||
|
m_last_scale( -1 )
|
||||||
{
|
{
|
||||||
init();
|
init();
|
||||||
|
|
||||||
|
m_scaleSlider->SetStep( 25 );
|
||||||
|
|
||||||
GetSizer()->SetSizeHints( this );
|
GetSizer()->SetSizeHints( this );
|
||||||
Center();
|
Center();
|
||||||
}
|
}
|
||||||
|
@ -85,6 +89,45 @@ void DIALOG_GENERALOPTIONS::init()
|
||||||
m_MagneticPadOptCtrl->SetSelection( GetParent()->Settings().m_magneticPads );
|
m_MagneticPadOptCtrl->SetSelection( GetParent()->Settings().m_magneticPads );
|
||||||
m_MagneticTrackOptCtrl->SetSelection( GetParent()->Settings().m_magneticTracks );
|
m_MagneticTrackOptCtrl->SetSelection( GetParent()->Settings().m_magneticTracks );
|
||||||
m_UseEditKeyForWidth->SetValue( GetParent()->Settings().m_editActionChangesTrackWidth );
|
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_magneticTracks = (MAGNETIC_PAD_OPTION_VALUES) m_MagneticTrackOptCtrl->GetSelection();
|
||||||
GetParent()->Settings().m_editActionChangesTrackWidth = m_UseEditKeyForWidth->GetValue();
|
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 );
|
EndModal( wxID_OK );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -31,12 +31,18 @@ class DIALOG_GENERALOPTIONS : public DIALOG_GENERALOPTIONS_BOARDEDITOR_BASE
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
BOARD* m_Board;
|
BOARD* m_Board;
|
||||||
|
int m_last_scale;
|
||||||
|
|
||||||
void init();
|
void init();
|
||||||
|
|
||||||
public:
|
public:
|
||||||
DIALOG_GENERALOPTIONS( PCB_EDIT_FRAME* parent );
|
DIALOG_GENERALOPTIONS( PCB_EDIT_FRAME* parent );
|
||||||
~DIALOG_GENERALOPTIONS() {};
|
~DIALOG_GENERALOPTIONS() {};
|
||||||
|
|
||||||
|
protected:
|
||||||
|
void OnScaleSlider( wxScrollEvent& aEvent ) override;
|
||||||
|
void OnScaleAuto( wxCommandEvent& aEvent ) override;
|
||||||
|
|
||||||
void OnOkClick( wxCommandEvent& event ) override;
|
void OnOkClick( wxCommandEvent& event ) override;
|
||||||
void OnCancelClick( wxCommandEvent& event ) override;
|
void OnCancelClick( wxCommandEvent& event ) override;
|
||||||
|
|
||||||
|
|
|
@ -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/
|
// http://www.wxformbuilder.org/
|
||||||
//
|
//
|
||||||
// PLEASE DO *NOT* EDIT THIS FILE!
|
// PLEASE DO *NOT* EDIT THIS FILE!
|
||||||
|
@ -22,30 +22,9 @@ DIALOG_GENERALOPTIONS_BOARDEDITOR_BASE::DIALOG_GENERALOPTIONS_BOARDEDITOR_BASE(
|
||||||
wxBoxSizer* bLeftSizer;
|
wxBoxSizer* bLeftSizer;
|
||||||
bLeftSizer = new wxBoxSizer( wxVERTICAL );
|
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;
|
wxFlexGridSizer* fgSizer1;
|
||||||
fgSizer1 = new wxFlexGridSizer( 0, 2, 0, 0 );
|
fgSizer1 = new wxFlexGridSizer( 0, 2, 0, 0 );
|
||||||
|
fgSizer1->AddGrowableCol( 1 );
|
||||||
fgSizer1->SetFlexibleDirection( wxBOTH );
|
fgSizer1->SetFlexibleDirection( wxBOTH );
|
||||||
fgSizer1->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
|
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 = 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.") );
|
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 );
|
fgSizer1->Add( m_SaveTime, 0, wxALIGN_CENTER_VERTICAL|wxALL|wxEXPAND, 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 );
|
|
||||||
|
|
||||||
|
|
||||||
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;
|
wxStaticBoxSizer* bOptionsSizer;
|
||||||
bOptionsSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Options") ), wxVERTICAL );
|
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 );
|
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 = 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.") );
|
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 );
|
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 );
|
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;
|
wxStaticBoxSizer* bLegacyOptionsSizer;
|
||||||
bLegacyOptionsSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Legacy Routing Options") ), wxVERTICAL );
|
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 );
|
bLegacyOptionsSizer->Add( m_Track_DoubleSegm_Ctrl, 0, wxBOTTOM|wxLEFT|wxRIGHT, 5 );
|
||||||
|
|
||||||
|
|
||||||
bMiddleLeftSizer->Add( bLegacyOptionsSizer, 0, wxEXPAND|wxALL, 5 );
|
bRightSizer->Add( bLegacyOptionsSizer, 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* 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 );
|
|
||||||
|
|
||||||
|
|
||||||
bSizerUpper->Add( bRightSizer, 0, wxALL|wxEXPAND, 5 );
|
bSizerUpper->Add( bRightSizer, 0, wxALL|wxEXPAND, 5 );
|
||||||
|
@ -189,6 +244,16 @@ DIALOG_GENERALOPTIONS_BOARDEDITOR_BASE::DIALOG_GENERALOPTIONS_BOARDEDITOR_BASE(
|
||||||
bMainSizer->Fit( this );
|
bMainSizer->Fit( this );
|
||||||
|
|
||||||
// Connect Events
|
// 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_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 );
|
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()
|
DIALOG_GENERALOPTIONS_BOARDEDITOR_BASE::~DIALOG_GENERALOPTIONS_BOARDEDITOR_BASE()
|
||||||
{
|
{
|
||||||
// Disconnect Events
|
// 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_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 );
|
m_sdbSizerOK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_GENERALOPTIONS_BOARDEDITOR_BASE::OnOkClick ), NULL, this );
|
||||||
|
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -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/
|
// http://www.wxformbuilder.org/
|
||||||
//
|
//
|
||||||
// PLEASE DO *NOT* EDIT THIS FILE!
|
// PLEASE DO *NOT* EDIT THIS FILE!
|
||||||
|
@ -11,19 +11,21 @@
|
||||||
#include <wx/artprov.h>
|
#include <wx/artprov.h>
|
||||||
#include <wx/xrc/xmlres.h>
|
#include <wx/xrc/xmlres.h>
|
||||||
#include <wx/intl.h>
|
#include <wx/intl.h>
|
||||||
|
#include "widgets/stepped_slider.h"
|
||||||
#include "dialog_shim.h"
|
#include "dialog_shim.h"
|
||||||
#include <wx/string.h>
|
#include <wx/string.h>
|
||||||
#include <wx/radiobox.h>
|
#include <wx/stattext.h>
|
||||||
#include <wx/gdicmn.h>
|
#include <wx/gdicmn.h>
|
||||||
#include <wx/font.h>
|
#include <wx/font.h>
|
||||||
#include <wx/colour.h>
|
#include <wx/colour.h>
|
||||||
#include <wx/settings.h>
|
#include <wx/settings.h>
|
||||||
#include <wx/sizer.h>
|
|
||||||
#include <wx/stattext.h>
|
|
||||||
#include <wx/spinctrl.h>
|
#include <wx/spinctrl.h>
|
||||||
#include <wx/textctrl.h>
|
#include <wx/sizer.h>
|
||||||
|
#include <wx/slider.h>
|
||||||
#include <wx/checkbox.h>
|
#include <wx/checkbox.h>
|
||||||
#include <wx/statbox.h>
|
#include <wx/statbox.h>
|
||||||
|
#include <wx/radiobox.h>
|
||||||
|
#include <wx/textctrl.h>
|
||||||
#include <wx/statline.h>
|
#include <wx/statline.h>
|
||||||
#include <wx/button.h>
|
#include <wx/button.h>
|
||||||
#include <wx/dialog.h>
|
#include <wx/dialog.h>
|
||||||
|
@ -40,41 +42,49 @@ class DIALOG_GENERALOPTIONS_BOARDEDITOR_BASE : public DIALOG_SHIM
|
||||||
protected:
|
protected:
|
||||||
enum
|
enum
|
||||||
{
|
{
|
||||||
wxID_POLAR_CTRL = 1000,
|
wxID_AUTOPAN = 1000,
|
||||||
|
wxID_POLAR_CTRL,
|
||||||
wxID_UNITS,
|
wxID_UNITS,
|
||||||
wxID_GENERAL_RATSNEST,
|
wxID_GENERAL_RATSNEST,
|
||||||
wxID_SEGMENTS45,
|
wxID_SEGMENTS45,
|
||||||
|
wxID_MAGNETIC_TRACKS,
|
||||||
wxID_DRC_ONOFF,
|
wxID_DRC_ONOFF,
|
||||||
wxID_TRACK_AUTODEL,
|
wxID_TRACK_AUTODEL,
|
||||||
wxID_TRACKS45,
|
wxID_TRACKS45
|
||||||
wxID_MAGNETIC_TRACKS,
|
|
||||||
wxID_AUTOPAN
|
|
||||||
};
|
};
|
||||||
|
|
||||||
wxRadioBox* m_PolarDisplay;
|
|
||||||
wxRadioBox* m_UnitsSelection;
|
|
||||||
wxStaticText* m_staticTextautosave;
|
wxStaticText* m_staticTextautosave;
|
||||||
wxSpinCtrl* m_SaveTime;
|
wxSpinCtrl* m_SaveTime;
|
||||||
wxStaticText* m_staticTextRotationAngle;
|
wxStaticText* m_staticText1;
|
||||||
wxTextCtrl* m_RotationAngle;
|
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_ShowGlobalRatsnest;
|
||||||
|
wxCheckBox* m_Show_Page_Limits;
|
||||||
wxCheckBox* m_Segments_45_Only_Ctrl;
|
wxCheckBox* m_Segments_45_Only_Ctrl;
|
||||||
wxCheckBox* m_UseEditKeyForWidth;
|
wxCheckBox* m_UseEditKeyForWidth;
|
||||||
|
wxStaticText* m_staticTextRotationAngle;
|
||||||
|
wxTextCtrl* m_RotationAngle;
|
||||||
|
wxRadioBox* m_MagneticPadOptCtrl;
|
||||||
|
wxRadioBox* m_MagneticTrackOptCtrl;
|
||||||
wxCheckBox* m_DrcOn;
|
wxCheckBox* m_DrcOn;
|
||||||
wxCheckBox* m_TrackAutodel;
|
wxCheckBox* m_TrackAutodel;
|
||||||
wxCheckBox* m_Track_45_Only_Ctrl;
|
wxCheckBox* m_Track_45_Only_Ctrl;
|
||||||
wxCheckBox* m_Track_DoubleSegm_Ctrl;
|
wxCheckBox* m_Track_DoubleSegm_Ctrl;
|
||||||
wxRadioBox* m_MagneticPadOptCtrl;
|
|
||||||
wxRadioBox* m_MagneticTrackOptCtrl;
|
|
||||||
wxCheckBox* m_ZoomCenterOpt;
|
|
||||||
wxCheckBox* m_MousewheelPANOpt;
|
|
||||||
wxCheckBox* m_AutoPANOpt;
|
|
||||||
wxStaticLine* m_staticline1;
|
wxStaticLine* m_staticline1;
|
||||||
wxStdDialogButtonSizer* m_sdbSizer;
|
wxStdDialogButtonSizer* m_sdbSizer;
|
||||||
wxButton* m_sdbSizerOK;
|
wxButton* m_sdbSizerOK;
|
||||||
wxButton* m_sdbSizerCancel;
|
wxButton* m_sdbSizerCancel;
|
||||||
|
|
||||||
// Virtual event handlers, overide them in your derived class
|
// 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 OnCancelClick( wxCommandEvent& event ) { event.Skip(); }
|
||||||
virtual void OnOkClick( wxCommandEvent& event ) { event.Skip(); }
|
virtual void OnOkClick( wxCommandEvent& event ) { event.Skip(); }
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue