Add support for optional touchpad panning.
This commit is contained in:
parent
0829446c86
commit
f8abe9c191
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||
*
|
||||
* Copyright (C) 1992-2014 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
* Copyright (C) 1992-2016 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
|
@ -86,7 +86,7 @@ EDA_3D_CANVAS::EDA_3D_CANVAS( EDA_3D_FRAME* parent, int* attribList ) :
|
|||
m_init = false;
|
||||
m_reportWarnings = true;
|
||||
m_shadow_init = false;
|
||||
// set an invalide value to not yet initialized indexes managing
|
||||
// set an invalid value to not yet initialized indexes managing
|
||||
// textures created to enhance 3D rendering
|
||||
m_text_pcb = m_text_silk = INVALID_INDEX;
|
||||
m_text_fake_shadow_front = INVALID_INDEX;
|
||||
|
@ -144,8 +144,7 @@ void EDA_3D_CANVAS::ClearLists( int aGlList )
|
|||
m_glLists[ii] = 0;
|
||||
}
|
||||
|
||||
// When m_text_fake_shadow_??? is set to INVALID_INDEX, textures are no yet
|
||||
// created.
|
||||
// When m_text_fake_shadow_??? is set to INVALID_INDEX, textures are not yet created.
|
||||
if( m_text_fake_shadow_front != INVALID_INDEX )
|
||||
glDeleteTextures( 1, &m_text_fake_shadow_front );
|
||||
|
||||
|
@ -284,19 +283,18 @@ void EDA_3D_CANVAS::SetView3D( int keycode )
|
|||
|
||||
void EDA_3D_CANVAS::OnMouseWheel( wxMouseEvent& event )
|
||||
{
|
||||
if( event.ShiftDown() )
|
||||
double delta = 0.05 * GetPrm3DVisu().m_Zoom * event.GetWheelRotation();
|
||||
|
||||
if( event.ShiftDown() || GetPrm3DVisu().GetFlag( FL_MOUSEWHEEL_PANNING ) )
|
||||
{
|
||||
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 +308,10 @@ void EDA_3D_CANVAS::OnMouseWheel( wxMouseEvent& event )
|
|||
else
|
||||
GetPrm3DVisu().m_Zoom *= 1.4;
|
||||
|
||||
DisplayStatus();
|
||||
Refresh( false );
|
||||
}
|
||||
|
||||
DisplayStatus();
|
||||
Refresh( false );
|
||||
GetPrm3DVisu().m_Beginx = event.GetX();
|
||||
GetPrm3DVisu().m_Beginy = event.GetY();
|
||||
}
|
||||
|
@ -327,7 +325,9 @@ void EDA_3D_CANVAS::OnMagnify( wxMouseEvent& event )
|
|||
GetPrm3DVisu().m_Zoom /= magnification;
|
||||
|
||||
if( GetPrm3DVisu().m_Zoom <= 0.01 )
|
||||
{
|
||||
GetPrm3DVisu().m_Zoom = 0.01;
|
||||
}
|
||||
|
||||
DisplayStatus();
|
||||
Refresh( false );
|
||||
|
@ -376,8 +376,6 @@ void EDA_3D_CANVAS::OnMouseMove( wxMouseEvent& event )
|
|||
}
|
||||
|
||||
|
||||
/* Construct and display a popup menu when the right button is clicked.
|
||||
*/
|
||||
void EDA_3D_CANVAS::OnRightClick( wxMouseEvent& event )
|
||||
{
|
||||
wxPoint pos;
|
||||
|
@ -563,7 +561,7 @@ GLuint load_and_generate_texture( tsImage *image )
|
|||
return texture;
|
||||
}
|
||||
|
||||
/* Initialize broad parameters for OpenGL */
|
||||
|
||||
void EDA_3D_CANVAS::InitGL()
|
||||
{
|
||||
if( !m_init )
|
||||
|
@ -579,7 +577,7 @@ void EDA_3D_CANVAS::InitGL()
|
|||
m_ZTop = 10.0;
|
||||
|
||||
glDisable( GL_CULL_FACE ); // show back faces
|
||||
glEnable( GL_DEPTH_TEST ); // Enable z-buferring
|
||||
glEnable( GL_DEPTH_TEST ); // Enable z-buffering
|
||||
glEnable( GL_ALPHA_TEST );
|
||||
glEnable( GL_LINE_SMOOTH );
|
||||
// glEnable(GL_POLYGON_SMOOTH); // creates issues with some graphic cards
|
||||
|
@ -600,7 +598,6 @@ void EDA_3D_CANVAS::InitGL()
|
|||
}
|
||||
|
||||
|
||||
/* Initialize OpenGL light sources. */
|
||||
void EDA_3D_CANVAS::SetLights()
|
||||
{
|
||||
// activate light. the source is above the xy plane, at source_pos
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
/*
|
||||
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||
*
|
||||
* Copyright (C) 1992-2015 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
* Copyright (C) 1992-2016 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
|
@ -70,6 +70,8 @@ static const wxChar keyBoardBodyColor_Red[] = wxT( "BoardBodyColor_Red" );
|
|||
static const wxChar keyBoardBodyColor_Green[] = wxT( "BoardBodyColor_Green" );
|
||||
static const wxChar keyBoardBodyColor_Blue[]= wxT( "BoardBodyColor_Blue" );
|
||||
|
||||
static const wxChar keyMousewheelPanning[] = wxT( "MousewheelPAN3D" );
|
||||
|
||||
static const wxChar keyShowRealisticMode[] = wxT( "ShowRealisticMode" );
|
||||
static const wxChar keyRenderShadows[] = wxT( "Render_Shadows" );
|
||||
static const wxChar keyRenderRemoveHoles[] = wxT( "Render_RemoveHoles" );
|
||||
|
@ -280,6 +282,9 @@ void EDA_3D_FRAME::LoadSettings( wxConfigBase* aCfg )
|
|||
aCfg->Read( keyBoardBodyColor_Blue, &GetPrm3DVisu().m_BoardBodyColor.m_Blue, 22.0 /255.0 );
|
||||
|
||||
bool tmp;
|
||||
aCfg->Read( keyMousewheelPanning, &tmp, false );
|
||||
prms.SetFlag( FL_MOUSEWHEEL_PANNING, tmp );
|
||||
|
||||
aCfg->Read( keyShowRealisticMode, &tmp, false );
|
||||
prms.SetFlag( FL_USE_REALISTIC_MODE, tmp );
|
||||
|
||||
|
@ -378,6 +383,8 @@ void EDA_3D_FRAME::SaveSettings( wxConfigBase* aCfg )
|
|||
aCfg->Write( keyBoardBodyColor_Green, GetPrm3DVisu().m_BoardBodyColor.m_Green );
|
||||
aCfg->Write( keyBoardBodyColor_Blue, GetPrm3DVisu().m_BoardBodyColor.m_Blue );
|
||||
|
||||
aCfg->Write( keyMousewheelPanning, prms.GetFlag( FL_MOUSEWHEEL_PANNING ) );
|
||||
|
||||
aCfg->Write( keyShowRealisticMode, prms.GetFlag( FL_USE_REALISTIC_MODE ) );
|
||||
|
||||
aCfg->Write( keyRenderShadows, prms.GetFlag( FL_RENDER_SHADOWS ) );
|
||||
|
@ -563,6 +570,10 @@ void EDA_3D_FRAME::Process_Special_Functions( wxCommandEvent& event )
|
|||
Set3DBoardBodyColorFromUser();
|
||||
break;
|
||||
|
||||
case ID_MENU3D_MOUSEWHEEL_PANNING:
|
||||
GetPrm3DVisu().SetFlag( FL_MOUSEWHEEL_PANNING, isChecked );
|
||||
return;
|
||||
|
||||
case ID_MENU3D_REALISTIC_MODE:
|
||||
GetPrm3DVisu().SetFlag( FL_USE_REALISTIC_MODE, isChecked );
|
||||
GetMenuBar()->FindItem( ID_MENU3D_COMMENTS_ONOFF )->Enable( !isChecked );
|
||||
|
@ -745,8 +756,6 @@ void EDA_3D_FRAME::OnActivate( wxActivateEvent& event )
|
|||
}
|
||||
|
||||
|
||||
/* called to set the background color of the 3D scene
|
||||
*/
|
||||
bool EDA_3D_FRAME::Set3DColorFromUser( S3D_COLOR &aColor, const wxString& aTitle,
|
||||
wxColourData* aPredefinedColors )
|
||||
{
|
||||
|
@ -778,13 +787,12 @@ bool EDA_3D_FRAME::Set3DColorFromUser( S3D_COLOR &aColor, const wxString& aTitle
|
|||
return true;
|
||||
}
|
||||
|
||||
/* called to set the silkscreen color. Sets up a number of default colors
|
||||
*/
|
||||
|
||||
bool EDA_3D_FRAME::Set3DSilkScreenColorFromUser()
|
||||
{
|
||||
wxColourData definedColors;
|
||||
|
||||
definedColors.SetCustomColour(0, wxColour( 241, 241, 241 ) ); // White
|
||||
definedColors.SetCustomColour(0, wxColour( 241, 241, 241 ) ); // White
|
||||
definedColors.SetCustomColour(1, wxColour( 180, 180, 180 ) ); // Gray
|
||||
|
||||
bool change = Set3DColorFromUser( GetPrm3DVisu().m_SilkScreenColor,
|
||||
|
@ -798,8 +806,6 @@ bool EDA_3D_FRAME::Set3DSilkScreenColorFromUser()
|
|||
}
|
||||
|
||||
|
||||
/* called to set the soldermask color. Sets up a number of default colors
|
||||
*/
|
||||
bool EDA_3D_FRAME::Set3DSolderMaskColorFromUser()
|
||||
{
|
||||
wxColourData definedColors;
|
||||
|
@ -822,8 +828,6 @@ bool EDA_3D_FRAME::Set3DSolderMaskColorFromUser()
|
|||
}
|
||||
|
||||
|
||||
/* called to set the copper surface color. Sets up a number of default colors
|
||||
*/
|
||||
bool EDA_3D_FRAME::Set3DCopperColorFromUser()
|
||||
{
|
||||
wxColourData definedColors;
|
||||
|
@ -845,8 +849,6 @@ bool EDA_3D_FRAME::Set3DCopperColorFromUser()
|
|||
}
|
||||
|
||||
|
||||
/* called to set the board body color. Sets up a number of default colors
|
||||
*/
|
||||
bool EDA_3D_FRAME::Set3DBoardBodyColorFromUser()
|
||||
{
|
||||
wxColourData definedColors;
|
||||
|
@ -871,8 +873,6 @@ bool EDA_3D_FRAME::Set3DBoardBodyColorFromUser()
|
|||
}
|
||||
|
||||
|
||||
/* called to set the solder paste layer color. Sets up a number of default colors
|
||||
*/
|
||||
bool EDA_3D_FRAME::Set3DSolderPasteColorFromUser()
|
||||
{
|
||||
wxColourData definedColors;
|
||||
|
@ -905,6 +905,7 @@ INFO3D_VISU& EDA_3D_FRAME::GetPrm3DVisu() const
|
|||
return g_Parm_3D_Visu;
|
||||
}
|
||||
|
||||
|
||||
bool EDA_3D_FRAME::IsEnabled( DISPLAY3D_FLG aItem ) const
|
||||
{
|
||||
// return true if aItem must be displayed
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
*
|
||||
* Copyright (C) 2015 Jean-Pierre Charras, jp.charras at wanadoo.fr
|
||||
* Copyright (C) 2013 Wayne Stambaugh <stambaughw@verizon.net>
|
||||
* Copyright (C) 1992-2015 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
* Copyright (C) 1992-2016 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
|
@ -153,6 +153,12 @@ void EDA_3D_FRAME::CreateMenuBar()
|
|||
|
||||
menuBar->Append( prefsMenu, _( "&Preferences" ) );
|
||||
|
||||
AddMenuItem( prefsMenu, ID_MENU3D_MOUSEWHEEL_PANNING,
|
||||
_( "Use Touchpad to Pan" ),
|
||||
KiBitmap( tools_xpm ), wxITEM_CHECK );
|
||||
|
||||
prefsMenu->AppendSeparator();
|
||||
|
||||
AddMenuItem( prefsMenu, ID_MENU3D_REALISTIC_MODE,
|
||||
_( "Realistic Mode" ),
|
||||
KiBitmap( use_3D_copper_thickness_xpm ), wxITEM_CHECK );
|
||||
|
@ -292,6 +298,7 @@ void EDA_3D_FRAME::CreateMenuBar()
|
|||
SetMenuBarOptionsState();
|
||||
}
|
||||
|
||||
|
||||
void EDA_3D_FRAME::SetMenuBarOptionsState()
|
||||
{
|
||||
wxMenuBar* menuBar = GetMenuBar();
|
||||
|
@ -301,6 +308,9 @@ void EDA_3D_FRAME::SetMenuBarOptionsState()
|
|||
|
||||
wxMenuItem* item;
|
||||
// Set the state of toggle menus according to the current display options
|
||||
item = menuBar->FindItem( ID_MENU3D_MOUSEWHEEL_PANNING );
|
||||
item->Check( GetPrm3DVisu().GetFlag( FL_MOUSEWHEEL_PANNING ) );
|
||||
|
||||
item = menuBar->FindItem( ID_MENU3D_REALISTIC_MODE );
|
||||
item->Check( GetPrm3DVisu().IsRealisticMode() );
|
||||
item = menuBar->FindItem( ID_MENU3D_COMMENTS_ONOFF );
|
||||
|
@ -366,6 +376,7 @@ void EDA_3D_FRAME::SetMenuBarOptionsState()
|
|||
item->Check( GetPrm3DVisu().GetFlag( FL_ECO ));
|
||||
}
|
||||
|
||||
|
||||
void EDA_3D_FRAME::SetToolbars()
|
||||
{
|
||||
}
|
||||
|
|
|
@ -51,6 +51,7 @@ enum id_3dview_frm
|
|||
ID_MENU3D_COMMENTS_ONOFF,
|
||||
ID_MENU3D_ECO_ONOFF,
|
||||
ID_MENU3D_SHOW_BOARD_BODY,
|
||||
ID_MENU3D_MOUSEWHEEL_PANNING,
|
||||
ID_MENU3D_REALISTIC_MODE,
|
||||
ID_MENU3D_FL_RENDER_SHADOWS,
|
||||
ID_MENU3D_FL_RENDER_SHOW_HOLES_IN_ZONES,
|
||||
|
|
|
@ -71,6 +71,7 @@ enum DISPLAY3D_FLG {
|
|||
FL_GRID,
|
||||
FL_USE_COPPER_THICKNESS,
|
||||
FL_SHOW_BOARD_BODY,
|
||||
FL_MOUSEWHEEL_PANNING,
|
||||
FL_USE_REALISTIC_MODE,
|
||||
FL_RENDER_SHADOWS,
|
||||
FL_RENDER_SHOW_HOLES_IN_ZONES,
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
*
|
||||
* Copyright (C) 2004-2015 Jean-Pierre Charras, jean-pierre.charras@gipsa-lab.inpg.fr
|
||||
* Copyright (C) 2008-2015 Wayne Stambaugh <stambaughw@verizon.net>
|
||||
* Copyright (C) 2004-2015 KiCad Developers, see change_log.txt for contributors.
|
||||
* Copyright (C) 2004-2016 KiCad Developers, see change_log.txt for contributors.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
|
@ -1076,6 +1076,7 @@ void EDA_DRAW_FRAME::UseGalCanvas( bool aEnable )
|
|||
|
||||
// Transfer EDA_DRAW_PANEL settings
|
||||
GetGalCanvas()->GetViewControls()->EnableCursorWarping( !m_canvas->GetEnableZoomNoCenter() );
|
||||
GetGalCanvas()->GetViewControls()->EnableMousewheelPan( m_canvas->GetEnableMousewheelPan() );
|
||||
GetToolManager()->RunAction( "pcbnew.Control.switchCursor" );
|
||||
}
|
||||
else if( m_galCanvasActive )
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
*
|
||||
* Copyright (C) 2009 Jean-Pierre Charras, jean-pierre.charras@gipsa-lab.inpg.fr
|
||||
* Copyright (C) 2007-2011 Wayne Stambaugh <stambaughw@verizon.net>
|
||||
* Copyright (C) 1992-2015 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
* Copyright (C) 1992-2016 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
|
@ -48,6 +48,7 @@ static const int CURSOR_SIZE = 12; ///< Cursor size in pixels
|
|||
|
||||
// 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" )
|
||||
|
@ -96,11 +97,7 @@ EDA_DRAW_PANEL::EDA_DRAW_PANEL( EDA_DRAW_FRAME* parent, int id,
|
|||
{
|
||||
wxASSERT( parent );
|
||||
|
||||
#ifndef USE_OSX_MAGNIFY_EVENT
|
||||
ShowScrollbars( wxSHOW_SB_ALWAYS, wxSHOW_SB_ALWAYS );
|
||||
#else
|
||||
ShowScrollbars( wxSHOW_SB_NEVER, wxSHOW_SB_NEVER );
|
||||
#endif
|
||||
DisableKeyboardScrolling();
|
||||
|
||||
m_scrollIncrementX = std::min( size.x / 8, 10 );
|
||||
|
@ -117,6 +114,7 @@ EDA_DRAW_PANEL::EDA_DRAW_PANEL( EDA_DRAW_FRAME* parent, int id,
|
|||
m_ClipBox.SetY( 0 );
|
||||
m_canStartBlock = -1; // Command block can start if >= 0
|
||||
m_abortRequest = false;
|
||||
m_enableMousewheelPan = false;
|
||||
m_enableMiddleButtonPan = true;
|
||||
m_enableZoomNoCenter = false;
|
||||
m_panScrollbarLimits = false;
|
||||
|
@ -131,6 +129,7 @@ EDA_DRAW_PANEL::EDA_DRAW_PANEL( EDA_DRAW_FRAME* parent, int id,
|
|||
|
||||
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 +159,7 @@ EDA_DRAW_PANEL::~EDA_DRAW_PANEL()
|
|||
|
||||
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 +432,7 @@ void EDA_DRAW_PANEL::OnScroll( wxScrollWinEvent& event )
|
|||
// 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;
|
||||
|
||||
|
@ -643,6 +643,15 @@ void EDA_DRAW_PANEL::ReDraw( wxDC* DC, bool erasebg )
|
|||
}
|
||||
|
||||
|
||||
void EDA_DRAW_PANEL::SetEnableMousewheelPan( bool aEnable )
|
||||
{
|
||||
m_enableMousewheelPan = aEnable;
|
||||
|
||||
if( GetParent()->IsGalCanvasActive() )
|
||||
GetParent()->GetGalCanvas()->GetViewControls()->EnableMousewheelPan( aEnable );
|
||||
}
|
||||
|
||||
|
||||
void EDA_DRAW_PANEL::SetEnableZoomNoCenter( bool aEnable )
|
||||
{
|
||||
m_enableZoomNoCenter = aEnable;
|
||||
|
@ -954,9 +963,21 @@ void EDA_DRAW_PANEL::OnMouseWheel( wxMouseEvent& event )
|
|||
offCenterReq = offCenterReq || m_enableZoomNoCenter;
|
||||
|
||||
int axis = event.GetWheelAxis();
|
||||
int wheelRotation = event.GetWheelRotation();
|
||||
|
||||
// This is a zoom in or out command
|
||||
if( event.GetWheelRotation() > 0 )
|
||||
if( m_enableMousewheelPan )
|
||||
{
|
||||
wxPoint newStart = GetViewStart();
|
||||
if( axis == wxMOUSE_WHEEL_HORIZONTAL )
|
||||
newStart.x += wheelRotation;
|
||||
else
|
||||
newStart.y -= wheelRotation;
|
||||
|
||||
wxPoint center = GetScreenCenterLogicalPosition();
|
||||
GetParent()->SetScrollCenterPosition( center );
|
||||
Scroll( newStart );
|
||||
}
|
||||
else if( wheelRotation > 0 )
|
||||
{
|
||||
if( event.ShiftDown() && !event.ControlDown() )
|
||||
{
|
||||
|
@ -972,7 +993,7 @@ void EDA_DRAW_PANEL::OnMouseWheel( wxMouseEvent& event )
|
|||
else
|
||||
cmd.SetId( ID_POPUP_ZOOM_IN );
|
||||
}
|
||||
else if( event.GetWheelRotation() < 0 )
|
||||
else if( wheelRotation < 0 )
|
||||
{
|
||||
if( event.ShiftDown() && !event.ControlDown() )
|
||||
{
|
||||
|
@ -989,7 +1010,8 @@ void EDA_DRAW_PANEL::OnMouseWheel( wxMouseEvent& event )
|
|||
cmd.SetId( ID_POPUP_ZOOM_OUT );
|
||||
}
|
||||
|
||||
GetEventHandler()->ProcessEvent( cmd );
|
||||
if( cmd.GetId() )
|
||||
GetEventHandler()->ProcessEvent( cmd );
|
||||
event.Skip();
|
||||
}
|
||||
|
||||
|
|
|
@ -3,6 +3,8 @@
|
|||
*
|
||||
* Copyright (C) 2012 Torsten Hueter, torstenhtr <at> gmx.de
|
||||
* Copyright (C) 2013-2015 CERN
|
||||
* Copyright (C) 2012-2016 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
*
|
||||
* @author Tomasz Wlostowski <tomasz.wlostowski@cern.ch>
|
||||
* @author Maciej Suminski <maciej.suminski@cern.ch>
|
||||
*
|
||||
|
@ -96,20 +98,31 @@ void WX_VIEW_CONTROLS::onWheel( wxMouseEvent& aEvent )
|
|||
{
|
||||
const double wheelPanSpeed = 0.001;
|
||||
|
||||
if( aEvent.ControlDown() || aEvent.ShiftDown() )
|
||||
if( aEvent.ControlDown() || aEvent.ShiftDown() || m_enableMousewheelPan )
|
||||
{
|
||||
// Scrolling
|
||||
VECTOR2D scrollVec = m_view->ToWorld( m_view->GetScreenPixelSize(), false ) *
|
||||
( (double) aEvent.GetWheelRotation() * wheelPanSpeed );
|
||||
double scrollSpeed;
|
||||
int axis = aEvent.GetWheelAxis();
|
||||
double scrollX = 0.0;
|
||||
double scrollY = 0.0;
|
||||
|
||||
if( std::abs( scrollVec.x ) > std::abs( scrollVec.y ) )
|
||||
scrollSpeed = scrollVec.x;
|
||||
if ( m_enableMousewheelPan )
|
||||
{
|
||||
if ( axis == wxMOUSE_WHEEL_HORIZONTAL )
|
||||
scrollX = scrollVec.x;
|
||||
else
|
||||
scrollY = -scrollVec.y;
|
||||
}
|
||||
else
|
||||
scrollSpeed = scrollVec.y;
|
||||
{
|
||||
if ( aEvent.ControlDown() )
|
||||
scrollX = -scrollVec.x;
|
||||
else
|
||||
scrollY = -scrollVec.y;
|
||||
}
|
||||
|
||||
VECTOR2D delta( aEvent.ControlDown() ? -scrollSpeed : 0.0,
|
||||
aEvent.ShiftDown() ? -scrollSpeed : 0.0 );
|
||||
VECTOR2D delta( scrollX, scrollY );
|
||||
|
||||
m_view->SetCenter( m_view->GetCenter() + delta );
|
||||
}
|
||||
|
@ -121,7 +134,7 @@ void WX_VIEW_CONTROLS::onWheel( wxMouseEvent& aEvent )
|
|||
int rotation = aEvent.GetWheelRotation();
|
||||
double zoomScale;
|
||||
|
||||
#ifdef __APPLE__
|
||||
#ifdef __WXMAC__
|
||||
// The following is to support Apple pointer devices (MagicMouse &
|
||||
// Macbook touchpad), which send events more frequently, but with smaller
|
||||
// wheel rotation.
|
||||
|
|
|
@ -333,6 +333,20 @@ public:
|
|||
return m_checkMiddleButtonPanLimited->GetValue();
|
||||
}
|
||||
|
||||
/**
|
||||
* 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
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
///////////////////////////////////////////////////////////////////////////
|
||||
// C++ code generated with wxFormBuilder (version Mar 28 2015)
|
||||
// C++ code generated with wxFormBuilder (version Jun 17 2015)
|
||||
// http://www.wxformbuilder.org/
|
||||
//
|
||||
// PLEASE DO "NOT" EDIT THIS FILE!
|
||||
|
@ -20,18 +20,18 @@ END_EVENT_TABLE()
|
|||
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,89 +39,89 @@ DIALOG_EESCHEMA_OPTIONS_BASE::DIALOG_EESCHEMA_OPTIONS_BASE( wxWindow* parent, wx
|
|||
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 );
|
||||
m_notebook->AddPage( m_panel5, _("Display"), false );
|
||||
m_notebook->AddPage( m_panel5, _("Display"), true );
|
||||
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 @@ DIALOG_EESCHEMA_OPTIONS_BASE::DIALOG_EESCHEMA_OPTIONS_BASE( wxWindow* parent, wx
|
|||
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 @@ DIALOG_EESCHEMA_OPTIONS_BASE::DIALOG_EESCHEMA_OPTIONS_BASE( wxWindow* parent, wx
|
|||
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,56 @@ DIALOG_EESCHEMA_OPTIONS_BASE::DIALOG_EESCHEMA_OPTIONS_BASE( wxWindow* parent, wx
|
|||
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_tabControls, xwID_ANY, _("Use touchpa&d to pan"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_checkEnableMousewheelPan->SetToolTip( _("Use touchpad to pan canvas") );
|
||||
|
||||
m_controlsSizer->Add( m_checkEnableMousewheelPan, 0, wxLEFT|wxRIGHT|wxTOP, 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 +301,33 @@ DIALOG_EESCHEMA_OPTIONS_BASE::DIALOG_EESCHEMA_OPTIONS_BASE( wxWindow* parent, wx
|
|||
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_notebook->AddPage( m_tabColors, _("Colors"), false );
|
||||
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 +341,67 @@ DIALOG_EESCHEMA_OPTIONS_BASE::DIALOG_EESCHEMA_OPTIONS_BASE( wxWindow* parent, wx
|
|||
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 );
|
||||
}
|
||||
|
||||
|
|
|
@ -184,10 +184,10 @@
|
|||
<event name="OnSetFocus"></event>
|
||||
<event name="OnSize"></event>
|
||||
<event name="OnUpdateUI"></event>
|
||||
<object class="notebookpage" expanded="0">
|
||||
<object class="notebookpage" expanded="1">
|
||||
<property name="bitmap"></property>
|
||||
<property name="label">Display</property>
|
||||
<property name="select">0</property>
|
||||
<property name="select">1</property>
|
||||
<object class="wxPanel" expanded="0">
|
||||
<property name="BottomDockable">1</property>
|
||||
<property name="LeftDockable">1</property>
|
||||
|
@ -3771,7 +3771,7 @@
|
|||
<property name="bitmap"></property>
|
||||
<property name="label">Controls</property>
|
||||
<property name="select">0</property>
|
||||
<object class="wxPanel" expanded="1">
|
||||
<object class="wxPanel" expanded="0">
|
||||
<property name="BottomDockable">1</property>
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
|
@ -4398,6 +4398,94 @@
|
|||
<event name="OnUpdateUI"></event>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="0">
|
||||
<property name="border">3</property>
|
||||
<property name="flag">wxLEFT|wxRIGHT|wxTOP</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxCheckBox" expanded="0">
|
||||
<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">xwID_ANY</property>
|
||||
<property name="label">Use touchpa&d 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">Use touchpad 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 class="sizeritem" expanded="0">
|
||||
<property name="border">3</property>
|
||||
<property name="flag">wxEXPAND|wxTOP|wxRIGHT|wxLEFT</property>
|
||||
|
@ -4494,8 +4582,8 @@
|
|||
<object class="notebookpage" expanded="1">
|
||||
<property name="bitmap"></property>
|
||||
<property name="label">Colors</property>
|
||||
<property name="select">1</property>
|
||||
<object class="wxPanel" expanded="1">
|
||||
<property name="select">0</property>
|
||||
<object class="wxPanel" expanded="0">
|
||||
<property name="BottomDockable">1</property>
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
|
@ -4569,16 +4657,16 @@
|
|||
<event name="OnSetFocus"></event>
|
||||
<event name="OnSize"></event>
|
||||
<event name="OnUpdateUI"></event>
|
||||
<object class="wxBoxSizer" expanded="1">
|
||||
<object class="wxBoxSizer" expanded="0">
|
||||
<property name="minimum_size"></property>
|
||||
<property name="name">bSizer14</property>
|
||||
<property name="orient">wxVERTICAL</property>
|
||||
<property name="permission">none</property>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<object class="sizeritem" expanded="0">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxEXPAND | wxALL</property>
|
||||
<property name="proportion">1</property>
|
||||
<object class="wxPanel" expanded="1">
|
||||
<object class="wxPanel" expanded="0">
|
||||
<property name="BottomDockable">1</property>
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
///////////////////////////////////////////////////////////////////////////
|
||||
// C++ code generated with wxFormBuilder (version Mar 28 2015)
|
||||
// C++ code generated with wxFormBuilder (version Jun 17 2015)
|
||||
// http://www.wxformbuilder.org/
|
||||
//
|
||||
// PLEASE DO "NOT" EDIT THIS FILE!
|
||||
|
@ -43,15 +43,15 @@ class DIALOG_EESCHEMA_OPTIONS_BASE : public DIALOG_SHIM
|
|||
{
|
||||
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 @@ class DIALOG_EESCHEMA_OPTIONS_BASE : public DIALOG_SHIM
|
|||
wxID_ADD_FIELD,
|
||||
wxID_DELETE_FIELD
|
||||
};
|
||||
|
||||
|
||||
wxNotebook* m_notebook;
|
||||
wxPanel* m_panel5;
|
||||
wxStaticText* m_staticText3;
|
||||
|
@ -111,6 +111,7 @@ class DIALOG_EESCHEMA_OPTIONS_BASE : public DIALOG_SHIM
|
|||
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 @@ class DIALOG_EESCHEMA_OPTIONS_BASE : public DIALOG_SHIM
|
|||
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__
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
/*
|
||||
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||
*
|
||||
* Copyright (C) 2014 KiCad Developers, see CHANGELOG.TXT for contributors.
|
||||
* Copyright (C) 2014-2016 KiCad Developers, see CHANGELOG.TXT for contributors.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
|
@ -314,6 +314,7 @@ void SCH_EDIT_FRAME::OnPreferencesOptions( wxCommandEvent& event )
|
|||
dlg.SetShowGrid( IsGridVisible() );
|
||||
dlg.SetShowHiddenPins( m_showAllPins );
|
||||
dlg.SetEnableMiddleButtonPan( m_canvas->GetEnableMiddleButtonPan() );
|
||||
dlg.SetEnableMousewheelPan( m_canvas->GetEnableMousewheelPan() );
|
||||
dlg.SetEnableZoomNoCenter( m_canvas->GetEnableZoomNoCenter() );
|
||||
dlg.SetMiddleButtonPanLimited( m_canvas->GetMiddleButtonPanLimited() );
|
||||
dlg.SetEnableAutoPan( m_canvas->GetEnableAutoPan() );
|
||||
|
@ -365,6 +366,7 @@ void SCH_EDIT_FRAME::OnPreferencesOptions( wxCommandEvent& event )
|
|||
SetGridVisibility( dlg.GetShowGrid() );
|
||||
m_showAllPins = dlg.GetShowHiddenPins();
|
||||
m_canvas->SetEnableMiddleButtonPan( dlg.GetEnableMiddleButtonPan() );
|
||||
m_canvas->SetEnableMousewheelPan( dlg.GetEnableMousewheelPan() );
|
||||
m_canvas->SetEnableZoomNoCenter( dlg.GetEnableZoomNoCenter() );
|
||||
m_canvas->SetMiddleButtonPanLimited( dlg.GetMiddleButtonPanLimited() );
|
||||
m_canvas->SetEnableAutoPan( dlg.GetEnableAutoPan() );
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||
*
|
||||
* Copyright (C) 2010-2014 Jean-Pierre Charras jp.charras at wanadoo.fr
|
||||
* Copyright (C) 1992-2014 KiCad Developers, see change_log.txt for contributors.
|
||||
* Copyright (C) 1992-2016 KiCad Developers, see change_log.txt for contributors.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
|
@ -72,6 +72,7 @@ void GERBVIEW_FRAME::InstallGerberOptionsDialog( wxCommandEvent& event )
|
|||
m_canvas->Refresh();
|
||||
}
|
||||
|
||||
|
||||
DIALOG_DISPLAY_OPTIONS::DIALOG_DISPLAY_OPTIONS( GERBVIEW_FRAME *parent) :
|
||||
DIALOG_DISPLAY_OPTIONS_BASE( parent, wxID_ANY )
|
||||
{
|
||||
|
@ -125,6 +126,7 @@ void DIALOG_DISPLAY_OPTIONS::initOptDialog( )
|
|||
|
||||
|
||||
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 +171,7 @@ void DIALOG_DISPLAY_OPTIONS::OnOKBUttonClick( wxCommandEvent& event )
|
|||
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() );
|
||||
|
||||
|
|
|
@ -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 );
|
||||
|
||||
|
||||
bLeftBottomSizer->Add( m_OptMiddleButtonPanLimited, 0, wxLEFT|wxRIGHT|wxTOP, 5 );
|
||||
|
||||
m_OptMousewheelPan = new wxCheckBox( bLeftBottomSizer->GetStaticBox(), wxID_ANY, _("Use touchpad to pan"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_OptMousewheelPan->SetToolTip( _("Use touchpad 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 @@ DIALOG_DISPLAY_OPTIONS_BASE::~DIALOG_DISPLAY_OPTIONS_BASE()
|
|||
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 );
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -1041,7 +1041,7 @@
|
|||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxALL</property>
|
||||
<property name="flag">wxLEFT|wxRIGHT|wxTOP</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxCheckBox" expanded="1">
|
||||
<property name="BottomDockable">1</property>
|
||||
|
@ -1127,6 +1127,94 @@
|
|||
<event name="OnUpdateUI"></event>
|
||||
</object>
|
||||
</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 touchpad 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 touchpad 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>
|
||||
</object>
|
||||
|
|
|
@ -36,7 +36,7 @@ class DIALOG_SHIM;
|
|||
class DIALOG_DISPLAY_OPTIONS_BASE : public DIALOG_SHIM
|
||||
{
|
||||
private:
|
||||
|
||||
|
||||
protected:
|
||||
wxRadioBox* m_PolarDisplay;
|
||||
wxRadioBox* m_BoxUnits;
|
||||
|
@ -49,22 +49,23 @@ class DIALOG_DISPLAY_OPTIONS_BASE : public DIALOG_SHIM
|
|||
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__
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
*
|
||||
* Copyright (C) 2004 Jean-Pierre Charras, jaen-pierre.charras@gipsa-lab.inpg.com
|
||||
* Copyright (C) 2011 Wayne Stambaugh <stambaughw@verizon.net>
|
||||
* Copyright (C) 1992-2011 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
* Copyright (C) 1992-2016 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
|
@ -73,6 +73,7 @@ private:
|
|||
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 @@ public:
|
|||
|
||||
void SetAbortRequest( bool aAbortRequest ) { m_abortRequest = aAbortRequest; }
|
||||
|
||||
bool GetEnableMousewheelPan() const { return m_enableMousewheelPan; }
|
||||
|
||||
void SetEnableMousewheelPan( bool aEnable );
|
||||
|
||||
bool GetEnableMiddleButtonPan() const { return m_enableMiddleButtonPan; }
|
||||
|
||||
void SetEnableMiddleButtonPan( bool aEnable ) { m_enableMiddleButtonPan = aEnable; }
|
||||
|
|
|
@ -3,6 +3,8 @@
|
|||
*
|
||||
* Copyright (C) 2012 Torsten Hueter, torstenhtr <at> gmx.de
|
||||
* Copyright (C) 2013 CERN
|
||||
* Copyright (C) 2013-2016 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
*
|
||||
* @author Tomasz Wlostowski <tomasz.wlostowski@cern.ch>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
|
@ -49,7 +51,7 @@ public:
|
|||
VIEW_CONTROLS( VIEW* aView ) : m_view( aView ),
|
||||
m_forceCursorPosition( false ), m_cursorCaptured( false ), m_snappingEnabled( false ),
|
||||
m_grabMouse( false ), m_autoPanEnabled( false ), m_autoPanMargin( 0.1 ),
|
||||
m_autoPanSpeed( 0.15 ), m_warpCursor( false )
|
||||
m_autoPanSpeed( 0.15 ), m_warpCursor( false ), m_enableMousewheelPan( false )
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -193,6 +195,25 @@ public:
|
|||
return m_warpCursor;
|
||||
}
|
||||
|
||||
/**
|
||||
* Function EnableMousewheelPan()
|
||||
* Enables or disables mousewheel panning.
|
||||
* @param aEnabled is true if mouse-wheel panning is enabled.
|
||||
*/
|
||||
virtual void EnableMousewheelPan( bool aEnable )
|
||||
{
|
||||
m_enableMousewheelPan = aEnable;
|
||||
}
|
||||
|
||||
/**
|
||||
* Function IsMousewheelPanEnabled()
|
||||
* Returns the current setting for mousewheel panning
|
||||
*/
|
||||
virtual bool IsMousewheelPanEnabled() const
|
||||
{
|
||||
return m_enableMousewheelPan;
|
||||
}
|
||||
|
||||
/**
|
||||
* Function CenterOnCursor()
|
||||
* Sets the viewport center to the current cursor position and warps the cursor to the
|
||||
|
@ -239,6 +260,9 @@ protected:
|
|||
|
||||
/// If the cursor is allowed to be warped
|
||||
bool m_warpCursor;
|
||||
|
||||
/// Mousewheel (2-finger touchpad) panning
|
||||
bool m_enableMousewheelPan;
|
||||
};
|
||||
} // namespace KIGFX
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||
*
|
||||
* Copyright (C) 2009 Jean-Pierre Charras, jaen-pierre.charras@gipsa-lab.inpg.com
|
||||
* Copyright (C) 1992-2015 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
* Copyright (C) 1992-2016 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
|
@ -85,6 +85,7 @@ void DIALOG_GENERALOPTIONS::init()
|
|||
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,11 @@ void DIALOG_GENERALOPTIONS::OnOkClick( wxCommandEvent& event )
|
|||
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() );
|
||||
|
||||
g_TwoSegmentTrackBuild = m_Track_DoubleSegm_Ctrl->GetValue();
|
||||
g_MagneticPadOption = m_MagneticPadOptCtrl->GetSelection();
|
||||
g_MagneticTrackOption = m_MagneticTrackOptCtrl->GetSelection();
|
||||
|
|
|
@ -12,212 +12,216 @@
|
|||
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->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 touchpad to pan"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_MousewheelPANOpt->SetToolTip( _("Use touchpad 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 +236,5 @@ DIALOG_GENERALOPTIONS_BOARDEDITOR_BASE::~DIALOG_GENERALOPTIONS_BOARDEDITOR_BASE(
|
|||
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 );
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -111,11 +111,11 @@
|
|||
<property name="name">bLeftSizer</property>
|
||||
<property name="orient">wxVERTICAL</property>
|
||||
<property name="permission">none</property>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<object class="sizeritem" expanded="0">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxALL|wxEXPAND</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxRadioBox" expanded="1">
|
||||
<object class="wxRadioBox" expanded="0">
|
||||
<property name="BottomDockable">1</property>
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
|
@ -201,11 +201,11 @@
|
|||
<event name="OnUpdateUI"></event>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<object class="sizeritem" expanded="0">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxALL|wxEXPAND</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxRadioBox" expanded="1">
|
||||
<object class="wxRadioBox" expanded="0">
|
||||
<property name="BottomDockable">1</property>
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
|
@ -291,11 +291,11 @@
|
|||
<event name="OnUpdateUI"></event>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<object class="sizeritem" expanded="0">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxALL|wxEXPAND</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxRadioBox" expanded="1">
|
||||
<object class="wxRadioBox" expanded="0">
|
||||
<property name="BottomDockable">1</property>
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
|
@ -408,11 +408,11 @@
|
|||
<property name="permission">none</property>
|
||||
<property name="rows">0</property>
|
||||
<property name="vgap">0</property>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<object class="sizeritem" expanded="0">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxALIGN_CENTER_VERTICAL|wxALL</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxStaticText" expanded="1">
|
||||
<object class="wxStaticText" expanded="0">
|
||||
<property name="BottomDockable">1</property>
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
|
@ -491,11 +491,11 @@
|
|||
<event name="OnUpdateUI"></event>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<object class="sizeritem" expanded="0">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxALIGN_CENTER_VERTICAL|wxALL|wxTOP</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxSpinCtrl" expanded="1">
|
||||
<object class="wxSpinCtrl" expanded="0">
|
||||
<property name="BottomDockable">1</property>
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
|
@ -579,11 +579,11 @@
|
|||
<event name="OnUpdateUI"></event>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<object class="sizeritem" expanded="0">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxALIGN_CENTER_VERTICAL|wxALL</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxStaticText" expanded="1">
|
||||
<object class="wxStaticText" expanded="0">
|
||||
<property name="BottomDockable">1</property>
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
|
@ -662,11 +662,11 @@
|
|||
<event name="OnUpdateUI"></event>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<object class="sizeritem" expanded="0">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxALIGN_CENTER_VERTICAL|wxALL</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxSpinCtrl" expanded="1">
|
||||
<object class="wxSpinCtrl" expanded="0">
|
||||
<property name="BottomDockable">1</property>
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
|
@ -750,11 +750,11 @@
|
|||
<event name="OnUpdateUI"></event>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<object class="sizeritem" expanded="0">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxALIGN_CENTER_VERTICAL|wxALL</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxStaticText" expanded="1">
|
||||
<object class="wxStaticText" expanded="0">
|
||||
<property name="BottomDockable">1</property>
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
|
@ -833,11 +833,11 @@
|
|||
<event name="OnUpdateUI"></event>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<object class="sizeritem" expanded="0">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxALIGN_CENTER_VERTICAL|wxALL</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxSpinCtrl" expanded="1">
|
||||
<object class="wxSpinCtrl" expanded="0">
|
||||
<property name="BottomDockable">1</property>
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
|
@ -921,11 +921,11 @@
|
|||
<event name="OnUpdateUI"></event>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<object class="sizeritem" expanded="0">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxALIGN_CENTER_VERTICAL|wxALL</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxStaticText" expanded="1">
|
||||
<object class="wxStaticText" expanded="0">
|
||||
<property name="BottomDockable">1</property>
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
|
@ -1004,11 +1004,11 @@
|
|||
<event name="OnUpdateUI"></event>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<object class="sizeritem" expanded="0">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxALIGN_CENTER_VERTICAL|wxALL|wxEXPAND</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxTextCtrl" expanded="1">
|
||||
<object class="wxTextCtrl" expanded="0">
|
||||
<property name="BottomDockable">1</property>
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
|
@ -1738,11 +1738,11 @@
|
|||
<property name="name">bRightSizer</property>
|
||||
<property name="orient">wxVERTICAL</property>
|
||||
<property name="permission">none</property>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<object class="sizeritem" expanded="0">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxALL|wxEXPAND</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxRadioBox" expanded="1">
|
||||
<object class="wxRadioBox" expanded="0">
|
||||
<property name="BottomDockable">1</property>
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
|
@ -1828,11 +1828,11 @@
|
|||
<event name="OnUpdateUI"></event>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<object class="sizeritem" expanded="0">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxALL|wxEXPAND</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxRadioBox" expanded="1">
|
||||
<object class="wxRadioBox" expanded="0">
|
||||
<property name="BottomDockable">1</property>
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
|
@ -1930,11 +1930,11 @@
|
|||
<property name="orient">wxVERTICAL</property>
|
||||
<property name="permission">none</property>
|
||||
<event name="OnUpdateUI"></event>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<object class="sizeritem" expanded="0">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxLEFT|wxRIGHT|wxTOP</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxCheckBox" expanded="1">
|
||||
<object class="wxCheckBox" expanded="0">
|
||||
<property name="BottomDockable">1</property>
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
|
@ -1948,7 +1948,7 @@
|
|||
<property name="caption"></property>
|
||||
<property name="caption_visible">1</property>
|
||||
<property name="center_pane">0</property>
|
||||
<property name="checked">1</property>
|
||||
<property name="checked">0</property>
|
||||
<property name="close_button">1</property>
|
||||
<property name="context_help"></property>
|
||||
<property name="context_menu">1</property>
|
||||
|
@ -2018,11 +2018,11 @@
|
|||
<event name="OnUpdateUI"></event>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<object class="sizeritem" expanded="0">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxLEFT|wxRIGHT|wxTOP</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxCheckBox" expanded="1">
|
||||
<object class="wxCheckBox" expanded="0">
|
||||
<property name="BottomDockable">1</property>
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
|
@ -2106,11 +2106,11 @@
|
|||
<event name="OnUpdateUI"></event>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<object class="sizeritem" expanded="0">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxLEFT|wxRIGHT|wxTOP</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxCheckBox" expanded="1">
|
||||
<object class="wxCheckBox" expanded="0">
|
||||
<property name="BottomDockable">1</property>
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
|
@ -2194,11 +2194,99 @@
|
|||
<event name="OnUpdateUI"></event>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<object class="sizeritem" expanded="0">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxLEFT|wxRIGHT|wxTOP</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxCheckBox" expanded="0">
|
||||
<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 touchpad 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 touchpad 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 class="sizeritem" expanded="0">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxALL</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxCheckBox" expanded="1">
|
||||
<object class="wxCheckBox" expanded="0">
|
||||
<property name="BottomDockable">1</property>
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
|
@ -2288,7 +2376,7 @@
|
|||
<property name="border">5</property>
|
||||
<property name="flag">wxALL|wxEXPAND</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxStaticBoxSizer" expanded="0">
|
||||
<object class="wxStaticBoxSizer" expanded="1">
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="label">Advanced/Developer</property>
|
||||
<property name="minimum_size"></property>
|
||||
|
|
|
@ -38,7 +38,7 @@ class DIALOG_SHIM;
|
|||
class DIALOG_GENERALOPTIONS_BOARDEDITOR_BASE : public DIALOG_SHIM
|
||||
{
|
||||
private:
|
||||
|
||||
|
||||
protected:
|
||||
enum
|
||||
{
|
||||
|
@ -55,7 +55,7 @@ class DIALOG_GENERALOPTIONS_BOARDEDITOR_BASE : public DIALOG_SHIM
|
|||
wxID_MIDDLEBUTTONPAN,
|
||||
wxID_AUTOPAN
|
||||
};
|
||||
|
||||
|
||||
wxRadioBox* m_PolarDisplay;
|
||||
wxRadioBox* m_UnitsSelection;
|
||||
wxRadioBox* m_CursorShape;
|
||||
|
@ -79,24 +79,25 @@ class DIALOG_GENERALOPTIONS_BOARDEDITOR_BASE : public DIALOG_SHIM
|
|||
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__
|
||||
|
|
Loading…
Reference in New Issue