Merge branch 'bzr/master'

This commit is contained in:
Tomasz Włostowski 2015-02-06 21:32:33 +01:00
commit b03d421801
145 changed files with 6614 additions and 2894 deletions

View File

@ -88,8 +88,7 @@ void VRML2_MODEL_PARSER::Load( const wxString& aFilename, double aVrmlunits_to_3
glScalef( matScale.x, matScale.y, matScale.z ); glScalef( matScale.x, matScale.y, matScale.z );
// Switch the locale to standard C (needed to print floating point numbers like 1.3) LOCALE_IO toggle; // Temporary switch the locale to standard C to r/w floats
SetLocaleTo_C_standard();
childs.clear(); childs.clear();
@ -117,7 +116,6 @@ void VRML2_MODEL_PARSER::Load( const wxString& aFilename, double aVrmlunits_to_3
} }
fclose( m_file ); fclose( m_file );
SetLocaleTo_Default(); // revert to the current locale
// DBG( printf( "chils size:%lu\n", childs.size() ) ); // DBG( printf( "chils size:%lu\n", childs.size() ) );

View File

@ -45,13 +45,17 @@ option( KICAD_KEEPCASE
# * No issues on Windows. # * No issues on Windows.
# * needs webkitgtk-devel package installed on Linux, and wxWidgets rebuilt with this package. # * needs webkitgtk-devel package installed on Linux, and wxWidgets rebuilt with this package.
# * Seems also OK on OSX. # * Seems also OK on OSX.
# However the default option is on and has effect only if BUILD_GITHUB_PLUGIN is ON # This option has effect only if BUILD_GITHUB_PLUGIN is ON
# This option could be removed soon, if no serious issue happens on Linux #
# This option is set to OFF because Kicad developers cannot be sure the use of Webkit does no open
# a security issue when runnig Kicad.
# the probability is low, but not zero.
option( KICAD_USE_WEBKIT option( KICAD_USE_WEBKIT
"Use system web kit to build a web viewer in footprint library wizard to easily select github libraries (default ON)." "Use system web kit to build a web viewer in footprint library wizard to easily select github libraries (default ON)."
ON OFF
) )
option( USE_WX_GRAPHICS_CONTEXT option( USE_WX_GRAPHICS_CONTEXT
"Use wxGraphicsContext for rendering (default OFF). Warning, this is experimental" ) "Use wxGraphicsContext for rendering (default OFF). Warning, this is experimental" )
@ -90,7 +94,6 @@ option( KICAD_SKIP_BOOST
) )
mark_as_advanced( KICAD_SKIP_BOOST ) # Normal builders should build Boost. mark_as_advanced( KICAD_SKIP_BOOST ) # Normal builders should build Boost.
# when option KICAD_SCRIPTING OR KICAD_SCRIPTING_MODULES is enabled: # when option KICAD_SCRIPTING OR KICAD_SCRIPTING_MODULES is enabled:
# PYTHON_EXECUTABLE can be defined when invoking cmake # PYTHON_EXECUTABLE can be defined when invoking cmake
# ( use -DPYTHON_EXECUTABLE=<python path>/python.exe or python2 ) # ( use -DPYTHON_EXECUTABLE=<python path>/python.exe or python2 )
@ -99,6 +102,18 @@ mark_as_advanced( KICAD_SKIP_BOOST ) # Normal builders should build Boost.
option( BUILD_GITHUB_PLUGIN "Build the GITHUB_PLUGIN for pcbnew." ON ) option( BUILD_GITHUB_PLUGIN "Build the GITHUB_PLUGIN for pcbnew." ON )
# When KICAD_USE_WEBKIT in on, the Kicad web viewer has access to the www.
# Kicad developers cannot be sure the use of Web viewer does no open a security issue when runnig Kicad.
# the probability is low, but not zero.
#so warn the user:
if( KICAD_USE_WEBKIT )
message( STATUS "by setting KICAD_USE_WEBKIT ON, you are building a web viewer inside Kicad.
Kicad developers cannot be sure the Web access does no open a security issue,
when running a Web Viewer inside Kicad. The probability is low, but not zero.
You are warned" )
endif()
# This can be set to a custom name to brag about a particular branch in the "About" dialog: # This can be set to a custom name to brag about a particular branch in the "About" dialog:
set( KICAD_REPO_NAME "product" CACHE STRING "Name of the tree from which this build came." ) set( KICAD_REPO_NAME "product" CACHE STRING "Name of the tree from which this build came." )

View File

@ -285,7 +285,7 @@ if (OPENSSL_INCLUDE_DIR)
set(OPENSSL_VERSION "${_OPENSSL_VERSION}") set(OPENSSL_VERSION "${_OPENSSL_VERSION}")
elseif(OPENSSL_INCLUDE_DIR AND EXISTS "${OPENSSL_INCLUDE_DIR}/openssl/opensslv.h") elseif(OPENSSL_INCLUDE_DIR AND EXISTS "${OPENSSL_INCLUDE_DIR}/openssl/opensslv.h")
file(STRINGS "${OPENSSL_INCLUDE_DIR}/openssl/opensslv.h" openssl_version_str file(STRINGS "${OPENSSL_INCLUDE_DIR}/openssl/opensslv.h" openssl_version_str
REGEX "^#define[\t ]+OPENSSL_VERSION_NUMBER[\t ]+0x([0-9a-fA-F])+.*") REGEX "^#[\t ]*define[\t ]+OPENSSL_VERSION_NUMBER[\t ]+0x([0-9a-fA-F])+.*")
# The version number is encoded as 0xMNNFFPPS: major minor fix patch status # The version number is encoded as 0xMNNFFPPS: major minor fix patch status
# The status gives if this is a developer or prerelease and is ignored here. # The status gives if this is a developer or prerelease and is ignored here.

View File

@ -61,6 +61,15 @@
/// The install prefix defined in CMAKE_INSTALL_PREFIX. /// The install prefix defined in CMAKE_INSTALL_PREFIX.
#define DEFAULT_INSTALL_PATH "@CMAKE_INSTALL_PREFIX@" #define DEFAULT_INSTALL_PATH "@CMAKE_INSTALL_PREFIX@"
/// The install prefix used for KiCad's libraries.
/// These paths are only intended to be reasonable default values that work if
/// the user installs KiCad in the default path for a given platform.
#if defined( APPLE )
#define KICAD_DATA_PATH "/Library/Application Support/kicad"
#else
#define KICAD_DATA_PATH "@CMAKE_INSTALL_PREFIX@/@KICAD_DATA@"
#endif
/// When defined, build the GITHUB_PLUGIN for pcbnew. /// When defined, build the GITHUB_PLUGIN for pcbnew.
#cmakedefine BUILD_GITHUB_PLUGIN #cmakedefine BUILD_GITHUB_PLUGIN

View File

@ -311,6 +311,10 @@ ExternalProject_Add_Step( boost bzr_add_boost
ExternalProject_Add_Step( boost bzr_init_boost ExternalProject_Add_Step( boost bzr_init_boost
COMMAND bzr init -q <SOURCE_DIR> COMMAND bzr init -q <SOURCE_DIR>
#creates a .bzrignore file in boost root dir, to avoid copying useless files
#moreover these files have a very very long name, and sometimes
#have a too long full file name to be handled by DOS commands
COMMAND echo "*.htm*" > ${PREFIX}/src/boost/.bzrignore
COMMENT "creating 'boost scratch repo' specifically for boost to track boost patches" COMMENT "creating 'boost scratch repo' specifically for boost to track boost patches"
DEPENDERS bzr_add_boost DEPENDERS bzr_add_boost
DEPENDEES download DEPENDEES download

View File

@ -37,6 +37,7 @@
#include <layers_id_colors_and_visibility.h> #include <layers_id_colors_and_visibility.h>
#include <potracelib.h> #include <potracelib.h>
#include <auxiliary.h> #include <auxiliary.h>
#include <common.h>
#include <bitmap2component.h> #include <bitmap2component.h>
@ -437,7 +438,7 @@ void BITMAPCONV_INFO::CreateOutputFile( BMP2CMP_MOD_LAYER aModLayer )
potrace_dpoint_t( *c )[3]; potrace_dpoint_t( *c )[3];
setlocale( LC_NUMERIC, "C" ); // Switch the locale to standard C LOCALE_IO toggle; // Temporary switch the locale to standard C to r/w floats
// The layer name has meaning only for .kicad_mod files. // The layer name has meaning only for .kicad_mod files.
// For these files the header creates 2 invisible texts: value and ref // For these files the header creates 2 invisible texts: value and ref
@ -530,8 +531,6 @@ void BITMAPCONV_INFO::CreateOutputFile( BMP2CMP_MOD_LAYER aModLayer )
} }
OuputFileEnd(); OuputFileEnd();
setlocale( LC_NUMERIC, "" ); // revert to the current locale
} }

View File

@ -49,7 +49,7 @@ enum textbox {
EDA_ITEM::EDA_ITEM( EDA_ITEM* parent, KICAD_T idType ) EDA_ITEM::EDA_ITEM( EDA_ITEM* parent, KICAD_T idType )
{ {
InitVars(); initVars();
m_StructType = idType; m_StructType = idType;
m_Parent = parent; m_Parent = parent;
} }
@ -57,14 +57,14 @@ EDA_ITEM::EDA_ITEM( EDA_ITEM* parent, KICAD_T idType )
EDA_ITEM::EDA_ITEM( KICAD_T idType ) EDA_ITEM::EDA_ITEM( KICAD_T idType )
{ {
InitVars(); initVars();
m_StructType = idType; m_StructType = idType;
} }
EDA_ITEM::EDA_ITEM( const EDA_ITEM& base ) EDA_ITEM::EDA_ITEM( const EDA_ITEM& base )
{ {
InitVars(); initVars();
m_StructType = base.m_StructType; m_StructType = base.m_StructType;
m_Parent = base.m_Parent; m_Parent = base.m_Parent;
m_Flags = base.m_Flags; m_Flags = base.m_Flags;
@ -75,7 +75,7 @@ EDA_ITEM::EDA_ITEM( const EDA_ITEM& base )
} }
void EDA_ITEM::InitVars() void EDA_ITEM::initVars()
{ {
m_StructType = TYPE_NOT_INIT; m_StructType = TYPE_NOT_INIT;
Pnext = NULL; // Linked list: Link (next struct) Pnext = NULL; // Linked list: Link (next struct)

View File

@ -2,7 +2,7 @@
* This program source code file is part of KiCad, a free EDA CAD application. * This program source code file is part of KiCad, a free EDA CAD application.
* *
* Copyright (C) 2015 Jean-Pierre Charras, jp.charras at wanadoo.fr * Copyright (C) 2015 Jean-Pierre Charras, jp.charras at wanadoo.fr
* Copyright (C) 2013 Wayne Stambaugh <stambaughw@verizon.net> * Copyright (C) 2013-2015 Wayne Stambaugh <stambaughw@verizon.net>
* Copyright (C) 1992-2015 KiCad Developers, see AUTHORS.txt for contributors. * Copyright (C) 1992-2015 KiCad Developers, see AUTHORS.txt for contributors.
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
@ -72,7 +72,6 @@ EDA_BASE_FRAME::EDA_BASE_FRAME( wxWindow* aParent, FRAME_T aFrameType,
m_Ident = aFrameType; m_Ident = aFrameType;
m_mainToolBar = NULL; m_mainToolBar = NULL;
m_FrameIsActive = true;
m_hasAutoSave = false; m_hasAutoSave = false;
m_autoSaveState = false; m_autoSaveState = false;
m_autoSaveInterval = -1; m_autoSaveInterval = -1;

View File

@ -433,19 +433,16 @@ void PLOTTER::sketchOval( const wxPoint& pos, const wxSize& aSize, double orient
void PLOTTER::ThickSegment( const wxPoint& start, const wxPoint& end, int width, void PLOTTER::ThickSegment( const wxPoint& start, const wxPoint& end, int width,
EDA_DRAW_MODE_T tracemode ) EDA_DRAW_MODE_T tracemode )
{ {
switch( tracemode ) if( tracemode == FILLED )
{ {
case FILLED: SetCurrentLineWidth( width );
case LINE:
SetCurrentLineWidth( tracemode==FILLED ? width : -1 );
MoveTo( start ); MoveTo( start );
FinishTo( end ); FinishTo( end );
break; }
else
case SKETCH: {
SetCurrentLineWidth( -1 ); SetCurrentLineWidth( -1 );
segmentAsOval( start, end, width, tracemode ); segmentAsOval( start, end, width, tracemode );
break;
} }
} }
@ -453,24 +450,15 @@ void PLOTTER::ThickSegment( const wxPoint& start, const wxPoint& end, int width,
void PLOTTER::ThickArc( const wxPoint& centre, double StAngle, double EndAngle, void PLOTTER::ThickArc( const wxPoint& centre, double StAngle, double EndAngle,
int radius, int width, EDA_DRAW_MODE_T tracemode ) int radius, int width, EDA_DRAW_MODE_T tracemode )
{ {
switch( tracemode ) if( tracemode == FILLED )
{
case LINE:
SetCurrentLineWidth( -1 );
Arc( centre, StAngle, EndAngle, radius, NO_FILL, -1 );
break;
case FILLED:
Arc( centre, StAngle, EndAngle, radius, NO_FILL, width ); Arc( centre, StAngle, EndAngle, radius, NO_FILL, width );
break; else
{
case SKETCH:
SetCurrentLineWidth( -1 ); SetCurrentLineWidth( -1 );
Arc( centre, StAngle, EndAngle, Arc( centre, StAngle, EndAngle,
radius - ( width - currentPenWidth ) / 2, NO_FILL, -1 ); radius - ( width - currentPenWidth ) / 2, NO_FILL, -1 );
Arc( centre, StAngle, EndAngle, Arc( centre, StAngle, EndAngle,
radius + ( width - currentPenWidth ) / 2, NO_FILL, -1 ); radius + ( width - currentPenWidth ) / 2, NO_FILL, -1 );
break;
} }
} }
@ -478,17 +466,10 @@ void PLOTTER::ThickArc( const wxPoint& centre, double StAngle, double EndAngle,
void PLOTTER::ThickRect( const wxPoint& p1, const wxPoint& p2, int width, void PLOTTER::ThickRect( const wxPoint& p1, const wxPoint& p2, int width,
EDA_DRAW_MODE_T tracemode ) EDA_DRAW_MODE_T tracemode )
{ {
switch( tracemode ) if( tracemode == FILLED )
{
case LINE:
Rect( p1, p2, NO_FILL, -1 );
break;
case FILLED:
Rect( p1, p2, NO_FILL, width ); Rect( p1, p2, NO_FILL, width );
break; else
{
case SKETCH:
SetCurrentLineWidth( -1 ); SetCurrentLineWidth( -1 );
wxPoint offsetp1( p1.x - (width - currentPenWidth) / 2, wxPoint offsetp1( p1.x - (width - currentPenWidth) / 2,
p1.y - (width - currentPenWidth) / 2 ); p1.y - (width - currentPenWidth) / 2 );
@ -500,28 +481,19 @@ void PLOTTER::ThickRect( const wxPoint& p1, const wxPoint& p2, int width,
offsetp2.x -= (width - currentPenWidth); offsetp2.x -= (width - currentPenWidth);
offsetp2.y -= (width - currentPenWidth); offsetp2.y -= (width - currentPenWidth);
Rect( offsetp1, offsetp2, NO_FILL, -1 ); Rect( offsetp1, offsetp2, NO_FILL, -1 );
break;
} }
} }
void PLOTTER::ThickCircle( const wxPoint& pos, int diametre, int width, EDA_DRAW_MODE_T tracemode ) void PLOTTER::ThickCircle( const wxPoint& pos, int diametre, int width, EDA_DRAW_MODE_T tracemode )
{ {
switch( tracemode ) if( tracemode == FILLED )
{
case LINE:
Circle( pos, diametre, NO_FILL, -1 );
break;
case FILLED:
Circle( pos, diametre, NO_FILL, width ); Circle( pos, diametre, NO_FILL, width );
break; else
{
case SKETCH:
SetCurrentLineWidth( -1 ); SetCurrentLineWidth( -1 );
Circle( pos, diametre - width + currentPenWidth, NO_FILL, -1 ); Circle( pos, diametre - width + currentPenWidth, NO_FILL, -1 );
Circle( pos, diametre + width - currentPenWidth, NO_FILL, -1 ); Circle( pos, diametre + width - currentPenWidth, NO_FILL, -1 );
break;
} }
} }

View File

@ -467,15 +467,7 @@ void DXF_PLOTTER::SetDash( bool dashed )
void DXF_PLOTTER::ThickSegment( const wxPoint& aStart, const wxPoint& aEnd, int aWidth, void DXF_PLOTTER::ThickSegment( const wxPoint& aStart, const wxPoint& aEnd, int aWidth,
EDA_DRAW_MODE_T aPlotMode ) EDA_DRAW_MODE_T aPlotMode )
{ {
if( aPlotMode == LINE ) // In line mode, just a line is OK
{
MoveTo( aStart );
FinishTo( aEnd );
}
else
{
segmentAsOval( aStart, aEnd, aWidth, aPlotMode ); segmentAsOval( aStart, aEnd, aWidth, aPlotMode );
}
} }
/* Plot an arc in DXF format /* Plot an arc in DXF format

View File

@ -432,19 +432,16 @@ void GERBER_PLOTTER::FlashPadCircle( const wxPoint& pos, int diametre, EDA_DRAW_
wxASSERT( outputFile ); wxASSERT( outputFile );
wxSize size( diametre, diametre ); wxSize size( diametre, diametre );
switch( trace_mode ) if( trace_mode == SKETCH )
{ {
case LINE:
case SKETCH:
SetCurrentLineWidth( -1 ); SetCurrentLineWidth( -1 );
Circle( pos, diametre - currentPenWidth, NO_FILL ); Circle( pos, diametre - currentPenWidth, NO_FILL );
break; }
else
case FILLED: {
DPOINT pos_dev = userToDeviceCoordinates( pos ); DPOINT pos_dev = userToDeviceCoordinates( pos );
selectAperture( size, APERTURE::Circle ); selectAperture( size, APERTURE::Circle );
emitDcode( pos_dev, 3 ); emitDcode( pos_dev, 3 );
break;
} }
} }
@ -519,23 +516,20 @@ void GERBER_PLOTTER::FlashPadRect( const wxPoint& pos, const wxSize& aSize,
// Pass through // Pass through
case 0: case 0:
case 1800: case 1800:
switch( trace_mode ) if( trace_mode == SKETCH )
{ {
case LINE:
case SKETCH:
SetCurrentLineWidth( -1 ); SetCurrentLineWidth( -1 );
Rect( wxPoint( pos.x - (size.x - currentPenWidth) / 2, Rect( wxPoint( pos.x - (size.x - currentPenWidth) / 2,
pos.y - (size.y - currentPenWidth) / 2 ), pos.y - (size.y - currentPenWidth) / 2 ),
wxPoint( pos.x + (size.x - currentPenWidth) / 2, wxPoint( pos.x + (size.x - currentPenWidth) / 2,
pos.y + (size.y - currentPenWidth) / 2 ), pos.y + (size.y - currentPenWidth) / 2 ),
NO_FILL ); NO_FILL );
break; }
else
case FILLED: {
DPOINT pos_dev = userToDeviceCoordinates( pos ); DPOINT pos_dev = userToDeviceCoordinates( pos );
selectAperture( size, APERTURE::Rect ); selectAperture( size, APERTURE::Rect );
emitDcode( pos_dev, 3 ); emitDcode( pos_dev, 3 );
break;
} }
break; break;

View File

@ -388,8 +388,8 @@ void HPGL_PLOTTER::ThickSegment( const wxPoint& start, const wxPoint& end,
wxPoint center; wxPoint center;
wxSize size; wxSize size;
// Suppress overlap if pen is too big or in line mode // Suppress overlap if pen is too big
if( (penDiameter >= width) || (tracemode == LINE) ) if( penDiameter >= width )
{ {
MoveTo( start ); MoveTo( start );
FinishTo( end ); FinishTo( end );
@ -491,15 +491,10 @@ void HPGL_PLOTTER::FlashPadCircle( const wxPoint& pos, int diametre,
int delta = KiROUND( penDiameter - penOverlap ); int delta = KiROUND( penDiameter - penOverlap );
int radius = diametre / 2; int radius = diametre / 2;
if( trace_mode != LINE )
{
radius = ( diametre - KiROUND( penDiameter ) ) / 2; radius = ( diametre - KiROUND( penDiameter ) ) / 2;
}
if( radius < 0 ) if( radius < 0 )
{
radius = 0; radius = 0;
}
double rsize = userToDeviceSize( radius ); double rsize = userToDeviceSize( radius );
@ -534,11 +529,8 @@ void HPGL_PLOTTER::FlashPadRect( const wxPoint& pos, const wxSize& padsize,
size.x = padsize.x / 2; size.x = padsize.x / 2;
size.y = padsize.y / 2; size.y = padsize.y / 2;
if( trace_mode != LINE )
{
size.x = (padsize.x - (int) penDiameter) / 2; size.x = (padsize.x - (int) penDiameter) / 2;
size.y = (padsize.y - (int) penDiameter) / 2; size.y = (padsize.y - (int) penDiameter) / 2;
}
if( size.x < 0 ) if( size.x < 0 )
size.x = 0; size.x = 0;

View File

@ -1,9 +1,9 @@
/* /*
* This program source code file is part of KiCad, a free EDA CAD application. * This program source code file is part of KiCad, a free EDA CAD application.
* *
* Copyright (C) 2004 Jean-Pierre Charras, jean-pierre.charras@gipsa-lab.inpg.fr * Copyright (C) 2004-2015 Jean-Pierre Charras, jean-pierre.charras@gipsa-lab.inpg.fr
* Copyright (C) 2008-2011 Wayne Stambaugh <stambaughw@verizon.net> * Copyright (C) 2008-2015 Wayne Stambaugh <stambaughw@verizon.net>
* Copyright (C) 2004-2011 KiCad Developers, see change_log.txt for contributors. * Copyright (C) 2004-2015 KiCad Developers, see change_log.txt for contributors.
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License * modify it under the terms of the GNU General Public License
@ -226,8 +226,6 @@ void EDA_DRAW_FRAME::EraseMsgBox()
void EDA_DRAW_FRAME::OnActivate( wxActivateEvent& event ) void EDA_DRAW_FRAME::OnActivate( wxActivateEvent& event )
{ {
m_FrameIsActive = event.GetActive();
if( m_canvas ) if( m_canvas )
m_canvas->SetCanStartBlock( -1 ); m_canvas->SetCanStartBlock( -1 );

View File

@ -346,9 +346,6 @@ void EDA_TEXT::drawOneLineOfText( EDA_RECT* aClipBox, wxDC* aDC,
{ {
int width = m_Thickness; int width = m_Thickness;
if( aFillMode == LINE )
width = 0;
if( aDrawMode != UNSPECIFIED_DRAWMODE ) if( aDrawMode != UNSPECIFIED_DRAWMODE )
GRSetDrawMode( aDC, aDrawMode ); GRSetDrawMode( aDC, aDrawMode );

View File

@ -812,11 +812,12 @@ void OPENGL_GAL::drawLineQuad( const VECTOR2D& aStartPoint, const VECTOR2D& aEnd
VECTOR2D startEndVector = aEndPoint - aStartPoint; VECTOR2D startEndVector = aEndPoint - aStartPoint;
double lineLength = startEndVector.EuclideanNorm(); double lineLength = startEndVector.EuclideanNorm();
double scale = 0.5 * lineWidth / lineLength;
if( lineLength <= 0.0 ) if( lineLength <= 0.0 )
return; return;
double scale = 0.5 * lineWidth / lineLength;
// The perpendicular vector also needs transformations // The perpendicular vector also needs transformations
glm::vec4 vector = currentManager->GetTransformation() * glm::vec4 vector = currentManager->GetTransformation() *
glm::vec4( -startEndVector.y * scale, startEndVector.x * scale, 0.0, 0.0 ); glm::vec4( -startEndVector.y * scale, startEndVector.x * scale, 0.0, 0.0 );

View File

@ -65,7 +65,7 @@ void GRID_TRICKS::getSelectedArea()
wxArrayInt cols = m_grid->GetSelectedCols(); wxArrayInt cols = m_grid->GetSelectedCols();
wxArrayInt rows = m_grid->GetSelectedRows(); wxArrayInt rows = m_grid->GetSelectedRows();
DBG(printf("topLeft.Count():%zd botRight:Count():%zd\n", topLeft.Count(), botRight.Count() );) DBG(printf("topLeft.Count():%d botRight:Count():%d\n", int( topLeft.Count() ), int( botRight.Count() ) );)
if( topLeft.Count() && botRight.Count() ) if( topLeft.Count() && botRight.Count() )
{ {

View File

@ -59,6 +59,8 @@ const wxChar PGM_BASE::workingDirKey[] = wxT( "WorkingDir" ); // public
static const wxChar languageCfgKey[] = wxT( "LanguageID" ); static const wxChar languageCfgKey[] = wxT( "LanguageID" );
static const wxChar kicadFpLibPath[] = wxT( "KicadFootprintLibraryPath" ); static const wxChar kicadFpLibPath[] = wxT( "KicadFootprintLibraryPath" );
static const wxChar pathEnvVariables[] = wxT( "EnvironmentVariables" );
static const wxChar traceEnvVars[] = wxT( "KIENVVARS" );
/** /**
@ -353,7 +355,8 @@ bool PGM_BASE::initPgm()
wxInitAllImageHandlers(); wxInitAllImageHandlers();
m_pgm_checker = new wxSingleInstanceChecker( pgm_name.GetName().Lower() + wxT( "-" ) + wxGetUserId(), GetKicadLockFilePath() ); m_pgm_checker = new wxSingleInstanceChecker( pgm_name.GetName().Lower() + wxT( "-" ) +
wxGetUserId(), GetKicadLockFilePath() );
if( m_pgm_checker->IsAnotherRunning() ) if( m_pgm_checker->IsAnotherRunning() )
{ {
@ -361,6 +364,7 @@ bool PGM_BASE::initPgm()
_( "%s is already running, Continue?" ), _( "%s is already running, Continue?" ),
GetChars( pgm_name.GetName() ) GetChars( pgm_name.GetName() )
); );
if( !IsOK( NULL, quiz ) ) if( !IsOK( NULL, quiz ) )
return false; return false;
} }
@ -383,9 +387,15 @@ bool PGM_BASE::initPgm()
App().SetAppName( pgm_name.GetName().Lower() ); App().SetAppName( pgm_name.GetName().Lower() );
// Install some image handlers, mainly for help // Install some image handlers, mainly for help
if( wxImage::FindHandler( wxBITMAP_TYPE_PNG ) == NULL )
wxImage::AddHandler( new wxPNGHandler ); wxImage::AddHandler( new wxPNGHandler );
if( wxImage::FindHandler( wxBITMAP_TYPE_GIF ) == NULL )
wxImage::AddHandler( new wxGIFHandler ); wxImage::AddHandler( new wxGIFHandler );
if( wxImage::FindHandler( wxBITMAP_TYPE_JPEG ) == NULL )
wxImage::AddHandler( new wxJPEGHandler ); wxImage::AddHandler( new wxJPEGHandler );
wxFileSystem::AddHandler( new wxZipFSHandler ); wxFileSystem::AddHandler( new wxZipFSHandler );
// Analyze the command line & initialize the binary path // Analyze the command line & initialize the binary path
@ -393,6 +403,17 @@ bool PGM_BASE::initPgm()
SetLanguagePath(); SetLanguagePath();
// Useful local environment variable settings.
m_local_env_vars[ wxString( wxT( "KIGITHUB" ) ) ] =
wxString( wxT( "https://github.com/KiCad" ) );
wxFileName tmpFileName;
tmpFileName.AssignDir( wxString( wxT( KICAD_DATA_PATH ) ) );
tmpFileName.AppendDir( wxT( "modules" ) );
m_local_env_vars[ wxString( wxT( "KISYSMOD" ) ) ] = tmpFileName.GetPath();
tmpFileName.AppendDir( wxT( "packages3d" ) );
m_local_env_vars[ wxString( wxT( "KISYS3DMOD" ) ) ] = tmpFileName.GetPath();
// OS specific instantiation of wxConfigBase derivative: // OS specific instantiation of wxConfigBase derivative:
m_common_settings = GetNewConfig( KICAD_COMMON ); m_common_settings = GetNewConfig( KICAD_COMMON );
@ -419,6 +440,7 @@ bool PGM_BASE::setExecutablePath()
// bundle directory, e.g., /Applications/kicad.app/ // bundle directory, e.g., /Applications/kicad.app/
wxFileName fn( m_bin_dir ); wxFileName fn( m_bin_dir );
if( fn.GetName() == wxT( "kicad" ) ) if( fn.GetName() == wxT( "kicad" ) )
{ {
// kicad launcher, so just remove the Contents/MacOS part // kicad launcher, so just remove the Contents/MacOS part
@ -434,6 +456,7 @@ bool PGM_BASE::setExecutablePath()
fn.RemoveLastDir(); fn.RemoveLastDir();
fn.RemoveLastDir(); fn.RemoveLastDir();
} }
m_bin_dir = fn.GetPath() + wxT( "/" ); m_bin_dir = fn.GetPath() + wxT( "/" );
#else #else
// Use unix notation for paths. I am not sure this is a good idea, // Use unix notation for paths. I am not sure this is a good idea,
@ -473,6 +496,33 @@ void PGM_BASE::loadCommonSettings()
} }
m_editor_name = m_common_settings->Read( wxT( "Editor" ) ); m_editor_name = m_common_settings->Read( wxT( "Editor" ) );
wxString entry, oldPath;
wxArrayString entries;
long index = 0L;
oldPath = m_common_settings->GetPath();
m_common_settings->SetPath( pathEnvVariables );
while( m_common_settings->GetNextEntry( entry, index ) )
{
wxLogTrace( traceEnvVars,
wxT( "Enumerating over entry %s, %ld." ), GetChars( entry ), index );
entries.Add( entry );
}
for( unsigned i = 0; i < entries.GetCount(); i++ )
{
wxString val = m_common_settings->Read( entries[i], wxEmptyString );
m_local_env_vars[ entries[i] ] = val;
}
for( std::map<wxString, wxString>::iterator it = m_local_env_vars.begin();
it != m_local_env_vars.end();
++it )
SetLocalEnvVariable( it->first, it->second );
m_common_settings->SetPath( oldPath );
} }
@ -485,6 +535,20 @@ void PGM_BASE::saveCommonSettings()
wxString cur_dir = wxGetCwd(); wxString cur_dir = wxGetCwd();
m_common_settings->Write( workingDirKey, cur_dir ); m_common_settings->Write( workingDirKey, cur_dir );
// Save the local environment variables.
m_common_settings->SetPath( pathEnvVariables );
for( std::map<wxString, wxString>::iterator it = m_local_env_vars.begin();
it != m_local_env_vars.end();
++it )
{
wxLogTrace( traceEnvVars, wxT( "Saving environment varaiable config entry %s as %s" ),
GetChars( it->first ), GetChars( it->second ) );
m_common_settings->Write( it->first, it->second );
}
m_common_settings->SetPath( wxT( ".." ) );
} }
} }
@ -659,3 +723,21 @@ void PGM_BASE::AddMenuLanguageList( wxMenu* MasterMenu )
} }
} }
bool PGM_BASE::SetLocalEnvVariable( const wxString& aName, const wxString& aValue )
{
wxString env;
// Check to see if the environment variable is already set.
if( wxGetEnv( aName, &env ) )
{
wxLogTrace( traceEnvVars, wxT( "Environment variable %s already set to %s." ),
GetChars( aName ), GetChars( env ) );
return env == aValue;
}
wxLogTrace( traceEnvVars, wxT( "Setting local environment variable %s to %s." ),
GetChars( aName ), GetChars( aValue ) );
return wxSetEnv( aName, aValue );
}

View File

@ -114,8 +114,8 @@ CONTEXT_MENU& CONTEXT_MENU::operator=( const CONTEXT_MENU& aMenu )
void CONTEXT_MENU::setupEvents() void CONTEXT_MENU::setupEvents()
{ {
Connect( wxEVT_MENU_HIGHLIGHT, wxEventHandler( CONTEXT_MENU::onMenuEvent ), NULL, this ); Connect( wxEVT_MENU_HIGHLIGHT, wxMenuEventHandler( CONTEXT_MENU::onMenuEvent ), NULL, this );
Connect( wxEVT_COMMAND_MENU_SELECTED, wxEventHandler( CONTEXT_MENU::onMenuEvent ), NULL, this ); Connect( wxEVT_COMMAND_MENU_SELECTED, wxMenuEventHandler( CONTEXT_MENU::onMenuEvent ), NULL, this );
} }
@ -194,7 +194,7 @@ void CONTEXT_MENU::Clear()
} }
void CONTEXT_MENU::onMenuEvent( wxEvent& aEvent ) void CONTEXT_MENU::onMenuEvent( wxMenuEvent& aEvent )
{ {
OPT_TOOL_EVENT evt; OPT_TOOL_EVENT evt;
@ -219,7 +219,25 @@ void CONTEXT_MENU::onMenuEvent( wxEvent& aEvent )
} }
else else
{ {
// Under Linux, every submenu can have a separate event handler, under
// Windows all submenus are handled by the main menu.
#ifdef __WINDOWS__
if( !evt ) {
// Try to find the submenu which holds the selected item
wxMenu*menu = NULL;
FindItem( m_selected, &menu );
if( menu )
{
menu->ProcessEvent( aEvent );
return;
}
assert( false ); // The event should be handled above
}
#else
evt = m_customHandler( aEvent ); evt = m_customHandler( aEvent );
#endif /* else __WINDOWS__ */
// Handling non-action menu entries (e.g. items in clarification list) // Handling non-action menu entries (e.g. items in clarification list)
if( !evt ) if( !evt )

View File

@ -218,7 +218,7 @@ void CVPCB_MAINFRAME::AutomaticFootprintMatching( wxCommandEvent& event )
bool equ_is_unique = true; bool equ_is_unique = true;
unsigned next = idx+1; unsigned next = idx+1;
unsigned previous = idx-1; int previous = idx-1;
if( next < equiv_List.size() && if( next < equiv_List.size() &&
equivItem.m_ComponentValue == equiv_List[next].m_ComponentValue ) equivItem.m_ComponentValue == equiv_List[next].m_ComponentValue )

View File

@ -1,9 +1,9 @@
/* /*
* This program source code file is part of KiCad, a free EDA CAD application. * This program source code file is part of KiCad, a free EDA CAD application.
* *
* Copyright (C) 2007 Jean-Pierre Charras, jaen-pierre.charras@gipsa-lab.inpg.com * Copyright (C) 2015 Jean-Pierre Charras, jp.charras at wanadoo.fr
* Copyright (C) 2011 Wayne Stambaugh <stambaughw@verizon.net> * Copyright (C) 2015 Wayne Stambaugh <stambaughw@verizon.net>
* Copyright (C) 2007-2011 KiCad Developers, see AUTHORS.txt for contributors. * Copyright (C) 2007-2015 KiCad Developers, see AUTHORS.txt for contributors.
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License * modify it under the terms of the GNU General Public License
@ -58,6 +58,7 @@ BEGIN_EVENT_TABLE( DISPLAY_FOOTPRINTS_FRAME, PCB_BASE_FRAME )
EVT_SIZE( DISPLAY_FOOTPRINTS_FRAME::OnSize ) EVT_SIZE( DISPLAY_FOOTPRINTS_FRAME::OnSize )
EVT_TOOL( ID_OPTIONS_SETUP, DISPLAY_FOOTPRINTS_FRAME::InstallOptionsDisplay ) EVT_TOOL( ID_OPTIONS_SETUP, DISPLAY_FOOTPRINTS_FRAME::InstallOptionsDisplay )
EVT_TOOL( ID_CVPCB_SHOW3D_FRAME, DISPLAY_FOOTPRINTS_FRAME::Show3D_Frame ) EVT_TOOL( ID_CVPCB_SHOW3D_FRAME, DISPLAY_FOOTPRINTS_FRAME::Show3D_Frame )
EVT_TOOL( ID_TB_OPTIONS_SHOW_MODULE_TEXT_SKETCH, EVT_TOOL( ID_TB_OPTIONS_SHOW_MODULE_TEXT_SKETCH,
DISPLAY_FOOTPRINTS_FRAME::OnSelectOptionToolbar) DISPLAY_FOOTPRINTS_FRAME::OnSelectOptionToolbar)
EVT_TOOL( ID_TB_OPTIONS_SHOW_MODULE_EDGE_SKETCH, EVT_TOOL( ID_TB_OPTIONS_SHOW_MODULE_EDGE_SKETCH,
@ -251,13 +252,10 @@ void DISPLAY_FOOTPRINTS_FRAME::OnUpdateTextDrawMode( wxUpdateUIEvent& aEvent )
wxString msgTextsFill[2] = { _( "Show texts in filled mode" ), wxString msgTextsFill[2] = { _( "Show texts in filled mode" ),
_( "Show texts in sketch mode" ) }; _( "Show texts in sketch mode" ) };
unsigned i = displ_opts->m_DisplayModText + 1; unsigned i = displ_opts->m_DisplayModTextFill == SKETCH ? 0 : 1;
if ( i > 2 ) aEvent.Check( displ_opts->m_DisplayModTextFill == SKETCH );
i = 1; m_optionsToolBar->SetToolShortHelp( ID_TB_OPTIONS_SHOW_MODULE_TEXT_SKETCH, msgTextsFill[i] );
aEvent.Check( displ_opts->m_DisplayModText == 1 );
m_optionsToolBar->SetToolShortHelp( ID_TB_OPTIONS_SHOW_MODULE_TEXT_SKETCH, msgTextsFill[i-1] );
} }
@ -266,16 +264,13 @@ void DISPLAY_FOOTPRINTS_FRAME::OnUpdateLineDrawMode( wxUpdateUIEvent& aEvent )
{ {
DISPLAY_OPTIONS* displ_opts = (DISPLAY_OPTIONS*)GetDisplayOptions(); DISPLAY_OPTIONS* displ_opts = (DISPLAY_OPTIONS*)GetDisplayOptions();
wxString msgEdgesFill[3] = { _( "Show outlines in filled mode" ), wxString msgEdgesFill[2] = { _( "Show outlines in filled mode" ),
_( "Show outlines in sketch mode" ) }; _( "Show outlines in sketch mode" ) };
int i = displ_opts->m_DisplayModEdge + 1; int i = displ_opts->m_DisplayModEdgeFill == SKETCH ? 0 : 1;
if ( i > 2 ) aEvent.Check( displ_opts->m_DisplayModEdgeFill == SKETCH );
i = 1; m_optionsToolBar->SetToolShortHelp( ID_TB_OPTIONS_SHOW_MODULE_EDGE_SKETCH, msgEdgesFill[i] );
aEvent.Check( displ_opts->m_DisplayModEdge == 2 );
m_optionsToolBar->SetToolShortHelp( ID_TB_OPTIONS_SHOW_MODULE_EDGE_SKETCH, msgEdgesFill[i-1] );
} }
@ -303,20 +298,12 @@ void DISPLAY_FOOTPRINTS_FRAME::OnSelectOptionToolbar( wxCommandEvent& event )
switch( id ) switch( id )
{ {
case ID_TB_OPTIONS_SHOW_MODULE_TEXT_SKETCH: case ID_TB_OPTIONS_SHOW_MODULE_TEXT_SKETCH:
displ_opts->m_DisplayModText++; displ_opts->m_DisplayModTextFill = displ_opts->m_DisplayModTextFill == FILLED ? SKETCH : FILLED;
if( displ_opts->m_DisplayModText > 2 )
displ_opts->m_DisplayModText = 0;
m_canvas->Refresh( ); m_canvas->Refresh( );
break; break;
case ID_TB_OPTIONS_SHOW_MODULE_EDGE_SKETCH: case ID_TB_OPTIONS_SHOW_MODULE_EDGE_SKETCH:
displ_opts->m_DisplayModEdge++; displ_opts->m_DisplayModEdgeFill = displ_opts->m_DisplayModEdgeFill == FILLED ? SKETCH : FILLED;
if( displ_opts->m_DisplayModEdge > 2 )
displ_opts->m_DisplayModEdge = 0;
m_canvas->Refresh(); m_canvas->Refresh();
break; break;

View File

@ -74,10 +74,10 @@ void DIALOG_FOOTPRINTS_DISPLAY_OPTIONS::initDialog()
DISPLAY_OPTIONS* displ_opts = (DISPLAY_OPTIONS*)m_Parent->GetDisplayOptions(); DISPLAY_OPTIONS* displ_opts = (DISPLAY_OPTIONS*)m_Parent->GetDisplayOptions();
m_EdgesDisplayOption->SetSelection( displ_opts->m_DisplayModEdge ); m_EdgesDisplayOption->SetValue( not displ_opts->m_DisplayModEdgeFill );
m_TextDisplayOption->SetSelection( displ_opts->m_DisplayModText ); m_TextDisplayOption->SetValue( not displ_opts->m_DisplayModTextFill );
m_IsShowPadFill->SetValue( displ_opts->m_DisplayPadFill ); m_ShowPadSketch->SetValue( not displ_opts->m_DisplayPadFill );
m_IsShowPadNum->SetValue( displ_opts->m_DisplayPadNum ); m_ShowPadNum->SetValue( displ_opts->m_DisplayPadNum );
m_IsZoomNoCenter->SetValue( m_Parent->GetCanvas()->GetEnableZoomNoCenter() ); m_IsZoomNoCenter->SetValue( m_Parent->GetCanvas()->GetEnableZoomNoCenter() );
m_IsMiddleButtonPan->SetValue( m_Parent->GetCanvas()->GetEnableMiddleButtonPan() ); m_IsMiddleButtonPan->SetValue( m_Parent->GetCanvas()->GetEnableMiddleButtonPan() );
m_IsMiddleButtonPanLimited->SetValue( m_Parent->GetCanvas()->GetMiddleButtonPanLimited() ); m_IsMiddleButtonPanLimited->SetValue( m_Parent->GetCanvas()->GetMiddleButtonPanLimited() );
@ -94,10 +94,10 @@ void DIALOG_FOOTPRINTS_DISPLAY_OPTIONS::UpdateObjectSettings( void )
{ {
DISPLAY_OPTIONS* displ_opts = (DISPLAY_OPTIONS*)m_Parent->GetDisplayOptions(); DISPLAY_OPTIONS* displ_opts = (DISPLAY_OPTIONS*)m_Parent->GetDisplayOptions();
displ_opts->m_DisplayModEdge = m_EdgesDisplayOption->GetSelection(); displ_opts->m_DisplayModEdgeFill = not m_EdgesDisplayOption->GetValue();
displ_opts->m_DisplayModText = m_TextDisplayOption->GetSelection(); displ_opts->m_DisplayModTextFill = not m_TextDisplayOption->GetValue();
displ_opts->m_DisplayPadNum = m_IsShowPadNum->GetValue(); displ_opts->m_DisplayPadNum = m_ShowPadNum->GetValue();
displ_opts->m_DisplayPadFill = m_IsShowPadFill->GetValue(); displ_opts->m_DisplayPadFill = not m_ShowPadSketch->GetValue();
m_Parent->GetCanvas()->SetEnableZoomNoCenter( m_IsZoomNoCenter->GetValue() ); m_Parent->GetCanvas()->SetEnableZoomNoCenter( m_IsZoomNoCenter->GetValue() );
m_Parent->GetCanvas()->SetEnableMiddleButtonPan( m_IsMiddleButtonPan->GetValue() ); m_Parent->GetCanvas()->SetEnableMiddleButtonPan( m_IsMiddleButtonPan->GetValue() );
m_Parent->GetCanvas()->SetMiddleButtonPanLimited( m_IsMiddleButtonPanLimited->GetValue() ); m_Parent->GetCanvas()->SetMiddleButtonPanLimited( m_IsMiddleButtonPanLimited->GetValue() );

View File

@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Oct 8 2012) // C++ code generated with wxFormBuilder (version Jun 5 2014)
// http://www.wxformbuilder.org/ // http://www.wxformbuilder.org/
// //
// PLEASE DO "NOT" EDIT THIS FILE! // PLEASE DO "NOT" EDIT THIS FILE!
@ -19,38 +19,23 @@ DIALOG_FOOTPRINTS_DISPLAY_OPTIONS_BASE::DIALOG_FOOTPRINTS_DISPLAY_OPTIONS_BASE(
wxBoxSizer* bUpperSizer; wxBoxSizer* bUpperSizer;
bUpperSizer = new wxBoxSizer( wxHORIZONTAL ); bUpperSizer = new wxBoxSizer( wxHORIZONTAL );
wxBoxSizer* bSizerLeft; wxStaticBoxSizer* sbSizerDrawMode;
bSizerLeft = new wxBoxSizer( wxVERTICAL ); sbSizerDrawMode = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Draw options") ), wxVERTICAL );
wxString m_EdgesDisplayOptionChoices[] = { _("Line"), _("Filled"), _("Sketch") }; m_EdgesDisplayOption = new wxCheckBox( this, wxID_ANY, _("Graphic items sketch mode"), wxDefaultPosition, wxDefaultSize, 0 );
int m_EdgesDisplayOptionNChoices = sizeof( m_EdgesDisplayOptionChoices ) / sizeof( wxString ); sbSizerDrawMode->Add( m_EdgesDisplayOption, 0, wxALL, 5 );
m_EdgesDisplayOption = new wxRadioBox( this, ID_EDGE_SELECT, _("Edges"), wxDefaultPosition, wxDefaultSize, m_EdgesDisplayOptionNChoices, m_EdgesDisplayOptionChoices, 1, wxRA_SPECIFY_COLS );
m_EdgesDisplayOption->SetSelection( 0 );
bSizerLeft->Add( m_EdgesDisplayOption, 1, wxALL|wxEXPAND, 5 );
wxString m_TextDisplayOptionChoices[] = { _("Line"), _("Filled"), _("Sketch") }; m_TextDisplayOption = new wxCheckBox( this, wxID_ANY, _("Texts sketch mode"), wxDefaultPosition, wxDefaultSize, 0 );
int m_TextDisplayOptionNChoices = sizeof( m_TextDisplayOptionChoices ) / sizeof( wxString ); sbSizerDrawMode->Add( m_TextDisplayOption, 0, wxALL, 5 );
m_TextDisplayOption = new wxRadioBox( this, ID_TEXT_SELECT, _("Text"), wxDefaultPosition, wxDefaultSize, m_TextDisplayOptionNChoices, m_TextDisplayOptionChoices, 1, wxRA_SPECIFY_COLS );
m_TextDisplayOption->SetSelection( 0 ); m_ShowPadSketch = new wxCheckBox( this, ID_PADFILL_OPT, _("Pad sketch mode"), wxDefaultPosition, wxDefaultSize, 0 );
bSizerLeft->Add( m_TextDisplayOption, 1, wxALL|wxEXPAND, 5 ); sbSizerDrawMode->Add( m_ShowPadSketch, 0, wxEXPAND|wxALL, 5 );
m_ShowPadNum = new wxCheckBox( this, wxID_ANY, _("Show pad &number"), wxDefaultPosition, wxDefaultSize, 0 );
sbSizerDrawMode->Add( m_ShowPadNum, 0, wxALL|wxEXPAND, 5 );
bUpperSizer->Add( bSizerLeft, 1, wxEXPAND, 5 ); bUpperSizer->Add( sbSizerDrawMode, 1, wxEXPAND|wxALL, 5 );
wxBoxSizer* bSizerRight;
bSizerRight = new wxBoxSizer( wxVERTICAL );
wxStaticBoxSizer* sbSizerPads;
sbSizerPads = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Pads") ), wxVERTICAL );
m_IsShowPadFill = new wxCheckBox( this, ID_PADFILL_OPT, _("Fill &pad"), wxDefaultPosition, wxDefaultSize, 0 );
sbSizerPads->Add( m_IsShowPadFill, 0, wxEXPAND|wxLEFT|wxRIGHT|wxTOP, 5 );
m_IsShowPadNum = new wxCheckBox( this, wxID_ANY, _("Show pad &number"), wxDefaultPosition, wxDefaultSize, 0 );
sbSizerPads->Add( m_IsShowPadNum, 0, wxALL|wxEXPAND, 5 );
bSizerRight->Add( sbSizerPads, 1, wxEXPAND|wxALL, 5 );
wxStaticBoxSizer* sbSizerViewOpt; wxStaticBoxSizer* sbSizerViewOpt;
sbSizerViewOpt = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Pan and Zoom") ), wxVERTICAL ); sbSizerViewOpt = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Pan and Zoom") ), wxVERTICAL );
@ -58,19 +43,16 @@ DIALOG_FOOTPRINTS_DISPLAY_OPTIONS_BASE::DIALOG_FOOTPRINTS_DISPLAY_OPTIONS_BASE(
m_IsZoomNoCenter = new wxCheckBox( this, wxID_ANY, _("Do not center and warp cusor on zoom"), wxDefaultPosition, wxDefaultSize, 0 ); m_IsZoomNoCenter = new wxCheckBox( this, wxID_ANY, _("Do not center and warp cusor on zoom"), wxDefaultPosition, wxDefaultSize, 0 );
m_IsZoomNoCenter->SetToolTip( _("Keep the cursor at its current location when zooming") ); m_IsZoomNoCenter->SetToolTip( _("Keep the cursor at its current location when zooming") );
sbSizerViewOpt->Add( m_IsZoomNoCenter, 0, wxEXPAND|wxLEFT|wxRIGHT|wxTOP, 5 ); sbSizerViewOpt->Add( m_IsZoomNoCenter, 0, wxEXPAND|wxALL, 5 );
m_IsMiddleButtonPan = new wxCheckBox( this, wxID_ANY, _("Use middle mouse button to pan"), wxDefaultPosition, wxDefaultSize, 0 ); m_IsMiddleButtonPan = new wxCheckBox( this, wxID_ANY, _("Use middle mouse button to pan"), wxDefaultPosition, wxDefaultSize, 0 );
sbSizerViewOpt->Add( m_IsMiddleButtonPan, 0, wxEXPAND|wxLEFT|wxRIGHT|wxTOP, 5 ); sbSizerViewOpt->Add( m_IsMiddleButtonPan, 0, wxEXPAND|wxALL, 5 );
m_IsMiddleButtonPanLimited = new wxCheckBox( this, wxID_ANY, _("Limit panning to scroll size"), wxDefaultPosition, wxDefaultSize, 0 ); m_IsMiddleButtonPanLimited = new wxCheckBox( this, wxID_ANY, _("Limit panning to scroll size"), wxDefaultPosition, wxDefaultSize, 0 );
sbSizerViewOpt->Add( m_IsMiddleButtonPanLimited, 0, wxALL|wxEXPAND, 5 ); sbSizerViewOpt->Add( m_IsMiddleButtonPanLimited, 0, wxALL|wxEXPAND, 5 );
bSizerRight->Add( sbSizerViewOpt, 1, wxALL|wxEXPAND, 5 ); bUpperSizer->Add( sbSizerViewOpt, 1, wxALL|wxEXPAND, 5 );
bUpperSizer->Add( bSizerRight, 2, wxEXPAND, 5 );
bSizerMain->Add( bUpperSizer, 1, wxEXPAND, 5 ); bSizerMain->Add( bUpperSizer, 1, wxEXPAND, 5 );
@ -92,7 +74,6 @@ DIALOG_FOOTPRINTS_DISPLAY_OPTIONS_BASE::DIALOG_FOOTPRINTS_DISPLAY_OPTIONS_BASE(
this->SetSizer( bSizerMain ); this->SetSizer( bSizerMain );
this->Layout(); this->Layout();
bSizerMain->Fit( this );
// Connect Events // Connect Events
m_IsMiddleButtonPan->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_FOOTPRINTS_DISPLAY_OPTIONS_BASE::OnMiddleBtnPanEnbl ), NULL, this ); m_IsMiddleButtonPan->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_FOOTPRINTS_DISPLAY_OPTIONS_BASE::OnMiddleBtnPanEnbl ), NULL, this );

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?> <?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<wxFormBuilder_Project> <wxFormBuilder_Project>
<FileVersion major="1" minor="11" /> <FileVersion major="1" minor="13" />
<object class="Project" expanded="1"> <object class="Project" expanded="1">
<property name="class_decoration"></property> <property name="class_decoration"></property>
<property name="code_generation">C++</property> <property name="code_generation">C++</property>
@ -20,8 +20,10 @@
<property name="path">.</property> <property name="path">.</property>
<property name="precompiled_header"></property> <property name="precompiled_header"></property>
<property name="relative_path">1</property> <property name="relative_path">1</property>
<property name="skip_lua_events">1</property>
<property name="skip_php_events">1</property> <property name="skip_php_events">1</property>
<property name="skip_python_events">1</property> <property name="skip_python_events">1</property>
<property name="ui_table">UI</property>
<property name="use_enum">0</property> <property name="use_enum">0</property>
<property name="use_microsoft_bom">0</property> <property name="use_microsoft_bom">0</property>
<object class="Dialog" expanded="1"> <object class="Dialog" expanded="1">
@ -42,7 +44,7 @@
<property name="minimum_size"></property> <property name="minimum_size"></property>
<property name="name">DIALOG_FOOTPRINTS_DISPLAY_OPTIONS_BASE</property> <property name="name">DIALOG_FOOTPRINTS_DISPLAY_OPTIONS_BASE</property>
<property name="pos"></property> <property name="pos"></property>
<property name="size">-1,-1</property> <property name="size">425,206</property>
<property name="style">wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER</property> <property name="style">wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER</property>
<property name="subclass">DIALOG_SHIM; dialog_shim.h</property> <property name="subclass">DIALOG_SHIM; dialog_shim.h</property>
<property name="title">Display Options</property> <property name="title">Display Options</property>
@ -102,18 +104,21 @@
<property name="permission">none</property> <property name="permission">none</property>
<object class="sizeritem" expanded="1"> <object class="sizeritem" expanded="1">
<property name="border">5</property> <property name="border">5</property>
<property name="flag">wxEXPAND</property> <property name="flag">wxEXPAND|wxALL</property>
<property name="proportion">1</property> <property name="proportion">1</property>
<object class="wxBoxSizer" expanded="1"> <object class="wxStaticBoxSizer" expanded="1">
<property name="id">wxID_ANY</property>
<property name="label">Draw options</property>
<property name="minimum_size"></property> <property name="minimum_size"></property>
<property name="name">bSizerLeft</property> <property name="name">sbSizerDrawMode</property>
<property name="orient">wxVERTICAL</property> <property name="orient">wxVERTICAL</property>
<property name="permission">none</property> <property name="permission">none</property>
<event name="OnUpdateUI"></event>
<object class="sizeritem" expanded="1"> <object class="sizeritem" expanded="1">
<property name="border">5</property> <property name="border">5</property>
<property name="flag">wxALL|wxEXPAND</property> <property name="flag">wxALL</property>
<property name="proportion">1</property> <property name="proportion">0</property>
<object class="wxRadioBox" expanded="1"> <object class="wxCheckBox" expanded="1">
<property name="BottomDockable">1</property> <property name="BottomDockable">1</property>
<property name="LeftDockable">1</property> <property name="LeftDockable">1</property>
<property name="RightDockable">1</property> <property name="RightDockable">1</property>
@ -127,7 +132,7 @@
<property name="caption"></property> <property name="caption"></property>
<property name="caption_visible">1</property> <property name="caption_visible">1</property>
<property name="center_pane">0</property> <property name="center_pane">0</property>
<property name="choices">&quot;Line&quot; &quot;Filled&quot; &quot;Sketch&quot;</property> <property name="checked">0</property>
<property name="close_button">1</property> <property name="close_button">1</property>
<property name="context_help"></property> <property name="context_help"></property>
<property name="context_menu">1</property> <property name="context_menu">1</property>
@ -141,9 +146,8 @@
<property name="font"></property> <property name="font"></property>
<property name="gripper">0</property> <property name="gripper">0</property>
<property name="hidden">0</property> <property name="hidden">0</property>
<property name="id">ID_EDGE_SELECT</property> <property name="id">wxID_ANY</property>
<property name="label">Edges</property> <property name="label">Graphic items sketch mode</property>
<property name="majorDimension">1</property>
<property name="max_size"></property> <property name="max_size"></property>
<property name="maximize_button">0</property> <property name="maximize_button">0</property>
<property name="maximum_size"></property> <property name="maximum_size"></property>
@ -159,10 +163,9 @@
<property name="pin_button">1</property> <property name="pin_button">1</property>
<property name="pos"></property> <property name="pos"></property>
<property name="resize">Resizable</property> <property name="resize">Resizable</property>
<property name="selection">0</property>
<property name="show">1</property> <property name="show">1</property>
<property name="size"></property> <property name="size"></property>
<property name="style">wxRA_SPECIFY_COLS</property> <property name="style"></property>
<property name="subclass"></property> <property name="subclass"></property>
<property name="toolbar_pane">0</property> <property name="toolbar_pane">0</property>
<property name="tooltip"></property> <property name="tooltip"></property>
@ -174,6 +177,7 @@
<property name="window_name"></property> <property name="window_name"></property>
<property name="window_style"></property> <property name="window_style"></property>
<event name="OnChar"></event> <event name="OnChar"></event>
<event name="OnCheckBox"></event>
<event name="OnEnterWindow"></event> <event name="OnEnterWindow"></event>
<event name="OnEraseBackground"></event> <event name="OnEraseBackground"></event>
<event name="OnKeyDown"></event> <event name="OnKeyDown"></event>
@ -190,7 +194,6 @@
<event name="OnMouseEvents"></event> <event name="OnMouseEvents"></event>
<event name="OnMouseWheel"></event> <event name="OnMouseWheel"></event>
<event name="OnPaint"></event> <event name="OnPaint"></event>
<event name="OnRadioBox"></event>
<event name="OnRightDClick"></event> <event name="OnRightDClick"></event>
<event name="OnRightDown"></event> <event name="OnRightDown"></event>
<event name="OnRightUp"></event> <event name="OnRightUp"></event>
@ -201,9 +204,9 @@
</object> </object>
<object class="sizeritem" expanded="1"> <object class="sizeritem" expanded="1">
<property name="border">5</property> <property name="border">5</property>
<property name="flag">wxALL|wxEXPAND</property> <property name="flag">wxALL</property>
<property name="proportion">1</property> <property name="proportion">0</property>
<object class="wxRadioBox" expanded="1"> <object class="wxCheckBox" expanded="1">
<property name="BottomDockable">1</property> <property name="BottomDockable">1</property>
<property name="LeftDockable">1</property> <property name="LeftDockable">1</property>
<property name="RightDockable">1</property> <property name="RightDockable">1</property>
@ -217,7 +220,7 @@
<property name="caption"></property> <property name="caption"></property>
<property name="caption_visible">1</property> <property name="caption_visible">1</property>
<property name="center_pane">0</property> <property name="center_pane">0</property>
<property name="choices">&quot;Line&quot; &quot;Filled&quot; &quot;Sketch&quot;</property> <property name="checked">0</property>
<property name="close_button">1</property> <property name="close_button">1</property>
<property name="context_help"></property> <property name="context_help"></property>
<property name="context_menu">1</property> <property name="context_menu">1</property>
@ -231,9 +234,8 @@
<property name="font"></property> <property name="font"></property>
<property name="gripper">0</property> <property name="gripper">0</property>
<property name="hidden">0</property> <property name="hidden">0</property>
<property name="id">ID_TEXT_SELECT</property> <property name="id">wxID_ANY</property>
<property name="label">Text</property> <property name="label">Texts sketch mode</property>
<property name="majorDimension">1</property>
<property name="max_size"></property> <property name="max_size"></property>
<property name="maximize_button">0</property> <property name="maximize_button">0</property>
<property name="maximum_size"></property> <property name="maximum_size"></property>
@ -249,10 +251,9 @@
<property name="pin_button">1</property> <property name="pin_button">1</property>
<property name="pos"></property> <property name="pos"></property>
<property name="resize">Resizable</property> <property name="resize">Resizable</property>
<property name="selection">0</property>
<property name="show">1</property> <property name="show">1</property>
<property name="size"></property> <property name="size"></property>
<property name="style">wxRA_SPECIFY_COLS</property> <property name="style"></property>
<property name="subclass"></property> <property name="subclass"></property>
<property name="toolbar_pane">0</property> <property name="toolbar_pane">0</property>
<property name="tooltip"></property> <property name="tooltip"></property>
@ -264,6 +265,7 @@
<property name="window_name"></property> <property name="window_name"></property>
<property name="window_style"></property> <property name="window_style"></property>
<event name="OnChar"></event> <event name="OnChar"></event>
<event name="OnCheckBox"></event>
<event name="OnEnterWindow"></event> <event name="OnEnterWindow"></event>
<event name="OnEraseBackground"></event> <event name="OnEraseBackground"></event>
<event name="OnKeyDown"></event> <event name="OnKeyDown"></event>
@ -280,7 +282,6 @@
<event name="OnMouseEvents"></event> <event name="OnMouseEvents"></event>
<event name="OnMouseWheel"></event> <event name="OnMouseWheel"></event>
<event name="OnPaint"></event> <event name="OnPaint"></event>
<event name="OnRadioBox"></event>
<event name="OnRightDClick"></event> <event name="OnRightDClick"></event>
<event name="OnRightDown"></event> <event name="OnRightDown"></event>
<event name="OnRightUp"></event> <event name="OnRightUp"></event>
@ -289,32 +290,9 @@
<event name="OnUpdateUI"></event> <event name="OnUpdateUI"></event>
</object> </object>
</object> </object>
</object>
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxEXPAND</property>
<property name="proportion">2</property>
<object class="wxBoxSizer" expanded="1">
<property name="minimum_size"></property>
<property name="name">bSizerRight</property>
<property name="orient">wxVERTICAL</property>
<property name="permission">none</property>
<object class="sizeritem" expanded="1"> <object class="sizeritem" expanded="1">
<property name="border">5</property> <property name="border">5</property>
<property name="flag">wxEXPAND|wxALL</property> <property name="flag">wxEXPAND|wxALL</property>
<property name="proportion">1</property>
<object class="wxStaticBoxSizer" expanded="1">
<property name="id">wxID_ANY</property>
<property name="label">Pads</property>
<property name="minimum_size"></property>
<property name="name">sbSizerPads</property>
<property name="orient">wxVERTICAL</property>
<property name="permission">none</property>
<event name="OnUpdateUI"></event>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxEXPAND|wxLEFT|wxRIGHT|wxTOP</property>
<property name="proportion">0</property> <property name="proportion">0</property>
<object class="wxCheckBox" expanded="1"> <object class="wxCheckBox" expanded="1">
<property name="BottomDockable">1</property> <property name="BottomDockable">1</property>
@ -345,7 +323,7 @@
<property name="gripper">0</property> <property name="gripper">0</property>
<property name="hidden">0</property> <property name="hidden">0</property>
<property name="id">ID_PADFILL_OPT</property> <property name="id">ID_PADFILL_OPT</property>
<property name="label">Fill &amp;pad</property> <property name="label">Pad sketch mode</property>
<property name="max_size"></property> <property name="max_size"></property>
<property name="maximize_button">0</property> <property name="maximize_button">0</property>
<property name="maximum_size"></property> <property name="maximum_size"></property>
@ -353,7 +331,7 @@
<property name="minimize_button">0</property> <property name="minimize_button">0</property>
<property name="minimum_size"></property> <property name="minimum_size"></property>
<property name="moveable">1</property> <property name="moveable">1</property>
<property name="name">m_IsShowPadFill</property> <property name="name">m_ShowPadSketch</property>
<property name="pane_border">1</property> <property name="pane_border">1</property>
<property name="pane_position"></property> <property name="pane_position"></property>
<property name="pane_size"></property> <property name="pane_size"></property>
@ -441,7 +419,7 @@
<property name="minimize_button">0</property> <property name="minimize_button">0</property>
<property name="minimum_size"></property> <property name="minimum_size"></property>
<property name="moveable">1</property> <property name="moveable">1</property>
<property name="name">m_IsShowPadNum</property> <property name="name">m_ShowPadNum</property>
<property name="pane_border">1</property> <property name="pane_border">1</property>
<property name="pane_position"></property> <property name="pane_position"></property>
<property name="pane_size"></property> <property name="pane_size"></property>
@ -504,7 +482,7 @@
<event name="OnUpdateUI"></event> <event name="OnUpdateUI"></event>
<object class="sizeritem" expanded="1"> <object class="sizeritem" expanded="1">
<property name="border">5</property> <property name="border">5</property>
<property name="flag">wxEXPAND|wxLEFT|wxRIGHT|wxTOP</property> <property name="flag">wxEXPAND|wxALL</property>
<property name="proportion">0</property> <property name="proportion">0</property>
<object class="wxCheckBox" expanded="1"> <object class="wxCheckBox" expanded="1">
<property name="BottomDockable">1</property> <property name="BottomDockable">1</property>
@ -592,7 +570,7 @@
</object> </object>
<object class="sizeritem" expanded="1"> <object class="sizeritem" expanded="1">
<property name="border">5</property> <property name="border">5</property>
<property name="flag">wxEXPAND|wxLEFT|wxRIGHT|wxTOP</property> <property name="flag">wxEXPAND|wxALL</property>
<property name="proportion">0</property> <property name="proportion">0</property>
<object class="wxCheckBox" expanded="1"> <object class="wxCheckBox" expanded="1">
<property name="BottomDockable">1</property> <property name="BottomDockable">1</property>
@ -770,8 +748,6 @@
</object> </object>
</object> </object>
</object> </object>
</object>
</object>
<object class="sizeritem" expanded="1"> <object class="sizeritem" expanded="1">
<property name="border">5</property> <property name="border">5</property>
<property name="flag">wxEXPAND | wxALL</property> <property name="flag">wxEXPAND | wxALL</property>

View File

@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Oct 8 2012) // C++ code generated with wxFormBuilder (version Jun 5 2014)
// http://www.wxformbuilder.org/ // http://www.wxformbuilder.org/
// //
// PLEASE DO "NOT" EDIT THIS FILE! // PLEASE DO "NOT" EDIT THIS FILE!
@ -15,13 +15,12 @@ class DIALOG_SHIM;
#include "dialog_shim.h" #include "dialog_shim.h"
#include <wx/string.h> #include <wx/string.h>
#include <wx/radiobox.h> #include <wx/checkbox.h>
#include <wx/gdicmn.h> #include <wx/gdicmn.h>
#include <wx/font.h> #include <wx/font.h>
#include <wx/colour.h> #include <wx/colour.h>
#include <wx/settings.h> #include <wx/settings.h>
#include <wx/sizer.h> #include <wx/sizer.h>
#include <wx/checkbox.h>
#include <wx/statbox.h> #include <wx/statbox.h>
#include <wx/statline.h> #include <wx/statline.h>
#include <wx/button.h> #include <wx/button.h>
@ -29,9 +28,7 @@ class DIALOG_SHIM;
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
#define ID_EDGE_SELECT 1000 #define ID_PADFILL_OPT 1000
#define ID_TEXT_SELECT 1001
#define ID_PADFILL_OPT 1002
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
/// Class DIALOG_FOOTPRINTS_DISPLAY_OPTIONS_BASE /// Class DIALOG_FOOTPRINTS_DISPLAY_OPTIONS_BASE
@ -41,10 +38,10 @@ class DIALOG_FOOTPRINTS_DISPLAY_OPTIONS_BASE : public DIALOG_SHIM
private: private:
protected: protected:
wxRadioBox* m_EdgesDisplayOption; wxCheckBox* m_EdgesDisplayOption;
wxRadioBox* m_TextDisplayOption; wxCheckBox* m_TextDisplayOption;
wxCheckBox* m_IsShowPadFill; wxCheckBox* m_ShowPadSketch;
wxCheckBox* m_IsShowPadNum; wxCheckBox* m_ShowPadNum;
wxCheckBox* m_IsZoomNoCenter; wxCheckBox* m_IsZoomNoCenter;
wxCheckBox* m_IsMiddleButtonPan; wxCheckBox* m_IsMiddleButtonPan;
wxCheckBox* m_IsMiddleButtonPanLimited; wxCheckBox* m_IsMiddleButtonPanLimited;
@ -63,7 +60,7 @@ class DIALOG_FOOTPRINTS_DISPLAY_OPTIONS_BASE : public DIALOG_SHIM
public: public:
DIALOG_FOOTPRINTS_DISPLAY_OPTIONS_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Display Options"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); DIALOG_FOOTPRINTS_DISPLAY_OPTIONS_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Display Options"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 425,206 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
~DIALOG_FOOTPRINTS_DISPLAY_OPTIONS_BASE(); ~DIALOG_FOOTPRINTS_DISPLAY_OPTIONS_BASE();
}; };

View File

@ -1,9 +1,9 @@
/* /*
* This program source code file is part of KiCad, a free EDA CAD application. * This program source code file is part of KiCad, a free EDA CAD application.
* *
* Copyright (C) 2004 Jean-Pierre Charras, jp.charras at wanadoo.fr * Copyright (C) 2004-2015 Jean-Pierre Charras, jp.charras at wanadoo.fr
* Copyright (C) 2008-2011 Wayne Stambaugh <stambaughw@verizon.net> * Copyright (C) 2008-2015 Wayne Stambaugh <stambaughw@verizon.net>
* Copyright (C) 2004-2011 KiCad Developers, see change_log.txt for contributors. * Copyright (C) 2004-2015 KiCad Developers, see change_log.txt for contributors.
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License * modify it under the terms of the GNU General Public License
@ -61,6 +61,9 @@ int LIB_PART::m_subpartIdSeparator = 0;
int LIB_PART::m_subpartFirstId = 'A'; int LIB_PART::m_subpartFirstId = 'A';
const wxChar traceSchLibMem[] = wxT( "KISCHLIBMEM" ); // public
LIB_ALIAS::LIB_ALIAS( const wxString& aName, LIB_PART* aRootPart ): LIB_ALIAS::LIB_ALIAS( const wxString& aName, LIB_PART* aRootPart ):
EDA_ITEM( LIB_ALIAS_T ), EDA_ITEM( LIB_ALIAS_T ),
shared( aRootPart ) shared( aRootPart )
@ -85,10 +88,10 @@ LIB_ALIAS::~LIB_ALIAS()
{ {
wxASSERT_MSG( shared, wxT( "~LIB_ALIAS() without a LIB_PART" ) ); wxASSERT_MSG( shared, wxT( "~LIB_ALIAS() without a LIB_PART" ) );
#if defined(DEBUG) && 1 wxLogTrace( traceSchLibMem,
printf( "%s: destroying alias:'%s' of part:'%s' alias count:%d.\n", wxT( "%s: destroying alias:'%s' of part:'%s'." ),
__func__, TO_UTF8( name ), TO_UTF8( shared->GetName() ), int( shared->m_aliases.size() ) ); GetChars( wxString::FromAscii( __WXFUNCTION__ ) ), GetChars( name ),
#endif GetChars( shared->GetName() ) );
if( shared ) if( shared )
shared->RemoveAlias( this ); shared->RemoveAlias( this );
@ -241,17 +244,10 @@ LIB_PART::LIB_PART( LIB_PART& aPart, PART_LIB* aLibrary ) :
LIB_PART::~LIB_PART() LIB_PART::~LIB_PART()
{ {
#if defined(DEBUG) && 1 wxLogTrace( traceSchLibMem,
wxT( "%s: destroying part '%s' with alias list count of %u." ),
if( m_aliases.size() ) GetChars( wxString::FromAscii( __WXFUNCTION__ ) ), GetChars( GetName() ),
{ m_aliases.size() );
int breakhere = 1;
(void) breakhere;
}
printf( "%s: destroying part '%s' with alias list count of %d\n",
__func__, TO_UTF8( GetName() ), int( m_aliases.size() ) );
#endif
// If the part is being deleted directly rather than through the library, // If the part is being deleted directly rather than through the library,
// delete all of the aliases. // delete all of the aliases.
@ -298,8 +294,9 @@ void LIB_PART::SetName( const wxString& aName )
void LIB_PART::Draw( EDA_DRAW_PANEL* aPanel, wxDC* aDc, const wxPoint& aOffset, int aMulti, void LIB_PART::Draw( EDA_DRAW_PANEL* aPanel, wxDC* aDc, const wxPoint& aOffset, int aMulti,
int aConvert, GR_DRAWMODE aDrawMode, EDA_COLOR_T aColor, const TRANSFORM& aTransform, int aConvert, GR_DRAWMODE aDrawMode, EDA_COLOR_T aColor,
bool aShowPinText, bool aDrawFields, bool aOnlySelected ) const TRANSFORM& aTransform, bool aShowPinText, bool aDrawFields,
bool aOnlySelected )
{ {
BASE_SCREEN* screen = aPanel ? aPanel->GetScreen() : NULL; BASE_SCREEN* screen = aPanel ? aPanel->GetScreen() : NULL;
@ -469,7 +466,7 @@ void LIB_PART::PlotLibFields( PLOTTER* aPlotter, int aUnit, int aConvert,
if( aConvert && item.m_Convert && ( item.m_Convert != aConvert ) ) if( aConvert && item.m_Convert && ( item.m_Convert != aConvert ) )
continue; continue;
// The reference is a special case: we shoud change the basic text // The reference is a special case: we should change the basic text
// to add '?' and the part id // to add '?' and the part id
LIB_FIELD& field = (LIB_FIELD&) item; LIB_FIELD& field = (LIB_FIELD&) item;
wxString tmp = field.GetShownText(); wxString tmp = field.GetShownText();
@ -488,7 +485,7 @@ void LIB_PART::RemoveDrawItem( LIB_ITEM* aItem, EDA_DRAW_PANEL* aPanel, wxDC* aD
{ {
wxASSERT( aItem != NULL ); wxASSERT( aItem != NULL );
// none of the MANDATOR_FIELDS may be removed in RAM, but they may be // none of the MANDATORY_FIELDS may be removed in RAM, but they may be
// omitted when saving to disk. // omitted when saving to disk.
if( aItem->Type() == LIB_FIELD_T ) if( aItem->Type() == LIB_FIELD_T )
{ {
@ -511,7 +508,8 @@ void LIB_PART::RemoveDrawItem( LIB_ITEM* aItem, EDA_DRAW_PANEL* aPanel, wxDC* aD
if( *i == aItem ) if( *i == aItem )
{ {
if( aDc != NULL ) if( aDc != NULL )
aItem->Draw( aPanel, aDc, wxPoint( 0, 0 ), UNSPECIFIED_COLOR, g_XorMode, NULL, DefaultTransform ); aItem->Draw( aPanel, aDc, wxPoint( 0, 0 ), UNSPECIFIED_COLOR,
g_XorMode, NULL, DefaultTransform );
drawings.erase( i ); drawings.erase( i );
SetModified(); SetModified();
@ -1698,10 +1696,13 @@ LIB_ALIAS* LIB_PART::RemoveAlias( LIB_ALIAS* aAlias )
{ {
bool rename = aAlias->IsRoot(); bool rename = aAlias->IsRoot();
DBG( printf( "%s: part:'%s' alias:'%s'\n", __func__, wxLogTrace( traceSchLibMem,
TO_UTF8( m_name ), wxT( "%s: part:'%s', alias:'%s', alias count %u, reference count %d." ),
TO_UTF8( aAlias->GetName() ) GetChars( wxString::FromAscii( __WXFUNCTION__ ) ),
);) GetChars( m_name ),
GetChars( aAlias->GetName() ),
m_aliases.size(),
m_me.use_count() );
it = m_aliases.erase( it ); it = m_aliases.erase( it );
@ -1763,15 +1764,6 @@ void LIB_PART::AddAlias( const wxString& aName )
} }
/** Set the separator char between the subpart id and the reference
* 0 (no separator) or '.' , '-' and '_'
* and the ascii char value to calculate the subpart symbol id from the part number:
* 'A' or '1' only are allowed. (to print U1.A or U1.1)
* if this is a digit, a number is used as id symbol
* Note also if the subpart symbol is a digit, the separator cannot be null.
* @param aSep = the separator symbol (0 (no separator) or '.' , '-' and '_')
* @param aFirstId = the Id of the first part ('A' or '1')
*/
void LIB_PART::SetSubpartIdNotation( int aSep, int aFirstId ) void LIB_PART::SetSubpartIdNotation( int aSep, int aFirstId )
{ {
m_subpartFirstId = 'A'; m_subpartFirstId = 'A';

View File

@ -1,9 +1,9 @@
/* /*
* This program source code file is part of KiCad, a free EDA CAD application. * This program source code file is part of KiCad, a free EDA CAD application.
* *
* Copyright (C) 2004 Jean-Pierre Charras, jp.charras at wanadoo.fr * Copyright (C) 2004-2015 Jean-Pierre Charras, jp.charras at wanadoo.fr
* Copyright (C) 2008-2011 Wayne Stambaugh <stambaughw@verizon.net> * Copyright (C) 2008-2015 Wayne Stambaugh <stambaughw@verizon.net>
* Copyright (C) 2004-2011 KiCad Developers, see change_log.txt for contributors. * Copyright (C) 2004-2015 KiCad Developers, see change_log.txt for contributors.
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License * modify it under the terms of the GNU General Public License
@ -34,6 +34,7 @@
#include <lib_draw_item.h> #include <lib_draw_item.h>
#include <lib_field.h> #include <lib_field.h>
#include <boost/shared_ptr.hpp> #include <boost/shared_ptr.hpp>
#include <boost/weak_ptr.hpp>
class LINE_READER; class LINE_READER;
class OUTPUTFORMATTER; class OUTPUTFORMATTER;
@ -69,6 +70,10 @@ enum LibrEntryOptions
}; };
/// WXTRACE value to enable schematic library memory deletion debug output.
extern const wxChar traceSchLibMem[];
/** /**
* Part library alias object definition. * Part library alias object definition.
* *
@ -153,7 +158,7 @@ public:
/** /**
* Function SaveDocs * Function SaveDocs
* rrite the entry document information to \a aFormatter in "*.dcm" format. * write the entry document information to \a aFormatter in "*.dcm" format.
* *
* @param aFormatter The #OUTPUTFORMATTER to write the alias documents to. * @param aFormatter The #OUTPUTFORMATTER to write the alias documents to.
* @return True if success writing else false. * @return True if success writing else false.

View File

@ -1,9 +1,9 @@
/* /*
* This program source code file is part of KiCad, a free EDA CAD application. * This program source code file is part of KiCad, a free EDA CAD application.
* *
* Copyright (C) 2004 Jean-Pierre Charras, jp.charras at wanadoo.fr * Copyright (C) 2004-2015 Jean-Pierre Charras, jp.charras at wanadoo.fr
* Copyright (C) 2008-2011 Wayne Stambaugh <stambaughw@verizon.net> * Copyright (C) 2008-2015 Wayne Stambaugh <stambaughw@verizon.net>
* Copyright (C) 2004-2011 KiCad Developers, see change_log.txt for contributors. * Copyright (C) 2004-2015 KiCad Developers, see change_log.txt for contributors.
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License * modify it under the terms of the GNU General Public License
@ -73,6 +73,22 @@ PART_LIB::PART_LIB( int aType, const wxString& aFileName ) :
PART_LIB::~PART_LIB() PART_LIB::~PART_LIB()
{ {
// When the library is destroyed, all of the alias objects on the heap should be deleted.
for( LIB_ALIAS_MAP::iterator it = m_amap.begin(); it != m_amap.end(); ++it )
{
wxLogTrace( traceSchLibMem, wxT( "Removing alias %s from library %s." ),
GetChars( it->second->GetName() ), GetChars( GetLogicalName() ) );
LIB_PART* part = it->second->GetPart();
LIB_ALIAS* alias = it->second;
delete alias;
// When the last alias of a part is destroyed, the part is no longer required and it
// too is destroyed.
if( part && part->GetAliasCount() == 0 )
delete part;
}
m_amap.clear();
} }

View File

@ -107,6 +107,7 @@ void DIALOG_EDIT_COMPONENT_IN_LIBRARY::initDlg()
{ {
m_ButtonDeleteAllFootprintFilter->Enable( false ); m_ButtonDeleteAllFootprintFilter->Enable( false );
m_ButtonDeleteOneFootprintFilter->Enable( false ); m_ButtonDeleteOneFootprintFilter->Enable( false );
m_buttonEditOneFootprintFilter->Enable( false );
} }
m_NoteBook->SetSelection( m_lastOpenedPage ); m_NoteBook->SetSelection( m_lastOpenedPage );
@ -486,6 +487,7 @@ void DIALOG_EDIT_COMPONENT_IN_LIBRARY::DeleteAllFootprintFilter( wxCommandEvent&
m_FootprintFilterListBox->Clear(); m_FootprintFilterListBox->Clear();
m_ButtonDeleteAllFootprintFilter->Enable( false ); m_ButtonDeleteAllFootprintFilter->Enable( false );
m_ButtonDeleteOneFootprintFilter->Enable( false ); m_ButtonDeleteOneFootprintFilter->Enable( false );
m_buttonEditOneFootprintFilter->Enable( false );
} }
} }
@ -526,6 +528,7 @@ void DIALOG_EDIT_COMPONENT_IN_LIBRARY::AddFootprintFilter( wxCommandEvent& event
m_FootprintFilterListBox->Append( Line ); m_FootprintFilterListBox->Append( Line );
m_ButtonDeleteAllFootprintFilter->Enable( true ); m_ButtonDeleteAllFootprintFilter->Enable( true );
m_ButtonDeleteOneFootprintFilter->Enable( true ); m_ButtonDeleteOneFootprintFilter->Enable( true );
m_buttonEditOneFootprintFilter->Enable( true );
} }
@ -540,5 +543,28 @@ void DIALOG_EDIT_COMPONENT_IN_LIBRARY::DeleteOneFootprintFilter( wxCommandEvent&
{ {
m_ButtonDeleteAllFootprintFilter->Enable( false ); m_ButtonDeleteAllFootprintFilter->Enable( false );
m_ButtonDeleteOneFootprintFilter->Enable( false ); m_ButtonDeleteOneFootprintFilter->Enable( false );
m_buttonEditOneFootprintFilter->Enable( false );
} }
} }
void DIALOG_EDIT_COMPONENT_IN_LIBRARY::EditOneFootprintFilter( wxCommandEvent& event )
{
int idx = m_FootprintFilterListBox->GetSelection();
if( idx < 0 )
return;
wxString filter = m_FootprintFilterListBox->GetStringSelection();
wxTextEntryDialog dlg( this, wxEmptyString, _( "Edit footprint filter" ), filter );
if( dlg.ShowModal() != wxID_OK )
return; // Aborted by user
filter = dlg.GetValue();
if( filter.IsEmpty() )
return; // do not accept blank filter.
m_FootprintFilterListBox->SetString( idx, filter );
}

View File

@ -63,7 +63,7 @@ private:
void DeleteAllFootprintFilter(wxCommandEvent& event); void DeleteAllFootprintFilter(wxCommandEvent& event);
void DeleteOneFootprintFilter(wxCommandEvent& event); void DeleteOneFootprintFilter(wxCommandEvent& event);
void AddFootprintFilter(wxCommandEvent& event); void AddFootprintFilter(wxCommandEvent& event);
void EditOneFootprintFilter( wxCommandEvent& event );
}; };
#endif #endif

View File

@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Nov 6 2013) // C++ code generated with wxFormBuilder (version Jun 5 2014)
// http://www.wxformbuilder.org/ // http://www.wxformbuilder.org/
// //
// PLEASE DO "NOT" EDIT THIS FILE! // PLEASE DO "NOT" EDIT THIS FILE!
@ -225,6 +225,9 @@ DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE::DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE( wx
m_buttonAddFpF = new wxButton( m_PanelFootprintFilter, ID_ADD_FOOTPRINT_FILTER, _("Add"), wxDefaultPosition, wxDefaultSize, 0 ); m_buttonAddFpF = new wxButton( m_PanelFootprintFilter, ID_ADD_FOOTPRINT_FILTER, _("Add"), wxDefaultPosition, wxDefaultSize, 0 );
bFpFilterRightBoxSizer->Add( m_buttonAddFpF, 0, wxALL|wxEXPAND, 5 ); bFpFilterRightBoxSizer->Add( m_buttonAddFpF, 0, wxALL|wxEXPAND, 5 );
m_buttonEditOneFootprintFilter = new wxButton( m_PanelFootprintFilter, wxID_ANY, _("Edit"), wxDefaultPosition, wxDefaultSize, 0 );
bFpFilterRightBoxSizer->Add( m_buttonEditOneFootprintFilter, 0, wxALL|wxEXPAND, 5 );
m_ButtonDeleteOneFootprintFilter = new wxButton( m_PanelFootprintFilter, ID_DELETE_ONE_FOOTPRINT_FILTER, _("Delete"), wxDefaultPosition, wxDefaultSize, 0 ); m_ButtonDeleteOneFootprintFilter = new wxButton( m_PanelFootprintFilter, ID_DELETE_ONE_FOOTPRINT_FILTER, _("Delete"), wxDefaultPosition, wxDefaultSize, 0 );
bFpFilterRightBoxSizer->Add( m_ButtonDeleteOneFootprintFilter, 0, wxALL|wxEXPAND, 5 ); bFpFilterRightBoxSizer->Add( m_ButtonDeleteOneFootprintFilter, 0, wxALL|wxEXPAND, 5 );
@ -266,6 +269,7 @@ DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE::DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE( wx
m_ButtonDeleteOneAlias->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE::DeleteAliasOfPart ), NULL, this ); m_ButtonDeleteOneAlias->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE::DeleteAliasOfPart ), NULL, this );
m_ButtonDeleteAllAlias->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE::DeleteAllAliasOfPart ), NULL, this ); m_ButtonDeleteAllAlias->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE::DeleteAllAliasOfPart ), NULL, this );
m_buttonAddFpF->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE::AddFootprintFilter ), NULL, this ); m_buttonAddFpF->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE::AddFootprintFilter ), NULL, this );
m_buttonEditOneFootprintFilter->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE::EditOneFootprintFilter ), NULL, this );
m_ButtonDeleteOneFootprintFilter->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE::DeleteOneFootprintFilter ), NULL, this ); m_ButtonDeleteOneFootprintFilter->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE::DeleteOneFootprintFilter ), NULL, this );
m_ButtonDeleteAllFootprintFilter->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE::DeleteAllFootprintFilter ), NULL, this ); m_ButtonDeleteAllFootprintFilter->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE::DeleteAllFootprintFilter ), NULL, this );
m_stdSizerButtonCancel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE::OnCancelClick ), NULL, this ); m_stdSizerButtonCancel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE::OnCancelClick ), NULL, this );
@ -281,6 +285,7 @@ DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE::~DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE()
m_ButtonDeleteOneAlias->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE::DeleteAliasOfPart ), NULL, this ); m_ButtonDeleteOneAlias->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE::DeleteAliasOfPart ), NULL, this );
m_ButtonDeleteAllAlias->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE::DeleteAllAliasOfPart ), NULL, this ); m_ButtonDeleteAllAlias->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE::DeleteAllAliasOfPart ), NULL, this );
m_buttonAddFpF->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE::AddFootprintFilter ), NULL, this ); m_buttonAddFpF->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE::AddFootprintFilter ), NULL, this );
m_buttonEditOneFootprintFilter->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE::EditOneFootprintFilter ), NULL, this );
m_ButtonDeleteOneFootprintFilter->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE::DeleteOneFootprintFilter ), NULL, this ); m_ButtonDeleteOneFootprintFilter->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE::DeleteOneFootprintFilter ), NULL, this );
m_ButtonDeleteAllFootprintFilter->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE::DeleteAllFootprintFilter ), NULL, this ); m_ButtonDeleteAllFootprintFilter->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE::DeleteAllFootprintFilter ), NULL, this );
m_stdSizerButtonCancel->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE::OnCancelClick ), NULL, this ); m_stdSizerButtonCancel->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE::OnCancelClick ), NULL, this );

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?> <?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<wxFormBuilder_Project> <wxFormBuilder_Project>
<FileVersion major="1" minor="11" /> <FileVersion major="1" minor="13" />
<object class="Project" expanded="1"> <object class="Project" expanded="1">
<property name="class_decoration"></property> <property name="class_decoration"></property>
<property name="code_generation">C++</property> <property name="code_generation">C++</property>
@ -899,6 +899,7 @@
<event name="OnSize"></event> <event name="OnSize"></event>
<event name="OnSpinCtrl"></event> <event name="OnSpinCtrl"></event>
<event name="OnSpinCtrlText"></event> <event name="OnSpinCtrlText"></event>
<event name="OnTextEnter"></event>
<event name="OnUpdateUI"></event> <event name="OnUpdateUI"></event>
</object> </object>
</object> </object>
@ -1080,6 +1081,7 @@
<event name="OnSize"></event> <event name="OnSize"></event>
<event name="OnSpinCtrl"></event> <event name="OnSpinCtrl"></event>
<event name="OnSpinCtrlText"></event> <event name="OnSpinCtrlText"></event>
<event name="OnTextEnter"></event>
<event name="OnUpdateUI"></event> <event name="OnUpdateUI"></event>
</object> </object>
</object> </object>
@ -3047,6 +3049,94 @@
<event name="OnUpdateUI"></event> <event name="OnUpdateUI"></event>
</object> </object>
</object> </object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxALL|wxEXPAND</property>
<property name="proportion">0</property>
<object class="wxButton" 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="close_button">1</property>
<property name="context_help"></property>
<property name="context_menu">1</property>
<property name="default">0</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">Edit</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_buttonEditOneFootprintFilter</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"></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="OnButtonClick">EditOneFootprintFilter</event>
<event name="OnChar"></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="1"> <object class="sizeritem" expanded="1">
<property name="border">5</property> <property name="border">5</property>
<property name="flag">wxALL|wxEXPAND</property> <property name="flag">wxALL|wxEXPAND</property>

View File

@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Nov 6 2013) // C++ code generated with wxFormBuilder (version Jun 5 2014)
// http://www.wxformbuilder.org/ // http://www.wxformbuilder.org/
// //
// PLEASE DO "NOT" EDIT THIS FILE! // PLEASE DO "NOT" EDIT THIS FILE!
@ -88,6 +88,7 @@ class DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE : public DIALOG_SHIM
wxStaticText* m_staticTextFootprints; wxStaticText* m_staticTextFootprints;
wxListBox* m_FootprintFilterListBox; wxListBox* m_FootprintFilterListBox;
wxButton* m_buttonAddFpF; wxButton* m_buttonAddFpF;
wxButton* m_buttonEditOneFootprintFilter;
wxButton* m_ButtonDeleteOneFootprintFilter; wxButton* m_ButtonDeleteOneFootprintFilter;
wxButton* m_ButtonDeleteAllFootprintFilter; wxButton* m_ButtonDeleteAllFootprintFilter;
wxStdDialogButtonSizer* m_stdSizerButton; wxStdDialogButtonSizer* m_stdSizerButton;
@ -101,6 +102,7 @@ class DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE : public DIALOG_SHIM
virtual void DeleteAliasOfPart( wxCommandEvent& event ) { event.Skip(); } virtual void DeleteAliasOfPart( wxCommandEvent& event ) { event.Skip(); }
virtual void DeleteAllAliasOfPart( wxCommandEvent& event ) { event.Skip(); } virtual void DeleteAllAliasOfPart( wxCommandEvent& event ) { event.Skip(); }
virtual void AddFootprintFilter( wxCommandEvent& event ) { event.Skip(); } virtual void AddFootprintFilter( wxCommandEvent& event ) { event.Skip(); }
virtual void EditOneFootprintFilter( wxCommandEvent& event ) { event.Skip(); }
virtual void DeleteOneFootprintFilter( wxCommandEvent& event ) { event.Skip(); } virtual void DeleteOneFootprintFilter( wxCommandEvent& event ) { event.Skip(); }
virtual void DeleteAllFootprintFilter( wxCommandEvent& event ) { event.Skip(); } virtual void DeleteAllFootprintFilter( wxCommandEvent& event ) { event.Skip(); }
virtual void OnCancelClick( wxCommandEvent& event ) { event.Skip(); } virtual void OnCancelClick( wxCommandEvent& event ) { event.Skip(); }

View File

@ -73,7 +73,7 @@ DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP(
chipnameTextCtrl->SetMaxLength( 32 ); chipnameTextCtrl->SetMaxLength( 32 );
chipnameTextCtrl->SetToolTip( _("The name of the symbol in the library from which this component came") ); chipnameTextCtrl->SetToolTip( _("The name of the symbol in the library from which this component came") );
sbSizerChipName->Add( chipnameTextCtrl, 0, wxEXPAND|wxBOTTOM, 5 ); sbSizerChipName->Add( chipnameTextCtrl, 0, wxEXPAND|wxTOP|wxBOTTOM, 5 );
wxBoxSizer* bSizerChpinameButt; wxBoxSizer* bSizerChpinameButt;
bSizerChpinameButt = new wxBoxSizer( wxHORIZONTAL ); bSizerChpinameButt = new wxBoxSizer( wxHORIZONTAL );
@ -149,16 +149,16 @@ DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP(
int m_FieldHJustifyCtrlNChoices = sizeof( m_FieldHJustifyCtrlChoices ) / sizeof( wxString ); int m_FieldHJustifyCtrlNChoices = sizeof( m_FieldHJustifyCtrlChoices ) / sizeof( wxString );
m_FieldHJustifyCtrl = new wxRadioBox( this, wxID_ANY, _("Horiz. Justify"), wxDefaultPosition, wxDefaultSize, m_FieldHJustifyCtrlNChoices, m_FieldHJustifyCtrlChoices, 1, wxRA_SPECIFY_COLS ); m_FieldHJustifyCtrl = new wxRadioBox( this, wxID_ANY, _("Horiz. Justify"), wxDefaultPosition, wxDefaultSize, m_FieldHJustifyCtrlNChoices, m_FieldHJustifyCtrlChoices, 1, wxRA_SPECIFY_COLS );
m_FieldHJustifyCtrl->SetSelection( 2 ); m_FieldHJustifyCtrl->SetSelection( 2 );
bSizerJustification->Add( m_FieldHJustifyCtrl, 1, wxRIGHT|wxLEFT, 5 ); bSizerJustification->Add( m_FieldHJustifyCtrl, 1, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 );
wxString m_FieldVJustifyCtrlChoices[] = { _("Bottom"), _("Center"), _("Top") }; wxString m_FieldVJustifyCtrlChoices[] = { _("Bottom"), _("Center"), _("Top") };
int m_FieldVJustifyCtrlNChoices = sizeof( m_FieldVJustifyCtrlChoices ) / sizeof( wxString ); int m_FieldVJustifyCtrlNChoices = sizeof( m_FieldVJustifyCtrlChoices ) / sizeof( wxString );
m_FieldVJustifyCtrl = new wxRadioBox( this, wxID_ANY, _("Vert. Justify"), wxDefaultPosition, wxDefaultSize, m_FieldVJustifyCtrlNChoices, m_FieldVJustifyCtrlChoices, 1, wxRA_SPECIFY_COLS ); m_FieldVJustifyCtrl = new wxRadioBox( this, wxID_ANY, _("Vert. Justify"), wxDefaultPosition, wxDefaultSize, m_FieldVJustifyCtrlNChoices, m_FieldVJustifyCtrlChoices, 1, wxRA_SPECIFY_COLS );
m_FieldVJustifyCtrl->SetSelection( 2 ); m_FieldVJustifyCtrl->SetSelection( 2 );
bSizerJustification->Add( m_FieldVJustifyCtrl, 1, wxRIGHT|wxLEFT, 5 ); bSizerJustification->Add( m_FieldVJustifyCtrl, 1, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 );
fieldEditBoxSizer->Add( bSizerJustification, 0, wxEXPAND|wxBOTTOM, 5 ); fieldEditBoxSizer->Add( bSizerJustification, 1, wxEXPAND|wxBOTTOM, 5 );
wxBoxSizer* bSizerStyle; wxBoxSizer* bSizerStyle;
bSizerStyle = new wxBoxSizer( wxHORIZONTAL ); bSizerStyle = new wxBoxSizer( wxHORIZONTAL );
@ -188,7 +188,7 @@ DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP(
bSizerStyle->Add( m_StyleRadioBox, 1, wxEXPAND|wxALL, 5 ); bSizerStyle->Add( m_StyleRadioBox, 1, wxEXPAND|wxALL, 5 );
fieldEditBoxSizer->Add( bSizerStyle, 1, wxEXPAND, 5 ); fieldEditBoxSizer->Add( bSizerStyle, 1, wxEXPAND|wxBOTTOM, 5 );
wxBoxSizer* fieldNameBoxSizer; wxBoxSizer* fieldNameBoxSizer;
fieldNameBoxSizer = new wxBoxSizer( wxVERTICAL ); fieldNameBoxSizer = new wxBoxSizer( wxVERTICAL );
@ -211,7 +211,7 @@ DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP(
fieldValueTextCtrl->SetMaxLength( 0 ); fieldValueTextCtrl->SetMaxLength( 0 );
fieldValueTextCtrl->SetToolTip( _("The name of the currently selected field\nSome fixed fields names are not editable") ); fieldValueTextCtrl->SetToolTip( _("The name of the currently selected field\nSome fixed fields names are not editable") );
fieldNameBoxSizer->Add( fieldValueTextCtrl, 0, wxEXPAND, 5 ); fieldNameBoxSizer->Add( fieldValueTextCtrl, 0, wxEXPAND|wxBOTTOM, 5 );
m_show_datasheet_button = new wxButton( this, wxID_ANY, _("Show in Browser"), wxDefaultPosition, wxDefaultSize, 0 ); m_show_datasheet_button = new wxButton( this, wxID_ANY, _("Show in Browser"), wxDefaultPosition, wxDefaultSize, 0 );
m_show_datasheet_button->SetToolTip( _("If your datasheet is an http:// link or a complete file path, then it may show in your browser by pressing this button.") ); m_show_datasheet_button->SetToolTip( _("If your datasheet is an http:// link or a complete file path, then it may show in your browser by pressing this button.") );

View File

@ -44,7 +44,7 @@
<property name="minimum_size"></property> <property name="minimum_size"></property>
<property name="name">DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP</property> <property name="name">DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP</property>
<property name="pos"></property> <property name="pos"></property>
<property name="size">677,586</property> <property name="size">688,586</property>
<property name="style">wxCAPTION|wxCLOSE_BOX|wxDEFAULT_DIALOG_STYLE|wxMAXIMIZE_BOX|wxMINIMIZE_BOX|wxRESIZE_BORDER|wxSYSTEM_MENU</property> <property name="style">wxCAPTION|wxCLOSE_BOX|wxDEFAULT_DIALOG_STYLE|wxMAXIMIZE_BOX|wxMINIMIZE_BOX|wxRESIZE_BORDER|wxSYSTEM_MENU</property>
<property name="subclass">DIALOG_SHIM; dialog_shim.h</property> <property name="subclass">DIALOG_SHIM; dialog_shim.h</property>
<property name="title">Component Properties</property> <property name="title">Component Properties</property>
@ -744,7 +744,7 @@
<event name="OnUpdateUI"></event> <event name="OnUpdateUI"></event>
<object class="sizeritem" expanded="0"> <object class="sizeritem" expanded="0">
<property name="border">5</property> <property name="border">5</property>
<property name="flag">wxEXPAND|wxBOTTOM</property> <property name="flag">wxEXPAND|wxTOP|wxBOTTOM</property>
<property name="proportion">0</property> <property name="proportion">0</property>
<object class="wxTextCtrl" expanded="0"> <object class="wxTextCtrl" expanded="0">
<property name="BottomDockable">1</property> <property name="BottomDockable">1</property>
@ -1774,7 +1774,7 @@
<object class="sizeritem" expanded="1"> <object class="sizeritem" expanded="1">
<property name="border">5</property> <property name="border">5</property>
<property name="flag">wxEXPAND|wxBOTTOM</property> <property name="flag">wxEXPAND|wxBOTTOM</property>
<property name="proportion">0</property> <property name="proportion">1</property>
<object class="wxBoxSizer" expanded="1"> <object class="wxBoxSizer" expanded="1">
<property name="minimum_size"></property> <property name="minimum_size"></property>
<property name="name">bSizerJustification</property> <property name="name">bSizerJustification</property>
@ -1782,7 +1782,7 @@
<property name="permission">none</property> <property name="permission">none</property>
<object class="sizeritem" expanded="0"> <object class="sizeritem" expanded="0">
<property name="border">5</property> <property name="border">5</property>
<property name="flag">wxRIGHT|wxLEFT</property> <property name="flag">wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND</property>
<property name="proportion">1</property> <property name="proportion">1</property>
<object class="wxRadioBox" expanded="0"> <object class="wxRadioBox" expanded="0">
<property name="BottomDockable">1</property> <property name="BottomDockable">1</property>
@ -1872,7 +1872,7 @@
</object> </object>
<object class="sizeritem" expanded="0"> <object class="sizeritem" expanded="0">
<property name="border">5</property> <property name="border">5</property>
<property name="flag">wxRIGHT|wxLEFT</property> <property name="flag">wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND</property>
<property name="proportion">1</property> <property name="proportion">1</property>
<object class="wxRadioBox" expanded="0"> <object class="wxRadioBox" expanded="0">
<property name="BottomDockable">1</property> <property name="BottomDockable">1</property>
@ -1964,7 +1964,7 @@
</object> </object>
<object class="sizeritem" expanded="1"> <object class="sizeritem" expanded="1">
<property name="border">5</property> <property name="border">5</property>
<property name="flag">wxEXPAND</property> <property name="flag">wxEXPAND|wxBOTTOM</property>
<property name="proportion">1</property> <property name="proportion">1</property>
<object class="wxBoxSizer" expanded="1"> <object class="wxBoxSizer" expanded="1">
<property name="minimum_size"></property> <property name="minimum_size"></property>
@ -2521,7 +2521,7 @@
</object> </object>
<object class="sizeritem" expanded="0"> <object class="sizeritem" expanded="0">
<property name="border">5</property> <property name="border">5</property>
<property name="flag">wxEXPAND</property> <property name="flag">wxEXPAND|wxBOTTOM</property>
<property name="proportion">0</property> <property name="proportion">0</property>
<object class="wxTextCtrl" expanded="0"> <object class="wxTextCtrl" expanded="0">
<property name="BottomDockable">1</property> <property name="BottomDockable">1</property>

View File

@ -100,7 +100,7 @@ class DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP : public DIALOG_SHIM
public: public:
DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Component Properties"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 677,586 ), long style = wxCAPTION|wxCLOSE_BOX|wxDEFAULT_DIALOG_STYLE|wxMAXIMIZE_BOX|wxMINIMIZE_BOX|wxRESIZE_BORDER|wxSYSTEM_MENU ); DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Component Properties"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 688,586 ), long style = wxCAPTION|wxCLOSE_BOX|wxDEFAULT_DIALOG_STYLE|wxMAXIMIZE_BOX|wxMINIMIZE_BOX|wxRESIZE_BORDER|wxSYSTEM_MENU );
~DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP(); ~DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP();
}; };

View File

@ -266,7 +266,7 @@ void DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB::OnOKButtonClick( wxCommandEvent& event
/* End unused code */ /* End unused code */
// save old cmp in undo list // save old cmp in undo list
m_parent->SaveCopyInUndoList( m_libEntry, IS_CHANGED ); m_parent->SaveCopyInUndoList( m_libEntry );
// delete any fields with no name or no value before we copy all of m_FieldsBuf // delete any fields with no name or no value before we copy all of m_FieldsBuf
// back into the component // back into the component

View File

@ -57,7 +57,7 @@ DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB_BASE::DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB_BASE
m_FieldHJustifyCtrl->SetSelection( 1 ); m_FieldHJustifyCtrl->SetSelection( 1 );
m_FieldHJustifyCtrl->SetToolTip( _("Select if the component is to be rotated when drawn") ); m_FieldHJustifyCtrl->SetToolTip( _("Select if the component is to be rotated when drawn") );
bSizerJustify->Add( m_FieldHJustifyCtrl, 1, wxBOTTOM|wxRIGHT|wxLEFT, 5 ); bSizerJustify->Add( m_FieldHJustifyCtrl, 1, wxEXPAND|wxALL, 5 );
wxString m_FieldVJustifyCtrlChoices[] = { _("Bottom"), _("Center"), _("Top") }; wxString m_FieldVJustifyCtrlChoices[] = { _("Bottom"), _("Center"), _("Top") };
int m_FieldVJustifyCtrlNChoices = sizeof( m_FieldVJustifyCtrlChoices ) / sizeof( wxString ); int m_FieldVJustifyCtrlNChoices = sizeof( m_FieldVJustifyCtrlChoices ) / sizeof( wxString );
@ -65,10 +65,10 @@ DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB_BASE::DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB_BASE
m_FieldVJustifyCtrl->SetSelection( 0 ); m_FieldVJustifyCtrl->SetSelection( 0 );
m_FieldVJustifyCtrl->SetToolTip( _("Pick the graphical transformation to be used when displaying the component, if any") ); m_FieldVJustifyCtrl->SetToolTip( _("Pick the graphical transformation to be used when displaying the component, if any") );
bSizerJustify->Add( m_FieldVJustifyCtrl, 1, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 ); bSizerJustify->Add( m_FieldVJustifyCtrl, 1, wxEXPAND|wxALL, 5 );
fieldEditBoxSizer->Add( bSizerJustify, 0, wxEXPAND|wxBOTTOM, 5 ); fieldEditBoxSizer->Add( bSizerJustify, 1, wxEXPAND|wxBOTTOM, 5 );
wxBoxSizer* bSizerAspect; wxBoxSizer* bSizerAspect;
bSizerAspect = new wxBoxSizer( wxHORIZONTAL ); bSizerAspect = new wxBoxSizer( wxHORIZONTAL );
@ -93,10 +93,10 @@ DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB_BASE::DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB_BASE
int m_StyleRadioBoxNChoices = sizeof( m_StyleRadioBoxChoices ) / sizeof( wxString ); int m_StyleRadioBoxNChoices = sizeof( m_StyleRadioBoxChoices ) / sizeof( wxString );
m_StyleRadioBox = new wxRadioBox( this, wxID_ANY, _("Style:"), wxDefaultPosition, wxDefaultSize, m_StyleRadioBoxNChoices, m_StyleRadioBoxChoices, 1, wxRA_SPECIFY_COLS ); m_StyleRadioBox = new wxRadioBox( this, wxID_ANY, _("Style:"), wxDefaultPosition, wxDefaultSize, m_StyleRadioBoxNChoices, m_StyleRadioBoxChoices, 1, wxRA_SPECIFY_COLS );
m_StyleRadioBox->SetSelection( 0 ); m_StyleRadioBox->SetSelection( 0 );
bSizerAspect->Add( m_StyleRadioBox, 1, wxBOTTOM|wxRIGHT|wxLEFT, 5 ); bSizerAspect->Add( m_StyleRadioBox, 1, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 );
fieldEditBoxSizer->Add( bSizerAspect, 0, wxEXPAND|wxTOP, 5 ); fieldEditBoxSizer->Add( bSizerAspect, 1, wxEXPAND|wxTOP|wxBOTTOM, 5 );
wxBoxSizer* fieldNameBoxSizer; wxBoxSizer* fieldNameBoxSizer;
fieldNameBoxSizer = new wxBoxSizer( wxVERTICAL ); fieldNameBoxSizer = new wxBoxSizer( wxVERTICAL );
@ -199,7 +199,6 @@ DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB_BASE::DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB_BASE
this->SetSizer( mainSizer ); this->SetSizer( mainSizer );
this->Layout(); this->Layout();
mainSizer->Fit( this );
// Connect Events // Connect Events
this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB_BASE::OnCloseDialog ) ); this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB_BASE::OnCloseDialog ) );

View File

@ -44,7 +44,7 @@
<property name="minimum_size"></property> <property name="minimum_size"></property>
<property name="name">DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB_BASE</property> <property name="name">DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB_BASE</property>
<property name="pos"></property> <property name="pos"></property>
<property name="size">-1,-1</property> <property name="size">542,529</property>
<property name="style">wxCAPTION|wxCLOSE_BOX|wxDEFAULT_DIALOG_STYLE|wxMAXIMIZE_BOX|wxMINIMIZE_BOX|wxRESIZE_BORDER|wxSYSTEM_MENU</property> <property name="style">wxCAPTION|wxCLOSE_BOX|wxDEFAULT_DIALOG_STYLE|wxMAXIMIZE_BOX|wxMINIMIZE_BOX|wxRESIZE_BORDER|wxSYSTEM_MENU</property>
<property name="subclass">DIALOG_SHIM; dialog_shim.h</property> <property name="subclass">DIALOG_SHIM; dialog_shim.h</property>
<property name="title">Field Properties</property> <property name="title">Field Properties</property>
@ -494,7 +494,7 @@
<object class="sizeritem" expanded="1"> <object class="sizeritem" expanded="1">
<property name="border">5</property> <property name="border">5</property>
<property name="flag">wxEXPAND|wxBOTTOM</property> <property name="flag">wxEXPAND|wxBOTTOM</property>
<property name="proportion">0</property> <property name="proportion">1</property>
<object class="wxBoxSizer" expanded="1"> <object class="wxBoxSizer" expanded="1">
<property name="minimum_size"></property> <property name="minimum_size"></property>
<property name="name">bSizerJustify</property> <property name="name">bSizerJustify</property>
@ -502,7 +502,7 @@
<property name="permission">none</property> <property name="permission">none</property>
<object class="sizeritem" expanded="1"> <object class="sizeritem" expanded="1">
<property name="border">5</property> <property name="border">5</property>
<property name="flag">wxBOTTOM|wxRIGHT|wxLEFT</property> <property name="flag">wxEXPAND|wxALL</property>
<property name="proportion">1</property> <property name="proportion">1</property>
<object class="wxRadioBox" expanded="1"> <object class="wxRadioBox" expanded="1">
<property name="BottomDockable">1</property> <property name="BottomDockable">1</property>
@ -592,7 +592,7 @@
</object> </object>
<object class="sizeritem" expanded="1"> <object class="sizeritem" expanded="1">
<property name="border">5</property> <property name="border">5</property>
<property name="flag">wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND</property> <property name="flag">wxEXPAND|wxALL</property>
<property name="proportion">1</property> <property name="proportion">1</property>
<object class="wxRadioBox" expanded="1"> <object class="wxRadioBox" expanded="1">
<property name="BottomDockable">1</property> <property name="BottomDockable">1</property>
@ -684,8 +684,8 @@
</object> </object>
<object class="sizeritem" expanded="1"> <object class="sizeritem" expanded="1">
<property name="border">5</property> <property name="border">5</property>
<property name="flag">wxEXPAND|wxTOP</property> <property name="flag">wxEXPAND|wxTOP|wxBOTTOM</property>
<property name="proportion">0</property> <property name="proportion">1</property>
<object class="wxBoxSizer" expanded="1"> <object class="wxBoxSizer" expanded="1">
<property name="minimum_size"></property> <property name="minimum_size"></property>
<property name="name">bSizerAspect</property> <property name="name">bSizerAspect</property>
@ -883,7 +883,7 @@
</object> </object>
<object class="sizeritem" expanded="1"> <object class="sizeritem" expanded="1">
<property name="border">5</property> <property name="border">5</property>
<property name="flag">wxBOTTOM|wxRIGHT|wxLEFT</property> <property name="flag">wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND</property>
<property name="proportion">1</property> <property name="proportion">1</property>
<object class="wxRadioBox" expanded="1"> <object class="wxRadioBox" expanded="1">
<property name="BottomDockable">1</property> <property name="BottomDockable">1</property>

View File

@ -84,7 +84,7 @@ class DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB_BASE : public DIALOG_SHIM
public: public:
DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Field Properties"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxCAPTION|wxCLOSE_BOX|wxDEFAULT_DIALOG_STYLE|wxMAXIMIZE_BOX|wxMINIMIZE_BOX|wxRESIZE_BORDER|wxSYSTEM_MENU ); DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Field Properties"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 542,529 ), long style = wxCAPTION|wxCLOSE_BOX|wxDEFAULT_DIALOG_STYLE|wxMAXIMIZE_BOX|wxMINIMIZE_BOX|wxRESIZE_BORDER|wxSYSTEM_MENU );
~DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB_BASE(); ~DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB_BASE();
}; };

View File

@ -1,8 +1,8 @@
/* /*
* This program source code file is part of KiCad, a free EDA CAD application. * This program source code file is part of KiCad, a free EDA CAD application.
* *
* Copyright (C) 2009 Wayne Stambaugh <stambaughw@verizon.net> * Copyright (C) 2009-2105 Wayne Stambaugh <stambaughw@verizon.net>
* Copyright (C) 2014 KiCad Developers, see CHANGELOG.TXT for contributors. * Copyright (C) 2015 KiCad Developers, see CHANGELOG.TXT for contributors.
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License * modify it under the terms of the GNU General Public License
@ -40,7 +40,7 @@ public:
DIALOG_LIB_NEW_COMPONENT( wxWindow* parent ); DIALOG_LIB_NEW_COMPONENT( wxWindow* parent );
void SetName( const wxString& name ) { m_textName->SetValue( name ); } void SetName( const wxString& name ) { m_textName->SetValue( name ); }
wxString GetName( void ) { return m_textName->GetValue(); } wxString GetName( void ) const { return m_textName->GetValue(); }
void SetReference( const wxString& reference ) void SetReference( const wxString& reference )
{ {

View File

@ -25,13 +25,13 @@
#include <fctsys.h> #include <fctsys.h>
#include <class_drawpanel.h> #include <class_drawpanel.h>
#include <general.h> //#include <general.h>
#include <protos.h> //#include <protos.h>
#include <libeditframe.h> #include <libeditframe.h>
#include <class_libentry.h> #include <class_libentry.h>
void LIB_EDIT_FRAME::SaveCopyInUndoList( EDA_ITEM* ItemToCopy, int unused_flag ) void LIB_EDIT_FRAME::SaveCopyInUndoList( EDA_ITEM* ItemToCopy )
{ {
LIB_PART* CopyItem; LIB_PART* CopyItem;
PICKED_ITEMS_LIST* lastcmd; PICKED_ITEMS_LIST* lastcmd;

View File

@ -506,7 +506,13 @@ private:
// General editing // General editing
public: public:
void SaveCopyInUndoList( EDA_ITEM* ItemToCopy, int flag_type_command = 0 ); /**
* Function SaveCopyInUndoList.
* Create a copy of the current component, and save it in the undo list.
* Because a component in library editor does not a lot of primitives,
* the full data is duplicated. It is not worth to try to optimize this save funtion
*/
void SaveCopyInUndoList( EDA_ITEM* ItemToCopy );
private: private:
void GetComponentFromUndoList( wxCommandEvent& event ); void GetComponentFromUndoList( wxCommandEvent& event );

View File

@ -125,22 +125,20 @@ void SCH_MARKER::Draw( EDA_DRAW_PANEL* aPanel, wxDC* aDC,
} }
bool SCH_MARKER::Matches( wxFindReplaceData& aSearchData, wxPoint * aFindLocation ) bool SCH_MARKER::Matches( wxFindReplaceData& aSearchData, void* aAuxData,
wxPoint * aFindLocation )
{ {
if( !SCH_ITEM::Matches( m_drc.GetMainText(), aSearchData ) ) if( SCH_ITEM::Matches( m_drc.GetErrorText(), aSearchData ) ||
{ SCH_ITEM::Matches( m_drc.GetMainText(), aSearchData ) ||
if( SCH_ITEM::Matches( m_drc.GetAuxiliaryText(), aSearchData ) ) SCH_ITEM::Matches( m_drc.GetAuxiliaryText(), aSearchData ) )
{ {
if( aFindLocation ) if( aFindLocation )
*aFindLocation = m_Pos; *aFindLocation = m_Pos;
return true; return true;
} }
return false;
}
if( aFindLocation ) return false;
*aFindLocation = m_Pos;
return true;
} }

View File

@ -1,8 +1,8 @@
/* /*
* This program source code file is part of KiCad, a free EDA CAD application. * This program source code file is part of KiCad, a free EDA CAD application.
* *
* Copyright (C) 2004 Jean-Pierre Charras, jaen-pierre.charras@gipsa-lab.inpg.com * Copyright (C) 2015 Jean-Pierre Charras, jp.charras at wanadoo.fr
* Copyright (C) 2004-2011 KiCad Developers, see change_log.txt for contributors. * Copyright (C) 2004-2015 KiCad Developers, see change_log.txt for contributors.
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License * modify it under the terms of the GNU General Public License
@ -89,13 +89,16 @@ public:
void Rotate( wxPoint aPosition ); void Rotate( wxPoint aPosition );
/** /**
* Function Matches, virtual from the base class EDA_ITEM
* Compare DRC marker main and auxiliary text against search string. * Compare DRC marker main and auxiliary text against search string.
* *
* @param aSearchData - Criteria to search against. * @param aSearchData - Criteria to search against.
* @param aAuxData A pointer to optional data required for the search or NULL
* if not used.
* @param aFindLocation - a wxPoint where to put the location of matched item. can be NULL. * @param aFindLocation - a wxPoint where to put the location of matched item. can be NULL.
* @return True if the DRC main or auxiliary text matches the search criteria. * @return True if the DRC main or auxiliary text matches the search criteria.
*/ */
bool Matches( wxFindReplaceData& aSearchData, wxPoint* aFindLocation ); bool Matches( wxFindReplaceData& aSearchData, void* aAuxData, wxPoint* aFindLocation );
void GetMsgPanelInfo( std::vector< MSG_PANEL_ITEM >& aList ); void GetMsgPanelInfo( std::vector< MSG_PANEL_ITEM >& aList );

View File

@ -269,11 +269,6 @@ void GERBVIEW_FRAME::LoadSettings( wxConfigBase* aCfg )
aCfg->SetPath( wxT( "drl_files" ) ); aCfg->SetPath( wxT( "drl_files" ) );
m_drillFileHistory.Load( *aCfg ); m_drillFileHistory.Load( *aCfg );
aCfg->SetPath( wxT( ".." ) ); aCfg->SetPath( wxT( ".." ) );
// WxWidgets 2.9.1 seems call setlocale( LC_NUMERIC, "" )
// when reading doubles in config,
// but forget to back to current locale. So we call SetLocaleTo_Default
SetLocaleTo_Default();
} }

View File

@ -1,10 +1,10 @@
/* /*
* This program source code file is part of KiCad, a free EDA CAD application. * This program source code file is part of KiCad, a free EDA CAD application.
* *
* Copyright (C) 2013 Jean-Pierre Charras, jp.charras at wanadoo.fr * Copyright (C) 2013-2015 Jean-Pierre Charras, jp.charras at wanadoo.fr
* Copyright (C) 2008-2013 SoftPLC Corporation, Dick Hollenbeck <dick@softplc.com> * Copyright (C) 2008-2015 SoftPLC Corporation, Dick Hollenbeck <dick@softplc.com>
* Copyright (C) 2008-2013 Wayne Stambaugh <stambaughw@verizon.net> * Copyright (C) 2008-2015 Wayne Stambaugh <stambaughw@verizon.net>
* Copyright (C) 2004-2013 KiCad Developers, see change_log.txt for contributors. * Copyright (C) 2004-2015 KiCad Developers, see change_log.txt for contributors.
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License * modify it under the terms of the GNU General Public License
@ -186,13 +186,16 @@ protected:
private: private:
void InitVars(); void initVars();
public: protected:
EDA_ITEM( EDA_ITEM* parent, KICAD_T idType ); EDA_ITEM( EDA_ITEM* parent, KICAD_T idType );
EDA_ITEM( KICAD_T idType ); EDA_ITEM( KICAD_T idType );
EDA_ITEM( const EDA_ITEM& base ); EDA_ITEM( const EDA_ITEM& base );
public:
virtual ~EDA_ITEM() { }; virtual ~EDA_ITEM() { };
/** /**
@ -426,16 +429,7 @@ public:
} }
/** /**
* Function Matches * Helper function used in search and replace dialog
* compares \a aText against search criteria in \a aSearchData.
*
* @param aText A reference to a wxString object containing the string to test.
* @param aSearchData The criteria to search against.
* @return True if \a aText matches the search criteria in \a aSearchData.
*/
bool Matches( const wxString& aText, wxFindReplaceData& aSearchData );
/**
* Function Replace * Function Replace
* performs a text replace on \a aText using the find and replace criteria in * performs a text replace on \a aText using the find and replace criteria in
* \a aSearchData on items that support text find and replace. * \a aSearchData on items that support text find and replace.
@ -533,6 +527,18 @@ public:
static std::ostream& NestedSpace( int nestLevel, std::ostream& os ); static std::ostream& NestedSpace( int nestLevel, std::ostream& os );
#endif #endif
protected:
/**
* Function Matches
* compares \a aText against search criteria in \a aSearchData.
* This is a helper function for simplify derived class logic.
*
* @param aText A reference to a wxString object containing the string to test.
* @param aSearchData The criteria to search against.
* @return True if \a aText matches the search criteria in \a aSearchData.
*/
bool Matches( const wxString& aText, wxFindReplaceData& aSearchData );
}; };

View File

@ -1,8 +1,8 @@
/* /*
* This program source code file is part of KiCad, a free EDA CAD application. * This program source code file is part of KiCad, a free EDA CAD application.
* *
* Copyright (C) 2009-2014 Jean-Pierre Charras, jp.charras at wanadoo.fr * Copyright (C) 2009-2015 Jean-Pierre Charras, jp.charras at wanadoo.fr
* Copyright (C) 1992-2014 KiCad Developers, see CHANGELOG.TXT for contributors. * Copyright (C) 1992-2015 KiCad Developers, see CHANGELOG.TXT for contributors.
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License * modify it under the terms of the GNU General Public License
@ -111,15 +111,64 @@ public:
double m_SolderPasteMarginRatio; ///< Solder pask margin ratio value of pad size double m_SolderPasteMarginRatio; ///< Solder pask margin ratio value of pad size
///< The final margin is the sum of these 2 values ///< The final margin is the sum of these 2 values
// Variables used in footprint handling // Variables used in footprint edition (default value in item/footprint creation)
int m_ModuleSegmentWidth; ///< Default width for all graphic lines
// Note: the default layer is the active layer
wxSize m_ModuleTextSize; ///< Default footprint texts size wxSize m_ModuleTextSize; ///< Default footprint texts size
int m_ModuleTextWidth; int m_ModuleTextWidth; ///< Default footprint texts thickness
int m_ModuleSegmentWidth;
wxString m_RefDefaultText; ///< Default ref text on fp creation
// if empty, use footprint name as default
bool m_RefDefaultVisibility; ///< Default ref text visibility on fp creation
int m_RefDefaultlayer; ///< Default ref text layer on fp creation
// should be a LAYER_ID, but use an int
// to save this param in config
wxString m_ValueDefaultText; ///< Default value text on fp creation
// if empty, use footprint name as default
bool m_ValueDefaultVisibility; ///< Default value text visibility on fp creation
int m_ValueDefaultlayer; ///< Default value text layer on fp creation
// should be a LAYER_ID, but use an int
// to save this param in config
// Miscellaneous
wxPoint m_AuxOrigin; ///< origin for plot exports wxPoint m_AuxOrigin; ///< origin for plot exports
wxPoint m_GridOrigin; ///< origin for grid offsets wxPoint m_GridOrigin; ///< origin for grid offsets
D_PAD m_Pad_Master; D_PAD m_Pad_Master; ///< A dummy pad to store all default parameters
// when importing values or create a new pad
private:
/// Index for #m_ViasDimensionsList to select the current via size.
/// 0 is the index selection of the default value Netclass
unsigned m_viaSizeIndex;
// Index for m_TrackWidthList to select the value.
/// 0 is the index selection of the default value Netclass
unsigned m_trackWidthIndex;
///> Use custom values for track/via sizes (not specified in net class nor in the size lists).
bool m_useCustomTrackVia;
///> Custom track width (used after UseCustomTrackViaSize( true ) was called).
int m_customTrackWidth;
///> Custom via size (used after UseCustomTrackViaSize( true ) was called).
VIA_DIMENSION m_customViaSize;
int m_copperLayerCount; ///< Number of copper layers for this design
LSET m_enabledLayers; ///< Bit-mask for layer enabling
LSET m_visibleLayers; ///< Bit-mask for layer visibility
int m_visibleElements; ///< Bit-mask for element category visibility
int m_boardThickness; ///< Board thickness for 3D viewer
/// Current net class name used to display netclass info.
/// This is also the last used netclass after starting a track.
wxString m_currentNetClassName;
public:
BOARD_DESIGN_SETTINGS(); BOARD_DESIGN_SETTINGS();
/** /**
@ -489,35 +538,6 @@ public:
inline void SetBoardThickness( int aThickness ) { m_boardThickness = aThickness; } inline void SetBoardThickness( int aThickness ) { m_boardThickness = aThickness; }
private: private:
/// Index for #m_ViasDimensionsList to select the current via size.
/// 0 is the index selection of the default value Netclass
unsigned m_viaSizeIndex;
// Index for m_TrackWidthList to select the value.
/// 0 is the index selection of the default value Netclass
unsigned m_trackWidthIndex;
///> Use custom values for track/via sizes (not specified in net class nor in the size lists).
bool m_useCustomTrackVia;
///> Custom track width (used after UseCustomTrackViaSize( true ) was called).
int m_customTrackWidth;
///> Custom via size (used after UseCustomTrackViaSize( true ) was called).
VIA_DIMENSION m_customViaSize;
int m_copperLayerCount; ///< Number of copper layers for this design
LSET m_enabledLayers; ///< Bit-mask for layer enabling
LSET m_visibleLayers; ///< Bit-mask for layer visibility
int m_visibleElements; ///< Bit-mask for element category visibility
int m_boardThickness; ///< Board thickness for 3D viewer
/// Current net class name used to display netclass info.
/// This is also the last used netclass after starting a track.
wxString m_currentNetClassName;
void formatNetClass( NETCLASS* aNetClass, OUTPUTFORMATTER* aFormatter, int aNestLevel, void formatNetClass( NETCLASS* aNetClass, OUTPUTFORMATTER* aFormatter, int aNestLevel,
int aControlBits ) const throw( IO_ERROR ); int aControlBits ) const throw( IO_ERROR );
}; };

View File

@ -52,11 +52,10 @@ enum EDA_TEXT_VJUSTIFY_T {
}; };
/* Options to show solid segments (segments, texts...) */ /* Options to draw items with thickness ( segments, arcs, circles, texts...) */
enum EDA_DRAW_MODE_T { enum EDA_DRAW_MODE_T {
LINE = 0, // segments are drawn as lines FILLED = true, // normal mode: solid segments
FILLED, // normal mode: segments have thickness SKETCH = false // sketch mode: draw segments outlines only
SKETCH // sketch mode: segments have thickness, but are not filled
}; };
@ -199,12 +198,12 @@ public:
* @param aOffset = draw offset (usually (0,0)) * @param aOffset = draw offset (usually (0,0))
* @param aColor = text color * @param aColor = text color
* @param aDrawMode = GR_OR, GR_XOR.., -1 to use the current mode. * @param aDrawMode = GR_OR, GR_XOR.., -1 to use the current mode.
* @param aDisplay_mode = LINE, FILLED or SKETCH * @param aDisplay_mode = FILLED or SKETCH
* @param aAnchor_color = anchor color ( UNSPECIFIED_COLOR = do not draw anchor ). * @param aAnchor_color = anchor color ( UNSPECIFIED_COLOR = do not draw anchor ).
*/ */
void Draw( EDA_RECT* aClipBox, wxDC* aDC, void Draw( EDA_RECT* aClipBox, wxDC* aDC,
const wxPoint& aOffset, EDA_COLOR_T aColor, const wxPoint& aOffset, EDA_COLOR_T aColor,
GR_DRAWMODE aDrawMode, EDA_DRAW_MODE_T aDisplay_mode = LINE, GR_DRAWMODE aDrawMode, EDA_DRAW_MODE_T aDisplay_mode = FILLED,
EDA_COLOR_T aAnchor_color = EDA_COLOR_T(UNSPECIFIED_COLOR) ); EDA_COLOR_T aAnchor_color = EDA_COLOR_T(UNSPECIFIED_COLOR) );
/** /**
@ -318,7 +317,7 @@ private:
* @param aOffset = draw offset (usually (0,0)) * @param aOffset = draw offset (usually (0,0))
* @param aColor = text color * @param aColor = text color
* @param aDrawMode = GR_OR, GR_XOR.., -1 to use the current mode. * @param aDrawMode = GR_OR, GR_XOR.., -1 to use the current mode.
* @param aFillMode = LINE, FILLED or SKETCH * @param aFillMode = FILLED or SKETCH
* @param aText = the single line of text to draw. * @param aText = the single line of text to draw.
* @param aPos = the position of this line ). * @param aPos = the position of this line ).
*/ */

View File

@ -75,8 +75,8 @@ public:
bool m_DisplayViaFill; bool m_DisplayViaFill;
bool m_DisplayPadNum; // show pads numbers bool m_DisplayPadNum; // show pads numbers
bool m_DisplayPadIsol; bool m_DisplayPadIsol;
int m_DisplayModEdge; // How to display module drawings (line/ filled / sketch) bool m_DisplayModEdgeFill; // How to display module drawings ( sketch/ filled )
int m_DisplayModText; // How to display module texts (line/ filled / sketch) bool m_DisplayModTextFill; // How to display module texts ( sketch/ filled )
bool m_DisplayPcbTrackFill; // false : tracks are show in sketch mode, true = filled. bool m_DisplayPcbTrackFill; // false : tracks are show in sketch mode, true = filled.
/// How trace clearances are displayed. @see TRACE_CLEARANCE_DISPLAY_MODE_T. /// How trace clearances are displayed. @see TRACE_CLEARANCE_DISPLAY_MODE_T.
@ -94,7 +94,7 @@ public:
* 3 show netnames on tracks and pads * 3 show netnames on tracks and pads
*/ */
int m_DisplayDrawItems; bool m_DisplayDrawItemsFill; // How to display graphic items on board ( sketch/ filled )
bool m_ContrastModeDisplay; bool m_ContrastModeDisplay;
int m_MaxLinksShowed; // in track creation: number of hairwires shown int m_MaxLinksShowed; // in track creation: number of hairwires shown
bool m_Show_Module_Ratsnest; // When moving a footprint: allows displaying a ratsnest bool m_Show_Module_Ratsnest; // When moving a footprint: allows displaying a ratsnest

View File

@ -1,9 +1,9 @@
/* /*
* This program source code file is part of KiCad, a free EDA CAD application. * This program source code file is part of KiCad, a free EDA CAD application.
* *
* Copyright (C) 2004 Jean-Pierre Charras, jaen-pierre.charras@gipsa-lab.inpg.com * Copyright (C) 2004-2015 Jean-Pierre Charras, jaen-pierre.charras@gipsa-lab.inpg.com
* Copyright (C) 2008-2011 Wayne Stambaugh <stambaughw@verizon.net> * Copyright (C) 2008-2015 Wayne Stambaugh <stambaughw@verizon.net>
* Copyright (C) 1992-2011 KiCad Developers, see AUTHORS.txt for contributors. * Copyright (C) 1992-2015 KiCad Developers, see AUTHORS.txt for contributors.
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License * modify it under the terms of the GNU General Public License
@ -31,6 +31,7 @@
#ifndef PGM_BASE_H_ #ifndef PGM_BASE_H_
#define PGM_BASE_H_ #define PGM_BASE_H_
#include <map>
#include <wx/filename.h> #include <wx/filename.h>
#include <search_stack.h> #include <search_stack.h>
#include <wx/gdicmn.h> #include <wx/gdicmn.h>
@ -109,7 +110,7 @@ public:
/** /**
* Function UseSystemPdfBrowser * Function UseSystemPdfBrowser
* returns true if the PDF browser is the default (system) PDF browser * returns true if the PDF browser is the default (system) PDF browser
* and false if the PDF browser is the prefered (selected) browser, else * and false if the PDF browser is the preferred (selected) browser, else
* returns false if there is no selected browser * returns false if there is no selected browser
*/ */
VTBL_ENTRY bool UseSystemPdfBrowser() const VTBL_ENTRY bool UseSystemPdfBrowser() const
@ -119,7 +120,7 @@ public:
/** /**
* Function ForceSystemPdfBrowser * Function ForceSystemPdfBrowser
* forces the use of system PDF browser, even if a preferend PDF browser is set. * forces the use of system PDF browser, even if a preferred PDF browser is set.
*/ */
VTBL_ENTRY void ForceSystemPdfBrowser( bool aFlg ) { m_use_system_pdf_browser = aFlg; } VTBL_ENTRY void ForceSystemPdfBrowser( bool aFlg ) { m_use_system_pdf_browser = aFlg; }
@ -168,6 +169,22 @@ public:
*/ */
VTBL_ENTRY void WritePdfBrowserInfos(); VTBL_ENTRY void WritePdfBrowserInfos();
/**
* Function SetLocalEnvVariable
*
* Sets the environment variable \a aName to \a aValue.
*
* This function first checks to see if the environment variable \a aName is already
* defined. If it is not defined, then the environment variable \a aName is set to
* a value. Otherwise, the environment variable is left unchanged. This allows the user
* to override environment variables for testing purposes.
*
* @param aName is a wxString containing the environment variable name.
* @param aValue is a wxString containing the environment variable value.
* @return true if the environment variable \a Name was set to \a aValue.
*/
VTBL_ENTRY bool SetLocalEnvVariable( const wxString& aName, const wxString& aValue );
/** /**
* Function App * Function App
* returns a bare naked wxApp, which may come from wxPython, SINGLE_TOP, or kicad.exe. * returns a bare naked wxApp, which may come from wxPython, SINGLE_TOP, or kicad.exe.
@ -247,6 +264,10 @@ protected:
wxString m_editor_name; wxString m_editor_name;
wxSize m_help_size; wxSize m_help_size;
/// Local environment variable expansion settings such as KIGITHUB, KISYSMOD, and KISYS3DMOD.
/// library table.
std::map<wxString, wxString> m_local_env_vars;
wxApp* m_wx_app; wxApp* m_wx_app;
// The PGM_* classes can have difficulties at termination if they // The PGM_* classes can have difficulties at termination if they

View File

@ -95,12 +95,12 @@ public:
} }
protected: protected:
void setCustomEventHandler( boost::function<OPT_TOOL_EVENT(const wxEvent&)> aHandler ) void setCustomEventHandler( boost::function<OPT_TOOL_EVENT(const wxMenuEvent&)> aHandler )
{ {
m_customHandler = aHandler; m_customHandler = aHandler;
} }
virtual OPT_TOOL_EVENT handleCustomEvent( const wxEvent& aEvent ) virtual OPT_TOOL_EVENT handleCustomEvent( const wxMenuEvent& aEvent )
{ {
return OPT_TOOL_EVENT(); return OPT_TOOL_EVENT();
} }
@ -116,7 +116,7 @@ private:
void setupEvents(); void setupEvents();
///> Event handler. ///> Event handler.
void onMenuEvent( wxEvent& aEvent ); void onMenuEvent( wxMenuEvent& aEvent );
/** /**
* Function setTool() * Function setTool()
@ -144,7 +144,7 @@ private:
std::map<int, const TOOL_ACTION*> m_toolActions; std::map<int, const TOOL_ACTION*> m_toolActions;
/// Custom events handler, allows to translate wxEvents to TOOL_EVENTs. /// Custom events handler, allows to translate wxEvents to TOOL_EVENTs.
boost::function<OPT_TOOL_EVENT(const wxEvent& aEvent)> m_customHandler; boost::function<OPT_TOOL_EVENT(const wxMenuEvent& aEvent)> m_customHandler;
friend class TOOL_INTERACTIVE; friend class TOOL_INTERACTIVE;
}; };

View File

@ -27,6 +27,9 @@
* @brief Custom text control validator definitions. * @brief Custom text control validator definitions.
*/ */
#ifndef VALIDATORS_H
#define VALIDATORS_H
#include <wx/valtext.h> #include <wx/valtext.h>
/** /**
@ -56,3 +59,5 @@ class FILE_NAME_WITH_PATH_CHAR_VALIDATOR : public wxTextValidator
public: public:
FILE_NAME_WITH_PATH_CHAR_VALIDATOR( wxString* aValue = NULL ); FILE_NAME_WITH_PATH_CHAR_VALIDATOR( wxString* aValue = NULL );
}; };
#endif // #ifndef VALIDATORS_H

View File

@ -292,6 +292,8 @@ public:
*/ */
inline void SetLayerVisible( int aLayer, bool aVisible = true ) inline void SetLayerVisible( int aLayer, bool aVisible = true )
{ {
wxASSERT( aLayer < (int) m_layers.size() );
if( m_layers[aLayer].visible != aVisible ) if( m_layers[aLayer].visible != aVisible )
{ {
// Target has to be redrawn after changing its visibility // Target has to be redrawn after changing its visibility
@ -307,9 +309,18 @@ public:
*/ */
inline bool IsLayerVisible( int aLayer ) const inline bool IsLayerVisible( int aLayer ) const
{ {
wxASSERT( aLayer < (int) m_layers.size() );
return m_layers.at( aLayer ).visible; return m_layers.at( aLayer ).visible;
} }
inline void SetLayerDisplayOnly( int aLayer, bool aDisplayOnly = true )
{
wxASSERT( aLayer < (int) m_layers.size() );
m_layers[aLayer].displayOnly = aDisplayOnly;
}
/** /**
* Function SetLayerTarget() * Function SetLayerTarget()
* Changes the rendering target for a particular layer. * Changes the rendering target for a particular layer.
@ -318,6 +329,8 @@ public:
*/ */
inline void SetLayerTarget( int aLayer, RENDER_TARGET aTarget ) inline void SetLayerTarget( int aLayer, RENDER_TARGET aTarget )
{ {
wxASSERT( aLayer < (int) m_layers.size() );
m_layers[aLayer].target = aTarget; m_layers[aLayer].target = aTarget;
} }
@ -477,6 +490,8 @@ public:
/// Returns true if the layer is cached /// Returns true if the layer is cached
inline bool IsCached( int aLayer ) const inline bool IsCached( int aLayer ) const
{ {
wxASSERT( aLayer < (int) m_layers.size() );
return m_layers.at( aLayer ).target == TARGET_CACHED; return m_layers.at( aLayer ).target == TARGET_CACHED;
} }

View File

@ -276,22 +276,6 @@ public:
*/ */
void CursorGoto( const wxPoint& aPos, bool aWarp = true ); void CursorGoto( const wxPoint& aPos, bool aWarp = true );
/**
* Function Save_Module_In_Library
* Save in an existing library a given footprint
* @param aLibName = name of the library to use
* @param aModule = the given footprint
* @param aOverwrite = true to overwrite an existing footprint, false to
* abort if an existing footprint with same name is found
* @param aDisplayDialog = true to display a dialog to enter or confirm the
* footprint name
* @return : true if OK, false if abort
*/
bool Save_Module_In_Library( const wxString& aLibName,
MODULE* aModule,
bool aOverwrite,
bool aDisplayDialog );
/** /**
* Function SelectLibrary * Function SelectLibrary
* puts up a dialog and allows the user to pick a library, for unspecified use. * puts up a dialog and allows the user to pick a library, for unspecified use.
@ -316,17 +300,19 @@ public:
virtual void OnModify(); virtual void OnModify();
// Modules (footprints) // Modules (footprints)
/** /**
* Function Create_1_Module * Function CreateNewModule
* Creates a new module or footprint : A new module contains 2 texts : * Creates a new module or footprint, at position 0,0
* First = REFERENCE * The new module contains only 2 texts: a reference and a value:
* Second = VALUE: "VAL**" * Reference = REF**
* the new module is added to the board module list * Value = "VAL**" or Footprint name in lib
* @param aModuleName = name of the new footprint * Note: they are dummy texts, which will be replaced by the actual texts
* (will be the component reference in board) * when the fooprint is placed on a board and a netlist is read
* @return a pointer to the new module * @param aModuleName = name of the new footprint in library
* @return a reference to the new module
*/ */
MODULE* Create_1_Module( const wxString& aModuleName ); MODULE* CreateNewModule( const wxString& aModuleName );
void Edit_Module( MODULE* module, wxDC* DC ); void Edit_Module( MODULE* module, wxDC* DC );
void Rotate_Module( wxDC* DC, MODULE* module, double angle, bool incremental ); void Rotate_Module( wxDC* DC, MODULE* module, double angle, bool incremental );

View File

@ -367,9 +367,6 @@ public:
* to define a configuration setting that needs to be loaded at run time, * to define a configuration setting that needs to be loaded at run time,
* this is the place to define it. * this is the place to define it.
* *
* @todo: Define the configuration variables as member variables instead of
* global variables or move them to the object class where they are
* used.
* @return - Reference to the list of applications settings. * @return - Reference to the list of applications settings.
*/ */
PARAM_CFG_ARRAY& GetConfigurationSettings(); PARAM_CFG_ARRAY& GetConfigurationSettings();
@ -1602,12 +1599,15 @@ public:
void Edit_Gap( wxDC* DC, MODULE* Module ); void Edit_Gap( wxDC* DC, MODULE* Module );
/** /**
* Function Create_MuWaveBasicShape * Function CreateMuWaveBaseFootprint
* create a footprint with pad_count pads for micro wave applications. * create a basic footprint for micro wave applications.
* This footprint has pad_count pads: * @param aValue = the text value
* @param aTextSize = the size of ref and value texts ( <= 0 to use board default values )
* @param aPadCount = number of pads
* Pads settings are:
* PAD_SMD, rectangular, H size = V size = current track width. * PAD_SMD, rectangular, H size = V size = current track width.
*/ */
MODULE* Create_MuWaveBasicShape( const wxString& name, int pad_count ); MODULE* CreateMuWaveBaseFootprint( const wxString& aValue, int aTextSize, int aPadCount );
/** /**
* Create_MuWaveComponent * Create_MuWaveComponent

View File

@ -1,9 +1,9 @@
/* /*
* This program source code file is part of KiCad, a free EDA CAD application. * 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) 2009-2015 Jean-Pierre Charras, jaen-pierre.charras@gipsa-lab.inpg.com
* Copyright (C) 2011 Wayne Stambaugh <stambaughw@verizon.net> * Copyright (C) 2011-2015 Wayne Stambaugh <stambaughw@verizon.net>
* Copyright (C) 1992-2011 KiCad Developers, see AUTHORS.txt for contributors. * Copyright (C) 1992-2015 KiCad Developers, see AUTHORS.txt for contributors.
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License * modify it under the terms of the GNU General Public License
@ -118,7 +118,6 @@ protected:
wxSize m_FrameSize; wxSize m_FrameSize;
wxAuiToolBar* m_mainToolBar; ///< Standard horizontal Toolbar wxAuiToolBar* m_mainToolBar; ///< Standard horizontal Toolbar
bool m_FrameIsActive;
wxString m_FrameName; ///< name used for writing and reading setup wxString m_FrameName; ///< name used for writing and reading setup
///< It is "SchematicFrame", "PcbFrame" .... ///< It is "SchematicFrame", "PcbFrame" ....
wxString m_AboutTitle; ///< Name of program displayed in About. wxString m_AboutTitle; ///< Name of program displayed in About.
@ -200,8 +199,6 @@ public:
wxString GetName() const { return m_FrameName; } wxString GetName() const { return m_FrameName; }
bool IsActive() const { return m_FrameIsActive; }
bool IsType( FRAME_T aType ) const { return m_Ident == aType; } bool IsType( FRAME_T aType ) const { return m_Ident == aType; }
void GetKicadHelp( wxCommandEvent& event ); void GetKicadHelp( wxCommandEvent& event );

View File

@ -96,6 +96,8 @@ set( PCBNEW_DIALOGS
dialogs/dialog_layer_selection_base.cpp dialogs/dialog_layer_selection_base.cpp
dialogs/dialog_layers_setup.cpp dialogs/dialog_layers_setup.cpp
dialogs/dialog_layers_setup_base.cpp dialogs/dialog_layers_setup_base.cpp
dialogs/dialog_modedit_options.cpp
dialogs/dialog_modedit_options_base.cpp
dialogs/dialog_netlist.cpp dialogs/dialog_netlist.cpp
dialogs/dialog_netlist_fbp.cpp dialogs/dialog_netlist_fbp.cpp
dialogs/dialog_pcb_text_properties.cpp dialogs/dialog_pcb_text_properties.cpp

View File

@ -753,25 +753,14 @@ void PCB_BASE_FRAME::LoadSettings( wxConfigBase* aCfg )
aCfg->Read( m_FrameName + DisplayPadFillEntry, &m_DisplayOptions.m_DisplayPadFill, true ); aCfg->Read( m_FrameName + DisplayPadFillEntry, &m_DisplayOptions.m_DisplayPadFill, true );
aCfg->Read( m_FrameName + DisplayViaFillEntry, &m_DisplayOptions.m_DisplayViaFill, true ); aCfg->Read( m_FrameName + DisplayViaFillEntry, &m_DisplayOptions.m_DisplayViaFill, true );
aCfg->Read( m_FrameName + DisplayPadNumberEntry, &m_DisplayOptions.m_DisplayPadNum, true ); aCfg->Read( m_FrameName + DisplayPadNumberEntry, &m_DisplayOptions.m_DisplayPadNum, true );
aCfg->Read( m_FrameName + DisplayModuleEdgeEntry, &m_DisplayOptions.m_DisplayModEdge, ( long )FILLED ); aCfg->Read( m_FrameName + DisplayModuleEdgeEntry, &m_DisplayOptions.m_DisplayModEdgeFill, true );
aCfg->Read( m_FrameName + FastGrid1Entry, &itmp, ( long )0); aCfg->Read( m_FrameName + FastGrid1Entry, &itmp, ( long )0);
m_FastGrid1 = itmp; m_FastGrid1 = itmp;
aCfg->Read( m_FrameName + FastGrid2Entry, &itmp, ( long )0); aCfg->Read( m_FrameName + FastGrid2Entry, &itmp, ( long )0);
m_FastGrid2 = itmp; m_FastGrid2 = itmp;
if( m_DisplayOptions.m_DisplayModEdge < LINE || m_DisplayOptions.m_DisplayModEdge > SKETCH ) aCfg->Read( m_FrameName + DisplayModuleTextEntry, &m_DisplayOptions.m_DisplayModTextFill, true );
m_DisplayOptions.m_DisplayModEdge = FILLED;
aCfg->Read( m_FrameName + DisplayModuleTextEntry, &m_DisplayOptions.m_DisplayModText, ( long )FILLED );
if( m_DisplayOptions.m_DisplayModText < LINE || m_DisplayOptions.m_DisplayModText > SKETCH )
m_DisplayOptions.m_DisplayModText = FILLED;
// WxWidgets 2.9.1 seems call setlocale( LC_NUMERIC, "" )
// when reading doubles in config,
// but forget to back to current locale. So we call SetLocaleTo_Default
SetLocaleTo_Default( );
} }
@ -785,8 +774,8 @@ void PCB_BASE_FRAME::SaveSettings( wxConfigBase* aCfg )
aCfg->Write( m_FrameName + DisplayPadFillEntry, m_DisplayOptions.m_DisplayPadFill ); aCfg->Write( m_FrameName + DisplayPadFillEntry, m_DisplayOptions.m_DisplayPadFill );
aCfg->Write( m_FrameName + DisplayViaFillEntry, m_DisplayOptions.m_DisplayViaFill ); aCfg->Write( m_FrameName + DisplayViaFillEntry, m_DisplayOptions.m_DisplayViaFill );
aCfg->Write( m_FrameName + DisplayPadNumberEntry, m_DisplayOptions.m_DisplayPadNum ); aCfg->Write( m_FrameName + DisplayPadNumberEntry, m_DisplayOptions.m_DisplayPadNum );
aCfg->Write( m_FrameName + DisplayModuleEdgeEntry, ( long )m_DisplayOptions.m_DisplayModEdge ); aCfg->Write( m_FrameName + DisplayModuleEdgeEntry, m_DisplayOptions.m_DisplayModEdgeFill );
aCfg->Write( m_FrameName + DisplayModuleTextEntry, ( long )m_DisplayOptions.m_DisplayModText ); aCfg->Write( m_FrameName + DisplayModuleTextEntry, m_DisplayOptions.m_DisplayModTextFill );
aCfg->Write( m_FrameName + FastGrid1Entry, ( long )m_FastGrid1 ); aCfg->Write( m_FrameName + FastGrid1Entry, ( long )m_FastGrid1 );
aCfg->Write( m_FrameName + FastGrid2Entry, ( long )m_FastGrid2 ); aCfg->Write( m_FrameName + FastGrid2Entry, ( long )m_FastGrid2 );
} }

View File

@ -6,11 +6,11 @@
/* /*
* This program source code file is part of KiCad, a free EDA CAD application. * This program source code file is part of KiCad, a free EDA CAD application.
* *
* Copyright (C) 2012 Jean-Pierre Charras, jean-pierre.charras@ujf-grenoble.fr * Copyright (C) 2015 Jean-Pierre Charras, jp.charras at wanadoo.fr
* Copyright (C) 2012 SoftPLC Corporation, Dick Hollenbeck <dick@softplc.com> * Copyright (C) 2012 SoftPLC Corporation, Dick Hollenbeck <dick@softplc.com>
* Copyright (C) 2011 Wayne Stambaugh <stambaughw@verizon.net> * Copyright (C) 2011 Wayne Stambaugh <stambaughw@verizon.net>
* *
* Copyright (C) 1992-2012 KiCad Developers, see AUTHORS.txt for contributors. * Copyright (C) 1992-2015 KiCad Developers, see AUTHORS.txt for contributors.
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License * modify it under the terms of the GNU General Public License
@ -303,7 +303,7 @@ void BOARD::PopHighLight()
} }
bool BOARD::SetLayer( LAYER_ID aIndex, const LAYER& aLayer ) bool BOARD::SetLayerDescr( LAYER_ID aIndex, const LAYER& aLayer )
{ {
if( unsigned( aIndex ) < DIM( m_Layer ) ) if( unsigned( aIndex ) < DIM( m_Layer ) )
{ {
@ -1212,10 +1212,12 @@ SEARCH_RESULT BOARD::Visit( INSPECTOR* inspector, const void* testData,
NETINFO_ITEM* BOARD::FindNet( int aNetcode ) const NETINFO_ITEM* BOARD::FindNet( int aNetcode ) const
{ {
// the first valid netcode is 1 and the last is m_NetInfo.GetCount()-1. // the first valid netcode is 1 and the last is m_NetInfo.GetCount()-1.
// zero is reserved for "no connection" and is not used. // zero is reserved for "no connection" and is not actually a net.
// NULL is returned for non valid netcodes // NULL is returned for non valid netcodes
if( aNetcode == NETINFO_LIST::UNCONNECTED ) wxASSERT( m_NetInfo.GetNetCount() > 0 ); // net zero should exist
if( aNetcode == NETINFO_LIST::UNCONNECTED && m_NetInfo.GetNetCount() == 0 )
return &NETINFO_LIST::ORPHANED; return &NETINFO_LIST::ORPHANED;
else else
return m_NetInfo.GetNetItem( aNetcode ); return m_NetInfo.GetNetItem( aNetcode );
@ -2459,14 +2461,14 @@ void BOARD::ReplaceNetlist( NETLIST& aNetlist, bool aDeleteSinglePadNets,
} }
} }
// We need the pad list, for next tests.
// padlist is the list of pads, sorted by netname.
BuildListOfNets();
std::vector<D_PAD*> padlist = GetPads();
// If needed, remove the single pad nets: // If needed, remove the single pad nets:
if( aDeleteSinglePadNets && !aNetlist.IsDryRun() ) if( aDeleteSinglePadNets && !aNetlist.IsDryRun() )
{ {
BuildListOfNets();
std::vector<D_PAD*> padlist = GetPads();
// padlist is the list of pads, sorted by netname.
int count = 0; int count = 0;
wxString netname; wxString netname;
D_PAD* pad = NULL; D_PAD* pad = NULL;
@ -2482,6 +2484,28 @@ void BOARD::ReplaceNetlist( NETLIST& aNetlist, bool aDeleteSinglePadNets,
if( netname != pad->GetNetname() ) // End of net if( netname != pad->GetNetname() ) // End of net
{ {
if( previouspad && count == 1 ) if( previouspad && count == 1 )
{
// First, see if we have a copper zone attached to this pad.
// If so, this is not really a single pad net
for( int ii = 0; ii < GetAreaCount(); ii++ )
{
ZONE_CONTAINER* zone = GetArea( ii );
if( !zone->IsOnCopperLayer() )
continue;
if( zone->GetIsKeepout() )
continue;
if( zone->GetNet() == previouspad->GetNet() )
{
count++;
break;
}
}
if( count == 1 ) // Really one pad, and nothing else
{ {
if( aReporter && aReporter->ReportAll() ) if( aReporter && aReporter->ReportAll() )
{ {
@ -2494,6 +2518,8 @@ void BOARD::ReplaceNetlist( NETLIST& aNetlist, bool aDeleteSinglePadNets,
previouspad->SetNetCode( NETINFO_LIST::UNCONNECTED ); previouspad->SetNetCode( NETINFO_LIST::UNCONNECTED );
} }
}
netname = pad->GetNetname(); netname = pad->GetNetname();
count = 1; count = 1;
} }
@ -2515,6 +2541,10 @@ void BOARD::ReplaceNetlist( NETLIST& aNetlist, bool aDeleteSinglePadNets,
// They should exist in footprints, otherwise the footprint is wrong // They should exist in footprints, otherwise the footprint is wrong
// note also references or time stamps are updated, so we use only // note also references or time stamps are updated, so we use only
// the reference to find a footprint // the reference to find a footprint
//
// Also verify if zones have acceptable nets, i.e. nets with pads.
// Zone with no pad belongs to a "dead" net which happens after changes in schematic
// when no more pad use this net name.
if( aReporter && aReporter->ReportErrors() ) if( aReporter && aReporter->ReportErrors() )
{ {
wxString padname; wxString padname;
@ -2543,6 +2573,22 @@ void BOARD::ReplaceNetlist( NETLIST& aNetlist, bool aDeleteSinglePadNets,
aReporter->Report( msg ); aReporter->Report( msg );
} }
} }
// Test copper zones to detect "dead" nets (nets without any pad):
for( int ii = 0; ii < GetAreaCount(); ii++ )
{
ZONE_CONTAINER* zone = GetArea( ii );
if( !zone->IsOnCopperLayer() || zone->GetIsKeepout() )
continue;
if( zone->GetNet()->GetNodesCount() == 0 )
{
msg.Printf( _( "* Warning: copper zone (net name '%s'): net has no pad*\n" ),
GetChars( zone->GetNet()->GetNetname() ) );
aReporter->Report( msg );
}
}
} }
} }

View File

@ -661,7 +661,15 @@ public:
return LSET::Name( aLayerId ); return LSET::Name( aLayerId );
} }
bool SetLayer( LAYER_ID aIndex, const LAYER& aLayer ); /**
* Function SetLayerDescr
* returns the type of the copper layer given by aLayer.
*
* @param aIndex A layer index in m_Layer
* @param aLayer A reference to a LAYER description.
* @return false if the index was out of range.
*/
bool SetLayerDescr( LAYER_ID aIndex, const LAYER& aLayer );
/** /**
* Function GetLayerType * Function GetLayerType

View File

@ -1,9 +1,9 @@
/* /*
* This program source code file is part of KiCad, a free EDA CAD application. * This program source code file is part of KiCad, a free EDA CAD application.
* *
* Copyright (C) 2012 Jean-Pierre Charras, jean-pierre.charras@ujf-grenoble.fr * Copyright (C) 2015 Jean-Pierre Charras, jp.charras at wanadoo.fr
* Copyright (C) 2012 SoftPLC Corporation, Dick Hollenbeck <dick@softplc.com> * Copyright (C) 2012 SoftPLC Corporation, Dick Hollenbeck <dick@softplc.com>
* Copyright (C) 1992-2012 KiCad Developers, see AUTHORS.txt for contributors. * Copyright (C) 1992-2015 KiCad Developers, see AUTHORS.txt for contributors.
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License * modify it under the terms of the GNU General Public License
@ -50,10 +50,10 @@ BOARD_CONNECTED_ITEM::BOARD_CONNECTED_ITEM( const BOARD_CONNECTED_ITEM& aItem )
void BOARD_CONNECTED_ITEM::SetNetCode( int aNetCode ) void BOARD_CONNECTED_ITEM::SetNetCode( int aNetCode )
{ {
assert( aNetCode >= 0 ); // assert( aNetCode >= 0 );
BOARD* board = GetBoard(); BOARD* board = GetBoard();
if( board ) if( ( aNetCode >= 0 ) && board )
m_netinfo = board->FindNet( aNetCode ); m_netinfo = board->FindNet( aNetCode );
else else
m_netinfo = &NETINFO_LIST::ORPHANED; m_netinfo = &NETINFO_LIST::ORPHANED;

View File

@ -1,7 +1,7 @@
/* /*
* This program source code file is part of KiCad, a free EDA CAD application. * This program source code file is part of KiCad, a free EDA CAD application.
* *
* Copyright (C) 1992-2012 KiCad Developers, see AUTHORS.txt for contributors. * Copyright (C) 1992-2015 KiCad Developers, see AUTHORS.txt for contributors.
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License * modify it under the terms of the GNU General Public License
@ -96,16 +96,28 @@ BOARD_DESIGN_SETTINGS::BOARD_DESIGN_SETTINGS() :
// The final margin is the sum of these 2 values // The final margin is the sum of these 2 values
// Usually < 0 because the mask is smaller than pad // Usually < 0 because the mask is smaller than pad
m_ModuleTextSize = wxSize( DEFAULT_TEXT_MODULE_SIZE,
DEFAULT_TEXT_MODULE_SIZE );
m_ModuleTextWidth = DEFAULT_GR_MODULE_THICKNESS;
m_ModuleSegmentWidth = DEFAULT_GR_MODULE_THICKNESS;
// Layer thickness for 3D viewer // Layer thickness for 3D viewer
m_boardThickness = Millimeter2iu( DEFAULT_BOARD_THICKNESS_MM ); m_boardThickness = Millimeter2iu( DEFAULT_BOARD_THICKNESS_MM );
m_viaSizeIndex = 0; m_viaSizeIndex = 0;
m_trackWidthIndex = 0; m_trackWidthIndex = 0;
// Default values for the footprint editor and fp creation
// (also covers footprints created on the fly by micor-waves tools)
m_ModuleTextSize = wxSize( DEFAULT_TEXT_MODULE_SIZE,
DEFAULT_TEXT_MODULE_SIZE );
m_ModuleTextWidth = DEFAULT_GR_MODULE_THICKNESS;
m_ModuleSegmentWidth = DEFAULT_GR_MODULE_THICKNESS;
// These values will be overriden by config values after reading the config
// Default ref text on fp creation. if empty, use footprint name as default
m_RefDefaultText = wxT( "REF**" );
m_RefDefaultVisibility = true; // Default ref text visibility on fp creation
m_RefDefaultlayer = int( F_SilkS ); // Default ref text layer on fp creation
// Default value text on fp creation. if empty, use footprint name as default
m_ValueDefaultText = wxEmptyString;
m_ValueDefaultVisibility = true;
m_ValueDefaultlayer = int( F_Fab );
} }
// Add parameters to save in project config. // Add parameters to save in project config.

View File

@ -334,7 +334,6 @@ void DIMENSION::AdjustDimensionDetails( bool aDoNotChangeText )
void DIMENSION::Draw( EDA_DRAW_PANEL* panel, wxDC* DC, GR_DRAWMODE mode_color, void DIMENSION::Draw( EDA_DRAW_PANEL* panel, wxDC* DC, GR_DRAWMODE mode_color,
const wxPoint& offset ) const wxPoint& offset )
{ {
int typeaff, width;
EDA_COLOR_T gcolor; EDA_COLOR_T gcolor;
BOARD* brd = GetBoard(); BOARD* brd = GetBoard();
@ -347,18 +346,11 @@ void DIMENSION::Draw( EDA_DRAW_PANEL* panel, wxDC* DC, GR_DRAWMODE mode_color,
GRSetDrawMode( DC, mode_color ); GRSetDrawMode( DC, mode_color );
DISPLAY_OPTIONS* displ_opts = (DISPLAY_OPTIONS*)panel->GetDisplayOptions(); DISPLAY_OPTIONS* displ_opts = (DISPLAY_OPTIONS*)panel->GetDisplayOptions();
typeaff = displ_opts ? displ_opts->m_DisplayDrawItems : FILLED; bool filled = displ_opts ? displ_opts->m_DisplayDrawItemsFill : FILLED;
width = m_Width; int width = m_Width;
if( DC->LogicalToDeviceXRel( width ) <= MIN_DRAW_WIDTH ) if( filled )
typeaff = LINE;
switch( typeaff )
{ {
case LINE:
width = 0;
case FILLED:
GRLine( panel->GetClipBox(), DC, m_crossBarO + offset, GRLine( panel->GetClipBox(), DC, m_crossBarO + offset,
m_crossBarF + offset, width, gcolor ); m_crossBarF + offset, width, gcolor );
GRLine( panel->GetClipBox(), DC, m_featureLineGO + offset, GRLine( panel->GetClipBox(), DC, m_featureLineGO + offset,
@ -373,9 +365,9 @@ void DIMENSION::Draw( EDA_DRAW_PANEL* panel, wxDC* DC, GR_DRAWMODE mode_color,
m_arrowG1F + offset, width, gcolor ); m_arrowG1F + offset, width, gcolor );
GRLine( panel->GetClipBox(), DC, m_crossBarO + offset, GRLine( panel->GetClipBox(), DC, m_crossBarO + offset,
m_arrowG2F + offset, width, gcolor ); m_arrowG2F + offset, width, gcolor );
break; }
else
case SKETCH: {
GRCSegm( panel->GetClipBox(), DC, m_crossBarO + offset, GRCSegm( panel->GetClipBox(), DC, m_crossBarO + offset,
m_crossBarF + offset, width, gcolor ); m_crossBarF + offset, width, gcolor );
GRCSegm( panel->GetClipBox(), DC, m_featureLineGO + offset, GRCSegm( panel->GetClipBox(), DC, m_featureLineGO + offset,
@ -390,7 +382,6 @@ void DIMENSION::Draw( EDA_DRAW_PANEL* panel, wxDC* DC, GR_DRAWMODE mode_color,
m_arrowG1F + offset, width, gcolor ); m_arrowG1F + offset, width, gcolor );
GRCSegm( panel->GetClipBox(), DC, m_crossBarO + offset, GRCSegm( panel->GetClipBox(), DC, m_crossBarO + offset,
m_arrowG2F + offset, width, gcolor ); m_arrowG2F + offset, width, gcolor );
break;
} }
} }

View File

@ -170,7 +170,6 @@ void DRAWSEGMENT::Draw( EDA_DRAW_PANEL* panel, wxDC* DC, GR_DRAWMODE draw_mode,
{ {
int ux0, uy0, dx, dy; int ux0, uy0, dx, dy;
int l_trace; int l_trace;
int mode;
int radius; int radius;
LAYER_ID curr_layer = ( (PCB_SCREEN*) panel->GetScreen() )->m_Active_Layer; LAYER_ID curr_layer = ( (PCB_SCREEN*) panel->GetScreen() )->m_Active_Layer;
@ -202,31 +201,24 @@ void DRAWSEGMENT::Draw( EDA_DRAW_PANEL* panel, wxDC* DC, GR_DRAWMODE draw_mode,
dx = m_End.x + aOffset.x; dx = m_End.x + aOffset.x;
dy = m_End.y + aOffset.y; dy = m_End.y + aOffset.y;
mode = displ_opts ? displ_opts->m_DisplayDrawItems : FILLED; bool filled = displ_opts ? displ_opts->m_DisplayDrawItemsFill : FILLED;
if( m_Flags & FORCE_SKETCH ) if( m_Flags & FORCE_SKETCH )
mode = SKETCH; filled = SKETCH;
if( DC->LogicalToDeviceXRel( l_trace ) <= MIN_DRAW_WIDTH )
mode = LINE;
switch( m_Shape ) switch( m_Shape )
{ {
case S_CIRCLE: case S_CIRCLE:
radius = KiROUND( Distance( ux0, uy0, dx, dy ) ); radius = KiROUND( Distance( ux0, uy0, dx, dy ) );
if( mode == LINE ) if( filled )
{ {
GRCircle( panel->GetClipBox(), DC, ux0, uy0, radius, color ); GRCircle( panel->GetClipBox(), DC, ux0, uy0, radius, m_Width, color );
}
else if( mode == SKETCH )
{
GRCircle( panel->GetClipBox(), DC, ux0, uy0, radius - l_trace, color );
GRCircle( panel->GetClipBox(), DC, ux0, uy0, radius + l_trace, color );
} }
else else
{ {
GRCircle( panel->GetClipBox(), DC, ux0, uy0, radius, m_Width, color ); GRCircle( panel->GetClipBox(), DC, ux0, uy0, radius - l_trace, color );
GRCircle( panel->GetClipBox(), DC, ux0, uy0, radius + l_trace, color );
} }
break; break;
@ -248,22 +240,19 @@ void DRAWSEGMENT::Draw( EDA_DRAW_PANEL* panel, wxDC* DC, GR_DRAWMODE draw_mode,
EXCHG( StAngle, EndAngle ); EXCHG( StAngle, EndAngle );
} }
if( mode == LINE ) if( filled )
{ {
GRArc( panel->GetClipBox(), DC, ux0, uy0, StAngle, EndAngle, radius, color ); GRArc( panel->GetClipBox(), DC, ux0, uy0, StAngle, EndAngle,
radius, m_Width, color );
} }
else if( mode == SKETCH ) else
{ {
GRArc( panel->GetClipBox(), DC, ux0, uy0, StAngle, EndAngle, GRArc( panel->GetClipBox(), DC, ux0, uy0, StAngle, EndAngle,
radius - l_trace, color ); radius - l_trace, color );
GRArc( panel->GetClipBox(), DC, ux0, uy0, StAngle, EndAngle, GRArc( panel->GetClipBox(), DC, ux0, uy0, StAngle, EndAngle,
radius + l_trace, color ); radius + l_trace, color );
} }
else
{
GRArc( panel->GetClipBox(), DC, ux0, uy0, StAngle, EndAngle,
radius, m_Width, color );
}
break; break;
case S_CURVE: case S_CURVE:
@ -271,23 +260,16 @@ void DRAWSEGMENT::Draw( EDA_DRAW_PANEL* panel, wxDC* DC, GR_DRAWMODE draw_mode,
for( unsigned int i=1; i < m_BezierPoints.size(); i++ ) for( unsigned int i=1; i < m_BezierPoints.size(); i++ )
{ {
if( mode == LINE ) if( filled )
{ {
GRLine( panel->GetClipBox(), DC, GRFillCSegm( panel->GetClipBox(), DC,
m_BezierPoints[i].x, m_BezierPoints[i].y,
m_BezierPoints[i-1].x, m_BezierPoints[i-1].y, 0,
color );
}
else if( mode == SKETCH )
{
GRCSegm( panel->GetClipBox(), DC,
m_BezierPoints[i].x, m_BezierPoints[i].y, m_BezierPoints[i].x, m_BezierPoints[i].y,
m_BezierPoints[i-1].x, m_BezierPoints[i-1].y, m_BezierPoints[i-1].x, m_BezierPoints[i-1].y,
m_Width, color ); m_Width, color );
} }
else else
{ {
GRFillCSegm( panel->GetClipBox(), DC, GRCSegm( panel->GetClipBox(), DC,
m_BezierPoints[i].x, m_BezierPoints[i].y, m_BezierPoints[i].x, m_BezierPoints[i].y,
m_BezierPoints[i-1].x, m_BezierPoints[i-1].y, m_BezierPoints[i-1].x, m_BezierPoints[i-1].y,
m_Width, color ); m_Width, color );
@ -297,17 +279,13 @@ void DRAWSEGMENT::Draw( EDA_DRAW_PANEL* panel, wxDC* DC, GR_DRAWMODE draw_mode,
break; break;
default: default:
if( mode == LINE ) if( filled )
{ {
GRLine( panel->GetClipBox(), DC, ux0, uy0, dx, dy, 0, color ); GRFillCSegm( panel->GetClipBox(), DC, ux0, uy0, dx, dy, m_Width, color );
}
else if( mode == SKETCH )
{
GRCSegm( panel->GetClipBox(), DC, ux0, uy0, dx, dy, m_Width, color );
} }
else else
{ {
GRFillCSegm( panel->GetClipBox(), DC, ux0, uy0, dx, dy, m_Width, color ); GRCSegm( panel->GetClipBox(), DC, ux0, uy0, dx, dy, m_Width, color );
} }
break; break;

View File

@ -157,8 +157,11 @@ public:
*/ */
MODULE* GetParentModule() const; MODULE* GetParentModule() const;
const std::vector<wxPoint>& GetBezierPoints() const { return m_BezierPoints; }; // Accessors:
const std::vector<wxPoint>& GetPolyPoints() const { return m_PolyPoints; }; const std::vector<wxPoint>& GetBezierPoints() const { return m_BezierPoints; }
const std::vector<wxPoint>& GetPolyPoints() const { return m_PolyPoints; }
// same accessor, to add/change corners of the polygon
std::vector<wxPoint>& GetPolyPoints() { return m_PolyPoints; }
void SetBezierPoints( const std::vector<wxPoint>& aPoints ) void SetBezierPoints( const std::vector<wxPoint>& aPoints )
{ {

View File

@ -2,7 +2,7 @@
* This program source code file is part of KiCad, a free EDA CAD application. * This program source code file is part of KiCad, a free EDA CAD application.
* *
* Copyright (C) 2007 Dick Hollenbeck, dick@softplc.com * Copyright (C) 2007 Dick Hollenbeck, dick@softplc.com
* Copyright (C) 2007 KiCad Developers, see change_log.txt for contributors. * Copyright (C) 2015 KiCad Developers, see change_log.txt for contributors.
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License * modify it under the terms of the GNU General Public License
@ -75,8 +75,10 @@ wxString DRC_ITEM::GetErrorText() const
return wxString( _( "Copper area inside copper area" ) ); return wxString( _( "Copper area inside copper area" ) );
case COPPERAREA_CLOSE_TO_COPPERAREA: case COPPERAREA_CLOSE_TO_COPPERAREA:
return wxString( _( "Copper areas intersect or are too close" ) ); return wxString( _( "Copper areas intersect or are too close" ) );
case DRCE_NON_EXISTANT_NET_FOR_ZONE_OUTLINE:
return wxString( _( "Copper area has a nonexistent net name" ) ); case DRCE_SUSPICIOUS_NET_FOR_ZONE_OUTLINE:
return wxString( _( "Copper area belongs a net which has no pads. This is strange" ) );
case DRCE_HOLE_NEAR_PAD: case DRCE_HOLE_NEAR_PAD:
return wxString( _( "Hole near pad" ) ); return wxString( _( "Hole near pad" ) );
case DRCE_HOLE_NEAR_TRACK: case DRCE_HOLE_NEAR_TRACK:

View File

@ -130,7 +130,6 @@ void EDGE_MODULE::Draw( EDA_DRAW_PANEL* panel, wxDC* DC, GR_DRAWMODE draw_mode,
const wxPoint& offset ) const wxPoint& offset )
{ {
int ux0, uy0, dx, dy, radius, StAngle, EndAngle; int ux0, uy0, dx, dy, radius, StAngle, EndAngle;
int typeaff;
LAYER_ID curr_layer = ( (PCB_SCREEN*) panel->GetScreen() )->m_Active_Layer; LAYER_ID curr_layer = ( (PCB_SCREEN*) panel->GetScreen() )->m_Active_Layer;
MODULE* module = (MODULE*) m_Parent; MODULE* module = (MODULE*) m_Parent;
@ -159,25 +158,15 @@ void EDGE_MODULE::Draw( EDA_DRAW_PANEL* panel, wxDC* DC, GR_DRAWMODE draw_mode,
dy = m_End.y - offset.y; dy = m_End.y - offset.y;
GRSetDrawMode( DC, draw_mode ); GRSetDrawMode( DC, draw_mode );
typeaff = displ_opts ? displ_opts->m_DisplayModEdge : FILLED; bool filled = displ_opts ? displ_opts->m_DisplayModEdgeFill : FILLED;
if( IsCopperLayer( m_Layer ) ) if( IsCopperLayer( m_Layer ) )
{ filled = displ_opts ? displ_opts->m_DisplayPcbTrackFill : FILLED;
typeaff = displ_opts ? displ_opts->m_DisplayPcbTrackFill : FILLED;
if( !typeaff )
typeaff = SKETCH;
}
if( DC->LogicalToDeviceXRel( m_Width ) <= MIN_DRAW_WIDTH )
typeaff = LINE;
switch( m_Shape ) switch( m_Shape )
{ {
case S_SEGMENT: case S_SEGMENT:
if( typeaff == LINE ) if( filled )
GRLine( panel->GetClipBox(), DC, ux0, uy0, dx, dy, 0, color );
else if( typeaff == FILLED )
GRLine( panel->GetClipBox(), DC, ux0, uy0, dx, dy, m_Width, color ); GRLine( panel->GetClipBox(), DC, ux0, uy0, dx, dy, m_Width, color );
else else
// SKETCH Mode // SKETCH Mode
@ -188,13 +177,7 @@ void EDGE_MODULE::Draw( EDA_DRAW_PANEL* panel, wxDC* DC, GR_DRAWMODE draw_mode,
case S_CIRCLE: case S_CIRCLE:
radius = KiROUND( Distance( ux0, uy0, dx, dy ) ); radius = KiROUND( Distance( ux0, uy0, dx, dy ) );
if( typeaff == LINE ) if( filled )
{
GRCircle( panel->GetClipBox(), DC, ux0, uy0, radius, color );
}
else
{
if( typeaff == FILLED )
{ {
GRCircle( panel->GetClipBox(), DC, ux0, uy0, radius, m_Width, color ); GRCircle( panel->GetClipBox(), DC, ux0, uy0, radius, m_Width, color );
} }
@ -203,7 +186,6 @@ void EDGE_MODULE::Draw( EDA_DRAW_PANEL* panel, wxDC* DC, GR_DRAWMODE draw_mode,
GRCircle( panel->GetClipBox(), DC, ux0, uy0, radius + (m_Width / 2), color ); GRCircle( panel->GetClipBox(), DC, ux0, uy0, radius + (m_Width / 2), color );
GRCircle( panel->GetClipBox(), DC, ux0, uy0, radius - (m_Width / 2), color ); GRCircle( panel->GetClipBox(), DC, ux0, uy0, radius - (m_Width / 2), color );
} }
}
break; break;
@ -223,11 +205,7 @@ void EDGE_MODULE::Draw( EDA_DRAW_PANEL* panel, wxDC* DC, GR_DRAWMODE draw_mode,
EXCHG( StAngle, EndAngle ); EXCHG( StAngle, EndAngle );
} }
if( typeaff == LINE ) if( filled )
{
GRArc( panel->GetClipBox(), DC, ux0, uy0, StAngle, EndAngle, radius, color );
}
else if( typeaff == FILLED )
{ {
GRArc( panel->GetClipBox(), DC, ux0, uy0, StAngle, EndAngle, radius, m_Width, color ); GRArc( panel->GetClipBox(), DC, ux0, uy0, StAngle, EndAngle, radius, m_Width, color );
} }

View File

@ -89,7 +89,6 @@ void PCB_TARGET::Draw( EDA_DRAW_PANEL* panel, wxDC* DC, GR_DRAWMODE mode_color,
{ {
int radius, ox, oy, width; int radius, ox, oy, width;
int dx1, dx2, dy1, dy2; int dx1, dx2, dy1, dy2;
int typeaff;
ox = m_Pos.x + offset.x; ox = m_Pos.x + offset.x;
oy = m_Pos.y + offset.y; oy = m_Pos.y + offset.y;
@ -103,29 +102,20 @@ void PCB_TARGET::Draw( EDA_DRAW_PANEL* panel, wxDC* DC, GR_DRAWMODE mode_color,
GRSetDrawMode( DC, mode_color ); GRSetDrawMode( DC, mode_color );
DISPLAY_OPTIONS* displ_opts = (DISPLAY_OPTIONS*)panel->GetDisplayOptions(); DISPLAY_OPTIONS* displ_opts = (DISPLAY_OPTIONS*)panel->GetDisplayOptions();
typeaff = displ_opts ? displ_opts->m_DisplayDrawItems : FILLED; bool filled = displ_opts ? displ_opts->m_DisplayDrawItemsFill : FILLED;
width = m_Width; width = m_Width;
if( DC->LogicalToDeviceXRel( width ) <= MIN_DRAW_WIDTH )
typeaff = LINE;
radius = m_Size / 3; radius = m_Size / 3;
if( GetShape() ) // shape X if( GetShape() ) // shape X
radius = m_Size / 2; radius = m_Size / 2;
switch( typeaff ) if( filled )
{
case LINE:
width = 0;
case FILLED:
GRCircle( panel->GetClipBox(), DC, ox, oy, radius, width, gcolor ); GRCircle( panel->GetClipBox(), DC, ox, oy, radius, width, gcolor );
break; else
{
case SKETCH:
GRCircle( panel->GetClipBox(), DC, ox, oy, radius + (width / 2), gcolor ); GRCircle( panel->GetClipBox(), DC, ox, oy, radius + (width / 2), gcolor );
GRCircle( panel->GetClipBox(), DC, ox, oy, radius - (width / 2), gcolor ); GRCircle( panel->GetClipBox(), DC, ox, oy, radius - (width / 2), gcolor );
break;
} }
@ -142,18 +132,15 @@ void PCB_TARGET::Draw( EDA_DRAW_PANEL* panel, wxDC* DC, GR_DRAWMODE mode_color,
dy2 = -dy1; dy2 = -dy1;
} }
switch( typeaff ) if( filled )
{ {
case LINE:
case FILLED:
GRLine( panel->GetClipBox(), DC, ox - dx1, oy - dy1, ox + dx1, oy + dy1, width, gcolor ); GRLine( panel->GetClipBox(), DC, ox - dx1, oy - dy1, ox + dx1, oy + dy1, width, gcolor );
GRLine( panel->GetClipBox(), DC, ox - dx2, oy - dy2, ox + dx2, oy + dy2, width, gcolor ); GRLine( panel->GetClipBox(), DC, ox - dx2, oy - dy2, ox + dx2, oy + dy2, width, gcolor );
break; }
else
case SKETCH: {
GRCSegm( panel->GetClipBox(), DC, ox - dx1, oy - dy1, ox + dx1, oy + dy1, width, gcolor ); GRCSegm( panel->GetClipBox(), DC, ox - dx1, oy - dy1, ox + dx1, oy + dy1, width, gcolor );
GRCSegm( panel->GetClipBox(), DC, ox - dx2, oy - dy2, ox + dx2, oy + dy2, width, gcolor ); GRCSegm( panel->GetClipBox(), DC, ox - dx2, oy - dy2, ox + dx2, oy + dy2, width, gcolor );
break;
} }
} }

View File

@ -320,7 +320,7 @@ public:
return NULL; return NULL;
} }
///> Constant that holds the unconnected net number ///> Constant that holds the unconnected net number (typically 0)
static const int UNCONNECTED; static const int UNCONNECTED;
///> NETINFO_ITEM meaning that there was no net assigned for an item, as there was no ///> NETINFO_ITEM meaning that there was no net assigned for an item, as there was no

View File

@ -80,10 +80,7 @@ void NETINFO_ITEM::Draw( EDA_DRAW_PANEL* panel,
void NETINFO_ITEM::GetMsgPanelInfo( std::vector< MSG_PANEL_ITEM >& aList ) void NETINFO_ITEM::GetMsgPanelInfo( std::vector< MSG_PANEL_ITEM >& aList )
{ {
int count;
wxString txt; wxString txt;
MODULE* module;
D_PAD* pad;
double lengthnet = 0.0; // This is the lenght of tracks on pcb double lengthnet = 0.0; // This is the lenght of tracks on pcb
double lengthPadToDie = 0.0; // this is the lenght of internal ICs connections double lengthPadToDie = 0.0; // this is the lenght of internal ICs connections
@ -92,12 +89,17 @@ void NETINFO_ITEM::GetMsgPanelInfo( std::vector< MSG_PANEL_ITEM >& aList )
txt.Printf( wxT( "%d" ), GetNet() ); txt.Printf( wxT( "%d" ), GetNet() );
aList.push_back( MSG_PANEL_ITEM( _( "Net Code" ), txt, RED ) ); aList.push_back( MSG_PANEL_ITEM( _( "Net Code" ), txt, RED ) );
count = 0; // Warning: for netcode == NETINFO_LIST::ORPHANED, the parent or the board
module = m_parent->GetBoard()->m_Modules; // can be NULL
BOARD * board = m_parent ? m_parent->GetBoard() : NULL;
for( ; module != 0; module = module->Next() ) if( board == NULL )
return;
int count = 0;
for( MODULE* module = board->m_Modules; module != NULL; module = module->Next() )
{ {
for( pad = module->Pads(); pad != 0; pad = pad->Next() ) for( D_PAD* pad = module->Pads(); pad != 0; pad = pad->Next() )
{ {
if( pad->GetNetCode() == GetNet() ) if( pad->GetNetCode() == GetNet() )
{ {
@ -112,7 +114,7 @@ void NETINFO_ITEM::GetMsgPanelInfo( std::vector< MSG_PANEL_ITEM >& aList )
count = 0; count = 0;
for( const TRACK *track = m_parent->GetBoard()->m_Track; track != NULL; track = track->Next() ) for( const TRACK *track = board->m_Track; track != NULL; track = track->Next() )
{ {
if( track->Type() == PCB_VIA_T ) if( track->Type() == PCB_VIA_T )
{ {

View File

@ -257,7 +257,7 @@ void PCB_LAYER_WIDGET::ReFillRender()
{ {
LAYER_WIDGET::ROW renderRow = s_render_rows[row]; LAYER_WIDGET::ROW renderRow = s_render_rows[row];
if( !isAllowedInFpMode( renderRow.id ) ) if( m_fp_editor_mode && !isAllowedInFpMode( renderRow.id ) )
continue; continue;
renderRow.tooltip = wxGetTranslation( s_render_rows[row].tooltip ); renderRow.tooltip = wxGetTranslation( s_render_rows[row].tooltip );
@ -284,7 +284,7 @@ void PCB_LAYER_WIDGET::SyncRenderStates()
{ {
int rowId = s_render_rows[row].id; int rowId = s_render_rows[row].id;
if( !isAllowedInFpMode( rowId ) ) if( m_fp_editor_mode && !isAllowedInFpMode( rowId ) )
continue; continue;
// this does not fire a UI event // this does not fire a UI event

View File

@ -74,7 +74,7 @@ void TEXTE_PCB::Copy( TEXTE_PCB* source )
m_Bold = source->m_Bold; m_Bold = source->m_Bold;
m_HJustify = source->m_HJustify; m_HJustify = source->m_HJustify;
m_VJustify = source->m_VJustify; m_VJustify = source->m_VJustify;
m_MultilineAllowed = m_MultilineAllowed; m_MultilineAllowed = source->m_MultilineAllowed;
m_Text = source->m_Text; m_Text = source->m_Text;
} }
@ -93,7 +93,7 @@ void TEXTE_PCB::Draw( EDA_DRAW_PANEL* panel, wxDC* DC,
EDA_DRAW_MODE_T fillmode = FILLED; EDA_DRAW_MODE_T fillmode = FILLED;
DISPLAY_OPTIONS* displ_opts = (DISPLAY_OPTIONS*)panel->GetDisplayOptions(); DISPLAY_OPTIONS* displ_opts = (DISPLAY_OPTIONS*)panel->GetDisplayOptions();
if( displ_opts && displ_opts->m_DisplayDrawItems == SKETCH ) if( displ_opts && displ_opts->m_DisplayDrawItemsFill == SKETCH )
fillmode = SKETCH; fillmode = SKETCH;
EDA_COLOR_T anchor_color = UNSPECIFIED_COLOR; EDA_COLOR_T anchor_color = UNSPECIFIED_COLOR;

View File

@ -268,6 +268,7 @@ void TEXTE_MODULE::Draw( EDA_DRAW_PANEL* panel, wxDC* DC, GR_DRAWMODE draw_mode,
* hiding. * hiding.
* If the whole module side is disabled this isn't even called */ * If the whole module side is disabled this isn't even called */
LAYER_ID text_layer = GetLayer(); LAYER_ID text_layer = GetLayer();
if( (IsFrontLayer( text_layer ) && !brd->IsElementVisible( MOD_TEXT_FR_VISIBLE )) || if( (IsFrontLayer( text_layer ) && !brd->IsElementVisible( MOD_TEXT_FR_VISIBLE )) ||
(IsBackLayer( text_layer ) && !brd->IsElementVisible( MOD_TEXT_BK_VISIBLE )) ) (IsBackLayer( text_layer ) && !brd->IsElementVisible( MOD_TEXT_BK_VISIBLE )) )
return; return;
@ -289,10 +290,8 @@ void TEXTE_MODULE::Draw( EDA_DRAW_PANEL* panel, wxDC* DC, GR_DRAWMODE draw_mode,
// Draw mode compensation for the width // Draw mode compensation for the width
DISPLAY_OPTIONS* displ_opts = (DISPLAY_OPTIONS*)panel->GetDisplayOptions(); DISPLAY_OPTIONS* displ_opts = (DISPLAY_OPTIONS*)panel->GetDisplayOptions();
int width = m_Thickness; int width = m_Thickness;
if( ( displ_opts && displ_opts->m_DisplayModText == LINE )
|| ( DC->LogicalToDeviceXRel( width ) <= MIN_DRAW_WIDTH ) ) if( displ_opts && displ_opts->m_DisplayModTextFill == SKETCH )
width = 0;
else if( displ_opts && displ_opts->m_DisplayModText == SKETCH )
width = -width; width = -width;
GRSetDrawMode( DC, draw_mode ); GRSetDrawMode( DC, draw_mode );

View File

@ -1,9 +1,9 @@
/* /*
* This program source code file is part of KiCad, a free EDA CAD application. * This program source code file is part of KiCad, a free EDA CAD application.
* *
* Copyright (C) 2012 Jean-Pierre Charras, jean-pierre.charras@ujf-grenoble.fr * Copyright (C) 2015 Jean-Pierre Charras, jp.charras at wanadoo.fr
* Copyright (C) 2012 SoftPLC Corporation, Dick Hollenbeck <dick@softplc.com> * Copyright (C) 2012 SoftPLC Corporation, Dick Hollenbeck <dick@softplc.com>
* Copyright (C) 1992-2012 KiCad Developers, see AUTHORS.txt for contributors. * Copyright (C) 1992-2015 KiCad Developers, see AUTHORS.txt for contributors.
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License * modify it under the terms of the GNU General Public License
@ -625,27 +625,21 @@ void ZONE_CONTAINER::GetMsgPanelInfo( std::vector< MSG_PANEL_ITEM >& aList )
{ {
if( GetNetCode() >= 0 ) if( GetNetCode() >= 0 )
{ {
NETINFO_ITEM* equipot = GetNet(); NETINFO_ITEM* net = GetNet();
if( equipot ) if( net )
msg = equipot->GetNetname(); msg = net->GetNetname();
else else // Should not occur
msg = wxT( "<noname>" ); msg = _( "<unknown>" );
} }
else // a netcode < 0 is an error else // a netcode < 0 is an error
{ msg = wxT( "<error>" );
msg = wxT( " [" );
msg << GetNetname() + wxT( "]" );
msg << wxT( " <" ) << _( "Not Found" ) << wxT( ">" );
}
aList.push_back( MSG_PANEL_ITEM( _( "NetName" ), msg, RED ) ); aList.push_back( MSG_PANEL_ITEM( _( "NetName" ), msg, RED ) );
#if 1
// Display net code : (useful in test or debug) // Display net code : (useful in test or debug)
msg.Printf( wxT( "%d" ), GetNetCode() ); msg.Printf( wxT( "%d" ), GetNetCode() );
aList.push_back( MSG_PANEL_ITEM( _( "NetCode" ), msg, RED ) ); aList.push_back( MSG_PANEL_ITEM( _( "NetCode" ), msg, RED ) );
#endif
// Display priority level // Display priority level
msg.Printf( wxT( "%d" ), GetPriority() ); msg.Printf( wxT( "%d" ), GetPriority() );

View File

@ -2,8 +2,8 @@
/* /*
* This program source code file is part of KiCad, a free EDA CAD application. * This program source code file is part of KiCad, a free EDA CAD application.
* *
* Copyright (C) 2004 Jean-Pierre Charras, jaen-pierre.charras@gipsa-lab.inpg.com * Copyright (C) 2015 Jean-Pierre Charras, jp.charras at wanadoo.fr
* Copyright (C) 1992-2011 KiCad Developers, see AUTHORS.txt for contributors. * Copyright (C) 1992-2015 KiCad Developers, see AUTHORS.txt for contributors.
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License * modify it under the terms of the GNU General Public License
@ -578,7 +578,6 @@ public:
void SetDoNotAllowVias( bool aEnable ) { m_doNotAllowVias = aEnable; } void SetDoNotAllowVias( bool aEnable ) { m_doNotAllowVias = aEnable; }
void SetDoNotAllowTracks( bool aEnable ) { m_doNotAllowTracks = aEnable; } void SetDoNotAllowTracks( bool aEnable ) { m_doNotAllowTracks = aEnable; }
#if defined(DEBUG) #if defined(DEBUG)
virtual void Show( int nestLevel, std::ostream& os ) const { ShowDummy( os ); } // override virtual void Show( int nestLevel, std::ostream& os ) const { ShowDummy( os ); } // override
#endif #endif
@ -632,8 +631,8 @@ private:
/// The index of the corner being moved or -1 if no corner is selected. /// The index of the corner being moved or -1 if no corner is selected.
int m_CornerSelection; int m_CornerSelection;
int m_localFlgs; ///< Flags used in polygon calculations. /// Variable used in polygon calculations.
int m_localFlgs;
/** Segments used to fill the zone (#m_FillMode ==1 ), when fill zone by segment is used. /** Segments used to fill the zone (#m_FillMode ==1 ), when fill zone by segment is used.
* In this case the segments have #m_ZoneMinThickness width. * In this case the segments have #m_ZoneMinThickness width.

View File

@ -207,9 +207,9 @@ DISPLAY_OPTIONS::DISPLAY_OPTIONS()
m_DisplayPadNum = true; m_DisplayPadNum = true;
m_DisplayPadIsol = true; m_DisplayPadIsol = true;
m_DisplayModEdge = true; m_DisplayModEdgeFill = FILLED;
m_DisplayModText = true; m_DisplayModTextFill = FILLED;
m_DisplayPcbTrackFill = true; // false = sketch , true = filled m_DisplayPcbTrackFill = FILLED; // false = sketch , true = filled
m_ShowTrackClearanceMode = SHOW_CLEARANCE_NEW_TRACKS_AND_VIA_AREAS; m_ShowTrackClearanceMode = SHOW_CLEARANCE_NEW_TRACKS_AND_VIA_AREAS;
m_DisplayViaMode = VIA_HOLE_NOT_SHOW; m_DisplayViaMode = VIA_HOLE_NOT_SHOW;
@ -222,7 +222,7 @@ DISPLAY_OPTIONS::DISPLAY_OPTIONS()
* 1 show netnames on pads * 1 show netnames on pads
* 2 show netnames on tracks * 2 show netnames on tracks
* 3 show netnames on tracks and pads */ * 3 show netnames on tracks and pads */
m_DisplayDrawItems = true; m_DisplayDrawItemsFill = FILLED;
m_ContrastModeDisplay = false; m_ContrastModeDisplay = false;
m_MaxLinksShowed = 3; // in track creation: number of hairwires shown m_MaxLinksShowed = 3; // in track creation: number of hairwires shown
m_Show_Module_Ratsnest = true; // When moving a footprint: allows displaying a ratsnest m_Show_Module_Ratsnest = true; // When moving a footprint: allows displaying a ratsnest

View File

@ -294,6 +294,7 @@ const ZONE_CONTAINER* TRACKS_CLEANER::zoneForTrackEndpoint( const TRACK *aTrack,
top_layer = aTrack->GetLayer(); top_layer = aTrack->GetLayer();
bottom_layer = top_layer; bottom_layer = top_layer;
} }
return m_Brd->HitTestForAnyFilledArea( aTrack->GetEndPoint( aEndPoint ), return m_Brd->HitTestForAnyFilledArea( aTrack->GetEndPoint( aEndPoint ),
top_layer, bottom_layer, aTrack->GetNetCode() ); top_layer, bottom_layer, aTrack->GetNetCode() );
} }
@ -305,8 +306,8 @@ bool TRACKS_CLEANER::testTrackEndpointDangling( TRACK *aTrack, ENDPOINT_T aEndPo
bool flag_erase = false; bool flag_erase = false;
TRACK* other = aTrack->GetTrack( m_Brd->m_Track, NULL, aEndPoint, true, false ); TRACK* other = aTrack->GetTrack( m_Brd->m_Track, NULL, aEndPoint, true, false );
if( (other == NULL) &&
(zoneForTrackEndpoint( aTrack, aEndPoint ) == NULL) ) if( (other == NULL) && (zoneForTrackEndpoint( aTrack, aEndPoint ) == NULL) )
flag_erase = true; // Start endpoint is neither on pad, zone or other track flag_erase = true; // Start endpoint is neither on pad, zone or other track
else // segment, via or zone connected to this end else // segment, via or zone connected to this end
{ {
@ -336,6 +337,7 @@ bool TRACKS_CLEANER::testTrackEndpointDangling( TRACK *aTrack, ENDPOINT_T aEndPo
aTrack->SetState( BUSY, false ); aTrack->SetState( BUSY, false );
} }
} }
return flag_erase; return flag_erase;
} }

View File

@ -45,6 +45,7 @@ void PCB_EDIT_FRAME::ExecuteRemoteCommand( const char* cmdline )
wxPoint pos; wxPoint pos;
strncpy( line, cmdline, sizeof(line) - 1 ); strncpy( line, cmdline, sizeof(line) - 1 );
line[sizeof(line) - 1] = 0;
idcmd = strtok( line, " \n\r" ); idcmd = strtok( line, " \n\r" );
text = strtok( NULL, " \n\r" ); text = strtok( NULL, " \n\r" );

View File

@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Nov 6 2013) // C++ code generated with wxFormBuilder (version Jun 5 2014)
// http://www.wxformbuilder.org/ // http://www.wxformbuilder.org/
// //
// PLEASE DO "NOT" EDIT THIS FILE! // PLEASE DO "NOT" EDIT THIS FILE!
@ -54,8 +54,7 @@ DIALOG_DESIGN_RULES_BASE::DIALOG_DESIGN_RULES_BASE( wxWindow* parent, wxWindowID
m_grid->SetColLabelAlignment( wxALIGN_CENTRE, wxALIGN_CENTRE ); m_grid->SetColLabelAlignment( wxALIGN_CENTRE, wxALIGN_CENTRE );
// Rows // Rows
m_grid->AutoSizeRows(); m_grid->EnableDragRowSize( false );
m_grid->EnableDragRowSize( true );
m_grid->SetRowLabelSize( 120 ); m_grid->SetRowLabelSize( 120 );
m_grid->SetRowLabelValue( 0, _("Default") ); m_grid->SetRowLabelValue( 0, _("Default") );
m_grid->SetRowLabelAlignment( wxALIGN_LEFT, wxALIGN_CENTRE ); m_grid->SetRowLabelAlignment( wxALIGN_LEFT, wxALIGN_CENTRE );
@ -65,6 +64,7 @@ DIALOG_DESIGN_RULES_BASE::DIALOG_DESIGN_RULES_BASE( wxWindow* parent, wxWindowID
// Cell Defaults // Cell Defaults
m_grid->SetDefaultCellAlignment( wxALIGN_LEFT, wxALIGN_TOP ); m_grid->SetDefaultCellAlignment( wxALIGN_LEFT, wxALIGN_TOP );
m_grid->SetToolTip( _("Net Class parameters") ); m_grid->SetToolTip( _("Net Class parameters") );
m_grid->SetMinSize( wxSize( -1,150 ) );
sbSizerUpper->Add( m_grid, 1, wxEXPAND, 5 ); sbSizerUpper->Add( m_grid, 1, wxEXPAND, 5 );

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?> <?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<wxFormBuilder_Project> <wxFormBuilder_Project>
<FileVersion major="1" minor="11" /> <FileVersion major="1" minor="13" />
<object class="Project" expanded="1"> <object class="Project" expanded="1">
<property name="class_decoration"></property> <property name="class_decoration"></property>
<property name="code_generation">C++</property> <property name="code_generation">C++</property>
@ -284,7 +284,7 @@
<property name="aui_position"></property> <property name="aui_position"></property>
<property name="aui_row"></property> <property name="aui_row"></property>
<property name="autosize_cols">0</property> <property name="autosize_cols">0</property>
<property name="autosize_rows">1</property> <property name="autosize_rows">0</property>
<property name="best_size"></property> <property name="best_size"></property>
<property name="bg"></property> <property name="bg"></property>
<property name="caption"></property> <property name="caption"></property>
@ -311,7 +311,7 @@
<property name="drag_col_move">0</property> <property name="drag_col_move">0</property>
<property name="drag_col_size">1</property> <property name="drag_col_size">1</property>
<property name="drag_grid_size">0</property> <property name="drag_grid_size">0</property>
<property name="drag_row_size">1</property> <property name="drag_row_size">0</property>
<property name="editing">1</property> <property name="editing">1</property>
<property name="enabled">1</property> <property name="enabled">1</property>
<property name="fg"></property> <property name="fg"></property>
@ -332,7 +332,7 @@
<property name="maximum_size"></property> <property name="maximum_size"></property>
<property name="min_size"></property> <property name="min_size"></property>
<property name="minimize_button">0</property> <property name="minimize_button">0</property>
<property name="minimum_size">-1,-1</property> <property name="minimum_size">-1,150</property>
<property name="moveable">1</property> <property name="moveable">1</property>
<property name="name">m_grid</property> <property name="name">m_grid</property>
<property name="pane_border">1</property> <property name="pane_border">1</property>

View File

@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Nov 6 2013) // C++ code generated with wxFormBuilder (version Jun 5 2014)
// http://www.wxformbuilder.org/ // http://www.wxformbuilder.org/
// //
// PLEASE DO "NOT" EDIT THIS FILE! // PLEASE DO "NOT" EDIT THIS FILE!

View File

@ -5,8 +5,8 @@
/* /*
* This program source code file is part of KiCad, a free EDA CAD application. * This program source code file is part of KiCad, a free EDA CAD application.
* *
* Copyright (C) 2014 Jean-Pierre Charras, jean-pierre.charras at wanadoo.fr * Copyright (C) 2015 Jean-Pierre Charras, jean-pierre.charras at wanadoo.fr
* Copyright (C) 1992-2014 KiCad Developers, see AUTHORS.txt for contributors. * Copyright (C) 1992-2015 KiCad Developers, see AUTHORS.txt for contributors.
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License * modify it under the terms of the GNU General Public License
@ -61,7 +61,7 @@ DIALOG_DISPLAY_OPTIONS::DIALOG_DISPLAY_OPTIONS( PCB_EDIT_FRAME* parent ) :
init(); init();
m_buttonOK->SetDefault(); m_sdbSizerOK->SetDefault();
GetSizer()->SetSizeHints( this ); GetSizer()->SetSizeHints( this );
} }
@ -70,10 +70,7 @@ void DIALOG_DISPLAY_OPTIONS::init()
SetFocus(); SetFocus();
DISPLAY_OPTIONS* displ_opts = (DISPLAY_OPTIONS*)m_Parent->GetDisplayOptions(); DISPLAY_OPTIONS* displ_opts = (DISPLAY_OPTIONS*)m_Parent->GetDisplayOptions();
if ( displ_opts->m_DisplayPcbTrackFill ) m_OptDisplayTracks->SetValue( displ_opts->m_DisplayPcbTrackFill == SKETCH );
m_OptDisplayTracks->SetSelection( 1 );
else
m_OptDisplayTracks->SetSelection( 0 );
switch ( displ_opts->m_ShowTrackClearanceMode ) switch ( displ_opts->m_ShowTrackClearanceMode )
{ {
@ -99,25 +96,18 @@ void DIALOG_DISPLAY_OPTIONS::init()
break; break;
} }
if ( displ_opts->m_DisplayPadFill ) m_OptDisplayPads->SetValue( displ_opts->m_DisplayPadFill == SKETCH );
m_OptDisplayPads->SetSelection( 1 ); m_OptDisplayVias->SetValue( displ_opts->m_DisplayViaFill == SKETCH );
else
m_OptDisplayPads->SetSelection( 0 );
if ( displ_opts->m_DisplayViaFill ) m_Show_Page_Limits->SetValue( m_Parent->ShowPageLimits() );
m_OptDisplayVias->SetSelection( 1 );
else
m_OptDisplayVias->SetSelection( 0 );
m_Show_Page_Limits->SetSelection( m_Parent->ShowPageLimits() ? 0 : 1 );
m_OptDisplayViaHole->SetSelection( displ_opts->m_DisplayViaMode ); m_OptDisplayViaHole->SetSelection( displ_opts->m_DisplayViaMode );
m_OptDisplayModTexts->SetSelection( displ_opts->m_DisplayModText ); m_OptDisplayModTexts->SetValue( displ_opts->m_DisplayModTextFill == SKETCH );
m_OptDisplayModEdges->SetSelection( displ_opts->m_DisplayModEdge ); m_OptDisplayModOutlines->SetValue( displ_opts->m_DisplayModEdgeFill == SKETCH );
m_OptDisplayPadClearence->SetValue( displ_opts->m_DisplayPadIsol ); m_OptDisplayPadClearence->SetValue( displ_opts->m_DisplayPadIsol );
m_OptDisplayPadNumber->SetValue( displ_opts->m_DisplayPadNum ); m_OptDisplayPadNumber->SetValue( displ_opts->m_DisplayPadNum );
m_OptDisplayPadNoConn->SetValue( m_Parent->IsElementVisible( PCB_VISIBLE( NO_CONNECTS_VISIBLE ) ) ); m_OptDisplayPadNoConn->SetValue( m_Parent->IsElementVisible( PCB_VISIBLE( NO_CONNECTS_VISIBLE ) ) );
m_OptDisplayDrawings->SetSelection( displ_opts->m_DisplayDrawItems ); m_OptDisplayDrawings->SetValue( displ_opts->m_DisplayDrawItemsFill == SKETCH );
m_ShowNetNamesOption->SetSelection( displ_opts->m_DisplayNetNamesMode ); m_ShowNetNamesOption->SetSelection( displ_opts->m_DisplayNetNamesMode );
} }
@ -134,12 +124,9 @@ void DIALOG_DISPLAY_OPTIONS::OnOkClick(wxCommandEvent& event)
{ {
DISPLAY_OPTIONS* displ_opts = (DISPLAY_OPTIONS*)m_Parent->GetDisplayOptions(); DISPLAY_OPTIONS* displ_opts = (DISPLAY_OPTIONS*)m_Parent->GetDisplayOptions();
if ( m_Show_Page_Limits->GetSelection() == 0 ) m_Parent->SetShowPageLimits( m_Show_Page_Limits->GetValue() );
m_Parent->SetShowPageLimits( true );
else
m_Parent->SetShowPageLimits( false );
displ_opts->m_DisplayPcbTrackFill = m_OptDisplayTracks->GetSelection() == 1; displ_opts->m_DisplayPcbTrackFill = not m_OptDisplayTracks->GetValue();
displ_opts->m_DisplayViaMode = (VIA_DISPLAY_MODE_T) m_OptDisplayViaHole->GetSelection(); displ_opts->m_DisplayViaMode = (VIA_DISPLAY_MODE_T) m_OptDisplayViaHole->GetSelection();
@ -166,11 +153,11 @@ void DIALOG_DISPLAY_OPTIONS::OnOkClick(wxCommandEvent& event)
break; break;
} }
displ_opts->m_DisplayModText = m_OptDisplayModTexts->GetSelection(); displ_opts->m_DisplayModTextFill = not m_OptDisplayModTexts->GetValue();
displ_opts->m_DisplayModEdge = m_OptDisplayModEdges->GetSelection(); displ_opts->m_DisplayModEdgeFill = not m_OptDisplayModOutlines->GetValue();
displ_opts->m_DisplayPadFill = m_OptDisplayPads->GetSelection() == 1; displ_opts->m_DisplayPadFill = not m_OptDisplayPads->GetValue();
displ_opts->m_DisplayViaFill = m_OptDisplayVias->GetSelection() == 1; displ_opts->m_DisplayViaFill = not m_OptDisplayVias->GetValue();
displ_opts->m_DisplayPadIsol = m_OptDisplayPadClearence->GetValue(); displ_opts->m_DisplayPadIsol = m_OptDisplayPadClearence->GetValue();
@ -179,7 +166,7 @@ void DIALOG_DISPLAY_OPTIONS::OnOkClick(wxCommandEvent& event)
m_Parent->SetElementVisibility( PCB_VISIBLE(NO_CONNECTS_VISIBLE), m_Parent->SetElementVisibility( PCB_VISIBLE(NO_CONNECTS_VISIBLE),
m_OptDisplayPadNoConn->GetValue() ); m_OptDisplayPadNoConn->GetValue() );
displ_opts->m_DisplayDrawItems = m_OptDisplayDrawings->GetSelection(); displ_opts->m_DisplayDrawItemsFill = not m_OptDisplayDrawings->GetValue();
displ_opts->m_DisplayNetNamesMode = m_ShowNetNamesOption->GetSelection(); displ_opts->m_DisplayNetNamesMode = m_ShowNetNamesOption->GetSelection();
// Apply changes to the GAL // Apply changes to the GAL

View File

@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Jun 6 2014) // C++ code generated with wxFormBuilder (version Jun 5 2014)
// http://www.wxformbuilder.org/ // http://www.wxformbuilder.org/
// //
// PLEASE DO "NOT" EDIT THIS FILE! // PLEASE DO "NOT" EDIT THIS FILE!
@ -14,24 +14,19 @@ DIALOG_DISPLAY_OPTIONS_BASE::DIALOG_DISPLAY_OPTIONS_BASE( wxWindow* parent, wxWi
this->SetSizeHints( wxDefaultSize, wxDefaultSize ); this->SetSizeHints( wxDefaultSize, wxDefaultSize );
wxBoxSizer* bMainSizer; wxBoxSizer* bMainSizer;
bMainSizer = new wxBoxSizer( wxHORIZONTAL ); bMainSizer = new wxBoxSizer( wxVERTICAL );
wxBoxSizer* bupperSizer;
bupperSizer = new wxBoxSizer( wxHORIZONTAL );
wxStaticBoxSizer* sLeftBoxSizer; wxStaticBoxSizer* sLeftBoxSizer;
sLeftBoxSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Tracks and vias:") ), wxVERTICAL ); sLeftBoxSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Tracks and vias:") ), wxVERTICAL );
wxString m_OptDisplayTracksChoices[] = { _("Sketch"), _("Filled") }; m_OptDisplayTracks = new wxCheckBox( this, wxID_ANY, _("Tracks sketch mode"), wxDefaultPosition, wxDefaultSize, 0 );
int m_OptDisplayTracksNChoices = sizeof( m_OptDisplayTracksChoices ) / sizeof( wxString ); sLeftBoxSizer->Add( m_OptDisplayTracks, 0, wxALL, 5 );
m_OptDisplayTracks = new wxRadioBox( this, wxID_DISPLAY_TRACK, _("Tracks:"), wxDefaultPosition, wxDefaultSize, m_OptDisplayTracksNChoices, m_OptDisplayTracksChoices, 1, wxRA_SPECIFY_COLS );
m_OptDisplayTracks->SetSelection( 1 );
m_OptDisplayTracks->SetToolTip( _("Select how tracks are displayed") );
sLeftBoxSizer->Add( m_OptDisplayTracks, 0, wxALL|wxEXPAND, 5 ); m_OptDisplayVias = new wxCheckBox( this, wxID_ANY, _("Vias sketch mode"), wxDefaultPosition, wxDefaultSize, 0 );
sLeftBoxSizer->Add( m_OptDisplayVias, 0, wxALL, 5 );
wxString m_OptDisplayViasChoices[] = { _("Sketch"), _("Filled") };
int m_OptDisplayViasNChoices = sizeof( m_OptDisplayViasChoices ) / sizeof( wxString );
m_OptDisplayVias = new wxRadioBox( this, ID_VIAS_SHAPES, _("Via Shapes:"), wxDefaultPosition, wxDefaultSize, m_OptDisplayViasNChoices, m_OptDisplayViasChoices, 1, wxRA_SPECIFY_COLS );
m_OptDisplayVias->SetSelection( 1 );
sLeftBoxSizer->Add( m_OptDisplayVias, 0, wxALL|wxEXPAND, 5 );
wxString m_OptDisplayViaHoleChoices[] = { _("Never"), _("Defined holes"), _("Always") }; wxString m_OptDisplayViaHoleChoices[] = { _("Never"), _("Defined holes"), _("Always") };
int m_OptDisplayViaHoleNChoices = sizeof( m_OptDisplayViaHoleChoices ) / sizeof( wxString ); int m_OptDisplayViaHoleNChoices = sizeof( m_OptDisplayViaHoleChoices ) / sizeof( wxString );
@ -39,10 +34,10 @@ DIALOG_DISPLAY_OPTIONS_BASE::DIALOG_DISPLAY_OPTIONS_BASE( wxWindow* parent, wxWi
m_OptDisplayViaHole->SetSelection( 1 ); m_OptDisplayViaHole->SetSelection( 1 );
m_OptDisplayViaHole->SetToolTip( _("Show (or not) via holes.\nIf Defined Holes is selected, only the non default size holes are shown") ); m_OptDisplayViaHole->SetToolTip( _("Show (or not) via holes.\nIf Defined Holes is selected, only the non default size holes are shown") );
sLeftBoxSizer->Add( m_OptDisplayViaHole, 0, wxALL|wxEXPAND, 5 ); sLeftBoxSizer->Add( m_OptDisplayViaHole, 1, wxALL|wxEXPAND, 5 );
bMainSizer->Add( sLeftBoxSizer, 0, wxEXPAND|wxALL, 5 ); bupperSizer->Add( sLeftBoxSizer, 0, wxEXPAND|wxALL, 5 );
wxStaticBoxSizer* sbMiddleLeftSizer; wxStaticBoxSizer* sbMiddleLeftSizer;
sbMiddleLeftSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Routing help:") ), wxVERTICAL ); sbMiddleLeftSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Routing help:") ), wxVERTICAL );
@ -53,7 +48,7 @@ DIALOG_DISPLAY_OPTIONS_BASE::DIALOG_DISPLAY_OPTIONS_BASE( wxWindow* parent, wxWi
m_ShowNetNamesOption->SetSelection( 3 ); m_ShowNetNamesOption->SetSelection( 3 );
m_ShowNetNamesOption->SetToolTip( _("Show or not net names on pads and/or tracks") ); m_ShowNetNamesOption->SetToolTip( _("Show or not net names on pads and/or tracks") );
sbMiddleLeftSizer->Add( m_ShowNetNamesOption, 0, wxALL, 5 ); sbMiddleLeftSizer->Add( m_ShowNetNamesOption, 1, wxALL|wxEXPAND, 5 );
wxString m_OptDisplayTracksClearanceChoices[] = { _("Never"), _("New track"), _("New track with via area"), _("New and edited tracks with via area"), _("Always") }; wxString m_OptDisplayTracksClearanceChoices[] = { _("Never"), _("New track"), _("New track with via area"), _("New and edited tracks with via area"), _("Always") };
int m_OptDisplayTracksClearanceNChoices = sizeof( m_OptDisplayTracksClearanceChoices ) / sizeof( wxString ); int m_OptDisplayTracksClearanceNChoices = sizeof( m_OptDisplayTracksClearanceChoices ) / sizeof( wxString );
@ -61,104 +56,87 @@ DIALOG_DISPLAY_OPTIONS_BASE::DIALOG_DISPLAY_OPTIONS_BASE( wxWindow* parent, wxWi
m_OptDisplayTracksClearance->SetSelection( 3 ); m_OptDisplayTracksClearance->SetSelection( 3 );
m_OptDisplayTracksClearance->SetToolTip( _("Show( or not) tracks clearance area.\nIf New track is selected, track clearance area is shown only when creating the track.") ); m_OptDisplayTracksClearance->SetToolTip( _("Show( or not) tracks clearance area.\nIf New track is selected, track clearance area is shown only when creating the track.") );
sbMiddleLeftSizer->Add( m_OptDisplayTracksClearance, 0, wxALL|wxEXPAND, 5 ); sbMiddleLeftSizer->Add( m_OptDisplayTracksClearance, 1, wxALL|wxEXPAND, 5 );
bMainSizer->Add( sbMiddleLeftSizer, 0, wxALL|wxEXPAND, 5 ); bupperSizer->Add( sbMiddleLeftSizer, 0, wxALL|wxEXPAND, 5 );
wxStaticBoxSizer* sMiddleRightSizer; wxBoxSizer* b_rightSizer;
sMiddleRightSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Footprints:") ), wxHORIZONTAL ); b_rightSizer = new wxBoxSizer( wxVERTICAL );
wxBoxSizer* bLModuleSizer; wxStaticBoxSizer* sfootprintSizer;
bLModuleSizer = new wxBoxSizer( wxVERTICAL ); sfootprintSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Footprints:") ), wxVERTICAL );
wxString m_OptDisplayModEdgesChoices[] = { _("Line"), _("Filled"), _("Sketch") }; m_OptDisplayModOutlines = new wxCheckBox( this, wxID_ANY, _("Outlines sketch mode"), wxDefaultPosition, wxDefaultSize, 0 );
int m_OptDisplayModEdgesNChoices = sizeof( m_OptDisplayModEdgesChoices ) / sizeof( wxString ); sfootprintSizer->Add( m_OptDisplayModOutlines, 0, wxALL, 5 );
m_OptDisplayModEdges = new wxRadioBox( this, ID_EDGES_MODULES, _("Footprint Edges:"), wxDefaultPosition, wxDefaultSize, m_OptDisplayModEdgesNChoices, m_OptDisplayModEdgesChoices, 1, wxRA_SPECIFY_COLS );
m_OptDisplayModEdges->SetSelection( 1 );
bLModuleSizer->Add( m_OptDisplayModEdges, 0, wxALL|wxEXPAND, 5 );
wxString m_OptDisplayModTextsChoices[] = { _("Line"), _("Filled"), _("Sketch") }; m_OptDisplayModTexts
int m_OptDisplayModTextsNChoices = sizeof( m_OptDisplayModTextsChoices ) / sizeof( wxString ); = new wxCheckBox( this, wxID_ANY, _("Texts sketch mode"), wxDefaultPosition, wxDefaultSize, 0 );
m_OptDisplayModTexts = new wxRadioBox( this, ID_TEXT_MODULES, _("Texts:"), wxDefaultPosition, wxDefaultSize, m_OptDisplayModTextsNChoices, m_OptDisplayModTextsChoices, 1, wxRA_SPECIFY_COLS ); sfootprintSizer->Add( m_OptDisplayModTexts
m_OptDisplayModTexts->SetSelection( 1 ); , 0, wxALL, 5 );
bLModuleSizer->Add( m_OptDisplayModTexts, 0, wxALL|wxEXPAND, 5 );
m_OptDisplayPads = new wxCheckBox( this, wxID_ANY, _("Pads sketch mode"), wxDefaultPosition, wxDefaultSize, 0 );
sMiddleRightSizer->Add( bLModuleSizer, 0, 0, 5 ); sfootprintSizer->Add( m_OptDisplayPads, 0, wxALL, 5 );
wxStaticBoxSizer* bRModuleSizer;
bRModuleSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Pad Options:") ), wxVERTICAL );
wxString m_OptDisplayPadsChoices[] = { _("Sketch"), _("Filled") };
int m_OptDisplayPadsNChoices = sizeof( m_OptDisplayPadsChoices ) / sizeof( wxString );
m_OptDisplayPads = new wxRadioBox( this, ID_PADS_SHAPES, _("Pad Shapes:"), wxDefaultPosition, wxDefaultSize, m_OptDisplayPadsNChoices, m_OptDisplayPadsChoices, 1, wxRA_SPECIFY_COLS );
m_OptDisplayPads->SetSelection( 1 );
bRModuleSizer->Add( m_OptDisplayPads, 0, wxALL|wxEXPAND, 5 );
m_OptDisplayPadClearence = new wxCheckBox( this, wxID_ANY, _("Show pad clearance"), wxDefaultPosition, wxDefaultSize, 0 ); m_OptDisplayPadClearence = new wxCheckBox( this, wxID_ANY, _("Show pad clearance"), wxDefaultPosition, wxDefaultSize, 0 );
bRModuleSizer->Add( m_OptDisplayPadClearence, 0, wxALL, 5 ); sfootprintSizer->Add( m_OptDisplayPadClearence, 0, wxALL, 5 );
m_OptDisplayPadNumber = new wxCheckBox( this, wxID_ANY, _("Show pad number"), wxDefaultPosition, wxDefaultSize, 0 ); m_OptDisplayPadNumber = new wxCheckBox( this, wxID_ANY, _("Show pad number"), wxDefaultPosition, wxDefaultSize, 0 );
m_OptDisplayPadNumber->SetValue(true); m_OptDisplayPadNumber->SetValue(true);
bRModuleSizer->Add( m_OptDisplayPadNumber, 0, wxALL, 5 ); sfootprintSizer->Add( m_OptDisplayPadNumber, 0, wxALL, 5 );
m_OptDisplayPadNoConn = new wxCheckBox( this, wxID_ANY, _("Show pad NoConnect"), wxDefaultPosition, wxDefaultSize, 0 ); m_OptDisplayPadNoConn = new wxCheckBox( this, wxID_ANY, _("Show pad NoConnect"), wxDefaultPosition, wxDefaultSize, 0 );
m_OptDisplayPadNoConn->SetValue(true); m_OptDisplayPadNoConn->SetValue(true);
bRModuleSizer->Add( m_OptDisplayPadNoConn, 0, wxALL, 5 ); sfootprintSizer->Add( m_OptDisplayPadNoConn, 0, wxALL, 5 );
sMiddleRightSizer->Add( bRModuleSizer, 0, 0, 5 ); b_rightSizer->Add( sfootprintSizer, 0, wxEXPAND|wxALL, 5 );
wxStaticBoxSizer* s_otherSizer;
s_otherSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Others:") ), wxVERTICAL );
m_OptDisplayDrawings = new wxCheckBox( this, wxID_ANY, _("Graphic items sketch mode"), wxDefaultPosition, wxDefaultSize, 0 );
m_OptDisplayDrawings->SetValue(true);
s_otherSizer->Add( m_OptDisplayDrawings, 0, wxALL, 5 );
m_Show_Page_Limits = new wxCheckBox( this, wxID_ANY, _("Show page limits"), wxDefaultPosition, wxDefaultSize, 0 );
m_Show_Page_Limits->SetValue(true);
s_otherSizer->Add( m_Show_Page_Limits, 0, wxALL, 5 );
bMainSizer->Add( sMiddleRightSizer, 0, wxEXPAND|wxALL, 5 ); b_rightSizer->Add( s_otherSizer, 1, wxEXPAND|wxALL, 5 );
wxBoxSizer* bRightSizer;
bRightSizer = new wxBoxSizer( wxVERTICAL );
wxStaticBoxSizer* sRightUpperSizer;
sRightUpperSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Others:") ), wxVERTICAL );
wxString m_OptDisplayDrawingsChoices[] = { _("Line"), _("Filled"), _("Sketch") };
int m_OptDisplayDrawingsNChoices = sizeof( m_OptDisplayDrawingsChoices ) / sizeof( wxString );
m_OptDisplayDrawings = new wxRadioBox( this, wxID_ANY, _("Display other items:"), wxDefaultPosition, wxDefaultSize, m_OptDisplayDrawingsNChoices, m_OptDisplayDrawingsChoices, 1, wxRA_SPECIFY_COLS );
m_OptDisplayDrawings->SetSelection( 1 );
sRightUpperSizer->Add( m_OptDisplayDrawings, 0, wxALL|wxEXPAND, 5 );
wxString m_Show_Page_LimitsChoices[] = { _("Yes"), _("No") };
int m_Show_Page_LimitsNChoices = sizeof( m_Show_Page_LimitsChoices ) / sizeof( wxString );
m_Show_Page_Limits = new wxRadioBox( this, wxID_ANY, _("Show page limits"), wxDefaultPosition, wxDefaultSize, m_Show_Page_LimitsNChoices, m_Show_Page_LimitsChoices, 1, wxRA_SPECIFY_COLS );
m_Show_Page_Limits->SetSelection( 1 );
sRightUpperSizer->Add( m_Show_Page_Limits, 0, wxALL|wxEXPAND, 5 );
bRightSizer->Add( sRightUpperSizer, 1, wxEXPAND, 5 ); bupperSizer->Add( b_rightSizer, 0, 0, 5 );
bRightSizer->Add( 10, 10, 0, 0, 5 ); bMainSizer->Add( bupperSizer, 1, wxEXPAND, 5 );
m_buttonOK = new wxButton( this, wxID_OK, _("OK"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticline1 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
bRightSizer->Add( m_buttonOK, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 ); bMainSizer->Add( m_staticline1, 0, wxEXPAND | wxALL, 5 );
m_buttonCANCEL = new wxButton( this, wxID_CANCEL, _("Cancel"), wxDefaultPosition, wxDefaultSize, 0 ); m_sdbSizer = new wxStdDialogButtonSizer();
bRightSizer->Add( m_buttonCANCEL, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 ); 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, wxEXPAND|wxALL, 5 );
bMainSizer->Add( bRightSizer, 0, wxEXPAND|wxALL, 5 );
this->SetSizer( bMainSizer ); this->SetSizer( bMainSizer );
this->Layout(); this->Layout();
// Connect Events // Connect Events
m_buttonOK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_DISPLAY_OPTIONS_BASE::OnOkClick ), NULL, this ); m_sdbSizerCancel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_DISPLAY_OPTIONS_BASE::OnCancelClick ), NULL, this );
m_buttonCANCEL->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_DISPLAY_OPTIONS_BASE::OnCancelClick ), NULL, this ); m_sdbSizerOK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_DISPLAY_OPTIONS_BASE::OnOkClick ), NULL, this );
} }
DIALOG_DISPLAY_OPTIONS_BASE::~DIALOG_DISPLAY_OPTIONS_BASE() DIALOG_DISPLAY_OPTIONS_BASE::~DIALOG_DISPLAY_OPTIONS_BASE()
{ {
// Disconnect Events // Disconnect Events
m_buttonOK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_DISPLAY_OPTIONS_BASE::OnOkClick ), NULL, this ); m_sdbSizerCancel->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_DISPLAY_OPTIONS_BASE::OnCancelClick ), NULL, this );
m_buttonCANCEL->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_DISPLAY_OPTIONS_BASE::OnCancelClick ), NULL, this ); m_sdbSizerOK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_DISPLAY_OPTIONS_BASE::OnOkClick ), NULL, this );
} }

View File

@ -44,7 +44,7 @@
<property name="minimum_size"></property> <property name="minimum_size"></property>
<property name="name">DIALOG_DISPLAY_OPTIONS_BASE</property> <property name="name">DIALOG_DISPLAY_OPTIONS_BASE</property>
<property name="pos"></property> <property name="pos"></property>
<property name="size">880,320</property> <property name="size">562,361</property>
<property name="style">wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER</property> <property name="style">wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER</property>
<property name="subclass">DIALOG_SHIM; dialog_shim.h</property> <property name="subclass">DIALOG_SHIM; dialog_shim.h</property>
<property name="title">Display options</property> <property name="title">Display options</property>
@ -91,6 +91,15 @@
<object class="wxBoxSizer" expanded="1"> <object class="wxBoxSizer" expanded="1">
<property name="minimum_size"></property> <property name="minimum_size"></property>
<property name="name">bMainSizer</property> <property name="name">bMainSizer</property>
<property name="orient">wxVERTICAL</property>
<property name="permission">none</property>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxEXPAND</property>
<property name="proportion">1</property>
<object class="wxBoxSizer" expanded="1">
<property name="minimum_size"></property>
<property name="name">bupperSizer</property>
<property name="orient">wxHORIZONTAL</property> <property name="orient">wxHORIZONTAL</property>
<property name="permission">none</property> <property name="permission">none</property>
<object class="sizeritem" expanded="1"> <object class="sizeritem" expanded="1">
@ -107,9 +116,9 @@
<event name="OnUpdateUI"></event> <event name="OnUpdateUI"></event>
<object class="sizeritem" expanded="1"> <object class="sizeritem" expanded="1">
<property name="border">5</property> <property name="border">5</property>
<property name="flag">wxALL|wxEXPAND</property> <property name="flag">wxALL</property>
<property name="proportion">0</property> <property name="proportion">0</property>
<object class="wxRadioBox" expanded="1"> <object class="wxCheckBox" expanded="1">
<property name="BottomDockable">1</property> <property name="BottomDockable">1</property>
<property name="LeftDockable">1</property> <property name="LeftDockable">1</property>
<property name="RightDockable">1</property> <property name="RightDockable">1</property>
@ -123,7 +132,7 @@
<property name="caption"></property> <property name="caption"></property>
<property name="caption_visible">1</property> <property name="caption_visible">1</property>
<property name="center_pane">0</property> <property name="center_pane">0</property>
<property name="choices">&quot;Sketch&quot; &quot;Filled&quot;</property> <property name="checked">0</property>
<property name="close_button">1</property> <property name="close_button">1</property>
<property name="context_help"></property> <property name="context_help"></property>
<property name="context_menu">1</property> <property name="context_menu">1</property>
@ -137,9 +146,8 @@
<property name="font"></property> <property name="font"></property>
<property name="gripper">0</property> <property name="gripper">0</property>
<property name="hidden">0</property> <property name="hidden">0</property>
<property name="id">wxID_DISPLAY_TRACK</property> <property name="id">wxID_ANY</property>
<property name="label">Tracks:</property> <property name="label">Tracks sketch mode</property>
<property name="majorDimension">1</property>
<property name="max_size"></property> <property name="max_size"></property>
<property name="maximize_button">0</property> <property name="maximize_button">0</property>
<property name="maximum_size"></property> <property name="maximum_size"></property>
@ -155,13 +163,12 @@
<property name="pin_button">1</property> <property name="pin_button">1</property>
<property name="pos"></property> <property name="pos"></property>
<property name="resize">Resizable</property> <property name="resize">Resizable</property>
<property name="selection">1</property>
<property name="show">1</property> <property name="show">1</property>
<property name="size"></property> <property name="size"></property>
<property name="style">wxRA_SPECIFY_COLS</property> <property name="style"></property>
<property name="subclass"></property> <property name="subclass"></property>
<property name="toolbar_pane">0</property> <property name="toolbar_pane">0</property>
<property name="tooltip">Select how tracks are displayed</property> <property name="tooltip"></property>
<property name="validator_data_type"></property> <property name="validator_data_type"></property>
<property name="validator_style">wxFILTER_NONE</property> <property name="validator_style">wxFILTER_NONE</property>
<property name="validator_type">wxDefaultValidator</property> <property name="validator_type">wxDefaultValidator</property>
@ -170,6 +177,7 @@
<property name="window_name"></property> <property name="window_name"></property>
<property name="window_style"></property> <property name="window_style"></property>
<event name="OnChar"></event> <event name="OnChar"></event>
<event name="OnCheckBox"></event>
<event name="OnEnterWindow"></event> <event name="OnEnterWindow"></event>
<event name="OnEraseBackground"></event> <event name="OnEraseBackground"></event>
<event name="OnKeyDown"></event> <event name="OnKeyDown"></event>
@ -186,7 +194,6 @@
<event name="OnMouseEvents"></event> <event name="OnMouseEvents"></event>
<event name="OnMouseWheel"></event> <event name="OnMouseWheel"></event>
<event name="OnPaint"></event> <event name="OnPaint"></event>
<event name="OnRadioBox"></event>
<event name="OnRightDClick"></event> <event name="OnRightDClick"></event>
<event name="OnRightDown"></event> <event name="OnRightDown"></event>
<event name="OnRightUp"></event> <event name="OnRightUp"></event>
@ -197,9 +204,9 @@
</object> </object>
<object class="sizeritem" expanded="1"> <object class="sizeritem" expanded="1">
<property name="border">5</property> <property name="border">5</property>
<property name="flag">wxALL|wxEXPAND</property> <property name="flag">wxALL</property>
<property name="proportion">0</property> <property name="proportion">0</property>
<object class="wxRadioBox" expanded="1"> <object class="wxCheckBox" expanded="1">
<property name="BottomDockable">1</property> <property name="BottomDockable">1</property>
<property name="LeftDockable">1</property> <property name="LeftDockable">1</property>
<property name="RightDockable">1</property> <property name="RightDockable">1</property>
@ -213,7 +220,7 @@
<property name="caption"></property> <property name="caption"></property>
<property name="caption_visible">1</property> <property name="caption_visible">1</property>
<property name="center_pane">0</property> <property name="center_pane">0</property>
<property name="choices">&quot;Sketch&quot; &quot;Filled&quot;</property> <property name="checked">0</property>
<property name="close_button">1</property> <property name="close_button">1</property>
<property name="context_help"></property> <property name="context_help"></property>
<property name="context_menu">1</property> <property name="context_menu">1</property>
@ -227,9 +234,8 @@
<property name="font"></property> <property name="font"></property>
<property name="gripper">0</property> <property name="gripper">0</property>
<property name="hidden">0</property> <property name="hidden">0</property>
<property name="id">ID_VIAS_SHAPES</property> <property name="id">wxID_ANY</property>
<property name="label">Via Shapes:</property> <property name="label">Vias sketch mode</property>
<property name="majorDimension">1</property>
<property name="max_size"></property> <property name="max_size"></property>
<property name="maximize_button">0</property> <property name="maximize_button">0</property>
<property name="maximum_size"></property> <property name="maximum_size"></property>
@ -245,10 +251,9 @@
<property name="pin_button">1</property> <property name="pin_button">1</property>
<property name="pos"></property> <property name="pos"></property>
<property name="resize">Resizable</property> <property name="resize">Resizable</property>
<property name="selection">1</property>
<property name="show">1</property> <property name="show">1</property>
<property name="size"></property> <property name="size"></property>
<property name="style">wxRA_SPECIFY_COLS</property> <property name="style"></property>
<property name="subclass"></property> <property name="subclass"></property>
<property name="toolbar_pane">0</property> <property name="toolbar_pane">0</property>
<property name="tooltip"></property> <property name="tooltip"></property>
@ -260,6 +265,7 @@
<property name="window_name"></property> <property name="window_name"></property>
<property name="window_style"></property> <property name="window_style"></property>
<event name="OnChar"></event> <event name="OnChar"></event>
<event name="OnCheckBox"></event>
<event name="OnEnterWindow"></event> <event name="OnEnterWindow"></event>
<event name="OnEraseBackground"></event> <event name="OnEraseBackground"></event>
<event name="OnKeyDown"></event> <event name="OnKeyDown"></event>
@ -276,7 +282,6 @@
<event name="OnMouseEvents"></event> <event name="OnMouseEvents"></event>
<event name="OnMouseWheel"></event> <event name="OnMouseWheel"></event>
<event name="OnPaint"></event> <event name="OnPaint"></event>
<event name="OnRadioBox"></event>
<event name="OnRightDClick"></event> <event name="OnRightDClick"></event>
<event name="OnRightDown"></event> <event name="OnRightDown"></event>
<event name="OnRightUp"></event> <event name="OnRightUp"></event>
@ -288,7 +293,7 @@
<object class="sizeritem" expanded="1"> <object class="sizeritem" expanded="1">
<property name="border">5</property> <property name="border">5</property>
<property name="flag">wxALL|wxEXPAND</property> <property name="flag">wxALL|wxEXPAND</property>
<property name="proportion">0</property> <property name="proportion">1</property>
<object class="wxRadioBox" expanded="1"> <object class="wxRadioBox" expanded="1">
<property name="BottomDockable">1</property> <property name="BottomDockable">1</property>
<property name="LeftDockable">1</property> <property name="LeftDockable">1</property>
@ -391,8 +396,8 @@
<event name="OnUpdateUI"></event> <event name="OnUpdateUI"></event>
<object class="sizeritem" expanded="1"> <object class="sizeritem" expanded="1">
<property name="border">5</property> <property name="border">5</property>
<property name="flag">wxALL</property> <property name="flag">wxALL|wxEXPAND</property>
<property name="proportion">0</property> <property name="proportion">1</property>
<object class="wxRadioBox" expanded="1"> <object class="wxRadioBox" expanded="1">
<property name="BottomDockable">1</property> <property name="BottomDockable">1</property>
<property name="LeftDockable">1</property> <property name="LeftDockable">1</property>
@ -482,7 +487,7 @@
<object class="sizeritem" expanded="1"> <object class="sizeritem" expanded="1">
<property name="border">5</property> <property name="border">5</property>
<property name="flag">wxALL|wxEXPAND</property> <property name="flag">wxALL|wxEXPAND</property>
<property name="proportion">0</property> <property name="proportion">1</property>
<object class="wxRadioBox" expanded="1"> <object class="wxRadioBox" expanded="1">
<property name="BottomDockable">1</property> <property name="BottomDockable">1</property>
<property name="LeftDockable">1</property> <property name="LeftDockable">1</property>
@ -571,6 +576,15 @@
</object> </object>
</object> </object>
</object> </object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag"></property>
<property name="proportion">0</property>
<object class="wxBoxSizer" expanded="1">
<property name="minimum_size"></property>
<property name="name">b_rightSizer</property>
<property name="orient">wxVERTICAL</property>
<property name="permission">none</property>
<object class="sizeritem" expanded="1"> <object class="sizeritem" expanded="1">
<property name="border">5</property> <property name="border">5</property>
<property name="flag">wxEXPAND|wxALL</property> <property name="flag">wxEXPAND|wxALL</property>
@ -579,24 +593,15 @@
<property name="id">wxID_ANY</property> <property name="id">wxID_ANY</property>
<property name="label">Footprints:</property> <property name="label">Footprints:</property>
<property name="minimum_size"></property> <property name="minimum_size"></property>
<property name="name">sMiddleRightSizer</property> <property name="name">sfootprintSizer</property>
<property name="orient">wxHORIZONTAL</property>
<property name="permission">none</property>
<event name="OnUpdateUI"></event>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag"></property>
<property name="proportion">0</property>
<object class="wxBoxSizer" expanded="1">
<property name="minimum_size"></property>
<property name="name">bLModuleSizer</property>
<property name="orient">wxVERTICAL</property> <property name="orient">wxVERTICAL</property>
<property name="permission">none</property> <property name="permission">none</property>
<event name="OnUpdateUI"></event>
<object class="sizeritem" expanded="1"> <object class="sizeritem" expanded="1">
<property name="border">5</property> <property name="border">5</property>
<property name="flag">wxALL|wxEXPAND</property> <property name="flag">wxALL</property>
<property name="proportion">0</property> <property name="proportion">0</property>
<object class="wxRadioBox" expanded="1"> <object class="wxCheckBox" expanded="1">
<property name="BottomDockable">1</property> <property name="BottomDockable">1</property>
<property name="LeftDockable">1</property> <property name="LeftDockable">1</property>
<property name="RightDockable">1</property> <property name="RightDockable">1</property>
@ -610,7 +615,7 @@
<property name="caption"></property> <property name="caption"></property>
<property name="caption_visible">1</property> <property name="caption_visible">1</property>
<property name="center_pane">0</property> <property name="center_pane">0</property>
<property name="choices">&quot;Line&quot; &quot;Filled&quot; &quot;Sketch&quot;</property> <property name="checked">0</property>
<property name="close_button">1</property> <property name="close_button">1</property>
<property name="context_help"></property> <property name="context_help"></property>
<property name="context_menu">1</property> <property name="context_menu">1</property>
@ -624,173 +629,67 @@
<property name="font"></property> <property name="font"></property>
<property name="gripper">0</property> <property name="gripper">0</property>
<property name="hidden">0</property> <property name="hidden">0</property>
<property name="id">ID_EDGES_MODULES</property>
<property name="label">Footprint Edges:</property>
<property name="majorDimension">1</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_OptDisplayModEdges</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="selection">1</property>
<property name="show">1</property>
<property name="size"></property>
<property name="style">wxRA_SPECIFY_COLS</property>
<property name="subclass"></property>
<property name="toolbar_pane">0</property>
<property name="tooltip"></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="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="OnRadioBox"></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="1">
<property name="border">5</property>
<property name="flag">wxALL|wxEXPAND</property>
<property name="proportion">0</property>
<object class="wxRadioBox" 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="choices">&quot;Line&quot; &quot;Filled&quot; &quot;Sketch&quot;</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">ID_TEXT_MODULES</property>
<property name="label">Texts:</property>
<property name="majorDimension">1</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_OptDisplayModTexts</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="selection">1</property>
<property name="show">1</property>
<property name="size"></property>
<property name="style">wxRA_SPECIFY_COLS</property>
<property name="subclass"></property>
<property name="toolbar_pane">0</property>
<property name="tooltip"></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="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="OnRadioBox"></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 class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag"></property>
<property name="proportion">0</property>
<object class="wxStaticBoxSizer" expanded="1">
<property name="id">wxID_ANY</property> <property name="id">wxID_ANY</property>
<property name="label">Pad Options:</property> <property name="label">Outlines sketch mode</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="minimum_size"></property>
<property name="name">bRModuleSizer</property> <property name="moveable">1</property>
<property name="orient">wxVERTICAL</property> <property name="name">m_OptDisplayModOutlines</property>
<property name="permission">none</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"></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> <event name="OnUpdateUI"></event>
</object>
</object>
<object class="sizeritem" expanded="1"> <object class="sizeritem" expanded="1">
<property name="border">5</property> <property name="border">5</property>
<property name="flag">wxALL|wxEXPAND</property> <property name="flag">wxALL</property>
<property name="proportion">0</property> <property name="proportion">0</property>
<object class="wxRadioBox" expanded="1"> <object class="wxCheckBox" expanded="1">
<property name="BottomDockable">1</property> <property name="BottomDockable">1</property>
<property name="LeftDockable">1</property> <property name="LeftDockable">1</property>
<property name="RightDockable">1</property> <property name="RightDockable">1</property>
@ -804,7 +703,7 @@
<property name="caption"></property> <property name="caption"></property>
<property name="caption_visible">1</property> <property name="caption_visible">1</property>
<property name="center_pane">0</property> <property name="center_pane">0</property>
<property name="choices">&quot;Sketch&quot; &quot;Filled&quot;</property> <property name="checked">0</property>
<property name="close_button">1</property> <property name="close_button">1</property>
<property name="context_help"></property> <property name="context_help"></property>
<property name="context_menu">1</property> <property name="context_menu">1</property>
@ -818,9 +717,96 @@
<property name="font"></property> <property name="font"></property>
<property name="gripper">0</property> <property name="gripper">0</property>
<property name="hidden">0</property> <property name="hidden">0</property>
<property name="id">ID_PADS_SHAPES</property> <property name="id">wxID_ANY</property>
<property name="label">Pad Shapes:</property> <property name="label">Texts sketch mode</property>
<property name="majorDimension">1</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_OptDisplayModTexts&#x0A;</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"></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="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">Pads sketch mode</property>
<property name="max_size"></property> <property name="max_size"></property>
<property name="maximize_button">0</property> <property name="maximize_button">0</property>
<property name="maximum_size"></property> <property name="maximum_size"></property>
@ -836,10 +822,9 @@
<property name="pin_button">1</property> <property name="pin_button">1</property>
<property name="pos"></property> <property name="pos"></property>
<property name="resize">Resizable</property> <property name="resize">Resizable</property>
<property name="selection">1</property>
<property name="show">1</property> <property name="show">1</property>
<property name="size"></property> <property name="size"></property>
<property name="style">wxRA_SPECIFY_COLS</property> <property name="style"></property>
<property name="subclass"></property> <property name="subclass"></property>
<property name="toolbar_pane">0</property> <property name="toolbar_pane">0</property>
<property name="tooltip"></property> <property name="tooltip"></property>
@ -851,6 +836,7 @@
<property name="window_name"></property> <property name="window_name"></property>
<property name="window_style"></property> <property name="window_style"></property>
<event name="OnChar"></event> <event name="OnChar"></event>
<event name="OnCheckBox"></event>
<event name="OnEnterWindow"></event> <event name="OnEnterWindow"></event>
<event name="OnEraseBackground"></event> <event name="OnEraseBackground"></event>
<event name="OnKeyDown"></event> <event name="OnKeyDown"></event>
@ -867,7 +853,6 @@
<event name="OnMouseEvents"></event> <event name="OnMouseEvents"></event>
<event name="OnMouseWheel"></event> <event name="OnMouseWheel"></event>
<event name="OnPaint"></event> <event name="OnPaint"></event>
<event name="OnRadioBox"></event>
<event name="OnRightDClick"></event> <event name="OnRightDClick"></event>
<event name="OnRightDown"></event> <event name="OnRightDown"></event>
<event name="OnRightUp"></event> <event name="OnRightUp"></event>
@ -1142,34 +1127,23 @@
</object> </object>
</object> </object>
</object> </object>
</object>
</object>
<object class="sizeritem" expanded="1"> <object class="sizeritem" expanded="1">
<property name="border">5</property> <property name="border">5</property>
<property name="flag">wxEXPAND|wxALL</property> <property name="flag">wxEXPAND|wxALL</property>
<property name="proportion">0</property>
<object class="wxBoxSizer" expanded="1">
<property name="minimum_size"></property>
<property name="name">bRightSizer</property>
<property name="orient">wxVERTICAL</property>
<property name="permission">none</property>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxEXPAND</property>
<property name="proportion">1</property> <property name="proportion">1</property>
<object class="wxStaticBoxSizer" expanded="1"> <object class="wxStaticBoxSizer" expanded="1">
<property name="id">wxID_ANY</property> <property name="id">wxID_ANY</property>
<property name="label">Others:</property> <property name="label">Others:</property>
<property name="minimum_size"></property> <property name="minimum_size"></property>
<property name="name">sRightUpperSizer</property> <property name="name">s_otherSizer</property>
<property name="orient">wxVERTICAL</property> <property name="orient">wxVERTICAL</property>
<property name="permission">none</property> <property name="permission">none</property>
<event name="OnUpdateUI"></event> <event name="OnUpdateUI"></event>
<object class="sizeritem" expanded="1"> <object class="sizeritem" expanded="1">
<property name="border">5</property> <property name="border">5</property>
<property name="flag">wxALL|wxEXPAND</property> <property name="flag">wxALL</property>
<property name="proportion">0</property> <property name="proportion">0</property>
<object class="wxRadioBox" expanded="1"> <object class="wxCheckBox" expanded="1">
<property name="BottomDockable">1</property> <property name="BottomDockable">1</property>
<property name="LeftDockable">1</property> <property name="LeftDockable">1</property>
<property name="RightDockable">1</property> <property name="RightDockable">1</property>
@ -1183,7 +1157,7 @@
<property name="caption"></property> <property name="caption"></property>
<property name="caption_visible">1</property> <property name="caption_visible">1</property>
<property name="center_pane">0</property> <property name="center_pane">0</property>
<property name="choices">&quot;Line&quot; &quot;Filled&quot; &quot;Sketch&quot;</property> <property name="checked">1</property>
<property name="close_button">1</property> <property name="close_button">1</property>
<property name="context_help"></property> <property name="context_help"></property>
<property name="context_menu">1</property> <property name="context_menu">1</property>
@ -1198,8 +1172,7 @@
<property name="gripper">0</property> <property name="gripper">0</property>
<property name="hidden">0</property> <property name="hidden">0</property>
<property name="id">wxID_ANY</property> <property name="id">wxID_ANY</property>
<property name="label">Display other items:</property> <property name="label">Graphic items sketch mode</property>
<property name="majorDimension">1</property>
<property name="max_size"></property> <property name="max_size"></property>
<property name="maximize_button">0</property> <property name="maximize_button">0</property>
<property name="maximum_size"></property> <property name="maximum_size"></property>
@ -1215,10 +1188,9 @@
<property name="pin_button">1</property> <property name="pin_button">1</property>
<property name="pos"></property> <property name="pos"></property>
<property name="resize">Resizable</property> <property name="resize">Resizable</property>
<property name="selection">1</property>
<property name="show">1</property> <property name="show">1</property>
<property name="size"></property> <property name="size"></property>
<property name="style">wxRA_SPECIFY_COLS</property> <property name="style"></property>
<property name="subclass"></property> <property name="subclass"></property>
<property name="toolbar_pane">0</property> <property name="toolbar_pane">0</property>
<property name="tooltip"></property> <property name="tooltip"></property>
@ -1230,6 +1202,7 @@
<property name="window_name"></property> <property name="window_name"></property>
<property name="window_style"></property> <property name="window_style"></property>
<event name="OnChar"></event> <event name="OnChar"></event>
<event name="OnCheckBox"></event>
<event name="OnEnterWindow"></event> <event name="OnEnterWindow"></event>
<event name="OnEraseBackground"></event> <event name="OnEraseBackground"></event>
<event name="OnKeyDown"></event> <event name="OnKeyDown"></event>
@ -1246,7 +1219,6 @@
<event name="OnMouseEvents"></event> <event name="OnMouseEvents"></event>
<event name="OnMouseWheel"></event> <event name="OnMouseWheel"></event>
<event name="OnPaint"></event> <event name="OnPaint"></event>
<event name="OnRadioBox"></event>
<event name="OnRightDClick"></event> <event name="OnRightDClick"></event>
<event name="OnRightDown"></event> <event name="OnRightDown"></event>
<event name="OnRightUp"></event> <event name="OnRightUp"></event>
@ -1257,9 +1229,9 @@
</object> </object>
<object class="sizeritem" expanded="1"> <object class="sizeritem" expanded="1">
<property name="border">5</property> <property name="border">5</property>
<property name="flag">wxALL|wxEXPAND</property> <property name="flag">wxALL</property>
<property name="proportion">0</property> <property name="proportion">0</property>
<object class="wxRadioBox" expanded="1"> <object class="wxCheckBox" expanded="1">
<property name="BottomDockable">1</property> <property name="BottomDockable">1</property>
<property name="LeftDockable">1</property> <property name="LeftDockable">1</property>
<property name="RightDockable">1</property> <property name="RightDockable">1</property>
@ -1273,7 +1245,7 @@
<property name="caption"></property> <property name="caption"></property>
<property name="caption_visible">1</property> <property name="caption_visible">1</property>
<property name="center_pane">0</property> <property name="center_pane">0</property>
<property name="choices">&quot;Yes&quot; &quot;No&quot;</property> <property name="checked">1</property>
<property name="close_button">1</property> <property name="close_button">1</property>
<property name="context_help"></property> <property name="context_help"></property>
<property name="context_menu">1</property> <property name="context_menu">1</property>
@ -1289,7 +1261,6 @@
<property name="hidden">0</property> <property name="hidden">0</property>
<property name="id">wxID_ANY</property> <property name="id">wxID_ANY</property>
<property name="label">Show page limits</property> <property name="label">Show page limits</property>
<property name="majorDimension">1</property>
<property name="max_size"></property> <property name="max_size"></property>
<property name="maximize_button">0</property> <property name="maximize_button">0</property>
<property name="maximum_size"></property> <property name="maximum_size"></property>
@ -1305,10 +1276,9 @@
<property name="pin_button">1</property> <property name="pin_button">1</property>
<property name="pos"></property> <property name="pos"></property>
<property name="resize">Resizable</property> <property name="resize">Resizable</property>
<property name="selection">1</property>
<property name="show">1</property> <property name="show">1</property>
<property name="size"></property> <property name="size"></property>
<property name="style">wxRA_SPECIFY_COLS</property> <property name="style"></property>
<property name="subclass"></property> <property name="subclass"></property>
<property name="toolbar_pane">0</property> <property name="toolbar_pane">0</property>
<property name="tooltip"></property> <property name="tooltip"></property>
@ -1320,6 +1290,7 @@
<property name="window_name"></property> <property name="window_name"></property>
<property name="window_style"></property> <property name="window_style"></property>
<event name="OnChar"></event> <event name="OnChar"></event>
<event name="OnCheckBox"></event>
<event name="OnEnterWindow"></event> <event name="OnEnterWindow"></event>
<event name="OnEraseBackground"></event> <event name="OnEraseBackground"></event>
<event name="OnKeyDown"></event> <event name="OnKeyDown"></event>
@ -1336,7 +1307,6 @@
<event name="OnMouseEvents"></event> <event name="OnMouseEvents"></event>
<event name="OnMouseWheel"></event> <event name="OnMouseWheel"></event>
<event name="OnPaint"></event> <event name="OnPaint"></event>
<event name="OnRadioBox"></event>
<event name="OnRightDClick"></event> <event name="OnRightDClick"></event>
<event name="OnRightDown"></event> <event name="OnRightDown"></event>
<event name="OnRightUp"></event> <event name="OnRightUp"></event>
@ -1347,21 +1317,15 @@
</object> </object>
</object> </object>
</object> </object>
<object class="sizeritem" expanded="1"> </object>
<property name="border">5</property> </object>
<property name="flag"></property>
<property name="proportion">0</property>
<object class="spacer" expanded="1">
<property name="height">10</property>
<property name="permission">protected</property>
<property name="width">10</property>
</object> </object>
</object> </object>
<object class="sizeritem" expanded="1"> <object class="sizeritem" expanded="1">
<property name="border">5</property> <property name="border">5</property>
<property name="flag">wxALL|wxALIGN_CENTER_HORIZONTAL|wxEXPAND</property> <property name="flag">wxEXPAND | wxALL</property>
<property name="proportion">0</property> <property name="proportion">0</property>
<object class="wxButton" expanded="1"> <object class="wxStaticLine" expanded="1">
<property name="BottomDockable">1</property> <property name="BottomDockable">1</property>
<property name="LeftDockable">1</property> <property name="LeftDockable">1</property>
<property name="RightDockable">1</property> <property name="RightDockable">1</property>
@ -1378,7 +1342,6 @@
<property name="close_button">1</property> <property name="close_button">1</property>
<property name="context_help"></property> <property name="context_help"></property>
<property name="context_menu">1</property> <property name="context_menu">1</property>
<property name="default">0</property>
<property name="default_pane">0</property> <property name="default_pane">0</property>
<property name="dock">Dock</property> <property name="dock">Dock</property>
<property name="dock_fixed">0</property> <property name="dock_fixed">0</property>
@ -1389,8 +1352,7 @@
<property name="font"></property> <property name="font"></property>
<property name="gripper">0</property> <property name="gripper">0</property>
<property name="hidden">0</property> <property name="hidden">0</property>
<property name="id">wxID_OK</property> <property name="id">wxID_ANY</property>
<property name="label">OK</property>
<property name="max_size"></property> <property name="max_size"></property>
<property name="maximize_button">0</property> <property name="maximize_button">0</property>
<property name="maximum_size"></property> <property name="maximum_size"></property>
@ -1398,7 +1360,7 @@
<property name="minimize_button">0</property> <property name="minimize_button">0</property>
<property name="minimum_size"></property> <property name="minimum_size"></property>
<property name="moveable">1</property> <property name="moveable">1</property>
<property name="name">m_buttonOK</property> <property name="name">m_staticline1</property>
<property name="pane_border">1</property> <property name="pane_border">1</property>
<property name="pane_position"></property> <property name="pane_position"></property>
<property name="pane_size"></property> <property name="pane_size"></property>
@ -1408,18 +1370,13 @@
<property name="resize">Resizable</property> <property name="resize">Resizable</property>
<property name="show">1</property> <property name="show">1</property>
<property name="size"></property> <property name="size"></property>
<property name="style"></property> <property name="style">wxLI_HORIZONTAL</property>
<property name="subclass"></property> <property name="subclass"></property>
<property name="toolbar_pane">0</property> <property name="toolbar_pane">0</property>
<property name="tooltip"></property> <property name="tooltip"></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_extra_style"></property>
<property name="window_name"></property> <property name="window_name"></property>
<property name="window_style"></property> <property name="window_style"></property>
<event name="OnButtonClick">OnOkClick</event>
<event name="OnChar"></event> <event name="OnChar"></event>
<event name="OnEnterWindow"></event> <event name="OnEnterWindow"></event>
<event name="OnEraseBackground"></event> <event name="OnEraseBackground"></event>
@ -1447,92 +1404,28 @@
</object> </object>
<object class="sizeritem" expanded="1"> <object class="sizeritem" expanded="1">
<property name="border">5</property> <property name="border">5</property>
<property name="flag">wxALL|wxALIGN_CENTER_HORIZONTAL|wxEXPAND</property> <property name="flag">wxEXPAND|wxALL</property>
<property name="proportion">0</property> <property name="proportion">0</property>
<object class="wxButton" expanded="1"> <object class="wxStdDialogButtonSizer" expanded="1">
<property name="BottomDockable">1</property> <property name="Apply">0</property>
<property name="LeftDockable">1</property> <property name="Cancel">1</property>
<property name="RightDockable">1</property> <property name="ContextHelp">0</property>
<property name="TopDockable">1</property> <property name="Help">0</property>
<property name="aui_layer"></property> <property name="No">0</property>
<property name="aui_name"></property> <property name="OK">1</property>
<property name="aui_position"></property> <property name="Save">0</property>
<property name="aui_row"></property> <property name="Yes">0</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="close_button">1</property>
<property name="context_help"></property>
<property name="context_menu">1</property>
<property name="default">0</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_CANCEL</property>
<property name="label">Cancel</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="minimum_size"></property>
<property name="moveable">1</property> <property name="name">m_sdbSizer</property>
<property name="name">m_buttonCANCEL</property>
<property name="pane_border">1</property>
<property name="pane_position"></property>
<property name="pane_size"></property>
<property name="permission">protected</property> <property name="permission">protected</property>
<property name="pin_button">1</property> <event name="OnApplyButtonClick"></event>
<property name="pos"></property> <event name="OnCancelButtonClick">OnCancelClick</event>
<property name="resize">Resizable</property> <event name="OnContextHelpButtonClick"></event>
<property name="show">1</property> <event name="OnHelpButtonClick"></event>
<property name="size"></property> <event name="OnNoButtonClick"></event>
<property name="style"></property> <event name="OnOKButtonClick">OnOkClick</event>
<property name="subclass"></property> <event name="OnSaveButtonClick"></event>
<property name="toolbar_pane">0</property> <event name="OnYesButtonClick"></event>
<property name="tooltip"></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="OnButtonClick">OnCancelClick</event>
<event name="OnChar"></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> </object>
</object> </object>

View File

@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Jun 6 2014) // C++ code generated with wxFormBuilder (version Jun 5 2014)
// http://www.wxformbuilder.org/ // http://www.wxformbuilder.org/
// //
// PLEASE DO "NOT" EDIT THIS FILE! // PLEASE DO "NOT" EDIT THIS FILE!
@ -15,14 +15,15 @@ class DIALOG_SHIM;
#include "dialog_shim.h" #include "dialog_shim.h"
#include <wx/string.h> #include <wx/string.h>
#include <wx/radiobox.h> #include <wx/checkbox.h>
#include <wx/gdicmn.h> #include <wx/gdicmn.h>
#include <wx/font.h> #include <wx/font.h>
#include <wx/colour.h> #include <wx/colour.h>
#include <wx/settings.h> #include <wx/settings.h>
#include <wx/radiobox.h>
#include <wx/sizer.h> #include <wx/sizer.h>
#include <wx/statbox.h> #include <wx/statbox.h>
#include <wx/checkbox.h> #include <wx/statline.h>
#include <wx/button.h> #include <wx/button.h>
#include <wx/dialog.h> #include <wx/dialog.h>
@ -38,39 +39,37 @@ class DIALOG_DISPLAY_OPTIONS_BASE : public DIALOG_SHIM
protected: protected:
enum enum
{ {
wxID_DISPLAY_TRACK = 1000, ID_VIAS_HOLES = 1000,
ID_VIAS_SHAPES, ID_SHOW_CLEARANCE
ID_VIAS_HOLES,
ID_SHOW_CLEARANCE,
ID_EDGES_MODULES,
ID_TEXT_MODULES,
ID_PADS_SHAPES
}; };
wxRadioBox* m_OptDisplayTracks; wxCheckBox* m_OptDisplayTracks;
wxRadioBox* m_OptDisplayVias; wxCheckBox* m_OptDisplayVias;
wxRadioBox* m_OptDisplayViaHole; wxRadioBox* m_OptDisplayViaHole;
wxRadioBox* m_ShowNetNamesOption; wxRadioBox* m_ShowNetNamesOption;
wxRadioBox* m_OptDisplayTracksClearance; wxRadioBox* m_OptDisplayTracksClearance;
wxRadioBox* m_OptDisplayModEdges; wxCheckBox* m_OptDisplayModOutlines;
wxRadioBox* m_OptDisplayModTexts; wxCheckBox* m_OptDisplayModTexts
wxRadioBox* m_OptDisplayPads; ;
wxCheckBox* m_OptDisplayPads;
wxCheckBox* m_OptDisplayPadClearence; wxCheckBox* m_OptDisplayPadClearence;
wxCheckBox* m_OptDisplayPadNumber; wxCheckBox* m_OptDisplayPadNumber;
wxCheckBox* m_OptDisplayPadNoConn; wxCheckBox* m_OptDisplayPadNoConn;
wxRadioBox* m_OptDisplayDrawings; wxCheckBox* m_OptDisplayDrawings;
wxRadioBox* m_Show_Page_Limits; wxCheckBox* m_Show_Page_Limits;
wxButton* m_buttonOK; wxStaticLine* m_staticline1;
wxButton* m_buttonCANCEL; wxStdDialogButtonSizer* m_sdbSizer;
wxButton* m_sdbSizerOK;
wxButton* m_sdbSizerCancel;
// Virtual event handlers, overide them in your derived class // Virtual event handlers, overide them in your derived class
virtual void OnOkClick( wxCommandEvent& event ) { event.Skip(); }
virtual void OnCancelClick( wxCommandEvent& event ) { event.Skip(); } virtual void OnCancelClick( wxCommandEvent& event ) { event.Skip(); }
virtual void OnOkClick( wxCommandEvent& event ) { event.Skip(); }
public: public:
DIALOG_DISPLAY_OPTIONS_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Display options"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 880,320 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); DIALOG_DISPLAY_OPTIONS_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Display options"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 562,361 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
~DIALOG_DISPLAY_OPTIONS_BASE(); ~DIALOG_DISPLAY_OPTIONS_BASE();
}; };

View File

@ -5,9 +5,9 @@
/* /*
* This program source code file is part of KiCad, a free EDA CAD application. * This program source code file is part of KiCad, a free EDA CAD application.
* *
* Copyright (C) 2013 Jean-Pierre Charras * Copyright (C) 2015 Jean-Pierre Charras, jp.charras at wanadoo.fr
* Copyright (C) 2013 Dick Hollenbeck, dick@softplc.com * Copyright (C) 2015 Dick Hollenbeck, dick@softplc.com
* Copyright (C) 2004-2013 KiCad Developers, see change_log.txt for contributors. * Copyright (C) 2004-2015 KiCad Developers, see change_log.txt for contributors.
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License * modify it under the terms of the GNU General Public License
@ -43,10 +43,13 @@
#include <class_module.h> #include <class_module.h>
#include <class_text_mod.h> #include <class_text_mod.h>
#include <validators.h>
#include <dialog_edit_module_for_BoardEditor.h> #include <dialog_edit_module_for_BoardEditor.h>
#include <wildcards_and_files_ext.h> #include <wildcards_and_files_ext.h>
size_t DIALOG_MODULE_BOARD_EDITOR::m_page = 0; // remember the last open page during session
DIALOG_MODULE_BOARD_EDITOR::DIALOG_MODULE_BOARD_EDITOR( PCB_EDIT_FRAME* aParent, DIALOG_MODULE_BOARD_EDITOR::DIALOG_MODULE_BOARD_EDITOR( PCB_EDIT_FRAME* aParent,
MODULE* aModule, MODULE* aModule,
@ -65,14 +68,19 @@ DIALOG_MODULE_BOARD_EDITOR::DIALOG_MODULE_BOARD_EDITOR( PCB_EDIT_FRAME* aParent
InitModeditProperties(); InitModeditProperties();
InitBoardProperties(); InitBoardProperties();
m_NoteBook->SetSelection( m_page );
m_sdbSizerStdButtonsOK->SetDefault(); m_sdbSizerStdButtonsOK->SetDefault();
GetSizer()->SetSizeHints( this ); GetSizer()->SetSizeHints( this );
Centre(); Centre();
} }
DIALOG_MODULE_BOARD_EDITOR::~DIALOG_MODULE_BOARD_EDITOR() DIALOG_MODULE_BOARD_EDITOR::~DIALOG_MODULE_BOARD_EDITOR()
{ {
m_page = m_NoteBook->GetSelection();
for( unsigned ii = 0; ii < m_Shapes3D_list.size(); ii++ ) for( unsigned ii = 0; ii < m_Shapes3D_list.size(); ii++ )
delete m_Shapes3D_list[ii]; delete m_Shapes3D_list[ii];
@ -417,6 +425,25 @@ void DIALOG_MODULE_BOARD_EDITOR::Remove3DShape( wxCommandEvent& event )
} }
} }
void DIALOG_MODULE_BOARD_EDITOR::Edit3DShapeFileName()
{
int idx = m_3D_ShapeNameListBox->GetSelection();
if( idx < 0 )
return;
// Edit filename
wxString filename = m_3D_ShapeNameListBox->GetStringSelection();
wxTextEntryDialog dlg( this, wxEmptyString, wxEmptyString, filename );
dlg.SetTextValidator( FILE_NAME_WITH_PATH_CHAR_VALIDATOR( &filename ) );
if( dlg.ShowModal() != wxID_OK || filename.IsEmpty() )
return; //Aborted by user
m_3D_ShapeNameListBox->SetString( idx, filename );
}
void DIALOG_MODULE_BOARD_EDITOR::BrowseAndAdd3DShapeFile() void DIALOG_MODULE_BOARD_EDITOR::BrowseAndAdd3DShapeFile()
{ {

View File

@ -1,8 +1,8 @@
/* /*
* This program source code file is part of KiCad, a free EDA CAD application. * This program source code file is part of KiCad, a free EDA CAD application.
* *
* Copyright (C) 2010-2014 Jean-Pierre Charras, jean-pierre.charras at wanadoo.fr * Copyright (C) 2010-2015 Jean-Pierre Charras, jean-pierre.charras at wanadoo.fr
* Copyright (C) 1992-2014 KiCad Developers, see AUTHORS.txt for contributors. * Copyright (C) 1992-2015 KiCad Developers, see AUTHORS.txt for contributors.
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License * modify it under the terms of the GNU General Public License
@ -38,6 +38,7 @@ private:
S3DPOINT_VALUE_CTRL * m_3D_Scale; S3DPOINT_VALUE_CTRL * m_3D_Scale;
S3DPOINT_VALUE_CTRL * m_3D_Offset; S3DPOINT_VALUE_CTRL * m_3D_Offset;
S3DPOINT_VALUE_CTRL * m_3D_Rotation; S3DPOINT_VALUE_CTRL * m_3D_Rotation;
static size_t m_page; // remember the last open page during session
public: public:
@ -51,17 +52,22 @@ private:
void InitModeditProperties(); void InitModeditProperties();
void Transfert3DValuesToDisplay( S3D_MASTER * aStruct3DSource ); void Transfert3DValuesToDisplay( S3D_MASTER * aStruct3DSource );
void TransfertDisplayTo3DValues( int aIndexSelection ); void TransfertDisplayTo3DValues( int aIndexSelection );
void Edit3DShapeFileName();
// virtual event functions // virtual event functions
void OnEditValue( wxCommandEvent& event ); void OnEditValue( wxCommandEvent& event );
void OnEditReference( wxCommandEvent& event ); void OnEditReference( wxCommandEvent& event );
void On3DShapeSelection( wxCommandEvent& event ); void On3DShapeSelection( wxCommandEvent& event );
void On3DShapeNameSelected( wxCommandEvent& event ); void On3DShapeNameSelected( wxCommandEvent& event );
void Edit3DShapeFilename( wxCommandEvent& event )
{
Edit3DShapeFileName();
}
void Remove3DShape( wxCommandEvent& event );
void Add3DShape( wxCommandEvent& event ) void Add3DShape( wxCommandEvent& event )
{ {
BrowseAndAdd3DShapeFile(); BrowseAndAdd3DShapeFile();
} }
void Remove3DShape( wxCommandEvent& event );
void OnCancelClick( wxCommandEvent& event ); void OnCancelClick( wxCommandEvent& event );
void OnOkClick( wxCommandEvent& event ); void OnOkClick( wxCommandEvent& event );
void GotoModuleEditor( wxCommandEvent& event ); void GotoModuleEditor( wxCommandEvent& event );

View File

@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Jun 6 2014) // C++ code generated with wxFormBuilder (version Jun 5 2014)
// http://www.wxformbuilder.org/ // http://www.wxformbuilder.org/
// //
// PLEASE DO "NOT" EDIT THIS FILE! // PLEASE DO "NOT" EDIT THIS FILE!
@ -356,14 +356,14 @@ DIALOG_MODULE_BOARD_EDITOR_BASE::DIALOG_MODULE_BOARD_EDITOR_BASE( wxWindow* pare
wxBoxSizer* bSizer3DButtons; wxBoxSizer* bSizer3DButtons;
bSizer3DButtons = new wxBoxSizer( wxVERTICAL ); bSizer3DButtons = new wxBoxSizer( wxVERTICAL );
m_buttonBrowse = new wxButton( m_Panel3D, ID_BROWSE_3D_LIB, _("Browse Shapes"), wxDefaultPosition, wxDefaultSize, 0 );
bSizer3DButtons->Add( m_buttonBrowse, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 );
m_buttonAdd = new wxButton( m_Panel3D, ID_ADD_3D_SHAPE, _("Add 3D Shape"), wxDefaultPosition, wxDefaultSize, 0 ); m_buttonAdd = new wxButton( m_Panel3D, ID_ADD_3D_SHAPE, _("Add 3D Shape"), wxDefaultPosition, wxDefaultSize, 0 );
bSizer3DButtons->Add( m_buttonAdd, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 ); bSizer3DButtons->Add( m_buttonAdd, 0, wxALIGN_CENTER_HORIZONTAL|wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
m_buttonRemove = new wxButton( m_Panel3D, ID_REMOVE_3D_SHAPE, _("Remove 3D Shape"), wxDefaultPosition, wxDefaultSize, 0 ); m_buttonRemove = new wxButton( m_Panel3D, ID_REMOVE_3D_SHAPE, _("Remove 3D Shape"), wxDefaultPosition, wxDefaultSize, 0 );
bSizer3DButtons->Add( m_buttonRemove, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 ); bSizer3DButtons->Add( m_buttonRemove, 0, wxALIGN_CENTER_HORIZONTAL|wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
m_buttonEdit = new wxButton( m_Panel3D, wxID_ANY, _("Edit Filename"), wxDefaultPosition, wxDefaultSize, 0 );
bSizer3DButtons->Add( m_buttonEdit, 0, wxALL|wxEXPAND, 5 );
bLowerSizer3D->Add( bSizer3DButtons, 0, wxALIGN_CENTER_VERTICAL, 5 ); bLowerSizer3D->Add( bSizer3DButtons, 0, wxALIGN_CENTER_VERTICAL, 5 );
@ -399,9 +399,9 @@ DIALOG_MODULE_BOARD_EDITOR_BASE::DIALOG_MODULE_BOARD_EDITOR_BASE( wxWindow* pare
m_buttonExchange->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_MODULE_BOARD_EDITOR_BASE::ExchangeModule ), NULL, this ); m_buttonExchange->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_MODULE_BOARD_EDITOR_BASE::ExchangeModule ), NULL, this );
m_buttonModuleEditor->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_MODULE_BOARD_EDITOR_BASE::GotoModuleEditor ), NULL, this ); m_buttonModuleEditor->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_MODULE_BOARD_EDITOR_BASE::GotoModuleEditor ), NULL, this );
m_3D_ShapeNameListBox->Connect( wxEVT_COMMAND_LISTBOX_SELECTED, wxCommandEventHandler( DIALOG_MODULE_BOARD_EDITOR_BASE::On3DShapeNameSelected ), NULL, this ); m_3D_ShapeNameListBox->Connect( wxEVT_COMMAND_LISTBOX_SELECTED, wxCommandEventHandler( DIALOG_MODULE_BOARD_EDITOR_BASE::On3DShapeNameSelected ), NULL, this );
m_buttonBrowse->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_MODULE_BOARD_EDITOR_BASE::Browse3DLib ), NULL, this );
m_buttonAdd->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_MODULE_BOARD_EDITOR_BASE::Add3DShape ), NULL, this ); m_buttonAdd->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_MODULE_BOARD_EDITOR_BASE::Add3DShape ), NULL, this );
m_buttonRemove->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_MODULE_BOARD_EDITOR_BASE::Remove3DShape ), NULL, this ); m_buttonRemove->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_MODULE_BOARD_EDITOR_BASE::Remove3DShape ), NULL, this );
m_buttonEdit->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_MODULE_BOARD_EDITOR_BASE::Edit3DShapeFilename ), NULL, this );
m_sdbSizerStdButtonsCancel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_MODULE_BOARD_EDITOR_BASE::OnCancelClick ), NULL, this ); m_sdbSizerStdButtonsCancel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_MODULE_BOARD_EDITOR_BASE::OnCancelClick ), NULL, this );
m_sdbSizerStdButtonsOK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_MODULE_BOARD_EDITOR_BASE::OnOkClick ), NULL, this ); m_sdbSizerStdButtonsOK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_MODULE_BOARD_EDITOR_BASE::OnOkClick ), NULL, this );
} }
@ -415,9 +415,9 @@ DIALOG_MODULE_BOARD_EDITOR_BASE::~DIALOG_MODULE_BOARD_EDITOR_BASE()
m_buttonExchange->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_MODULE_BOARD_EDITOR_BASE::ExchangeModule ), NULL, this ); m_buttonExchange->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_MODULE_BOARD_EDITOR_BASE::ExchangeModule ), NULL, this );
m_buttonModuleEditor->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_MODULE_BOARD_EDITOR_BASE::GotoModuleEditor ), NULL, this ); m_buttonModuleEditor->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_MODULE_BOARD_EDITOR_BASE::GotoModuleEditor ), NULL, this );
m_3D_ShapeNameListBox->Disconnect( wxEVT_COMMAND_LISTBOX_SELECTED, wxCommandEventHandler( DIALOG_MODULE_BOARD_EDITOR_BASE::On3DShapeNameSelected ), NULL, this ); m_3D_ShapeNameListBox->Disconnect( wxEVT_COMMAND_LISTBOX_SELECTED, wxCommandEventHandler( DIALOG_MODULE_BOARD_EDITOR_BASE::On3DShapeNameSelected ), NULL, this );
m_buttonBrowse->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_MODULE_BOARD_EDITOR_BASE::Browse3DLib ), NULL, this );
m_buttonAdd->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_MODULE_BOARD_EDITOR_BASE::Add3DShape ), NULL, this ); m_buttonAdd->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_MODULE_BOARD_EDITOR_BASE::Add3DShape ), NULL, this );
m_buttonRemove->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_MODULE_BOARD_EDITOR_BASE::Remove3DShape ), NULL, this ); m_buttonRemove->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_MODULE_BOARD_EDITOR_BASE::Remove3DShape ), NULL, this );
m_buttonEdit->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_MODULE_BOARD_EDITOR_BASE::Edit3DShapeFilename ), NULL, this );
m_sdbSizerStdButtonsCancel->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_MODULE_BOARD_EDITOR_BASE::OnCancelClick ), NULL, this ); m_sdbSizerStdButtonsCancel->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_MODULE_BOARD_EDITOR_BASE::OnCancelClick ), NULL, this );
m_sdbSizerStdButtonsOK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_MODULE_BOARD_EDITOR_BASE::OnOkClick ), NULL, this ); m_sdbSizerStdButtonsOK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_MODULE_BOARD_EDITOR_BASE::OnOkClick ), NULL, this );

View File

@ -4764,11 +4764,11 @@
<event name="OnUpdateUI"></event> <event name="OnUpdateUI"></event>
</object> </object>
</object> </object>
<object class="sizeritem" expanded="0"> <object class="sizeritem" expanded="1">
<property name="border">5</property> <property name="border">5</property>
<property name="flag">wxEXPAND</property> <property name="flag">wxEXPAND</property>
<property name="proportion">0</property> <property name="proportion">0</property>
<object class="wxBoxSizer" expanded="0"> <object class="wxBoxSizer" expanded="1">
<property name="minimum_size"></property> <property name="minimum_size"></property>
<property name="name">bLowerSizer3D</property> <property name="name">bLowerSizer3D</property>
<property name="orient">wxHORIZONTAL</property> <property name="orient">wxHORIZONTAL</property>
@ -5069,106 +5069,18 @@
</object> </object>
</object> </object>
</object> </object>
<object class="sizeritem" expanded="0"> <object class="sizeritem" expanded="1">
<property name="border">5</property> <property name="border">5</property>
<property name="flag">wxALIGN_CENTER_VERTICAL</property> <property name="flag">wxALIGN_CENTER_VERTICAL</property>
<property name="proportion">0</property> <property name="proportion">0</property>
<object class="wxBoxSizer" expanded="0"> <object class="wxBoxSizer" expanded="1">
<property name="minimum_size"></property> <property name="minimum_size"></property>
<property name="name">bSizer3DButtons</property> <property name="name">bSizer3DButtons</property>
<property name="orient">wxVERTICAL</property> <property name="orient">wxVERTICAL</property>
<property name="permission">none</property> <property name="permission">none</property>
<object class="sizeritem" expanded="0"> <object class="sizeritem" expanded="0">
<property name="border">5</property> <property name="border">5</property>
<property name="flag">wxALL|wxALIGN_CENTER_HORIZONTAL|wxEXPAND</property> <property name="flag">wxALIGN_CENTER_HORIZONTAL|wxEXPAND|wxTOP|wxRIGHT|wxLEFT</property>
<property name="proportion">0</property>
<object class="wxButton" 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="close_button">1</property>
<property name="context_help"></property>
<property name="context_menu">1</property>
<property name="default">0</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">ID_BROWSE_3D_LIB</property>
<property name="label">Browse Shapes</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_buttonBrowse</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"></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="OnButtonClick">Browse3DLib</event>
<event name="OnChar"></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|wxALIGN_CENTER_HORIZONTAL|wxEXPAND</property>
<property name="proportion">0</property> <property name="proportion">0</property>
<object class="wxButton" expanded="0"> <object class="wxButton" expanded="0">
<property name="BottomDockable">1</property> <property name="BottomDockable">1</property>
@ -5256,7 +5168,7 @@
</object> </object>
<object class="sizeritem" expanded="0"> <object class="sizeritem" expanded="0">
<property name="border">5</property> <property name="border">5</property>
<property name="flag">wxALL|wxALIGN_CENTER_HORIZONTAL|wxEXPAND</property> <property name="flag">wxALIGN_CENTER_HORIZONTAL|wxEXPAND|wxTOP|wxRIGHT|wxLEFT</property>
<property name="proportion">0</property> <property name="proportion">0</property>
<object class="wxButton" expanded="0"> <object class="wxButton" expanded="0">
<property name="BottomDockable">1</property> <property name="BottomDockable">1</property>
@ -5342,6 +5254,94 @@
<event name="OnUpdateUI"></event> <event name="OnUpdateUI"></event>
</object> </object>
</object> </object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxALL|wxEXPAND</property>
<property name="proportion">0</property>
<object class="wxButton" 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="close_button">1</property>
<property name="context_help"></property>
<property name="context_menu">1</property>
<property name="default">0</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">Edit Filename</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_buttonEdit</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"></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="OnButtonClick">Edit3DShapeFilename</event>
<event name="OnChar"></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> </object>
</object> </object>

View File

@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Jun 6 2014) // C++ code generated with wxFormBuilder (version Jun 5 2014)
// http://www.wxformbuilder.org/ // http://www.wxformbuilder.org/
// //
// PLEASE DO "NOT" EDIT THIS FILE! // PLEASE DO "NOT" EDIT THIS FILE!
@ -42,9 +42,8 @@ class DIALOG_SHIM;
#define ID_LISTBOX_ORIENT_SELECT 1001 #define ID_LISTBOX_ORIENT_SELECT 1001
#define ID_MODULE_PROPERTIES_EXCHANGE 1002 #define ID_MODULE_PROPERTIES_EXCHANGE 1002
#define ID_GOTO_MODULE_EDITOR 1003 #define ID_GOTO_MODULE_EDITOR 1003
#define ID_BROWSE_3D_LIB 1004 #define ID_ADD_3D_SHAPE 1004
#define ID_ADD_3D_SHAPE 1005 #define ID_REMOVE_3D_SHAPE 1005
#define ID_REMOVE_3D_SHAPE 1006
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
/// Class DIALOG_MODULE_BOARD_EDITOR_BASE /// Class DIALOG_MODULE_BOARD_EDITOR_BASE
@ -114,9 +113,9 @@ class DIALOG_MODULE_BOARD_EDITOR_BASE : public DIALOG_SHIM
wxStaticText* m_staticTextShapeOffset; wxStaticText* m_staticTextShapeOffset;
wxBoxSizer* m_bSizerShapeRotation; wxBoxSizer* m_bSizerShapeRotation;
wxStaticText* m_staticTextShapeRotation; wxStaticText* m_staticTextShapeRotation;
wxButton* m_buttonBrowse;
wxButton* m_buttonAdd; wxButton* m_buttonAdd;
wxButton* m_buttonRemove; wxButton* m_buttonRemove;
wxButton* m_buttonEdit;
wxStdDialogButtonSizer* m_sdbSizerStdButtons; wxStdDialogButtonSizer* m_sdbSizerStdButtons;
wxButton* m_sdbSizerStdButtonsOK; wxButton* m_sdbSizerStdButtonsOK;
wxButton* m_sdbSizerStdButtonsCancel; wxButton* m_sdbSizerStdButtonsCancel;
@ -128,9 +127,9 @@ class DIALOG_MODULE_BOARD_EDITOR_BASE : public DIALOG_SHIM
virtual void ExchangeModule( wxCommandEvent& event ) { event.Skip(); } virtual void ExchangeModule( wxCommandEvent& event ) { event.Skip(); }
virtual void GotoModuleEditor( wxCommandEvent& event ) { event.Skip(); } virtual void GotoModuleEditor( wxCommandEvent& event ) { event.Skip(); }
virtual void On3DShapeNameSelected( wxCommandEvent& event ) { event.Skip(); } virtual void On3DShapeNameSelected( wxCommandEvent& event ) { event.Skip(); }
virtual void Browse3DLib( wxCommandEvent& event ) { event.Skip(); }
virtual void Add3DShape( wxCommandEvent& event ) { event.Skip(); } virtual void Add3DShape( wxCommandEvent& event ) { event.Skip(); }
virtual void Remove3DShape( wxCommandEvent& event ) { event.Skip(); } virtual void Remove3DShape( wxCommandEvent& event ) { event.Skip(); }
virtual void Edit3DShapeFilename( wxCommandEvent& event ) { event.Skip(); }
virtual void OnCancelClick( wxCommandEvent& event ) { event.Skip(); } virtual void OnCancelClick( wxCommandEvent& event ) { event.Skip(); }
virtual void OnOkClick( wxCommandEvent& event ) { event.Skip(); } virtual void OnOkClick( wxCommandEvent& event ) { event.Skip(); }

View File

@ -7,10 +7,10 @@
/* /*
* This program source code file is part of KiCad, a free EDA CAD application. * This program source code file is part of KiCad, a free EDA CAD application.
* *
* Copyright (C) 2014 Jean-Pierre Charras, jp.charras at wanadoo.fr * Copyright (C) 2015 Jean-Pierre Charras, jp.charras at wanadoo.fr
* Copyright (C) 2014 Dick Hollenbeck, dick@softplc.com * Copyright (C) 2015 Dick Hollenbeck, dick@softplc.com
* Copyright (C) 2008-2014 Wayne Stambaugh <stambaughw@verizon.net> * Copyright (C) 2008-2015 Wayne Stambaugh <stambaughw@verizon.net>
* Copyright (C) 2004-2014 KiCad Developers, see change_log.txt for contributors. * Copyright (C) 2004-2015 KiCad Developers, see change_log.txt for contributors.
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License * modify it under the terms of the GNU General Public License
@ -51,6 +51,8 @@
#include <dialog_edit_module_for_Modedit.h> #include <dialog_edit_module_for_Modedit.h>
#include <wildcards_and_files_ext.h> #include <wildcards_and_files_ext.h>
size_t DIALOG_MODULE_MODULE_EDITOR::m_page = 0; // remember the last open page during session
DIALOG_MODULE_MODULE_EDITOR::DIALOG_MODULE_MODULE_EDITOR( FOOTPRINT_EDIT_FRAME* aParent, DIALOG_MODULE_MODULE_EDITOR::DIALOG_MODULE_MODULE_EDITOR( FOOTPRINT_EDIT_FRAME* aParent,
MODULE* aModule ) : MODULE* aModule ) :
@ -66,6 +68,9 @@ DIALOG_MODULE_MODULE_EDITOR::DIALOG_MODULE_MODULE_EDITOR( FOOTPRINT_EDIT_FRAME*
m_FootprintNameCtrl->SetValidator( FILE_NAME_CHAR_VALIDATOR() ); m_FootprintNameCtrl->SetValidator( FILE_NAME_CHAR_VALIDATOR() );
initModeditProperties(); initModeditProperties();
m_NoteBook->SetSelection( m_page );
m_sdbSizerStdButtonsOK->SetDefault(); m_sdbSizerStdButtonsOK->SetDefault();
GetSizer()->SetSizeHints( this ); GetSizer()->SetSizeHints( this );
Centre(); Centre();
@ -74,6 +79,8 @@ DIALOG_MODULE_MODULE_EDITOR::DIALOG_MODULE_MODULE_EDITOR( FOOTPRINT_EDIT_FRAME*
DIALOG_MODULE_MODULE_EDITOR::~DIALOG_MODULE_MODULE_EDITOR() DIALOG_MODULE_MODULE_EDITOR::~DIALOG_MODULE_MODULE_EDITOR()
{ {
m_page = m_NoteBook->GetSelection();
for( unsigned ii = 0; ii < m_shapes3D_list.size(); ii++ ) for( unsigned ii = 0; ii < m_shapes3D_list.size(); ii++ )
delete m_shapes3D_list[ii]; delete m_shapes3D_list[ii];
@ -287,6 +294,26 @@ void DIALOG_MODULE_MODULE_EDITOR::Remove3DShape(wxCommandEvent& event)
} }
void DIALOG_MODULE_MODULE_EDITOR::Edit3DShapeFileName()
{
int idx = m_3D_ShapeNameListBox->GetSelection();
if( idx < 0 )
return;
// Edit filename
wxString filename = m_3D_ShapeNameListBox->GetStringSelection();
wxTextEntryDialog dlg( this, wxEmptyString, wxEmptyString, filename );
dlg.SetTextValidator( FILE_NAME_WITH_PATH_CHAR_VALIDATOR( &filename ) );
if( dlg.ShowModal() != wxID_OK || filename.IsEmpty() )
return; //Aborted by user
m_3D_ShapeNameListBox->SetString( idx, filename );
}
void DIALOG_MODULE_MODULE_EDITOR::BrowseAndAdd3DShapeFile() void DIALOG_MODULE_MODULE_EDITOR::BrowseAndAdd3DShapeFile()
{ {
PROJECT& prj = Prj(); PROJECT& prj = Prj();

View File

@ -1,8 +1,8 @@
/* /*
* This program source code file is part of KiCad, a free EDA CAD application. * This program source code file is part of KiCad, a free EDA CAD application.
* *
* Copyright (C) 2010-2014 Jean-Pierre Charras, jean-pierre.charras at wanadoo.fr * Copyright (C) 2010-2015 Jean-Pierre Charras, jean-pierre.charras at wanadoo.fr
* Copyright (C) 1992-2014 KiCad Developers, see AUTHORS.txt for contributors. * Copyright (C) 1992-2015 KiCad Developers, see AUTHORS.txt for contributors.
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License * modify it under the terms of the GNU General Public License
@ -42,6 +42,7 @@ private:
S3DPOINT_VALUE_CTRL * m_3D_Scale; S3DPOINT_VALUE_CTRL * m_3D_Scale;
S3DPOINT_VALUE_CTRL * m_3D_Offset; S3DPOINT_VALUE_CTRL * m_3D_Offset;
S3DPOINT_VALUE_CTRL * m_3D_Rotation; S3DPOINT_VALUE_CTRL * m_3D_Rotation;
static size_t m_page; // remember the last open page during session
public: public:
@ -54,6 +55,7 @@ private:
void initModeditProperties(); void initModeditProperties();
void Transfert3DValuesToDisplay( S3D_MASTER * aStruct3DSource ); void Transfert3DValuesToDisplay( S3D_MASTER * aStruct3DSource );
void TransfertDisplayTo3DValues( int aIndexSelection ); void TransfertDisplayTo3DValues( int aIndexSelection );
void Edit3DShapeFileName();
// virtual event functions // virtual event functions
void OnEditValue( wxCommandEvent& event ); void OnEditValue( wxCommandEvent& event );
@ -65,6 +67,10 @@ private:
BrowseAndAdd3DShapeFile(); BrowseAndAdd3DShapeFile();
} }
void Remove3DShape( wxCommandEvent& event ); void Remove3DShape( wxCommandEvent& event );
void Edit3DShapeFilename( wxCommandEvent& event )
{
Edit3DShapeFileName();
}
void OnCancelClick( wxCommandEvent& event ); void OnCancelClick( wxCommandEvent& event );
void OnOkClick( wxCommandEvent& event ); void OnOkClick( wxCommandEvent& event );
}; };

View File

@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Jun 6 2014) // C++ code generated with wxFormBuilder (version Jun 5 2014)
// http://www.wxformbuilder.org/ // http://www.wxformbuilder.org/
// //
// PLEASE DO "NOT" EDIT THIS FILE! // PLEASE DO "NOT" EDIT THIS FILE!
@ -291,10 +291,13 @@ DIALOG_MODULE_MODULE_EDITOR_BASE::DIALOG_MODULE_MODULE_EDITOR_BASE( wxWindow* pa
bSizer3DButtons = new wxBoxSizer( wxVERTICAL ); bSizer3DButtons = new wxBoxSizer( wxVERTICAL );
m_buttonBrowse = new wxButton( m_Panel3D, ID_BROWSE_3D_LIB, _("Add 3D Shape"), wxDefaultPosition, wxDefaultSize, 0 ); m_buttonBrowse = new wxButton( m_Panel3D, ID_BROWSE_3D_LIB, _("Add 3D Shape"), wxDefaultPosition, wxDefaultSize, 0 );
bSizer3DButtons->Add( m_buttonBrowse, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 ); bSizer3DButtons->Add( m_buttonBrowse, 0, wxALIGN_CENTER_HORIZONTAL|wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
m_buttonRemove = new wxButton( m_Panel3D, ID_REMOVE_3D_SHAPE, _("Remove 3D Shape"), wxDefaultPosition, wxDefaultSize, 0 ); m_buttonRemove = new wxButton( m_Panel3D, ID_REMOVE_3D_SHAPE, _("Remove 3D Shape"), wxDefaultPosition, wxDefaultSize, 0 );
bSizer3DButtons->Add( m_buttonRemove, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 ); bSizer3DButtons->Add( m_buttonRemove, 0, wxALIGN_CENTER_HORIZONTAL|wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
m_buttonEdit = new wxButton( m_Panel3D, wxID_ANY, _("Edit Filename"), wxDefaultPosition, wxDefaultSize, 0 );
bSizer3DButtons->Add( m_buttonEdit, 0, wxALL|wxEXPAND, 5 );
bLowerSizer3D->Add( bSizer3DButtons, 0, wxALIGN_CENTER_VERTICAL, 5 ); bLowerSizer3D->Add( bSizer3DButtons, 0, wxALIGN_CENTER_VERTICAL, 5 );
@ -329,6 +332,7 @@ DIALOG_MODULE_MODULE_EDITOR_BASE::DIALOG_MODULE_MODULE_EDITOR_BASE( wxWindow* pa
m_3D_ShapeNameListBox->Connect( wxEVT_COMMAND_LISTBOX_SELECTED, wxCommandEventHandler( DIALOG_MODULE_MODULE_EDITOR_BASE::On3DShapeNameSelected ), NULL, this ); m_3D_ShapeNameListBox->Connect( wxEVT_COMMAND_LISTBOX_SELECTED, wxCommandEventHandler( DIALOG_MODULE_MODULE_EDITOR_BASE::On3DShapeNameSelected ), NULL, this );
m_buttonBrowse->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_MODULE_MODULE_EDITOR_BASE::Add3DShape ), NULL, this ); m_buttonBrowse->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_MODULE_MODULE_EDITOR_BASE::Add3DShape ), NULL, this );
m_buttonRemove->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_MODULE_MODULE_EDITOR_BASE::Remove3DShape ), NULL, this ); m_buttonRemove->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_MODULE_MODULE_EDITOR_BASE::Remove3DShape ), NULL, this );
m_buttonEdit->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_MODULE_MODULE_EDITOR_BASE::Edit3DShapeFilename ), NULL, this );
m_sdbSizerStdButtonsCancel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_MODULE_MODULE_EDITOR_BASE::OnCancelClick ), NULL, this ); m_sdbSizerStdButtonsCancel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_MODULE_MODULE_EDITOR_BASE::OnCancelClick ), NULL, this );
m_sdbSizerStdButtonsOK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_MODULE_MODULE_EDITOR_BASE::OnOkClick ), NULL, this ); m_sdbSizerStdButtonsOK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_MODULE_MODULE_EDITOR_BASE::OnOkClick ), NULL, this );
} }
@ -341,6 +345,7 @@ DIALOG_MODULE_MODULE_EDITOR_BASE::~DIALOG_MODULE_MODULE_EDITOR_BASE()
m_3D_ShapeNameListBox->Disconnect( wxEVT_COMMAND_LISTBOX_SELECTED, wxCommandEventHandler( DIALOG_MODULE_MODULE_EDITOR_BASE::On3DShapeNameSelected ), NULL, this ); m_3D_ShapeNameListBox->Disconnect( wxEVT_COMMAND_LISTBOX_SELECTED, wxCommandEventHandler( DIALOG_MODULE_MODULE_EDITOR_BASE::On3DShapeNameSelected ), NULL, this );
m_buttonBrowse->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_MODULE_MODULE_EDITOR_BASE::Add3DShape ), NULL, this ); m_buttonBrowse->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_MODULE_MODULE_EDITOR_BASE::Add3DShape ), NULL, this );
m_buttonRemove->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_MODULE_MODULE_EDITOR_BASE::Remove3DShape ), NULL, this ); m_buttonRemove->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_MODULE_MODULE_EDITOR_BASE::Remove3DShape ), NULL, this );
m_buttonEdit->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_MODULE_MODULE_EDITOR_BASE::Edit3DShapeFilename ), NULL, this );
m_sdbSizerStdButtonsCancel->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_MODULE_MODULE_EDITOR_BASE::OnCancelClick ), NULL, this ); m_sdbSizerStdButtonsCancel->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_MODULE_MODULE_EDITOR_BASE::OnCancelClick ), NULL, this );
m_sdbSizerStdButtonsOK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_MODULE_MODULE_EDITOR_BASE::OnOkClick ), NULL, this ); m_sdbSizerStdButtonsOK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_MODULE_MODULE_EDITOR_BASE::OnOkClick ), NULL, this );

View File

@ -3801,7 +3801,7 @@
<property name="border">5</property> <property name="border">5</property>
<property name="flag">wxALL|wxEXPAND</property> <property name="flag">wxALL|wxEXPAND</property>
<property name="proportion">0</property> <property name="proportion">0</property>
<object class="wxBoxSizer" expanded="0"> <object class="wxBoxSizer" expanded="1">
<property name="minimum_size"></property> <property name="minimum_size"></property>
<property name="name">bLowerSizer3D</property> <property name="name">bLowerSizer3D</property>
<property name="orient">wxHORIZONTAL</property> <property name="orient">wxHORIZONTAL</property>
@ -4113,7 +4113,7 @@
<property name="permission">none</property> <property name="permission">none</property>
<object class="sizeritem" expanded="0"> <object class="sizeritem" expanded="0">
<property name="border">5</property> <property name="border">5</property>
<property name="flag">wxALL|wxALIGN_CENTER_HORIZONTAL|wxEXPAND</property> <property name="flag">wxALIGN_CENTER_HORIZONTAL|wxEXPAND|wxTOP|wxRIGHT|wxLEFT</property>
<property name="proportion">0</property> <property name="proportion">0</property>
<object class="wxButton" expanded="0"> <object class="wxButton" expanded="0">
<property name="BottomDockable">1</property> <property name="BottomDockable">1</property>
@ -4201,7 +4201,7 @@
</object> </object>
<object class="sizeritem" expanded="0"> <object class="sizeritem" expanded="0">
<property name="border">5</property> <property name="border">5</property>
<property name="flag">wxALL|wxALIGN_CENTER_HORIZONTAL|wxEXPAND</property> <property name="flag">wxALIGN_CENTER_HORIZONTAL|wxEXPAND|wxTOP|wxRIGHT|wxLEFT</property>
<property name="proportion">0</property> <property name="proportion">0</property>
<object class="wxButton" expanded="0"> <object class="wxButton" expanded="0">
<property name="BottomDockable">1</property> <property name="BottomDockable">1</property>
@ -4287,6 +4287,94 @@
<event name="OnUpdateUI"></event> <event name="OnUpdateUI"></event>
</object> </object>
</object> </object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxALL|wxEXPAND</property>
<property name="proportion">0</property>
<object class="wxButton" 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="close_button">1</property>
<property name="context_help"></property>
<property name="context_menu">1</property>
<property name="default">0</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">Edit Filename</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_buttonEdit</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"></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="OnButtonClick">Edit3DShapeFilename</event>
<event name="OnChar"></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> </object>
</object> </object>

View File

@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Jun 6 2014) // C++ code generated with wxFormBuilder (version Jun 5 2014)
// http://www.wxformbuilder.org/ // http://www.wxformbuilder.org/
// //
// PLEASE DO "NOT" EDIT THIS FILE! // PLEASE DO "NOT" EDIT THIS FILE!
@ -101,6 +101,7 @@ class DIALOG_MODULE_MODULE_EDITOR_BASE : public DIALOG_SHIM
wxStaticText* m_staticTextShapeRotation; wxStaticText* m_staticTextShapeRotation;
wxButton* m_buttonBrowse; wxButton* m_buttonBrowse;
wxButton* m_buttonRemove; wxButton* m_buttonRemove;
wxButton* m_buttonEdit;
wxStdDialogButtonSizer* m_sdbSizerStdButtons; wxStdDialogButtonSizer* m_sdbSizerStdButtons;
wxButton* m_sdbSizerStdButtonsOK; wxButton* m_sdbSizerStdButtonsOK;
wxButton* m_sdbSizerStdButtonsCancel; wxButton* m_sdbSizerStdButtonsCancel;
@ -111,6 +112,7 @@ class DIALOG_MODULE_MODULE_EDITOR_BASE : public DIALOG_SHIM
virtual void On3DShapeNameSelected( wxCommandEvent& event ) { event.Skip(); } virtual void On3DShapeNameSelected( wxCommandEvent& event ) { event.Skip(); }
virtual void Add3DShape( wxCommandEvent& event ) { event.Skip(); } virtual void Add3DShape( wxCommandEvent& event ) { event.Skip(); }
virtual void Remove3DShape( wxCommandEvent& event ) { event.Skip(); } virtual void Remove3DShape( wxCommandEvent& event ) { event.Skip(); }
virtual void Edit3DShapeFilename( wxCommandEvent& event ) { event.Skip(); }
virtual void OnCancelClick( wxCommandEvent& event ) { event.Skip(); } virtual void OnCancelClick( wxCommandEvent& event ) { event.Skip(); }
virtual void OnOkClick( wxCommandEvent& event ) { event.Skip(); } virtual void OnOkClick( wxCommandEvent& event ) { event.Skip(); }

View File

@ -514,7 +514,7 @@ private:
m_cur_grid = ( m_pageNdx == 0 ) ? m_global_grid : m_project_grid; m_cur_grid = ( m_pageNdx == 0 ) ? m_global_grid : m_project_grid;
} }
void appendRowHandler( wxMouseEvent& event ) void appendRowHandler( wxCommandEvent& event )
{ {
if( m_cur_grid->AppendRows( 1 ) ) if( m_cur_grid->AppendRows( 1 ) )
{ {
@ -527,7 +527,7 @@ private:
} }
} }
void deleteRowHandler( wxMouseEvent& event ) void deleteRowHandler( wxCommandEvent& event )
{ {
#if 1 #if 1
int currRow = getCursorRow(); int currRow = getCursorRow();
@ -564,7 +564,7 @@ private:
#endif #endif
} }
void moveUpHandler( wxMouseEvent& event ) void moveUpHandler( wxCommandEvent& event )
{ {
int curRow = getCursorRow(); int curRow = getCursorRow();
if( curRow >= 1 ) if( curRow >= 1 )
@ -596,7 +596,7 @@ private:
} }
} }
void moveDownHandler( wxMouseEvent& event ) void moveDownHandler( wxCommandEvent& event )
{ {
FP_TBL_MODEL* tbl = cur_model(); FP_TBL_MODEL* tbl = cur_model();
@ -628,7 +628,7 @@ private:
} }
} }
void optionsEditor( wxMouseEvent& event ) void optionsEditor( wxCommandEvent& event )
{ {
FP_TBL_MODEL* tbl = cur_model(); FP_TBL_MODEL* tbl = cur_model();

View File

@ -206,14 +206,14 @@ DIALOG_FP_LIB_TABLE_BASE::DIALOG_FP_LIB_TABLE_BASE( wxWindow* parent, wxWindowID
wxBoxSizer* m_bottom_sizer; wxBoxSizer* m_bottom_sizer;
m_bottom_sizer = new wxBoxSizer( wxVERTICAL ); m_bottom_sizer = new wxBoxSizer( wxVERTICAL );
m_sdbSizer1 = new wxStdDialogButtonSizer(); m_sdbSizer = new wxStdDialogButtonSizer();
m_sdbSizer1OK = new wxButton( this, wxID_OK ); m_sdbSizerOK = new wxButton( this, wxID_OK );
m_sdbSizer1->AddButton( m_sdbSizer1OK ); m_sdbSizer->AddButton( m_sdbSizerOK );
m_sdbSizer1Cancel = new wxButton( this, wxID_CANCEL ); m_sdbSizerCancel = new wxButton( this, wxID_CANCEL );
m_sdbSizer1->AddButton( m_sdbSizer1Cancel ); m_sdbSizer->AddButton( m_sdbSizerCancel );
m_sdbSizer1->Realize(); m_sdbSizer->Realize();
m_bottom_sizer->Add( m_sdbSizer1, 0, wxALL|wxEXPAND, 5 ); m_bottom_sizer->Add( m_sdbSizer, 0, wxALL|wxEXPAND, 5 );
bSizer1->Add( m_bottom_sizer, 0, wxEXPAND, 5 ); bSizer1->Add( m_bottom_sizer, 0, wxEXPAND, 5 );
@ -228,14 +228,14 @@ DIALOG_FP_LIB_TABLE_BASE::DIALOG_FP_LIB_TABLE_BASE( wxWindow* parent, wxWindowID
this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DIALOG_FP_LIB_TABLE_BASE::onCancelCaptionButtonClick ) ); this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DIALOG_FP_LIB_TABLE_BASE::onCancelCaptionButtonClick ) );
this->Connect( wxEVT_KEY_DOWN, wxKeyEventHandler( DIALOG_FP_LIB_TABLE_BASE::onKeyDown ) ); this->Connect( wxEVT_KEY_DOWN, wxKeyEventHandler( DIALOG_FP_LIB_TABLE_BASE::onKeyDown ) );
m_auinotebook->Connect( wxEVT_COMMAND_AUINOTEBOOK_PAGE_CHANGED, wxAuiNotebookEventHandler( DIALOG_FP_LIB_TABLE_BASE::pageChangedHandler ), NULL, this ); m_auinotebook->Connect( wxEVT_COMMAND_AUINOTEBOOK_PAGE_CHANGED, wxAuiNotebookEventHandler( DIALOG_FP_LIB_TABLE_BASE::pageChangedHandler ), NULL, this );
m_append_button->Connect( wxEVT_LEFT_DOWN, wxMouseEventHandler( DIALOG_FP_LIB_TABLE_BASE::appendRowHandler ), NULL, this ); m_append_button->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FP_LIB_TABLE_BASE::appendRowHandler ), NULL, this );
m_buttonWizard->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FP_LIB_TABLE_BASE::OnClickLibraryWizard ), NULL, this ); m_buttonWizard->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FP_LIB_TABLE_BASE::OnClickLibraryWizard ), NULL, this );
m_delete_button->Connect( wxEVT_LEFT_DOWN, wxMouseEventHandler( DIALOG_FP_LIB_TABLE_BASE::deleteRowHandler ), NULL, this ); m_delete_button->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FP_LIB_TABLE_BASE::deleteRowHandler ), NULL, this );
m_move_up_button->Connect( wxEVT_LEFT_DOWN, wxMouseEventHandler( DIALOG_FP_LIB_TABLE_BASE::moveUpHandler ), NULL, this ); m_move_up_button->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FP_LIB_TABLE_BASE::moveUpHandler ), NULL, this );
m_move_down_button->Connect( wxEVT_LEFT_DOWN, wxMouseEventHandler( DIALOG_FP_LIB_TABLE_BASE::moveDownHandler ), NULL, this ); m_move_down_button->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FP_LIB_TABLE_BASE::moveDownHandler ), NULL, this );
m_edit_options->Connect( wxEVT_LEFT_DOWN, wxMouseEventHandler( DIALOG_FP_LIB_TABLE_BASE::optionsEditor ), NULL, this ); m_edit_options->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FP_LIB_TABLE_BASE::optionsEditor ), NULL, this );
m_sdbSizer1Cancel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FP_LIB_TABLE_BASE::onCancelButtonClick ), NULL, this ); m_sdbSizerCancel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FP_LIB_TABLE_BASE::onCancelButtonClick ), NULL, this );
m_sdbSizer1OK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FP_LIB_TABLE_BASE::onOKButtonClick ), NULL, this ); m_sdbSizerOK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FP_LIB_TABLE_BASE::onOKButtonClick ), NULL, this );
} }
DIALOG_FP_LIB_TABLE_BASE::~DIALOG_FP_LIB_TABLE_BASE() DIALOG_FP_LIB_TABLE_BASE::~DIALOG_FP_LIB_TABLE_BASE()
@ -244,13 +244,13 @@ DIALOG_FP_LIB_TABLE_BASE::~DIALOG_FP_LIB_TABLE_BASE()
this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DIALOG_FP_LIB_TABLE_BASE::onCancelCaptionButtonClick ) ); this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DIALOG_FP_LIB_TABLE_BASE::onCancelCaptionButtonClick ) );
this->Disconnect( wxEVT_KEY_DOWN, wxKeyEventHandler( DIALOG_FP_LIB_TABLE_BASE::onKeyDown ) ); this->Disconnect( wxEVT_KEY_DOWN, wxKeyEventHandler( DIALOG_FP_LIB_TABLE_BASE::onKeyDown ) );
m_auinotebook->Disconnect( wxEVT_COMMAND_AUINOTEBOOK_PAGE_CHANGED, wxAuiNotebookEventHandler( DIALOG_FP_LIB_TABLE_BASE::pageChangedHandler ), NULL, this ); m_auinotebook->Disconnect( wxEVT_COMMAND_AUINOTEBOOK_PAGE_CHANGED, wxAuiNotebookEventHandler( DIALOG_FP_LIB_TABLE_BASE::pageChangedHandler ), NULL, this );
m_append_button->Disconnect( wxEVT_LEFT_DOWN, wxMouseEventHandler( DIALOG_FP_LIB_TABLE_BASE::appendRowHandler ), NULL, this ); m_append_button->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FP_LIB_TABLE_BASE::appendRowHandler ), NULL, this );
m_buttonWizard->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FP_LIB_TABLE_BASE::OnClickLibraryWizard ), NULL, this ); m_buttonWizard->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FP_LIB_TABLE_BASE::OnClickLibraryWizard ), NULL, this );
m_delete_button->Disconnect( wxEVT_LEFT_DOWN, wxMouseEventHandler( DIALOG_FP_LIB_TABLE_BASE::deleteRowHandler ), NULL, this ); m_delete_button->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FP_LIB_TABLE_BASE::deleteRowHandler ), NULL, this );
m_move_up_button->Disconnect( wxEVT_LEFT_DOWN, wxMouseEventHandler( DIALOG_FP_LIB_TABLE_BASE::moveUpHandler ), NULL, this ); m_move_up_button->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FP_LIB_TABLE_BASE::moveUpHandler ), NULL, this );
m_move_down_button->Disconnect( wxEVT_LEFT_DOWN, wxMouseEventHandler( DIALOG_FP_LIB_TABLE_BASE::moveDownHandler ), NULL, this ); m_move_down_button->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FP_LIB_TABLE_BASE::moveDownHandler ), NULL, this );
m_edit_options->Disconnect( wxEVT_LEFT_DOWN, wxMouseEventHandler( DIALOG_FP_LIB_TABLE_BASE::optionsEditor ), NULL, this ); m_edit_options->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FP_LIB_TABLE_BASE::optionsEditor ), NULL, this );
m_sdbSizer1Cancel->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FP_LIB_TABLE_BASE::onCancelButtonClick ), NULL, this ); m_sdbSizerCancel->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FP_LIB_TABLE_BASE::onCancelButtonClick ), NULL, this );
m_sdbSizer1OK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FP_LIB_TABLE_BASE::onOKButtonClick ), NULL, this ); m_sdbSizerOK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FP_LIB_TABLE_BASE::onOKButtonClick ), NULL, this );
} }

View File

@ -44,7 +44,7 @@
<property name="minimum_size"></property> <property name="minimum_size"></property>
<property name="name">DIALOG_FP_LIB_TABLE_BASE</property> <property name="name">DIALOG_FP_LIB_TABLE_BASE</property>
<property name="pos"></property> <property name="pos"></property>
<property name="size">900,600</property> <property name="size">634,600</property>
<property name="style">wxCAPTION|wxCLOSE_BOX|wxDEFAULT_DIALOG_STYLE|wxMAXIMIZE_BOX|wxRESIZE_BORDER|wxSYSTEM_MENU</property> <property name="style">wxCAPTION|wxCLOSE_BOX|wxDEFAULT_DIALOG_STYLE|wxMAXIMIZE_BOX|wxRESIZE_BORDER|wxSYSTEM_MENU</property>
<property name="subclass">DIALOG_SHIM; dialog_shim.h</property> <property name="subclass">DIALOG_SHIM; dialog_shim.h</property>
<property name="title">PCB Library Tables</property> <property name="title">PCB Library Tables</property>
@ -1093,7 +1093,7 @@
<property name="window_extra_style"></property> <property name="window_extra_style"></property>
<property name="window_name"></property> <property name="window_name"></property>
<property name="window_style"></property> <property name="window_style"></property>
<event name="OnButtonClick"></event> <event name="OnButtonClick">appendRowHandler</event>
<event name="OnChar"></event> <event name="OnChar"></event>
<event name="OnEnterWindow"></event> <event name="OnEnterWindow"></event>
<event name="OnEraseBackground"></event> <event name="OnEraseBackground"></event>
@ -1102,7 +1102,7 @@
<event name="OnKillFocus"></event> <event name="OnKillFocus"></event>
<event name="OnLeaveWindow"></event> <event name="OnLeaveWindow"></event>
<event name="OnLeftDClick"></event> <event name="OnLeftDClick"></event>
<event name="OnLeftDown">appendRowHandler</event> <event name="OnLeftDown"></event>
<event name="OnLeftUp"></event> <event name="OnLeftUp"></event>
<event name="OnMiddleDClick"></event> <event name="OnMiddleDClick"></event>
<event name="OnMiddleDown"></event> <event name="OnMiddleDown"></event>
@ -1269,7 +1269,7 @@
<property name="window_extra_style"></property> <property name="window_extra_style"></property>
<property name="window_name"></property> <property name="window_name"></property>
<property name="window_style"></property> <property name="window_style"></property>
<event name="OnButtonClick"></event> <event name="OnButtonClick">deleteRowHandler</event>
<event name="OnChar"></event> <event name="OnChar"></event>
<event name="OnEnterWindow"></event> <event name="OnEnterWindow"></event>
<event name="OnEraseBackground"></event> <event name="OnEraseBackground"></event>
@ -1278,7 +1278,7 @@
<event name="OnKillFocus"></event> <event name="OnKillFocus"></event>
<event name="OnLeaveWindow"></event> <event name="OnLeaveWindow"></event>
<event name="OnLeftDClick"></event> <event name="OnLeftDClick"></event>
<event name="OnLeftDown">deleteRowHandler</event> <event name="OnLeftDown"></event>
<event name="OnLeftUp"></event> <event name="OnLeftUp"></event>
<event name="OnMiddleDClick"></event> <event name="OnMiddleDClick"></event>
<event name="OnMiddleDown"></event> <event name="OnMiddleDown"></event>
@ -1357,7 +1357,7 @@
<property name="window_extra_style"></property> <property name="window_extra_style"></property>
<property name="window_name"></property> <property name="window_name"></property>
<property name="window_style"></property> <property name="window_style"></property>
<event name="OnButtonClick"></event> <event name="OnButtonClick">moveUpHandler</event>
<event name="OnChar"></event> <event name="OnChar"></event>
<event name="OnEnterWindow"></event> <event name="OnEnterWindow"></event>
<event name="OnEraseBackground"></event> <event name="OnEraseBackground"></event>
@ -1366,7 +1366,7 @@
<event name="OnKillFocus"></event> <event name="OnKillFocus"></event>
<event name="OnLeaveWindow"></event> <event name="OnLeaveWindow"></event>
<event name="OnLeftDClick"></event> <event name="OnLeftDClick"></event>
<event name="OnLeftDown">moveUpHandler</event> <event name="OnLeftDown"></event>
<event name="OnLeftUp"></event> <event name="OnLeftUp"></event>
<event name="OnMiddleDClick"></event> <event name="OnMiddleDClick"></event>
<event name="OnMiddleDown"></event> <event name="OnMiddleDown"></event>
@ -1445,7 +1445,7 @@
<property name="window_extra_style"></property> <property name="window_extra_style"></property>
<property name="window_name"></property> <property name="window_name"></property>
<property name="window_style"></property> <property name="window_style"></property>
<event name="OnButtonClick"></event> <event name="OnButtonClick">moveDownHandler</event>
<event name="OnChar"></event> <event name="OnChar"></event>
<event name="OnEnterWindow"></event> <event name="OnEnterWindow"></event>
<event name="OnEraseBackground"></event> <event name="OnEraseBackground"></event>
@ -1454,7 +1454,7 @@
<event name="OnKillFocus"></event> <event name="OnKillFocus"></event>
<event name="OnLeaveWindow"></event> <event name="OnLeaveWindow"></event>
<event name="OnLeftDClick"></event> <event name="OnLeftDClick"></event>
<event name="OnLeftDown">moveDownHandler</event> <event name="OnLeftDown"></event>
<event name="OnLeftUp"></event> <event name="OnLeftUp"></event>
<event name="OnMiddleDClick"></event> <event name="OnMiddleDClick"></event>
<event name="OnMiddleDown"></event> <event name="OnMiddleDown"></event>
@ -1533,7 +1533,7 @@
<property name="window_extra_style"></property> <property name="window_extra_style"></property>
<property name="window_name"></property> <property name="window_name"></property>
<property name="window_style"></property> <property name="window_style"></property>
<event name="OnButtonClick"></event> <event name="OnButtonClick">optionsEditor</event>
<event name="OnChar"></event> <event name="OnChar"></event>
<event name="OnEnterWindow"></event> <event name="OnEnterWindow"></event>
<event name="OnEraseBackground"></event> <event name="OnEraseBackground"></event>
@ -1542,7 +1542,7 @@
<event name="OnKillFocus"></event> <event name="OnKillFocus"></event>
<event name="OnLeaveWindow"></event> <event name="OnLeaveWindow"></event>
<event name="OnLeftDClick"></event> <event name="OnLeftDClick"></event>
<event name="OnLeftDown">optionsEditor</event> <event name="OnLeftDown"></event>
<event name="OnLeftUp"></event> <event name="OnLeftUp"></event>
<event name="OnMiddleDClick"></event> <event name="OnMiddleDClick"></event>
<event name="OnMiddleDown"></event> <event name="OnMiddleDown"></event>
@ -1743,7 +1743,7 @@
<property name="Save">0</property> <property name="Save">0</property>
<property name="Yes">0</property> <property name="Yes">0</property>
<property name="minimum_size"></property> <property name="minimum_size"></property>
<property name="name">m_sdbSizer1</property> <property name="name">m_sdbSizer</property>
<property name="permission">protected</property> <property name="permission">protected</property>
<event name="OnApplyButtonClick"></event> <event name="OnApplyButtonClick"></event>
<event name="OnCancelButtonClick">onCancelButtonClick</event> <event name="OnCancelButtonClick">onCancelButtonClick</event>

View File

@ -58,27 +58,27 @@ class DIALOG_FP_LIB_TABLE_BASE : public DIALOG_SHIM
wxButton* m_move_down_button; wxButton* m_move_down_button;
wxButton* m_edit_options; wxButton* m_edit_options;
wxGrid* m_path_subs_grid; wxGrid* m_path_subs_grid;
wxStdDialogButtonSizer* m_sdbSizer1; wxStdDialogButtonSizer* m_sdbSizer;
wxButton* m_sdbSizer1OK; wxButton* m_sdbSizerOK;
wxButton* m_sdbSizer1Cancel; wxButton* m_sdbSizerCancel;
// Virtual event handlers, overide them in your derived class // Virtual event handlers, overide them in your derived class
virtual void onCancelCaptionButtonClick( wxCloseEvent& event ) = 0; virtual void onCancelCaptionButtonClick( wxCloseEvent& event ) = 0;
virtual void onKeyDown( wxKeyEvent& event ) = 0; virtual void onKeyDown( wxKeyEvent& event ) = 0;
virtual void pageChangedHandler( wxAuiNotebookEvent& event ) = 0; virtual void pageChangedHandler( wxAuiNotebookEvent& event ) = 0;
virtual void appendRowHandler( wxMouseEvent& event ) = 0; virtual void appendRowHandler( wxCommandEvent& event ) = 0;
virtual void OnClickLibraryWizard( wxCommandEvent& event ) = 0; virtual void OnClickLibraryWizard( wxCommandEvent& event ) = 0;
virtual void deleteRowHandler( wxMouseEvent& event ) = 0; virtual void deleteRowHandler( wxCommandEvent& event ) = 0;
virtual void moveUpHandler( wxMouseEvent& event ) = 0; virtual void moveUpHandler( wxCommandEvent& event ) = 0;
virtual void moveDownHandler( wxMouseEvent& event ) = 0; virtual void moveDownHandler( wxCommandEvent& event ) = 0;
virtual void optionsEditor( wxMouseEvent& event ) = 0; virtual void optionsEditor( wxCommandEvent& event ) = 0;
virtual void onCancelButtonClick( wxCommandEvent& event ) = 0; virtual void onCancelButtonClick( wxCommandEvent& event ) = 0;
virtual void onOKButtonClick( wxCommandEvent& event ) = 0; virtual void onOKButtonClick( wxCommandEvent& event ) = 0;
public: public:
DIALOG_FP_LIB_TABLE_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("PCB Library Tables"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 900,600 ), long style = wxCAPTION|wxCLOSE_BOX|wxDEFAULT_DIALOG_STYLE|wxMAXIMIZE_BOX|wxRESIZE_BORDER|wxSYSTEM_MENU ); DIALOG_FP_LIB_TABLE_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("PCB Library Tables"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 634,600 ), long style = wxCAPTION|wxCLOSE_BOX|wxDEFAULT_DIALOG_STYLE|wxMAXIMIZE_BOX|wxRESIZE_BORDER|wxSYSTEM_MENU );
~DIALOG_FP_LIB_TABLE_BASE(); ~DIALOG_FP_LIB_TABLE_BASE();
}; };

View File

@ -0,0 +1,133 @@
/*
* 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.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, you may find one here:
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
* or you may search the http://www.gnu.org website for the version 2 license,
* or you may write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
/**
* @file dialog_modedit_options.cpp
*/
#include <fctsys.h>
#include <pcbnew.h>
#include <wxPcbStruct.h>
#include <class_board_design_settings.h>
#include <base_units.h>
#include <module_editor_frame.h>
//#include <class_board.h>
#include <dialog_modedit_options_base.h>
class DIALOG_MODEDIT_OPTIONS : public DIALOG_MODEDIT_OPTIONS_BASE
{
BOARD_DESIGN_SETTINGS m_brdSettings;
FOOTPRINT_EDIT_FRAME * m_parent;
public:
DIALOG_MODEDIT_OPTIONS( FOOTPRINT_EDIT_FRAME* aParent );
private:
void OnCancelClick( wxCommandEvent& event ) { EndModal( wxID_CANCEL ); }
void OnOkClick( wxCommandEvent& event );
void initValues( );
};
DIALOG_MODEDIT_OPTIONS::DIALOG_MODEDIT_OPTIONS( FOOTPRINT_EDIT_FRAME* aParent ) :
DIALOG_MODEDIT_OPTIONS_BASE( aParent )
{
m_parent = aParent;
m_brdSettings = m_parent->GetDesignSettings();
initValues( );
GetSizer()->SetSizeHints( this );
Centre();
}
bool InvokeFPEditorPrefsDlg( FOOTPRINT_EDIT_FRAME* aCaller )
{
DIALOG_MODEDIT_OPTIONS dlg( aCaller );
int ret = dlg.ShowModal();
return ret == wxID_OK;
}
void DIALOG_MODEDIT_OPTIONS::initValues()
{
EDA_UNITS_T units = g_UserUnit;
// Modules: graphic lines width:
m_staticTextGrLineUnit->SetLabel( GetAbbreviatedUnitsLabel( units ) );
PutValueInLocalUnits( *m_OptModuleGrLineWidth, m_brdSettings.m_ModuleSegmentWidth );
// Modules: Texts: Size & width:
m_staticTextTextWidthUnit->SetLabel( GetAbbreviatedUnitsLabel( units ) );
PutValueInLocalUnits( *m_OptModuleTextWidth, m_brdSettings.m_ModuleTextWidth );
m_staticTextTextVSizeUnit->SetLabel( GetAbbreviatedUnitsLabel( units ) );
PutValueInLocalUnits( *m_OptModuleTextVSize, m_brdSettings.m_ModuleTextSize.y );
m_staticTextTextHSizeUnit->SetLabel( GetAbbreviatedUnitsLabel( units ) );
PutValueInLocalUnits( *m_OptModuleTextHSize, m_brdSettings.m_ModuleTextSize.x );
// Ref: default values
m_textCtrlRefText->SetValue( m_brdSettings.m_RefDefaultText );
int sel = m_brdSettings.m_RefDefaultlayer == F_SilkS ? 0 : 1;
m_choiceLayerReference->SetSelection( sel );
sel = m_brdSettings.m_RefDefaultVisibility ? 0 : 1;
m_choiceVisibleReference->SetSelection( sel );
// Value: default values
m_textCtrlValueText->SetValue( m_brdSettings.m_ValueDefaultText );
sel = m_brdSettings.m_ValueDefaultlayer == F_SilkS ? 0 : 1;
m_choiceLayerValue->SetSelection( sel );
sel = m_brdSettings.m_ValueDefaultVisibility ? 0 : 1;
m_choiceVisibleValue->SetSelection( sel );
}
void DIALOG_MODEDIT_OPTIONS::OnOkClick( wxCommandEvent& event )
{
m_brdSettings.m_ModuleSegmentWidth = ValueFromTextCtrl( *m_OptModuleGrLineWidth );
m_brdSettings.m_ModuleTextWidth = ValueFromTextCtrl( *m_OptModuleTextWidth );
m_brdSettings.m_ModuleTextSize.y = ValueFromTextCtrl( *m_OptModuleTextVSize );
m_brdSettings.m_ModuleTextSize.x = ValueFromTextCtrl( *m_OptModuleTextHSize );
// Ref: default values
m_brdSettings.m_RefDefaultText = m_textCtrlRefText->GetValue();
int sel = m_choiceLayerReference->GetSelection();
m_brdSettings.m_RefDefaultlayer = sel == 1 ? F_Fab : F_SilkS;
sel = m_choiceVisibleReference->GetSelection();
m_brdSettings.m_RefDefaultVisibility = sel != 1;
// Value: default values
m_brdSettings.m_ValueDefaultText = m_textCtrlValueText->GetValue();
sel = m_choiceLayerValue->GetSelection();
m_brdSettings.m_ValueDefaultlayer = sel == 1 ? F_Fab : F_SilkS;
sel = m_choiceVisibleValue->GetSelection();
m_brdSettings.m_ValueDefaultVisibility = sel != 1;
m_parent->SetDesignSettings( m_brdSettings );
EndModal( wxID_OK );
}

Some files were not shown because too many files have changed in this diff Show More