Created
January 25, 2016 19:33
-
-
Save d235j/460390585ef45ad5d255 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
=== modified file '3d-viewer/3d_canvas.cpp' | |
--- 3d-viewer/3d_canvas.cpp 2016-01-25 00:18:29 +0000 | |
+++ 3d-viewer/3d_canvas.cpp 2016-01-25 18:29:20 +0000 | |
@@ -284,19 +284,18 @@ | |
void EDA_3D_CANVAS::OnMouseWheel( wxMouseEvent& event ) | |
{ | |
- if( event.ShiftDown() ) | |
+ double delta = 0.05 * GetPrm3DVisu().m_Zoom * event.GetWheelRotation(); | |
+ | |
+ if( event.ShiftDown() || true ) | |
{ | |
- if( event.GetWheelRotation() < 0 ) | |
- SetView3D( WXK_UP ); // move up | |
+ if( event.GetWheelAxis() == wxMOUSE_WHEEL_HORIZONTAL ) | |
+ m_draw3dOffset.x -= delta; | |
else | |
- SetView3D( WXK_DOWN ); // move down | |
+ m_draw3dOffset.y -= delta; | |
} | |
else if( event.ControlDown() ) | |
{ | |
- if( event.GetWheelRotation() > 0 ) | |
- SetView3D( WXK_RIGHT ); // move right | |
- else | |
- SetView3D( WXK_LEFT ); // move left | |
+ m_draw3dOffset.y -= delta; | |
} | |
else | |
{ | |
@@ -310,10 +309,10 @@ | |
else | |
GetPrm3DVisu().m_Zoom *= 1.4; | |
- DisplayStatus(); | |
- Refresh( false ); | |
} | |
+ DisplayStatus(); | |
+ Refresh( false ); | |
GetPrm3DVisu().m_Beginx = event.GetX(); | |
GetPrm3DVisu().m_Beginy = event.GetY(); | |
} | |
=== modified file 'common/draw_panel.cpp' | |
--- common/draw_panel.cpp 2016-01-25 00:18:29 +0000 | |
+++ common/draw_panel.cpp 2016-01-25 19:27:55 +0000 | |
@@ -48,6 +48,7 @@ | |
// keys to store options in config: | |
#define ENBL_ZOOM_NO_CENTER_KEY wxT( "ZoomNoCenter" ) | |
+#define ENBL_MOUSEWHEEL_PAN_KEY wxT( "MousewheelPAN" ) | |
#define ENBL_MIDDLE_BUTT_PAN_KEY wxT( "MiddleButtonPAN" ) | |
#define MIDDLE_BUTT_PAN_LIMITED_KEY wxT( "MiddleBtnPANLimited" ) | |
#define ENBL_AUTO_PAN_KEY wxT( "AutoPAN" ) | |
@@ -118,6 +119,7 @@ | |
m_canStartBlock = -1; // Command block can start if >= 0 | |
m_abortRequest = false; | |
m_enableMiddleButtonPan = true; | |
+ m_enableMousewheelPan = false; | |
m_enableZoomNoCenter = false; | |
m_panScrollbarLimits = false; | |
m_enableAutoPan = true; | |
@@ -131,6 +133,7 @@ | |
if( cfg ) | |
{ | |
+ cfg->Read( ENBL_MOUSEWHEEL_PAN_KEY, &m_enableMousewheelPan, false ); | |
cfg->Read( ENBL_MIDDLE_BUTT_PAN_KEY, &m_enableMiddleButtonPan, true ); | |
cfg->Read( ENBL_ZOOM_NO_CENTER_KEY, &m_enableZoomNoCenter, false ); | |
cfg->Read( MIDDLE_BUTT_PAN_LIMITED_KEY, &m_panScrollbarLimits, false ); | |
@@ -160,6 +163,7 @@ | |
if( cfg ) | |
{ | |
+ cfg->Write( ENBL_MOUSEWHEEL_PAN_KEY, m_enableMousewheelPan ); | |
cfg->Write( ENBL_MIDDLE_BUTT_PAN_KEY, m_enableMiddleButtonPan ); | |
cfg->Write( ENBL_ZOOM_NO_CENTER_KEY, m_enableZoomNoCenter ); | |
cfg->Write( MIDDLE_BUTT_PAN_LIMITED_KEY, m_panScrollbarLimits ); | |
@@ -432,7 +436,7 @@ | |
// so we skip these events. | |
// Note they are here just in case, because they are not actually used | |
// in Kicad | |
-#if wxCHECK_VERSION( 3, 1, 0 ) || !wxCHECK_VERSION( 2, 9, 5 ) || !defined (__WINDOWS__) | |
+#if wxCHECK_VERSION( 3, 1, 0 ) || !wxCHECK_VERSION( 2, 9, 5 ) || (!defined (__WINDOWS__) && !defined (__WXMAC__) ) | |
int maxX = unitsX - csizeX; | |
int maxY = unitsY - csizeY; | |
@@ -955,41 +959,40 @@ | |
int axis = event.GetWheelAxis(); | |
- // This is a zoom in or out command | |
- if( event.GetWheelRotation() > 0 ) | |
- { | |
- if( event.ShiftDown() && !event.ControlDown() ) | |
- { | |
- if( axis == 0 ) | |
- cmd.SetId( ID_PAN_UP ); | |
- else | |
- cmd.SetId( ID_PAN_RIGHT ); | |
- } | |
- else if( event.ControlDown() && !event.ShiftDown() ) | |
- cmd.SetId( ID_PAN_LEFT ); | |
- else if( offCenterReq ) | |
- cmd.SetId( ID_OFFCENTER_ZOOM_IN ); | |
- else | |
- cmd.SetId( ID_POPUP_ZOOM_IN ); | |
- } | |
- else if( event.GetWheelRotation() < 0 ) | |
- { | |
- if( event.ShiftDown() && !event.ControlDown() ) | |
- { | |
- if( axis == 0 ) | |
- cmd.SetId( ID_PAN_DOWN ); | |
- else | |
- cmd.SetId( ID_PAN_LEFT ); | |
- } | |
- else if( event.ControlDown() && !event.ShiftDown() ) | |
- cmd.SetId( ID_PAN_RIGHT ); | |
- else if( offCenterReq ) | |
- cmd.SetId( ID_OFFCENTER_ZOOM_OUT ); | |
- else | |
- cmd.SetId( ID_POPUP_ZOOM_OUT ); | |
- } | |
- | |
- GetEventHandler()->ProcessEvent( cmd ); | |
+ wxPoint delta; | |
+ wxPoint start = GetViewStart(); | |
+ int wheelRotation = event.GetWheelRotation(); | |
+ | |
+ if( ( m_enableMousewheelPan || event.ShiftDown() ) && !event.ControlDown() ) | |
+ { | |
+ if( axis == wxMOUSE_WHEEL_HORIZONTAL ) | |
+ delta.x = -wheelRotation; | |
+ else | |
+ delta.y = -wheelRotation; | |
+ } | |
+ else if( event.ControlDown() && !event.ShiftDown() && !m_enableMousewheelPan ) | |
+ delta.y = event.wheelRotation; | |
+ else if( offCenterReq ) | |
+ { | |
+ // Don't let wxWidgets invert the wheel rotation when shift+ctrl-modified. | |
+ if( axis == wxMOUSE_WHEEL_HORIZONTAL ) | |
+ wheelRotation = -wheelRotation; | |
+ cmd.SetId( wheelRotation > 0 ? ID_OFFCENTER_ZOOM_IN : ID_OFFCENTER_ZOOM_OUT ); | |
+ } | |
+ else | |
+ cmd.SetId( wheelRotation > 0 ? ID_POPUP_ZOOM_IN : ID_POPUP_ZOOM_OUT ); | |
+ | |
+ if( cmd.GetId() ) | |
+ { | |
+ GetEventHandler()->ProcessEvent( cmd ); | |
+ } | |
+ else | |
+ { | |
+ wxPoint newStart = start - delta; | |
+ wxPoint center = GetScreenCenterLogicalPosition(); | |
+ GetParent()->SetScrollCenterPosition(center); | |
+ Scroll(newStart); | |
+ } | |
event.Skip(); | |
} | |
=== modified file 'common/draw_panel_gal.cpp' | |
--- common/draw_panel_gal.cpp 2016-01-25 00:18:29 +0000 | |
+++ common/draw_panel_gal.cpp 2016-01-25 18:51:39 +0000 | |
@@ -31,6 +31,7 @@ | |
#include <wx/filename.h> | |
#include <confirm.h> | |
+#include <kiface_i.h> | |
#include <class_draw_panel_gal.h> | |
#include <view/view.h> | |
#include <view/wx_view_controls.h> | |
@@ -49,6 +50,9 @@ | |
#include <profile.h> | |
#endif /* __WXDEBUG__ */ | |
+// keys to retrieve options in config: | |
+#define ENBL_MOUSEWHEEL_PAN_KEY wxT( "MousewheelPAN" ) | |
+ | |
EDA_DRAW_PANEL_GAL::EDA_DRAW_PANEL_GAL( wxWindow* aParentWindow, wxWindowID aWindowId, | |
const wxPoint& aPosition, const wxSize& aSize, | |
GAL_TYPE aGalType ) : | |
@@ -99,12 +103,21 @@ | |
// on updated viewport data. | |
m_viewControls = new KIGFX::WX_VIEW_CONTROLS( m_view, this ); | |
+ m_enableMousewheelPan = false; | |
+ | |
// Set up timer that prevents too frequent redraw commands | |
m_refreshTimer.SetOwner( this ); | |
m_pendingRefresh = false; | |
m_drawing = false; | |
m_drawingEnabled = false; | |
Connect( wxEVT_TIMER, wxTimerEventHandler( EDA_DRAW_PANEL_GAL::onRefreshTimer ), NULL, this ); | |
+ | |
+ wxConfigBase* cfg = Kiface().KifaceSettings(); | |
+ | |
+ if( cfg ) | |
+ { | |
+ cfg->Read( ENBL_MOUSEWHEEL_PAN_KEY, &m_enableMousewheelPan, false ); | |
+ } | |
} | |
=== modified file 'common/view/wx_view_controls.cpp' | |
--- common/view/wx_view_controls.cpp 2016-01-25 00:18:29 +0000 | |
+++ common/view/wx_view_controls.cpp 2016-01-25 19:31:48 +0000 | |
@@ -95,22 +95,22 @@ | |
void WX_VIEW_CONTROLS::onWheel( wxMouseEvent& aEvent ) | |
{ | |
const double wheelPanSpeed = 0.001; | |
+ VECTOR2D scrollVec = m_view->ToWorld( m_view->GetScreenPixelSize(), false ) * | |
+ ( (double) aEvent.GetWheelRotation() * wheelPanSpeed ); | |
+ bool mousewheelPanEnabled = ((EDA_DRAW_PANEL_GAL *)m_parentPanel)->GetEnableMousewheelPan(); | |
- if( aEvent.ControlDown() || aEvent.ShiftDown() ) | |
+ int axis = aEvent.GetWheelAxis(); | |
+ if( !aEvent.ControlDown() && ( aEvent.ShiftDown() || mousewheelPanEnabled) ) | |
{ | |
// Scrolling | |
- VECTOR2D scrollVec = m_view->ToWorld( m_view->GetScreenPixelSize(), false ) * | |
- ( (double) aEvent.GetWheelRotation() * wheelPanSpeed ); | |
- double scrollSpeed; | |
- | |
- if( std::abs( scrollVec.x ) > std::abs( scrollVec.y ) ) | |
- scrollSpeed = scrollVec.x; | |
- else | |
- scrollSpeed = scrollVec.y; | |
- | |
- VECTOR2D delta( aEvent.ControlDown() ? -scrollSpeed : 0.0, | |
- aEvent.ShiftDown() ? -scrollSpeed : 0.0 ); | |
- | |
+ VECTOR2D delta( axis == wxMOUSE_WHEEL_HORIZONTAL ? scrollVec.x : 0.0, | |
+ axis == wxMOUSE_WHEEL_VERTICAL ? -scrollVec.y : 0.0 ); | |
+ | |
+ m_view->SetCenter( m_view->GetCenter() + delta ); | |
+ } | |
+ else if( aEvent.ControlDown() && !aEvent.ShiftDown() && !mousewheelPanEnabled ) | |
+ { | |
+ VECTOR2D delta( 0.0, -scrollVec.y ); | |
m_view->SetCenter( m_view->GetCenter() + delta ); | |
} | |
else | |
@@ -138,6 +138,10 @@ | |
m_timeStamp = timeStamp; | |
+ // Don't let wxWidgets invert the wheel rotation when shift+ctrl-modified. | |
+ if( axis == wxMOUSE_WHEEL_HORIZONTAL ) | |
+ rotation = -rotation; | |
+ | |
// Set scaling speed depending on scroll wheel event interval | |
if( timeDiff < 500 && timeDiff > 0 ) | |
{ | |
=== modified file 'eeschema/dialogs/dialog_eeschema_options.h' | |
--- eeschema/dialogs/dialog_eeschema_options.h 2016-01-16 23:51:38 +0000 | |
+++ eeschema/dialogs/dialog_eeschema_options.h 2016-01-25 18:44:35 +0000 | |
@@ -334,6 +334,20 @@ | |
} | |
/** | |
+ * Function SetEnableMousewheelPan | |
+ * Sets the MousewheelPan setting in the dialog | |
+ * | |
+ * @param enable The boolean value to set the AutoPan value in the dialog | |
+ */ | |
+ void SetEnableMousewheelPan( bool enable ) { m_checkEnableMousewheelPan->SetValue( enable ); } | |
+ | |
+ /** | |
+ * Function GetEnableMousewheelPan | |
+ * Return the MousewheelPan setting from the dialog | |
+ */ | |
+ bool GetEnableMousewheelPan( void ) { return m_checkEnableMousewheelPan->GetValue(); } | |
+ | |
+ /** | |
* Function SetEnableAutoPan | |
* Sets the AutoPan setting in the dialog | |
* | |
=== modified file 'eeschema/dialogs/dialog_eeschema_options_base.cpp' | |
--- eeschema/dialogs/dialog_eeschema_options_base.cpp 2016-01-16 23:51:38 +0000 | |
+++ eeschema/dialogs/dialog_eeschema_options_base.cpp 2016-01-25 18:56:48 +0000 | |
@@ -20,18 +20,18 @@ | |
DIALOG_EESCHEMA_OPTIONS_BASE::DIALOG_EESCHEMA_OPTIONS_BASE( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : DIALOG_SHIM( parent, id, title, pos, size, style ) | |
{ | |
this->SetSizeHints( wxDefaultSize, wxDefaultSize ); | |
- | |
+ | |
wxBoxSizer* mainSizer; | |
mainSizer = new wxBoxSizer( wxVERTICAL ); | |
- | |
+ | |
wxBoxSizer* bOptionsSizer; | |
bOptionsSizer = new wxBoxSizer( wxVERTICAL ); | |
- | |
+ | |
m_notebook = new wxNotebook( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 ); | |
m_panel5 = new wxPanel( m_notebook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); | |
wxBoxSizer* bSizer82; | |
bSizer82 = new wxBoxSizer( wxVERTICAL ); | |
- | |
+ | |
wxFlexGridSizer* fgSizer32; | |
fgSizer32 = new wxFlexGridSizer( 0, 3, 0, 0 ); | |
fgSizer32->AddGrowableCol( 0 ); | |
@@ -39,81 +39,81 @@ | |
fgSizer32->AddGrowableCol( 2 ); | |
fgSizer32->SetFlexibleDirection( wxBOTH ); | |
fgSizer32->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); | |
- | |
+ | |
m_staticText3 = new wxStaticText( m_panel5, wxID_ANY, _("&Grid size:"), wxDefaultPosition, wxDefaultSize, 0 ); | |
m_staticText3->Wrap( -1 ); | |
fgSizer32->Add( m_staticText3, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 3 ); | |
- | |
+ | |
wxArrayString m_choiceGridSizeChoices; | |
m_choiceGridSize = new wxChoice( m_panel5, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_choiceGridSizeChoices, 0 ); | |
m_choiceGridSize->SetSelection( 0 ); | |
fgSizer32->Add( m_choiceGridSize, 0, wxEXPAND|wxALL, 3 ); | |
- | |
+ | |
m_staticGridUnits = new wxStaticText( m_panel5, wxID_ANY, _("mils"), wxDefaultPosition, wxDefaultSize, 0 ); | |
m_staticGridUnits->Wrap( -1 ); | |
fgSizer32->Add( m_staticGridUnits, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 3 ); | |
- | |
+ | |
m_staticText51 = new wxStaticText( m_panel5, wxID_ANY, _("&Bus thickness:"), wxDefaultPosition, wxDefaultSize, 0 ); | |
m_staticText51->Wrap( -1 ); | |
fgSizer32->Add( m_staticText51, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 3 ); | |
- | |
+ | |
m_spinBusWidth = new wxSpinCtrl( m_panel5, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS|wxSP_WRAP, 1, 100, 1 ); | |
fgSizer32->Add( m_spinBusWidth, 0, wxALL|wxEXPAND, 3 ); | |
- | |
+ | |
m_staticBusWidthUnits = new wxStaticText( m_panel5, wxID_ANY, _("mils"), wxDefaultPosition, wxDefaultSize, 0 ); | |
m_staticBusWidthUnits->Wrap( -1 ); | |
fgSizer32->Add( m_staticBusWidthUnits, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 3 ); | |
- | |
+ | |
m_staticText5 = new wxStaticText( m_panel5, wxID_ANY, _("&Line thickness:"), wxDefaultPosition, wxDefaultSize, 0 ); | |
m_staticText5->Wrap( -1 ); | |
fgSizer32->Add( m_staticText5, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 3 ); | |
- | |
+ | |
m_spinLineWidth = new wxSpinCtrl( m_panel5, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS|wxSP_WRAP, 1, 100, 1 ); | |
fgSizer32->Add( m_spinLineWidth, 0, wxALL|wxEXPAND, 3 ); | |
- | |
+ | |
m_staticLineWidthUnits = new wxStaticText( m_panel5, wxID_ANY, _("mils"), wxDefaultPosition, wxDefaultSize, 0 ); | |
m_staticLineWidthUnits->Wrap( -1 ); | |
fgSizer32->Add( m_staticLineWidthUnits, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 3 ); | |
- | |
+ | |
m_staticText26 = new wxStaticText( m_panel5, wxID_ANY, _("&Part ID notation:"), wxDefaultPosition, wxDefaultSize, 0 ); | |
m_staticText26->Wrap( -1 ); | |
fgSizer32->Add( m_staticText26, 0, wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL, 3 ); | |
- | |
+ | |
wxString m_choiceSeparatorRefIdChoices[] = { _("A"), _(".A"), _("-A"), _("_A"), _(".1"), _("-1"), _("_1") }; | |
int m_choiceSeparatorRefIdNChoices = sizeof( m_choiceSeparatorRefIdChoices ) / sizeof( wxString ); | |
m_choiceSeparatorRefId = new wxChoice( m_panel5, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_choiceSeparatorRefIdNChoices, m_choiceSeparatorRefIdChoices, 0 ); | |
m_choiceSeparatorRefId->SetSelection( 0 ); | |
fgSizer32->Add( m_choiceSeparatorRefId, 0, wxALL|wxEXPAND, 3 ); | |
- | |
- | |
+ | |
+ | |
fgSizer32->Add( 0, 0, 1, wxEXPAND, 5 ); | |
- | |
- | |
+ | |
+ | |
bSizer82->Add( fgSizer32, 0, wxALL|wxEXPAND, 5 ); | |
- | |
+ | |
wxBoxSizer* bSizer92; | |
bSizer92 = new wxBoxSizer( wxVERTICAL ); | |
- | |
+ | |
m_staticline3 = new wxStaticLine( m_panel5, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); | |
bSizer92->Add( m_staticline3, 0, wxEXPAND | wxALL, 5 ); | |
- | |
+ | |
m_checkShowGrid = new wxCheckBox( m_panel5, wxID_ANY, _("&Show grid"), wxDefaultPosition, wxDefaultSize, 0 ); | |
bSizer92->Add( m_checkShowGrid, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 3 ); | |
- | |
+ | |
m_checkHVOrientation = new wxCheckBox( m_panel5, wxID_ANY, _("&Restrict buses and wires to H and V orientation"), wxDefaultPosition, wxDefaultSize, 0 ); | |
bSizer92->Add( m_checkHVOrientation, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 3 ); | |
- | |
+ | |
m_checkShowHiddenPins = new wxCheckBox( m_panel5, wxID_ANY, _("S&how hidden pins"), wxDefaultPosition, wxDefaultSize, 0 ); | |
bSizer92->Add( m_checkShowHiddenPins, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 3 ); | |
- | |
+ | |
m_checkPageLimits = new wxCheckBox( m_panel5, wxID_ANY, _("Show page limi&ts"), wxDefaultPosition, wxDefaultSize, 0 ); | |
- m_checkPageLimits->SetValue(true); | |
+ m_checkPageLimits->SetValue(true); | |
bSizer92->Add( m_checkPageLimits, 0, wxEXPAND|wxLEFT|wxTOP|wxRIGHT, 3 ); | |
- | |
- | |
+ | |
+ | |
bSizer82->Add( bSizer92, 0, wxALL|wxEXPAND, 5 ); | |
- | |
- | |
+ | |
+ | |
m_panel5->SetSizer( bSizer82 ); | |
m_panel5->Layout(); | |
bSizer82->Fit( m_panel5 ); | |
@@ -121,7 +121,7 @@ | |
m_panel3 = new wxPanel( m_notebook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); | |
wxBoxSizer* bSizer8; | |
bSizer8 = new wxBoxSizer( wxVERTICAL ); | |
- | |
+ | |
wxFlexGridSizer* fgSizer3; | |
fgSizer3 = new wxFlexGridSizer( 0, 3, 0, 0 ); | |
fgSizer3->AddGrowableCol( 0 ); | |
@@ -129,106 +129,106 @@ | |
fgSizer3->AddGrowableCol( 2 ); | |
fgSizer3->SetFlexibleDirection( wxBOTH ); | |
fgSizer3->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); | |
- | |
+ | |
m_staticText2 = new wxStaticText( m_panel3, wxID_ANY, _("&Measurement units:"), wxDefaultPosition, wxDefaultSize, 0 ); | |
m_staticText2->Wrap( -1 ); | |
fgSizer3->Add( m_staticText2, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 3 ); | |
- | |
+ | |
wxArrayString m_choiceUnitsChoices; | |
m_choiceUnits = new wxChoice( m_panel3, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_choiceUnitsChoices, 0 ); | |
m_choiceUnits->SetSelection( 0 ); | |
fgSizer3->Add( m_choiceUnits, 0, wxALL|wxEXPAND, 3 ); | |
- | |
- | |
+ | |
+ | |
fgSizer3->Add( 0, 0, 1, wxEXPAND, 3 ); | |
- | |
+ | |
m_staticText9 = new wxStaticText( m_panel3, wxID_ANY, _("&Horizontal pitch of repeated items:"), wxDefaultPosition, wxDefaultSize, 0 ); | |
m_staticText9->Wrap( -1 ); | |
fgSizer3->Add( m_staticText9, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 3 ); | |
- | |
+ | |
m_spinRepeatHorizontal = new wxSpinCtrl( m_panel3, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS|wxSP_WRAP, -5000, 5000, 0 ); | |
fgSizer3->Add( m_spinRepeatHorizontal, 0, wxALL|wxEXPAND, 3 ); | |
- | |
+ | |
m_staticRepeatXUnits = new wxStaticText( m_panel3, wxID_ANY, _("mils"), wxDefaultPosition, wxDefaultSize, 0 ); | |
m_staticRepeatXUnits->Wrap( -1 ); | |
fgSizer3->Add( m_staticRepeatXUnits, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 3 ); | |
- | |
+ | |
m_staticText12 = new wxStaticText( m_panel3, wxID_ANY, _("&Vertical pitch of repeated items:"), wxDefaultPosition, wxDefaultSize, 0 ); | |
m_staticText12->Wrap( -1 ); | |
fgSizer3->Add( m_staticText12, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 3 ); | |
- | |
+ | |
m_spinRepeatVertical = new wxSpinCtrl( m_panel3, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS|wxSP_WRAP, -5000, 5000, 100 ); | |
fgSizer3->Add( m_spinRepeatVertical, 0, wxALL|wxEXPAND, 3 ); | |
- | |
+ | |
m_staticRepeatYUnits = new wxStaticText( m_panel3, wxID_ANY, _("mils"), wxDefaultPosition, wxDefaultSize, 0 ); | |
m_staticRepeatYUnits->Wrap( -1 ); | |
fgSizer3->Add( m_staticRepeatYUnits, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 3 ); | |
- | |
+ | |
m_staticText16 = new wxStaticText( m_panel3, wxID_ANY, _("&Increment of repeated labels:"), wxDefaultPosition, wxDefaultSize, 0 ); | |
m_staticText16->Wrap( -1 ); | |
fgSizer3->Add( m_staticText16, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 3 ); | |
- | |
+ | |
m_spinRepeatLabel = new wxSpinCtrl( m_panel3, wxID_ANY, wxT("1"), wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS|wxSP_WRAP, -10, 10, 1 ); | |
fgSizer3->Add( m_spinRepeatLabel, 0, wxALL|wxEXPAND, 3 ); | |
- | |
- | |
+ | |
+ | |
fgSizer3->Add( 0, 0, 1, wxEXPAND, 3 ); | |
- | |
+ | |
m_staticText7 = new wxStaticText( m_panel3, wxID_ANY, _("Def&ault text size:"), wxDefaultPosition, wxDefaultSize, 0 ); | |
m_staticText7->Wrap( -1 ); | |
fgSizer3->Add( m_staticText7, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 3 ); | |
- | |
+ | |
m_spinTextSize = new wxSpinCtrl( m_panel3, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS|wxSP_WRAP, 0, 1000, 0 ); | |
fgSizer3->Add( m_spinTextSize, 0, wxALL|wxEXPAND, 3 ); | |
- | |
+ | |
m_staticTextSizeUnits = new wxStaticText( m_panel3, wxID_ANY, _("mils"), wxDefaultPosition, wxDefaultSize, 0 ); | |
m_staticTextSizeUnits->Wrap( -1 ); | |
fgSizer3->Add( m_staticTextSizeUnits, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 3 ); | |
- | |
+ | |
m_stMaxUndoItems = new wxStaticText( m_panel3, wxID_ANY, _("Ma&ximum undo items:"), wxDefaultPosition, wxDefaultSize, 0 ); | |
m_stMaxUndoItems->Wrap( -1 ); | |
fgSizer3->Add( m_stMaxUndoItems, 0, wxALIGN_CENTER_VERTICAL|wxALL, 3 ); | |
- | |
+ | |
m_spinMaxUndoItems = new wxSpinCtrl( m_panel3, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, 0, 65536, 0 ); | |
fgSizer3->Add( m_spinMaxUndoItems, 0, wxALL|wxEXPAND, 3 ); | |
- | |
+ | |
m_staticText22 = new wxStaticText( m_panel3, wxID_ANY, _("(0 = unlimited)"), wxDefaultPosition, wxDefaultSize, 0 ); | |
m_staticText22->Wrap( -1 ); | |
fgSizer3->Add( m_staticText22, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 3 ); | |
- | |
+ | |
m_staticText221 = new wxStaticText( m_panel3, wxID_ANY, _("&Auto-save time interval"), wxDefaultPosition, wxDefaultSize, 0 ); | |
m_staticText221->Wrap( -1 ); | |
fgSizer3->Add( m_staticText221, 1, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 3 ); | |
- | |
+ | |
m_spinAutoSaveInterval = new wxSpinCtrl( m_panel3, ID_M_SPINAUTOSAVEINTERVAL, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, 0, 1000, 10 ); | |
fgSizer3->Add( m_spinAutoSaveInterval, 0, wxALL|wxEXPAND, 3 ); | |
- | |
+ | |
m_staticText23 = new wxStaticText( m_panel3, wxID_ANY, _("minutes"), wxDefaultPosition, wxDefaultSize, 0 ); | |
m_staticText23->Wrap( -1 ); | |
fgSizer3->Add( m_staticText23, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 3 ); | |
- | |
- | |
+ | |
+ | |
bSizer8->Add( fgSizer3, 0, wxALL|wxEXPAND, 5 ); | |
- | |
+ | |
wxBoxSizer* bSizer9; | |
bSizer9 = new wxBoxSizer( wxVERTICAL ); | |
- | |
+ | |
m_staticline2 = new wxStaticLine( m_panel3, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); | |
bSizer9->Add( m_staticline2, 0, wxEXPAND | wxALL, 5 ); | |
- | |
+ | |
m_checkAutoplaceFields = new wxCheckBox( m_panel3, wxID_ANY, _("A&utomatically place component fields"), wxDefaultPosition, wxDefaultSize, 0 ); | |
bSizer9->Add( m_checkAutoplaceFields, 0, wxEXPAND|wxLEFT|wxTOP|wxRIGHT, 3 ); | |
- | |
+ | |
m_checkAutoplaceJustify = new wxCheckBox( m_panel3, wxID_ANY, _("A&llow field autoplace to change justification"), wxDefaultPosition, wxDefaultSize, 0 ); | |
bSizer9->Add( m_checkAutoplaceJustify, 0, wxEXPAND|wxLEFT|wxTOP|wxRIGHT, 3 ); | |
- | |
+ | |
m_checkAutoplaceAlign = new wxCheckBox( m_panel3, wxID_ANY, _("Al&ways align autoplaced fields to the 50 mil grid"), wxDefaultPosition, wxDefaultSize, 0 ); | |
bSizer9->Add( m_checkAutoplaceAlign, 0, wxEXPAND|wxLEFT|wxTOP|wxRIGHT, 3 ); | |
- | |
- | |
+ | |
+ | |
bSizer8->Add( bSizer9, 0, wxALL|wxEXPAND, 5 ); | |
- | |
- | |
+ | |
+ | |
m_panel3->SetSizer( bSizer8 ); | |
m_panel3->Layout(); | |
bSizer8->Fit( m_panel3 ); | |
@@ -236,7 +236,7 @@ | |
m_tabControls = new wxPanel( m_notebook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); | |
wxBoxSizer* bSizer81; | |
bSizer81 = new wxBoxSizer( wxVERTICAL ); | |
- | |
+ | |
wxFlexGridSizer* fgSizer31; | |
fgSizer31 = new wxFlexGridSizer( 0, 3, 0, 0 ); | |
fgSizer31->AddGrowableCol( 0 ); | |
@@ -244,51 +244,54 @@ | |
fgSizer31->AddGrowableCol( 2 ); | |
fgSizer31->SetFlexibleDirection( wxBOTH ); | |
fgSizer31->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); | |
- | |
- | |
+ | |
+ | |
bSizer81->Add( fgSizer31, 0, wxALL|wxEXPAND, 5 ); | |
- | |
+ | |
m_controlsSizer = new wxBoxSizer( wxVERTICAL ); | |
- | |
+ | |
wxBoxSizer* bSizer13; | |
bSizer13 = new wxBoxSizer( wxHORIZONTAL ); | |
- | |
+ | |
m_staticText20 = new wxStaticText( m_tabControls, wxID_ANY, _("Hotkeys:"), wxDefaultPosition, wxDefaultSize, 0 ); | |
m_staticText20->Wrap( -1 ); | |
bSizer13->Add( m_staticText20, 1, wxALL, 5 ); | |
- | |
+ | |
m_staticText21 = new wxStaticText( m_tabControls, wxID_ANY, _("Double-click to edit"), wxDefaultPosition, wxDefaultSize, 0 ); | |
m_staticText21->Wrap( -1 ); | |
bSizer13->Add( m_staticText21, 0, wxALL, 5 ); | |
- | |
- | |
+ | |
+ | |
m_controlsSizer->Add( bSizer13, 0, wxEXPAND, 5 ); | |
- | |
+ | |
m_panelHotkeys = new wxPanel( m_tabControls, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); | |
m_controlsSizer->Add( m_panelHotkeys, 1, wxEXPAND | wxALL, 5 ); | |
- | |
+ | |
m_checkEnableZoomCenter = new wxCheckBox( m_tabControls, wxID_ANY, _("Cen&ter and warp cursor on zoom"), wxDefaultPosition, wxDefaultSize, 0 ); | |
m_checkEnableZoomCenter->SetToolTip( _("Keep the cursor at its current location when zooming") ); | |
- | |
+ | |
m_controlsSizer->Add( m_checkEnableZoomCenter, 0, wxTOP|wxRIGHT|wxLEFT, 3 ); | |
- | |
+ | |
m_checkEnableMiddleButtonPan = new wxCheckBox( m_tabControls, xwID_ANY, _("&Use middle mouse button to pan"), wxDefaultPosition, wxDefaultSize, 0 ); | |
m_checkEnableMiddleButtonPan->SetToolTip( _("Use middle mouse button dragging to pan") ); | |
- | |
+ | |
m_controlsSizer->Add( m_checkEnableMiddleButtonPan, 0, wxTOP|wxRIGHT|wxLEFT, 3 ); | |
- | |
+ | |
m_checkMiddleButtonPanLimited = new wxCheckBox( m_tabControls, wxID_ANY, _("&Limit panning to scroll size"), wxDefaultPosition, wxDefaultSize, 0 ); | |
m_checkMiddleButtonPanLimited->SetToolTip( _("Middle mouse button panning limited by current scrollbar size") ); | |
- | |
+ | |
m_controlsSizer->Add( m_checkMiddleButtonPanLimited, 0, wxTOP|wxRIGHT|wxLEFT, 3 ); | |
- | |
+ | |
+ m_checkEnableMousewheelPan = new wxCheckBox( m_panel1, wxID_ANY, _("Use mousewheel to pan"), wxDefaultPosition, wxDefaultSize, 0 ); | |
+ m_controlsSizer->Add( m_checkEnableMousewheelPan, 0, wxTOP|wxRIGHT|wxLEFT, 3 ); | |
+ | |
m_checkAutoPan = new wxCheckBox( m_tabControls, wxID_ANY, _("&Pan while moving object"), wxDefaultPosition, wxDefaultSize, 0 ); | |
m_controlsSizer->Add( m_checkAutoPan, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 3 ); | |
- | |
- | |
+ | |
+ | |
bSizer81->Add( m_controlsSizer, 1, wxALL|wxEXPAND, 5 ); | |
- | |
- | |
+ | |
+ | |
m_tabControls->SetSizer( bSizer81 ); | |
m_tabControls->Layout(); | |
bSizer81->Fit( m_tabControls ); | |
@@ -296,33 +299,33 @@ | |
m_tabColors = new wxPanel( m_notebook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); | |
wxBoxSizer* bSizer14; | |
bSizer14 = new wxBoxSizer( wxVERTICAL ); | |
- | |
+ | |
m_panelColors = new wxPanel( m_tabColors, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); | |
bSizer14->Add( m_panelColors, 1, wxEXPAND | wxALL, 5 ); | |
- | |
- | |
+ | |
+ | |
m_tabColors->SetSizer( bSizer14 ); | |
m_tabColors->Layout(); | |
bSizer14->Fit( m_tabColors ); | |
m_notebook->AddPage( m_tabColors, _("Colors"), true ); | |
m_panel2 = new wxPanel( m_notebook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); | |
m_panel2->SetToolTip( _("User defined field names for schematic components. ") ); | |
- | |
+ | |
wxBoxSizer* bSizer6; | |
bSizer6 = new wxBoxSizer( wxHORIZONTAL ); | |
- | |
+ | |
wxBoxSizer* bSizer11; | |
bSizer11 = new wxBoxSizer( wxVERTICAL ); | |
- | |
+ | |
m_fieldGrid = new wxGrid( m_panel2, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 ); | |
- | |
+ | |
// Grid | |
m_fieldGrid->CreateGrid( 0, 3 ); | |
m_fieldGrid->EnableEditing( true ); | |
m_fieldGrid->EnableGridLines( true ); | |
m_fieldGrid->EnableDragGridSize( false ); | |
m_fieldGrid->SetMargins( 0, 0 ); | |
- | |
+ | |
// Columns | |
m_fieldGrid->SetColSize( 0, 150 ); | |
m_fieldGrid->SetColSize( 1, 150 ); | |
@@ -336,67 +339,67 @@ | |
m_fieldGrid->SetColLabelValue( 3, _("Name") ); | |
m_fieldGrid->SetColLabelValue( 4, wxEmptyString ); | |
m_fieldGrid->SetColLabelAlignment( wxALIGN_CENTRE, wxALIGN_CENTRE ); | |
- | |
+ | |
// Rows | |
m_fieldGrid->EnableDragRowSize( true ); | |
m_fieldGrid->SetRowLabelSize( 80 ); | |
m_fieldGrid->SetRowLabelAlignment( wxALIGN_CENTRE, wxALIGN_CENTRE ); | |
- | |
+ | |
// Label Appearance | |
- | |
+ | |
// Cell Defaults | |
m_fieldGrid->SetDefaultCellAlignment( wxALIGN_LEFT, wxALIGN_TOP ); | |
bSizer11->Add( m_fieldGrid, 1, wxALL|wxEXPAND, 5 ); | |
- | |
- | |
+ | |
+ | |
bSizer6->Add( bSizer11, 1, wxEXPAND, 5 ); | |
- | |
+ | |
wxBoxSizer* bSizer10; | |
bSizer10 = new wxBoxSizer( wxVERTICAL ); | |
- | |
+ | |
addFieldButton = new wxButton( m_panel2, wxID_ADD_FIELD, _("&Add"), wxDefaultPosition, wxDefaultSize, 0 ); | |
bSizer10->Add( addFieldButton, 0, wxALL|wxEXPAND, 5 ); | |
- | |
+ | |
deleteFieldButton = new wxButton( m_panel2, wxID_DELETE_FIELD, _("De&lete"), wxDefaultPosition, wxDefaultSize, 0 ); | |
bSizer10->Add( deleteFieldButton, 0, wxALL|wxEXPAND, 5 ); | |
- | |
- | |
+ | |
+ | |
bSizer10->Add( 0, 0, 1, wxEXPAND, 5 ); | |
- | |
- | |
+ | |
+ | |
bSizer6->Add( bSizer10, 0, wxEXPAND, 5 ); | |
- | |
- | |
+ | |
+ | |
m_panel2->SetSizer( bSizer6 ); | |
m_panel2->Layout(); | |
bSizer6->Fit( m_panel2 ); | |
m_notebook->AddPage( m_panel2, _("Default Fields"), false ); | |
- | |
+ | |
bOptionsSizer->Add( m_notebook, 1, wxALL|wxEXPAND, 5 ); | |
- | |
+ | |
wxBoxSizer* bSizer12; | |
bSizer12 = new wxBoxSizer( wxHORIZONTAL ); | |
- | |
+ | |
m_sdbSizer = new wxStdDialogButtonSizer(); | |
m_sdbSizerOK = new wxButton( this, wxID_OK ); | |
m_sdbSizer->AddButton( m_sdbSizerOK ); | |
m_sdbSizerCancel = new wxButton( this, wxID_CANCEL ); | |
m_sdbSizer->AddButton( m_sdbSizerCancel ); | |
m_sdbSizer->Realize(); | |
- | |
+ | |
bSizer12->Add( m_sdbSizer, 1, wxALL|wxEXPAND, 5 ); | |
- | |
- | |
+ | |
+ | |
bOptionsSizer->Add( bSizer12, 0, wxBOTTOM|wxEXPAND, 5 ); | |
- | |
- | |
+ | |
+ | |
mainSizer->Add( bOptionsSizer, 1, wxEXPAND, 12 ); | |
- | |
- | |
+ | |
+ | |
this->SetSizer( mainSizer ); | |
this->Layout(); | |
mainSizer->Fit( this ); | |
- | |
+ | |
this->Centre( wxBOTH ); | |
} | |
=== modified file 'eeschema/dialogs/dialog_eeschema_options_base.fbp' | |
--- eeschema/dialogs/dialog_eeschema_options_base.fbp 2016-01-16 23:51:38 +0000 | |
+++ eeschema/dialogs/dialog_eeschema_options_base.fbp 2016-01-25 19:11:54 +0000 | |
@@ -4398,6 +4398,94 @@ | |
<event name="OnUpdateUI"></event> | |
</object> | |
</object> | |
+ <object class="sizeritem" expanded="1"> | |
+ <property name="border">3</property> | |
+ <property name="flag">wxTOP|wxRIGHT|wxLEFT</property> | |
+ <property name="proportion">0</property> | |
+ <object class="wxCheckBox" expanded="1"> | |
+ <property name="BottomDockable">1</property> | |
+ <property name="LeftDockable">1</property> | |
+ <property name="RightDockable">1</property> | |
+ <property name="TopDockable">1</property> | |
+ <property name="aui_layer"></property> | |
+ <property name="aui_name"></property> | |
+ <property name="aui_position"></property> | |
+ <property name="aui_row"></property> | |
+ <property name="best_size"></property> | |
+ <property name="bg"></property> | |
+ <property name="caption"></property> | |
+ <property name="caption_visible">1</property> | |
+ <property name="center_pane">0</property> | |
+ <property name="checked">0</property> | |
+ <property name="close_button">1</property> | |
+ <property name="context_help"></property> | |
+ <property name="context_menu">1</property> | |
+ <property name="default_pane">0</property> | |
+ <property name="dock">Dock</property> | |
+ <property name="dock_fixed">0</property> | |
+ <property name="docking">Left</property> | |
+ <property name="enabled">1</property> | |
+ <property name="fg"></property> | |
+ <property name="floatable">1</property> | |
+ <property name="font"></property> | |
+ <property name="gripper">0</property> | |
+ <property name="hidden">0</property> | |
+ <property name="id">wxID_ANY</property> | |
+ <property name="label">Use mousewheel to pan</property> | |
+ <property name="max_size"></property> | |
+ <property name="maximize_button">0</property> | |
+ <property name="maximum_size"></property> | |
+ <property name="min_size"></property> | |
+ <property name="minimize_button">0</property> | |
+ <property name="minimum_size"></property> | |
+ <property name="moveable">1</property> | |
+ <property name="name">m_checkEnableMousewheelPan</property> | |
+ <property name="pane_border">1</property> | |
+ <property name="pane_position"></property> | |
+ <property name="pane_size"></property> | |
+ <property name="permission">protected</property> | |
+ <property name="pin_button">1</property> | |
+ <property name="pos"></property> | |
+ <property name="resize">Resizable</property> | |
+ <property name="show">1</property> | |
+ <property name="size"></property> | |
+ <property name="style"></property> | |
+ <property name="subclass"></property> | |
+ <property name="toolbar_pane">0</property> | |
+ <property name="tooltip">Scroll weel to pan instead of zoom</property> | |
+ <property name="validator_data_type"></property> | |
+ <property name="validator_style">wxFILTER_NONE</property> | |
+ <property name="validator_type">wxDefaultValidator</property> | |
+ <property name="validator_variable"></property> | |
+ <property name="window_extra_style"></property> | |
+ <property name="window_name"></property> | |
+ <property name="window_style"></property> | |
+ <event name="OnChar"></event> | |
+ <event name="OnCheckBox"></event> | |
+ <event name="OnEnterWindow"></event> | |
+ <event name="OnEraseBackground"></event> | |
+ <event name="OnKeyDown"></event> | |
+ <event name="OnKeyUp"></event> | |
+ <event name="OnKillFocus"></event> | |
+ <event name="OnLeaveWindow"></event> | |
+ <event name="OnLeftDClick"></event> | |
+ <event name="OnLeftDown"></event> | |
+ <event name="OnLeftUp"></event> | |
+ <event name="OnMiddleDClick"></event> | |
+ <event name="OnMiddleDown"></event> | |
+ <event name="OnMiddleUp"></event> | |
+ <event name="OnMotion"></event> | |
+ <event name="OnMouseEvents"></event> | |
+ <event name="OnMouseWheel"></event> | |
+ <event name="OnPaint"></event> | |
+ <event name="OnRightDClick"></event> | |
+ <event name="OnRightDown"></event> | |
+ <event name="OnRightUp"></event> | |
+ <event name="OnSetFocus"></event> | |
+ <event name="OnSize"></event> | |
+ <event name="OnUpdateUI"></event> | |
+ </object> | |
+ </object> | |
<object class="sizeritem" expanded="0"> | |
<property name="border">3</property> | |
<property name="flag">wxEXPAND|wxTOP|wxRIGHT|wxLEFT</property> | |
=== modified file 'eeschema/dialogs/dialog_eeschema_options_base.h' | |
--- eeschema/dialogs/dialog_eeschema_options_base.h 2016-01-16 23:51:38 +0000 | |
+++ eeschema/dialogs/dialog_eeschema_options_base.h 2016-01-25 19:12:44 +0000 | |
@@ -43,15 +43,15 @@ | |
{ | |
DECLARE_EVENT_TABLE() | |
private: | |
- | |
+ | |
// Private event handlers | |
void _wxFB_OnSize( wxSizeEvent& event ){ OnSize( event ); } | |
void _wxFB_OnChooseUnits( wxCommandEvent& event ){ OnChooseUnits( event ); } | |
void _wxFB_OnMiddleBtnPanEnbl( wxCommandEvent& event ){ OnMiddleBtnPanEnbl( event ); } | |
void _wxFB_OnAddButtonClick( wxCommandEvent& event ){ OnAddButtonClick( event ); } | |
void _wxFB_OnDeleteButtonClick( wxCommandEvent& event ){ OnDeleteButtonClick( event ); } | |
- | |
- | |
+ | |
+ | |
protected: | |
enum | |
{ | |
@@ -60,7 +60,7 @@ | |
wxID_ADD_FIELD, | |
wxID_DELETE_FIELD | |
}; | |
- | |
+ | |
wxNotebook* m_notebook; | |
wxPanel* m_panel5; | |
wxStaticText* m_staticText3; | |
@@ -111,6 +111,7 @@ | |
wxCheckBox* m_checkEnableZoomCenter; | |
wxCheckBox* m_checkEnableMiddleButtonPan; | |
wxCheckBox* m_checkMiddleButtonPanLimited; | |
+ wxCheckBox* m_checkEnableMousewheelPan; | |
wxCheckBox* m_checkAutoPan; | |
wxPanel* m_tabColors; | |
wxPanel* m_panelColors; | |
@@ -121,20 +122,20 @@ | |
wxStdDialogButtonSizer* m_sdbSizer; | |
wxButton* m_sdbSizerOK; | |
wxButton* m_sdbSizerCancel; | |
- | |
+ | |
// Virtual event handlers, overide them in your derived class | |
virtual void OnSize( wxSizeEvent& event ) { event.Skip(); } | |
virtual void OnChooseUnits( wxCommandEvent& event ) { event.Skip(); } | |
virtual void OnMiddleBtnPanEnbl( wxCommandEvent& event ) { event.Skip(); } | |
virtual void OnAddButtonClick( wxCommandEvent& event ) { event.Skip(); } | |
virtual void OnDeleteButtonClick( wxCommandEvent& event ) { event.Skip(); } | |
- | |
- | |
+ | |
+ | |
public: | |
- | |
- DIALOG_EESCHEMA_OPTIONS_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Schematic Editor Options"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); | |
+ | |
+ DIALOG_EESCHEMA_OPTIONS_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Schematic Editor Options"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); | |
~DIALOG_EESCHEMA_OPTIONS_BASE(); | |
- | |
+ | |
}; | |
#endif //__DIALOG_EESCHEMA_OPTIONS_BASE_H__ | |
=== modified file 'eeschema/eeschema_config.cpp' | |
--- eeschema/eeschema_config.cpp 2016-01-16 23:51:56 +0000 | |
+++ eeschema/eeschema_config.cpp 2016-01-25 18:44:46 +0000 | |
@@ -313,6 +313,7 @@ | |
dlg.SetShowGrid( IsGridVisible() ); | |
dlg.SetShowHiddenPins( m_showAllPins ); | |
+ dlg.SetEnableMousewheelPan( m_canvas->GetEnableMousewheelPan() ); | |
dlg.SetEnableMiddleButtonPan( m_canvas->GetEnableMiddleButtonPan() ); | |
dlg.SetEnableZoomNoCenter( m_canvas->GetEnableZoomNoCenter() ); | |
dlg.SetMiddleButtonPanLimited( m_canvas->GetMiddleButtonPanLimited() ); | |
@@ -364,6 +365,7 @@ | |
GetScreen()->SetMaxUndoItems( dlg.GetMaxUndoItems() ); | |
SetGridVisibility( dlg.GetShowGrid() ); | |
m_showAllPins = dlg.GetShowHiddenPins(); | |
+ m_canvas->SetEnableMousewheelPan( dlg.GetEnableMousewheelPan() ); | |
m_canvas->SetEnableMiddleButtonPan( dlg.GetEnableMiddleButtonPan() ); | |
m_canvas->SetEnableZoomNoCenter( dlg.GetEnableZoomNoCenter() ); | |
m_canvas->SetMiddleButtonPanLimited( dlg.GetMiddleButtonPanLimited() ); | |
=== modified file 'gerbview/dialogs/gerbview_dialog_display_options_frame.cpp' | |
--- gerbview/dialogs/gerbview_dialog_display_options_frame.cpp 2015-04-03 20:38:24 +0000 | |
+++ gerbview/dialogs/gerbview_dialog_display_options_frame.cpp 2016-01-25 18:47:27 +0000 | |
@@ -125,6 +125,7 @@ | |
m_OptZoomNoCenter->SetValue( m_Parent->GetCanvas()->GetEnableZoomNoCenter() ); | |
+ m_OptMousewheelPan->SetValue( m_Parent->GetCanvas()->GetEnableMousewheelPan() ); | |
m_OptMiddleButtonPan->SetValue( m_Parent->GetCanvas()->GetEnableMiddleButtonPan() ); | |
m_OptMiddleButtonPanLimited->SetValue( m_Parent->GetCanvas()->GetMiddleButtonPanLimited() ); | |
m_OptMiddleButtonPanLimited->Enable( m_OptMiddleButtonPan->GetValue() ); | |
@@ -169,6 +170,7 @@ | |
m_Parent->SetPageSettings( pageInfo ); | |
m_Parent->GetCanvas()->SetEnableZoomNoCenter( m_OptZoomNoCenter->GetValue() ); | |
+ m_Parent->GetCanvas()->SetEnableMousewheelPan( m_OptMousewheelPan->GetValue() ); | |
m_Parent->GetCanvas()->SetEnableMiddleButtonPan( m_OptMiddleButtonPan->GetValue() ); | |
m_Parent->GetCanvas()->SetMiddleButtonPanLimited( m_OptMiddleButtonPanLimited->GetValue() ); | |
=== modified file 'gerbview/dialogs/gerbview_dialog_display_options_frame_base.cpp' | |
--- gerbview/dialogs/gerbview_dialog_display_options_frame_base.cpp 2015-08-01 12:48:38 +0000 | |
+++ gerbview/dialogs/gerbview_dialog_display_options_frame_base.cpp 2016-01-25 19:14:19 +0000 | |
@@ -12,114 +12,119 @@ | |
DIALOG_DISPLAY_OPTIONS_BASE::DIALOG_DISPLAY_OPTIONS_BASE( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : DIALOG_SHIM( parent, id, title, pos, size, style ) | |
{ | |
this->SetSizeHints( wxDefaultSize, wxDefaultSize ); | |
- | |
+ | |
wxBoxSizer* bDialogSizer; | |
bDialogSizer = new wxBoxSizer( wxVERTICAL ); | |
- | |
+ | |
wxBoxSizer* bUpperSizer; | |
bUpperSizer = new wxBoxSizer( wxHORIZONTAL ); | |
- | |
+ | |
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_ANY, _("Coordinates"), wxDefaultPosition, wxDefaultSize, m_PolarDisplayNChoices, m_PolarDisplayChoices, 1, wxRA_SPECIFY_COLS ); | |
m_PolarDisplay->SetSelection( 0 ); | |
bLeftSizer->Add( m_PolarDisplay, 0, wxALL|wxEXPAND, 5 ); | |
- | |
+ | |
wxString m_BoxUnitsChoices[] = { _("Inches"), _("Millimeters") }; | |
int m_BoxUnitsNChoices = sizeof( m_BoxUnitsChoices ) / sizeof( wxString ); | |
m_BoxUnits = new wxRadioBox( this, wxID_ANY, _("Units"), wxDefaultPosition, wxDefaultSize, m_BoxUnitsNChoices, m_BoxUnitsChoices, 1, wxRA_SPECIFY_COLS ); | |
m_BoxUnits->SetSelection( 0 ); | |
bLeftSizer->Add( m_BoxUnits, 0, wxALL|wxEXPAND, 5 ); | |
- | |
+ | |
wxString m_CursorShapeChoices[] = { _("Small cross"), _("Full screen cursor") }; | |
int m_CursorShapeNChoices = sizeof( m_CursorShapeChoices ) / sizeof( wxString ); | |
m_CursorShape = new wxRadioBox( this, wxID_ANY, _("Cursor"), wxDefaultPosition, wxDefaultSize, m_CursorShapeNChoices, m_CursorShapeChoices, 1, wxRA_SPECIFY_COLS ); | |
m_CursorShape->SetSelection( 1 ); | |
bLeftSizer->Add( m_CursorShape, 0, wxALL|wxEXPAND, 5 ); | |
- | |
+ | |
m_OptDisplayDCodes = new wxCheckBox( this, wxID_ANY, _("Show D codes"), wxDefaultPosition, wxDefaultSize, 0 ); | |
- m_OptDisplayDCodes->SetValue(true); | |
+ m_OptDisplayDCodes->SetValue(true); | |
bLeftSizer->Add( m_OptDisplayDCodes, 0, wxALL, 5 ); | |
- | |
- | |
+ | |
+ | |
bUpperSizer->Add( bLeftSizer, 1, wxALL|wxEXPAND, 5 ); | |
- | |
+ | |
wxBoxSizer* bMiddleSizer; | |
bMiddleSizer = new wxBoxSizer( wxVERTICAL ); | |
- | |
+ | |
wxString m_OptDisplayLinesChoices[] = { _("Sketch"), _("Filled") }; | |
int m_OptDisplayLinesNChoices = sizeof( m_OptDisplayLinesChoices ) / sizeof( wxString ); | |
m_OptDisplayLines = new wxRadioBox( this, wxID_ANY, _("Lines"), wxDefaultPosition, wxDefaultSize, m_OptDisplayLinesNChoices, m_OptDisplayLinesChoices, 1, wxRA_SPECIFY_COLS ); | |
m_OptDisplayLines->SetSelection( 1 ); | |
bMiddleSizer->Add( m_OptDisplayLines, 0, wxALL|wxEXPAND, 5 ); | |
- | |
+ | |
wxString m_OptDisplayFlashedItemsChoices[] = { _("Sketch"), _("Filled") }; | |
int m_OptDisplayFlashedItemsNChoices = sizeof( m_OptDisplayFlashedItemsChoices ) / sizeof( wxString ); | |
m_OptDisplayFlashedItems = new wxRadioBox( this, wxID_ANY, _("Pads"), wxDefaultPosition, wxDefaultSize, m_OptDisplayFlashedItemsNChoices, m_OptDisplayFlashedItemsChoices, 1, wxRA_SPECIFY_COLS ); | |
m_OptDisplayFlashedItems->SetSelection( 1 ); | |
bMiddleSizer->Add( m_OptDisplayFlashedItems, 0, wxALL|wxEXPAND, 5 ); | |
- | |
+ | |
wxString m_OptDisplayPolygonsChoices[] = { _("Sketch"), _("Filled") }; | |
int m_OptDisplayPolygonsNChoices = sizeof( m_OptDisplayPolygonsChoices ) / sizeof( wxString ); | |
m_OptDisplayPolygons = new wxRadioBox( this, wxID_ANY, _("Polygons"), wxDefaultPosition, wxDefaultSize, m_OptDisplayPolygonsNChoices, m_OptDisplayPolygonsChoices, 1, wxRA_SPECIFY_COLS ); | |
m_OptDisplayPolygons->SetSelection( 1 ); | |
bMiddleSizer->Add( m_OptDisplayPolygons, 0, wxALL|wxEXPAND, 5 ); | |
- | |
- | |
+ | |
+ | |
bUpperSizer->Add( bMiddleSizer, 1, wxALL|wxEXPAND, 5 ); | |
- | |
+ | |
wxBoxSizer* bRightSizer; | |
bRightSizer = new wxBoxSizer( wxVERTICAL ); | |
- | |
+ | |
wxString m_ShowPageLimitsChoices[] = { _("Full size without limits"), _("Full size"), _("Size A4"), _("Size A3"), _("Size A2"), _("Size A"), _("Size B"), _("Size C") }; | |
int m_ShowPageLimitsNChoices = sizeof( m_ShowPageLimitsChoices ) / sizeof( wxString ); | |
m_ShowPageLimits = new wxRadioBox( this, wxID_ANY, _("Page"), wxDefaultPosition, wxDefaultSize, m_ShowPageLimitsNChoices, m_ShowPageLimitsChoices, 1, wxRA_SPECIFY_COLS ); | |
m_ShowPageLimits->SetSelection( 0 ); | |
bRightSizer->Add( m_ShowPageLimits, 0, wxALL|wxEXPAND, 5 ); | |
- | |
+ | |
wxStaticBoxSizer* bLeftBottomSizer; | |
bLeftBottomSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Pan and Zoom") ), wxVERTICAL ); | |
- | |
+ | |
m_OptZoomNoCenter = new wxCheckBox( bLeftBottomSizer->GetStaticBox(), wxID_ANY, _("Do not center and warp cursor on zoom"), wxDefaultPosition, wxDefaultSize, 0 ); | |
m_OptZoomNoCenter->SetToolTip( _("Keep the cursor at its current location when zooming") ); | |
- | |
+ | |
bLeftBottomSizer->Add( m_OptZoomNoCenter, 0, wxLEFT|wxRIGHT|wxTOP, 5 ); | |
- | |
+ | |
m_OptMiddleButtonPan = new wxCheckBox( bLeftBottomSizer->GetStaticBox(), wxID_ANY, _("Use middle mouse button to pan"), wxDefaultPosition, wxDefaultSize, 0 ); | |
bLeftBottomSizer->Add( m_OptMiddleButtonPan, 0, wxLEFT|wxRIGHT|wxTOP, 5 ); | |
- | |
+ | |
m_OptMiddleButtonPanLimited = new wxCheckBox( bLeftBottomSizer->GetStaticBox(), wxID_ANY, _("Limit panning to scroll size"), wxDefaultPosition, wxDefaultSize, 0 ); | |
bLeftBottomSizer->Add( m_OptMiddleButtonPanLimited, 0, wxALL, 5 ); | |
- | |
- | |
+ | |
+ m_OptMousewheelPan = new wxCheckBox( bLeftBottomSizer->GetStaticBox(), wxID_ANY, _("Use mousewheel to pan"), wxDefaultPosition, wxDefaultSize, 0 ); | |
+ m_OptMousewheelPan->SetToolTip( _("Use mousewheel to pan canvas") ); | |
+ | |
+ bLeftBottomSizer->Add( m_OptMousewheelPan, 0, wxALL, 5 ); | |
+ | |
+ | |
bRightSizer->Add( bLeftBottomSizer, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 ); | |
- | |
- | |
+ | |
+ | |
bUpperSizer->Add( bRightSizer, 2, wxALL|wxEXPAND, 5 ); | |
- | |
- | |
+ | |
+ | |
bDialogSizer->Add( bUpperSizer, 1, wxEXPAND, 5 ); | |
- | |
+ | |
m_staticline1 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); | |
bDialogSizer->Add( m_staticline1, 0, wxEXPAND|wxLEFT|wxRIGHT, 5 ); | |
- | |
+ | |
m_sdbSizer1 = new wxStdDialogButtonSizer(); | |
m_sdbSizer1OK = new wxButton( this, wxID_OK ); | |
m_sdbSizer1->AddButton( m_sdbSizer1OK ); | |
m_sdbSizer1Cancel = new wxButton( this, wxID_CANCEL ); | |
m_sdbSizer1->AddButton( m_sdbSizer1Cancel ); | |
m_sdbSizer1->Realize(); | |
- | |
+ | |
bDialogSizer->Add( m_sdbSizer1, 0, wxEXPAND|wxALL, 5 ); | |
- | |
- | |
+ | |
+ | |
this->SetSizer( bDialogSizer ); | |
this->Layout(); | |
bDialogSizer->Fit( this ); | |
- | |
+ | |
// Connect Events | |
m_OptMiddleButtonPan->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_DISPLAY_OPTIONS_BASE::OnMiddleBtnPanEnbl ), NULL, this ); | |
m_sdbSizer1Cancel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_DISPLAY_OPTIONS_BASE::OnCancelButtonClick ), NULL, this ); | |
@@ -132,5 +137,5 @@ | |
m_OptMiddleButtonPan->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_DISPLAY_OPTIONS_BASE::OnMiddleBtnPanEnbl ), NULL, this ); | |
m_sdbSizer1Cancel->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_DISPLAY_OPTIONS_BASE::OnCancelButtonClick ), NULL, this ); | |
m_sdbSizer1OK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_DISPLAY_OPTIONS_BASE::OnOKBUttonClick ), NULL, this ); | |
- | |
+ | |
} | |
=== modified file 'gerbview/dialogs/gerbview_dialog_display_options_frame_base.fbp' | |
--- gerbview/dialogs/gerbview_dialog_display_options_frame_base.fbp 2015-08-01 12:48:38 +0000 | |
+++ gerbview/dialogs/gerbview_dialog_display_options_frame_base.fbp 2016-01-25 19:17:30 +0000 | |
@@ -1126,6 +1126,93 @@ | |
<event name="OnSize"></event> | |
<event name="OnUpdateUI"></event> | |
</object> | |
+ <object class="sizeritem" expanded="1"> | |
+ <property name="border">5</property> | |
+ <property name="flag">wxALL</property> | |
+ <property name="proportion">0</property> | |
+ <object class="wxCheckBox" expanded="1"> | |
+ <property name="BottomDockable">1</property> | |
+ <property name="LeftDockable">1</property> | |
+ <property name="RightDockable">1</property> | |
+ <property name="TopDockable">1</property> | |
+ <property name="aui_layer"></property> | |
+ <property name="aui_name"></property> | |
+ <property name="aui_position"></property> | |
+ <property name="aui_row"></property> | |
+ <property name="best_size"></property> | |
+ <property name="bg"></property> | |
+ <property name="caption"></property> | |
+ <property name="caption_visible">1</property> | |
+ <property name="center_pane">0</property> | |
+ <property name="checked">0</property> | |
+ <property name="close_button">1</property> | |
+ <property name="context_help"></property> | |
+ <property name="context_menu">1</property> | |
+ <property name="default_pane">0</property> | |
+ <property name="dock">Dock</property> | |
+ <property name="dock_fixed">0</property> | |
+ <property name="docking">Left</property> | |
+ <property name="enabled">1</property> | |
+ <property name="fg"></property> | |
+ <property name="floatable">1</property> | |
+ <property name="font"></property> | |
+ <property name="gripper">0</property> | |
+ <property name="hidden">0</property> | |
+ <property name="id">wxID_ANY</property> | |
+ <property name="label">Use mousewheel to pan</property> | |
+ <property name="max_size"></property> | |
+ <property name="maximize_button">0</property> | |
+ <property name="maximum_size"></property> | |
+ <property name="min_size"></property> | |
+ <property name="minimize_button">0</property> | |
+ <property name="minimum_size"></property> | |
+ <property name="moveable">1</property> | |
+ <property name="name">m_OptMousewheelPan</property> | |
+ <property name="pane_border">1</property> | |
+ <property name="pane_position"></property> | |
+ <property name="pane_size"></property> | |
+ <property name="permission">protected</property> | |
+ <property name="pin_button">1</property> | |
+ <property name="pos"></property> | |
+ <property name="resize">Resizable</property> | |
+ <property name="show">1</property> | |
+ <property name="size"></property> | |
+ <property name="style"></property> | |
+ <property name="subclass"></property> | |
+ <property name="toolbar_pane">0</property> | |
+ <property name="tooltip">Use mousewheel to pan canvas</property> | |
+ <property name="validator_data_type"></property> | |
+ <property name="validator_style">wxFILTER_NONE</property> | |
+ <property name="validator_type">wxDefaultValidator</property> | |
+ <property name="validator_variable"></property> | |
+ <property name="window_extra_style"></property> | |
+ <property name="window_name"></property> | |
+ <property name="window_style"></property> | |
+ <event name="OnChar"></event> | |
+ <event name="OnCheckBox"></event> | |
+ <event name="OnEnterWindow"></event> | |
+ <event name="OnEraseBackground"></event> | |
+ <event name="OnKeyDown"></event> | |
+ <event name="OnKeyUp"></event> | |
+ <event name="OnKillFocus"></event> | |
+ <event name="OnLeaveWindow"></event> | |
+ <event name="OnLeftDClick"></event> | |
+ <event name="OnLeftDown"></event> | |
+ <event name="OnLeftUp"></event> | |
+ <event name="OnMiddleDClick"></event> | |
+ <event name="OnMiddleDown"></event> | |
+ <event name="OnMiddleUp"></event> | |
+ <event name="OnMotion"></event> | |
+ <event name="OnMouseEvents"></event> | |
+ <event name="OnMouseWheel"></event> | |
+ <event name="OnPaint"></event> | |
+ <event name="OnRightDClick"></event> | |
+ <event name="OnRightDown"></event> | |
+ <event name="OnRightUp"></event> | |
+ <event name="OnSetFocus"></event> | |
+ <event name="OnSize"></event> | |
+ <event name="OnUpdateUI"></event> | |
+ </object> | |
</object> | |
</object> | |
</object> | |
=== modified file 'gerbview/dialogs/gerbview_dialog_display_options_frame_base.h' | |
--- gerbview/dialogs/gerbview_dialog_display_options_frame_base.h 2015-08-01 12:48:38 +0000 | |
+++ gerbview/dialogs/gerbview_dialog_display_options_frame_base.h 2016-01-25 19:18:08 +0000 | |
@@ -36,7 +36,7 @@ | |
class DIALOG_DISPLAY_OPTIONS_BASE : public DIALOG_SHIM | |
{ | |
private: | |
- | |
+ | |
protected: | |
wxRadioBox* m_PolarDisplay; | |
wxRadioBox* m_BoxUnits; | |
@@ -49,22 +49,23 @@ | |
wxCheckBox* m_OptZoomNoCenter; | |
wxCheckBox* m_OptMiddleButtonPan; | |
wxCheckBox* m_OptMiddleButtonPanLimited; | |
+ wxCheckBox* m_OptMousewheelPan; | |
wxStaticLine* m_staticline1; | |
wxStdDialogButtonSizer* m_sdbSizer1; | |
wxButton* m_sdbSizer1OK; | |
wxButton* m_sdbSizer1Cancel; | |
- | |
+ | |
// Virtual event handlers, overide them in your derived class | |
virtual void OnMiddleBtnPanEnbl( wxCommandEvent& event ) { event.Skip(); } | |
virtual void OnCancelButtonClick( wxCommandEvent& event ) { event.Skip(); } | |
virtual void OnOKBUttonClick( wxCommandEvent& event ) { event.Skip(); } | |
- | |
- | |
+ | |
+ | |
public: | |
- | |
- DIALOG_DISPLAY_OPTIONS_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Gerbview Options"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); | |
+ | |
+ DIALOG_DISPLAY_OPTIONS_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Gerbview Options"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); | |
~DIALOG_DISPLAY_OPTIONS_BASE(); | |
- | |
+ | |
}; | |
#endif //__GERBVIEW_DIALOG_DISPLAY_OPTIONS_FRAME_BASE_H__ | |
=== modified file 'include/class_draw_panel_gal.h' | |
--- include/class_draw_panel_gal.h 2015-08-25 09:21:00 +0000 | |
+++ include/class_draw_panel_gal.h 2016-01-25 19:19:40 +0000 | |
@@ -111,6 +111,24 @@ | |
return (KIGFX::VIEW_CONTROLS*)( m_viewControls ); | |
} | |
+ /** | |
+ * Function GetEnableMousewheelPan | |
+ * Return default mousewheel behavior. | |
+ */ | |
+ bool GetEnableMousewheelPan() const | |
+ { | |
+ return m_enableMousewheelPan; | |
+ } | |
+ | |
+ /** | |
+ * Function SetEnableMousewheelPan | |
+ * Set default mousewheel behavior. | |
+ */ | |
+ void SetEnableMousewheelPan( bool aEnable ) | |
+ { | |
+ m_enableMousewheelPan = aEnable; | |
+ } | |
+ | |
/// @copydoc wxWindow::Refresh() | |
void Refresh( bool aEraseBackground = true, const wxRect* aRect = NULL ); | |
@@ -214,6 +232,9 @@ | |
/// Flag to indicate that focus should be regained on the next mouse event. It is a workaround | |
/// for cases when the panel loses keyboard focus, so it does not react to hotkeys anymore. | |
bool m_lostFocus; | |
+ | |
+ /// Flag to indicate whether mousewheel panning is enabled by default. | |
+ bool m_enableMousewheelPan; | |
}; | |
#endif | |
=== modified file 'include/class_drawpanel.h' | |
--- include/class_drawpanel.h 2016-01-25 00:18:29 +0000 | |
+++ include/class_drawpanel.h 2016-01-25 18:48:57 +0000 | |
@@ -73,6 +73,7 @@ | |
bool m_abortRequest; ///< Flag used to abort long commands. | |
bool m_enableZoomNoCenter; ///< True to enable zooming around the crosshair instead of the center | |
+ bool m_enableMousewheelPan; ///< True to enable mousewheel panning by default. | |
bool m_enableMiddleButtonPan; ///< True to enable middle mouse button panning. | |
bool m_panScrollbarLimits; ///< has meaning only if m_enableMiddleButtonPan = true | |
///< true to limit panning to scrollbar current limits | |
@@ -142,6 +143,10 @@ | |
void SetAbortRequest( bool aAbortRequest ) { m_abortRequest = aAbortRequest; } | |
+ bool GetEnableMousewheelPan() const { return m_enableMousewheelPan; } | |
+ | |
+ void SetEnableMousewheelPan( bool aEnable ) { m_enableMousewheelPan = aEnable; } | |
+ | |
bool GetEnableMiddleButtonPan() const { return m_enableMiddleButtonPan; } | |
void SetEnableMiddleButtonPan( bool aEnable ) { m_enableMiddleButtonPan = aEnable; } | |
=== modified file 'pcbnew/dialogs/dialog_general_options.cpp' | |
--- pcbnew/dialogs/dialog_general_options.cpp 2015-10-14 18:12:17 +0000 | |
+++ pcbnew/dialogs/dialog_general_options.cpp 2016-01-25 19:20:59 +0000 | |
@@ -85,6 +85,7 @@ | |
m_Track_45_Only_Ctrl->SetValue( g_Track_45_Only_Allowed ); | |
m_Segments_45_Only_Ctrl->SetValue( g_Segments_45_Only ); | |
m_ZoomCenterOpt->SetValue( ! GetParent()->GetCanvas()->GetEnableZoomNoCenter() ); | |
+ m_MousewheelPANOpt->SetValue( GetParent()->GetCanvas()->GetEnableMousewheelPan() ); | |
m_MiddleButtonPANOpt->SetValue( GetParent()->GetCanvas()->GetEnableMiddleButtonPan() ); | |
m_OptMiddleButtonPanLimited->SetValue( GetParent()->GetCanvas()->GetMiddleButtonPanLimited() ); | |
m_OptMiddleButtonPanLimited->Enable( m_MiddleButtonPANOpt->GetValue() ); | |
@@ -137,10 +138,14 @@ | |
g_Track_45_Only_Allowed = m_Track_45_Only_Ctrl->GetValue(); | |
GetParent()->GetCanvas()->SetEnableZoomNoCenter( ! m_ZoomCenterOpt->GetValue() ); | |
+ GetParent()->GetCanvas()->SetEnableMousewheelPan( m_MousewheelPANOpt->GetValue() ); | |
GetParent()->GetCanvas()->SetEnableMiddleButtonPan( m_MiddleButtonPANOpt->GetValue() ); | |
GetParent()->GetCanvas()->SetMiddleButtonPanLimited( m_OptMiddleButtonPanLimited->GetValue() ); | |
GetParent()->GetCanvas()->SetEnableAutoPan( m_AutoPANOpt->GetValue() ); | |
+ | |
+ GetParent()->GetGalCanvas()->SetEnableMousewheelPan( m_MousewheelPANOpt->GetValue() ); | |
+ | |
g_TwoSegmentTrackBuild = m_Track_DoubleSegm_Ctrl->GetValue(); | |
g_MagneticPadOption = m_MagneticPadOptCtrl->GetSelection(); | |
g_MagneticTrackOption = m_MagneticTrackOptCtrl->GetSelection(); | |
=== modified file 'pcbnew/dialogs/dialog_general_options_BoardEditor_base.cpp' | |
--- pcbnew/dialogs/dialog_general_options_BoardEditor_base.cpp 2015-10-16 15:56:50 +0000 | |
+++ pcbnew/dialogs/dialog_general_options_BoardEditor_base.cpp 2016-01-25 19:22:24 +0000 | |
@@ -12,212 +12,217 @@ | |
DIALOG_GENERALOPTIONS_BOARDEDITOR_BASE::DIALOG_GENERALOPTIONS_BOARDEDITOR_BASE( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : DIALOG_SHIM( parent, id, title, pos, size, style ) | |
{ | |
this->SetSizeHints( wxDefaultSize, wxDefaultSize ); | |
- | |
+ | |
wxBoxSizer* bMainSizer; | |
bMainSizer = new wxBoxSizer( wxVERTICAL ); | |
- | |
+ | |
wxBoxSizer* bSizerUpper; | |
bSizerUpper = new wxBoxSizer( wxHORIZONTAL ); | |
- | |
+ | |
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( 1 ); | |
m_PolarDisplay->SetToolTip( _("Activates the display of relative coordinates from relative origin (set by the space key)\nto the cursor, in polar coordinates (angle and distance)") ); | |
- | |
+ | |
bLeftSizer->Add( m_PolarDisplay, 0, wxALL|wxEXPAND, 5 ); | |
- | |
+ | |
wxString m_UnitsSelectionChoices[] = { _("Inches"), _("Millimeters") }; | |
int m_UnitsSelectionNChoices = sizeof( m_UnitsSelectionChoices ) / sizeof( wxString ); | |
m_UnitsSelection = new wxRadioBox( this, wxID_UNITS, _("Units"), wxDefaultPosition, wxDefaultSize, m_UnitsSelectionNChoices, m_UnitsSelectionChoices, 1, wxRA_SPECIFY_COLS ); | |
m_UnitsSelection->SetSelection( 1 ); | |
m_UnitsSelection->SetToolTip( _("Selection of units used to display dimensions and positions of items") ); | |
- | |
+ | |
bLeftSizer->Add( m_UnitsSelection, 0, wxALL|wxEXPAND, 5 ); | |
- | |
+ | |
wxString m_CursorShapeChoices[] = { _("Small cross"), _("Full screen cursor") }; | |
int m_CursorShapeNChoices = sizeof( m_CursorShapeChoices ) / sizeof( wxString ); | |
m_CursorShape = new wxRadioBox( this, wxID_CURSOR_SHAPE, _("Cursor"), wxDefaultPosition, wxDefaultSize, m_CursorShapeNChoices, m_CursorShapeChoices, 1, wxRA_SPECIFY_COLS ); | |
m_CursorShape->SetSelection( 0 ); | |
m_CursorShape->SetToolTip( _("Main cursor shape selection (small cross or large cursor)") ); | |
- | |
+ | |
bLeftSizer->Add( m_CursorShape, 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->SetFlexibleDirection( wxBOTH ); | |
fgSizer1->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); | |
- | |
+ | |
m_staticTextmaxlinks = new wxStaticText( this, wxID_ANY, _("&Maximum links:"), wxDefaultPosition, wxDefaultSize, 0 ); | |
m_staticTextmaxlinks->Wrap( -1 ); | |
fgSizer1->Add( m_staticTextmaxlinks, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 ); | |
- | |
+ | |
m_MaxShowLinks = new wxSpinCtrl( this, wxID_ANY, wxT("1"), wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, 1, 5, 1 ); | |
m_MaxShowLinks->SetToolTip( _("Adjust the number of ratsnets shown from cursor to closest pads") ); | |
- | |
+ | |
fgSizer1->Add( m_MaxShowLinks, 0, wxALIGN_CENTER_VERTICAL|wxALL|wxTOP, 5 ); | |
- | |
+ | |
m_staticTextautosave = new wxStaticText( this, wxID_ANY, _("&Auto save (minutes):"), wxDefaultPosition, wxDefaultSize, 0 ); | |
m_staticTextautosave->Wrap( -1 ); | |
fgSizer1->Add( m_staticTextautosave, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 ); | |
- | |
+ | |
m_SaveTime = new wxSpinCtrl( this, wxID_ANY, wxT("0"), wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, 0, 60, 0 ); | |
m_SaveTime->SetToolTip( _("Delay after the first change to create a backup file of the board on disk.") ); | |
- | |
+ | |
fgSizer1->Add( m_SaveTime, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 ); | |
- | |
+ | |
m_stMaxUndoItems = new wxStaticText( this, wxID_ANY, _("Ma&ximum undo items:"), wxDefaultPosition, wxDefaultSize, 0 ); | |
m_stMaxUndoItems->Wrap( -1 ); | |
fgSizer1->Add( m_stMaxUndoItems, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 ); | |
- | |
+ | |
m_spinMaxUndoItems = new wxSpinCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, 0, 65536, 1 ); | |
fgSizer1->Add( m_spinMaxUndoItems, 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( _("Context menu and hot key footprint rotation increment.") ); | |
- | |
+ | |
fgSizer1->Add( m_RotationAngle, 0, wxALIGN_CENTER_VERTICAL|wxALL|wxEXPAND, 5 ); | |
- | |
- | |
+ | |
+ | |
bMiddleLeftSizer->Add( fgSizer1, 0, wxEXPAND, 5 ); | |
- | |
+ | |
wxStaticBoxSizer* bMiddleRightBoxSizer; | |
bMiddleRightBoxSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Options") ), wxVERTICAL ); | |
- | |
+ | |
m_DrcOn = new wxCheckBox( bMiddleRightBoxSizer->GetStaticBox(), wxID_DRC_ONOFF, _("&Enforce design rules when routing"), wxDefaultPosition, wxDefaultSize, 0 ); | |
- m_DrcOn->SetValue(true); | |
+ m_DrcOn->SetValue(true); | |
m_DrcOn->SetToolTip( _("Enable/disable the DRC control.\nWhen the DRC control is disabled, all connections are allowed.") ); | |
- | |
+ | |
bMiddleRightBoxSizer->Add( m_DrcOn, 0, wxALL|wxEXPAND, 5 ); | |
- | |
+ | |
m_ShowGlobalRatsnest = new wxCheckBox( bMiddleRightBoxSizer->GetStaticBox(), wxID_GENERAL_RATSNEST, _("&Show ratsnest"), wxDefaultPosition, wxDefaultSize, 0 ); | |
- m_ShowGlobalRatsnest->SetValue(true); | |
+ m_ShowGlobalRatsnest->SetValue(true); | |
m_ShowGlobalRatsnest->SetToolTip( _("Show (or not) the full rastnest.") ); | |
- | |
+ | |
bMiddleRightBoxSizer->Add( m_ShowGlobalRatsnest, 0, wxALL, 5 ); | |
- | |
+ | |
m_ShowModuleRatsnest = new wxCheckBox( bMiddleRightBoxSizer->GetStaticBox(), wxID_RATSNEST_MODULE, _("S&how footprint ratsnest"), wxDefaultPosition, wxDefaultSize, 0 ); | |
m_ShowModuleRatsnest->SetToolTip( _("Shows (or not) the local ratsnest relative to a footprint, when moving it.\nThis ratsnest is useful to place a footprint.") ); | |
- | |
+ | |
bMiddleRightBoxSizer->Add( m_ShowModuleRatsnest, 0, wxALL, 5 ); | |
- | |
+ | |
m_TrackAutodel = new wxCheckBox( bMiddleRightBoxSizer->GetStaticBox(), wxID_TRACK_AUTODEL, _("&Delete unconnected tracks"), wxDefaultPosition, wxDefaultSize, 0 ); | |
m_TrackAutodel->SetToolTip( _("Enable/disable the automatic track deletion when recreating a track.") ); | |
- | |
+ | |
bMiddleRightBoxSizer->Add( m_TrackAutodel, 0, wxALL, 5 ); | |
- | |
+ | |
m_Track_45_Only_Ctrl = new wxCheckBox( bMiddleRightBoxSizer->GetStaticBox(), wxID_TRACKS45, _("&Limit tracks to 45 degrees"), wxDefaultPosition, wxDefaultSize, 0 ); | |
m_Track_45_Only_Ctrl->SetToolTip( _("If enabled, force tracks directions to H, V or 45 degrees, when creating a track.") ); | |
- | |
+ | |
bMiddleRightBoxSizer->Add( m_Track_45_Only_Ctrl, 0, wxALL, 5 ); | |
- | |
+ | |
m_Segments_45_Only_Ctrl = new wxCheckBox( bMiddleRightBoxSizer->GetStaticBox(), wxID_SEGMENTS45, _("L&imit graphic lines to 45 degrees"), wxDefaultPosition, wxDefaultSize, 0 ); | |
m_Segments_45_Only_Ctrl->SetToolTip( _("If enabled, force segments directions to H, V or 45 degrees, when creating a segment on technical layers.") ); | |
- | |
+ | |
bMiddleRightBoxSizer->Add( m_Segments_45_Only_Ctrl, 0, wxALL, 5 ); | |
- | |
+ | |
m_Track_DoubleSegm_Ctrl = new wxCheckBox( bMiddleRightBoxSizer->GetStaticBox(), wxID_ANY, _("&Use double segmented tracks"), wxDefaultPosition, wxDefaultSize, 0 ); | |
m_Track_DoubleSegm_Ctrl->SetToolTip( _("If enabled, uses two track segments, with 45 degrees angle between them when creating a new track ") ); | |
- | |
+ | |
bMiddleRightBoxSizer->Add( m_Track_DoubleSegm_Ctrl, 0, wxALL, 5 ); | |
- | |
- | |
+ | |
+ | |
bMiddleLeftSizer->Add( bMiddleRightBoxSizer, 4, wxALL|wxEXPAND, 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( 0 ); | |
m_MagneticPadOptCtrl->SetToolTip( _("control the capture of the pcb cursor when the mouse cursor enters a pad area") ); | |
- | |
+ | |
bRightSizer->Add( m_MagneticPadOptCtrl, 0, wxALL|wxEXPAND, 5 ); | |
- | |
+ | |
wxString m_MagneticTrackOptCtrlChoices[] = { _("Never"), _("When creating tracks"), _("Always") }; | |
int m_MagneticTrackOptCtrlNChoices = sizeof( m_MagneticTrackOptCtrlChoices ) / sizeof( wxString ); | |
m_MagneticTrackOptCtrl = new wxRadioBox( this, wxID_MAGNETIC_TRACKS, _("Magnetic Tracks"), wxDefaultPosition, wxDefaultSize, m_MagneticTrackOptCtrlNChoices, m_MagneticTrackOptCtrlChoices, 1, wxRA_SPECIFY_COLS ); | |
m_MagneticTrackOptCtrl->SetSelection( 0 ); | |
m_MagneticTrackOptCtrl->SetToolTip( _("Control the capture of the pcb cursor when the mouse cursor enters a track") ); | |
- | |
+ | |
bRightSizer->Add( m_MagneticTrackOptCtrl, 0, wxALL|wxEXPAND, 5 ); | |
- | |
+ | |
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->SetValue(true); | |
+ m_ZoomCenterOpt->SetValue(true); | |
m_ZoomCenterOpt->SetToolTip( _("Keep the cursor at its current location when zooming") ); | |
- | |
+ | |
sbSizer2PAN->Add( m_ZoomCenterOpt, 0, wxLEFT|wxRIGHT|wxTOP, 5 ); | |
- | |
+ | |
m_MiddleButtonPANOpt = new wxCheckBox( sbSizer2PAN->GetStaticBox(), wxID_ANY, _("Use middle mouse &button to pan"), wxDefaultPosition, wxDefaultSize, 0 ); | |
m_MiddleButtonPANOpt->SetToolTip( _("Use middle mouse button dragging to pan") ); | |
- | |
+ | |
sbSizer2PAN->Add( m_MiddleButtonPANOpt, 0, wxLEFT|wxRIGHT|wxTOP, 5 ); | |
- | |
+ | |
m_OptMiddleButtonPanLimited = new wxCheckBox( sbSizer2PAN->GetStaticBox(), wxID_MIDDLEBUTTONPAN, _("Limi&t panning to scroll size"), wxDefaultPosition, wxDefaultSize, 0 ); | |
m_OptMiddleButtonPanLimited->SetToolTip( _("Middle mouse button panning limited by current scrollbar size") ); | |
- | |
+ | |
sbSizer2PAN->Add( m_OptMiddleButtonPanLimited, 0, wxLEFT|wxRIGHT|wxTOP, 5 ); | |
- | |
+ | |
+ m_MousewheelPANOpt = new wxCheckBox( sbSizer2PAN->GetStaticBox(), wxID_ANY, _("Use mousewheel to pan"), wxDefaultPosition, wxDefaultSize, 0 ); | |
+ m_MousewheelPANOpt->SetToolTip( _("Use mousewheel to pan canvas") ); | |
+ | |
+ 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( _("Allows auto pan when creating a track, or moving an item.") ); | |
- | |
+ | |
sbSizer2PAN->Add( m_AutoPANOpt, 0, wxALL, 5 ); | |
- | |
- | |
+ | |
+ | |
bRightSizer->Add( sbSizer2PAN, 1, wxEXPAND, 5 ); | |
- | |
+ | |
wxStaticBoxSizer* sbSizer2Adv; | |
sbSizer2Adv = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Advanced/Developer") ), wxVERTICAL ); | |
- | |
+ | |
m_DumpZonesWhenFilling = new wxCheckBox( sbSizer2Adv->GetStaticBox(), wxID_ANY, _("Dump zone geometry to files when filling"), wxDefaultPosition, wxDefaultSize, 0 ); | |
sbSizer2Adv->Add( m_DumpZonesWhenFilling, 0, wxLEFT|wxRIGHT|wxTOP, 5 ); | |
- | |
- | |
+ | |
+ | |
bRightSizer->Add( sbSizer2Adv, 0, wxALL|wxEXPAND, 5 ); | |
- | |
- | |
+ | |
+ | |
bSizerUpper->Add( bRightSizer, 0, wxALL|wxEXPAND, 5 ); | |
- | |
- | |
+ | |
+ | |
bMainSizer->Add( bSizerUpper, 0, wxEXPAND, 5 ); | |
- | |
+ | |
m_staticline1 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); | |
bMainSizer->Add( m_staticline1, 0, wxEXPAND|wxLEFT|wxRIGHT, 5 ); | |
- | |
+ | |
m_sdbSizer = new wxStdDialogButtonSizer(); | |
m_sdbSizerOK = new wxButton( this, wxID_OK ); | |
m_sdbSizer->AddButton( m_sdbSizerOK ); | |
m_sdbSizerCancel = new wxButton( this, wxID_CANCEL ); | |
m_sdbSizer->AddButton( m_sdbSizerCancel ); | |
m_sdbSizer->Realize(); | |
- | |
+ | |
bMainSizer->Add( m_sdbSizer, 0, wxALL|wxEXPAND, 5 ); | |
- | |
- | |
+ | |
+ | |
this->SetSizer( bMainSizer ); | |
this->Layout(); | |
bMainSizer->Fit( this ); | |
- | |
+ | |
// Connect Events | |
m_MiddleButtonPANOpt->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_GENERALOPTIONS_BOARDEDITOR_BASE::OnMiddleBtnPanEnbl ), NULL, this ); | |
m_DumpZonesWhenFilling->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_GENERALOPTIONS_BOARDEDITOR_BASE::OnMiddleBtnPanEnbl ), NULL, this ); | |
@@ -232,5 +237,5 @@ | |
m_DumpZonesWhenFilling->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_GENERALOPTIONS_BOARDEDITOR_BASE::OnMiddleBtnPanEnbl ), 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 ); | |
- | |
+ | |
} | |
=== modified file 'pcbnew/dialogs/dialog_general_options_BoardEditor_base.fbp' | |
--- pcbnew/dialogs/dialog_general_options_BoardEditor_base.fbp 2015-10-16 15:56:50 +0000 | |
+++ pcbnew/dialogs/dialog_general_options_BoardEditor_base.fbp 2016-01-25 19:25:17 +0000 | |
@@ -2281,6 +2281,93 @@ | |
<event name="OnSize"></event> | |
<event name="OnUpdateUI"></event> | |
</object> | |
+ <object class="sizeritem" expanded="1"> | |
+ <property name="border">5</property> | |
+ <property name="flag">wxALL</property> | |
+ <property name="proportion">0</property> | |
+ <object class="wxCheckBox" expanded="1"> | |
+ <property name="BottomDockable">1</property> | |
+ <property name="LeftDockable">1</property> | |
+ <property name="RightDockable">1</property> | |
+ <property name="TopDockable">1</property> | |
+ <property name="aui_layer"></property> | |
+ <property name="aui_name"></property> | |
+ <property name="aui_position"></property> | |
+ <property name="aui_row"></property> | |
+ <property name="best_size"></property> | |
+ <property name="bg"></property> | |
+ <property name="caption"></property> | |
+ <property name="caption_visible">1</property> | |
+ <property name="center_pane">0</property> | |
+ <property name="checked">0</property> | |
+ <property name="close_button">1</property> | |
+ <property name="context_help"></property> | |
+ <property name="context_menu">1</property> | |
+ <property name="default_pane">0</property> | |
+ <property name="dock">Dock</property> | |
+ <property name="dock_fixed">0</property> | |
+ <property name="docking">Left</property> | |
+ <property name="enabled">1</property> | |
+ <property name="fg"></property> | |
+ <property name="floatable">1</property> | |
+ <property name="font"></property> | |
+ <property name="gripper">0</property> | |
+ <property name="hidden">0</property> | |
+ <property name="id">wxID_AUTOPAN</property> | |
+ <property name="label">Use mousewheel to pan</property> | |
+ <property name="max_size"></property> | |
+ <property name="maximize_button">0</property> | |
+ <property name="maximum_size"></property> | |
+ <property name="min_size"></property> | |
+ <property name="minimize_button">0</property> | |
+ <property name="minimum_size"></property> | |
+ <property name="moveable">1</property> | |
+ <property name="name">m_MousewheelPANOpt</property> | |
+ <property name="pane_border">1</property> | |
+ <property name="pane_position"></property> | |
+ <property name="pane_size"></property> | |
+ <property name="permission">protected</property> | |
+ <property name="pin_button">1</property> | |
+ <property name="pos"></property> | |
+ <property name="resize">Resizable</property> | |
+ <property name="show">1</property> | |
+ <property name="size"></property> | |
+ <property name="style"></property> | |
+ <property name="subclass"></property> | |
+ <property name="toolbar_pane">0</property> | |
+ <property name="tooltip">Use mousewheel to pan canvas</property> | |
+ <property name="validator_data_type"></property> | |
+ <property name="validator_style">wxFILTER_NONE</property> | |
+ <property name="validator_type">wxDefaultValidator</property> | |
+ <property name="validator_variable"></property> | |
+ <property name="window_extra_style"></property> | |
+ <property name="window_name"></property> | |
+ <property name="window_style"></property> | |
+ <event name="OnChar"></event> | |
+ <event name="OnCheckBox"></event> | |
+ <event name="OnEnterWindow"></event> | |
+ <event name="OnEraseBackground"></event> | |
+ <event name="OnKeyDown"></event> | |
+ <event name="OnKeyUp"></event> | |
+ <event name="OnKillFocus"></event> | |
+ <event name="OnLeaveWindow"></event> | |
+ <event name="OnLeftDClick"></event> | |
+ <event name="OnLeftDown"></event> | |
+ <event name="OnLeftUp"></event> | |
+ <event name="OnMiddleDClick"></event> | |
+ <event name="OnMiddleDown"></event> | |
+ <event name="OnMiddleUp"></event> | |
+ <event name="OnMotion"></event> | |
+ <event name="OnMouseEvents"></event> | |
+ <event name="OnMouseWheel"></event> | |
+ <event name="OnPaint"></event> | |
+ <event name="OnRightDClick"></event> | |
+ <event name="OnRightDown"></event> | |
+ <event name="OnRightUp"></event> | |
+ <event name="OnSetFocus"></event> | |
+ <event name="OnSize"></event> | |
+ <event name="OnUpdateUI"></event> | |
+ </object> | |
</object> | |
</object> | |
</object> | |
=== modified file 'pcbnew/dialogs/dialog_general_options_BoardEditor_base.h' | |
--- pcbnew/dialogs/dialog_general_options_BoardEditor_base.h 2015-08-08 13:54:32 +0000 | |
+++ pcbnew/dialogs/dialog_general_options_BoardEditor_base.h 2016-01-25 19:25:43 +0000 | |
@@ -38,7 +38,7 @@ | |
class DIALOG_GENERALOPTIONS_BOARDEDITOR_BASE : public DIALOG_SHIM | |
{ | |
private: | |
- | |
+ | |
protected: | |
enum | |
{ | |
@@ -55,7 +55,7 @@ | |
wxID_MIDDLEBUTTONPAN, | |
wxID_AUTOPAN | |
}; | |
- | |
+ | |
wxRadioBox* m_PolarDisplay; | |
wxRadioBox* m_UnitsSelection; | |
wxRadioBox* m_CursorShape; | |
@@ -79,24 +79,25 @@ | |
wxCheckBox* m_ZoomCenterOpt; | |
wxCheckBox* m_MiddleButtonPANOpt; | |
wxCheckBox* m_OptMiddleButtonPanLimited; | |
+ wxCheckBox* m_MousewheelPANOpt; | |
wxCheckBox* m_AutoPANOpt; | |
wxCheckBox* m_DumpZonesWhenFilling; | |
wxStaticLine* m_staticline1; | |
wxStdDialogButtonSizer* m_sdbSizer; | |
wxButton* m_sdbSizerOK; | |
wxButton* m_sdbSizerCancel; | |
- | |
+ | |
// Virtual event handlers, overide them in your derived class | |
virtual void OnMiddleBtnPanEnbl( wxCommandEvent& event ) { event.Skip(); } | |
virtual void OnCancelClick( wxCommandEvent& event ) { event.Skip(); } | |
virtual void OnOkClick( wxCommandEvent& event ) { event.Skip(); } | |
- | |
- | |
+ | |
+ | |
public: | |
- | |
- DIALOG_GENERALOPTIONS_BOARDEDITOR_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("General Settings"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); | |
+ | |
+ DIALOG_GENERALOPTIONS_BOARDEDITOR_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("General Settings"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); | |
~DIALOG_GENERALOPTIONS_BOARDEDITOR_BASE(); | |
- | |
+ | |
}; | |
#endif //__DIALOG_GENERAL_OPTIONS_BOARDEDITOR_BASE_H__ | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment