Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
K
kicad-source-mirror
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
Elphel
kicad-source-mirror
Commits
5ed0980d
Commit
5ed0980d
authored
Mar 06, 2014
by
Maciej Suminski
Browse files
Options
Browse Files
Download
Plain Diff
Merged upstream.
parents
3cb168be
a1b065c1
Changes
71
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
71 changed files
with
1133 additions
and
469 deletions
+1133
-469
3d_canvas.h
3d-viewer/3d_canvas.h
+1
-1
3d_class.cpp
3d-viewer/3d_class.cpp
+8
-1
3d_draw.cpp
3d-viewer/3d_draw.cpp
+26
-38
3d_read_mesh.cpp
3d-viewer/3d_read_mesh.cpp
+0
-17
3d_struct.h
3d-viewer/3d_struct.h
+1
-8
info3d_visu.cpp
3d-viewer/info3d_visu.cpp
+8
-7
info3d_visu.h
3d-viewer/info3d_visu.h
+8
-6
vrmlmodelparser.cpp
3d-viewer/vrmlmodelparser.cpp
+7
-4
CMakeLists.txt
CMakeLists.txt
+2
-4
COMPILING.txt
Documentation/compiling/COMPILING.txt
+2
-1
build-config.txt
Documentation/compiling/build-config.txt
+104
-34
INSTALL.txt
INSTALL.txt
+3
-0
dialog_page_settings.cpp
common/dialogs/dialog_page_settings.cpp
+1
-1
dialog_page_settings_base.cpp
common/dialogs/dialog_page_settings_base.cpp
+1
-1
dialog_page_settings_base.fbp
common/dialogs/dialog_page_settings_base.fbp
+1
-1
dialog_page_settings_base.h
common/dialogs/dialog_page_settings_base.h
+20
-21
fp_lib_table.cpp
common/fp_lib_table.cpp
+5
-3
common_help_msg.h
cvpcb/common_help_msg.h
+3
-3
cvframe.cpp
cvpcb/cvframe.cpp
+3
-0
menubar.cpp
cvpcb/menubar.cpp
+8
-8
tool_cvpcb.cpp
cvpcb/tool_cvpcb.cpp
+8
-8
component_tree_search_container.cpp
eeschema/component_tree_search_container.cpp
+27
-11
component_tree_search_container.h
eeschema/component_tree_search_container.h
+1
-1
dialog_choose_component.cpp
eeschema/dialogs/dialog_choose_component.cpp
+43
-8
dialog_choose_component.h
eeschema/dialogs/dialog_choose_component.h
+19
-6
dialog_choose_component_base.cpp
eeschema/dialogs/dialog_choose_component_base.cpp
+5
-3
dialog_choose_component_base.fbp
eeschema/dialogs/dialog_choose_component_base.fbp
+2
-2
dialog_choose_component_base.h
eeschema/dialogs/dialog_choose_component_base.h
+3
-2
getpart.cpp
eeschema/getpart.cpp
+37
-15
help_common_strings.h
eeschema/help_common_strings.h
+1
-1
libeditframe.cpp
eeschema/libeditframe.cpp
+7
-0
menubar.cpp
eeschema/menubar.cpp
+5
-5
operations_on_items_lists.cpp
eeschema/operations_on_items_lists.cpp
+0
-5
sch_component.cpp
eeschema/sch_component.cpp
+3
-4
schframe.cpp
eeschema/schframe.cpp
+7
-0
tool_sch.cpp
eeschema/tool_sch.cpp
+4
-4
viewlib_frame.cpp
eeschema/viewlib_frame.cpp
+25
-8
viewlib_frame.h
eeschema/viewlib_frame.h
+46
-27
sch_base_frame.h
include/sch_base_frame.h
+8
-2
wxPcbStruct.h
include/wxPcbStruct.h
+1
-0
commandframe.cpp
kicad/commandframe.cpp
+1
-1
install.nsi
packaging/windows/nsis/install.nsi
+35
-19
CMakeLists.txt
pcbnew/CMakeLists.txt
+11
-0
spread_footprints.cpp
pcbnew/autorouter/spread_footprints.cpp
+28
-26
board_items_to_polygon_shape_transform.cpp
pcbnew/board_items_to_polygon_shape_transform.cpp
+47
-15
dialog_gendrill.cpp
pcbnew/dialogs/dialog_gendrill.cpp
+23
-28
dialog_gendrill.h
pcbnew/dialogs/dialog_gendrill.h
+24
-4
dialog_gendrill_base.cpp
pcbnew/dialogs/dialog_gendrill_base.cpp
+4
-1
dialog_gendrill_base.fbp
pcbnew/dialogs/dialog_gendrill_base.fbp
+90
-0
dialog_gendrill_base.h
pcbnew/dialogs/dialog_gendrill_base.h
+2
-1
dialog_general_options.cpp
pcbnew/dialogs/dialog_general_options.cpp
+4
-0
dialog_global_deletion.cpp
pcbnew/dialogs/dialog_global_deletion.cpp
+81
-38
dialog_global_deletion.h
pcbnew/dialogs/dialog_global_deletion.h
+1
-0
dialog_global_deletion_base.cpp
pcbnew/dialogs/dialog_global_deletion_base.cpp
+17
-8
dialog_global_deletion_base.fbp
pcbnew/dialogs/dialog_global_deletion_base.fbp
+183
-5
dialog_global_deletion_base.h
pcbnew/dialogs/dialog_global_deletion_base.h
+5
-2
dialog_layers_setup.cpp
pcbnew/dialogs/dialog_layers_setup.cpp
+1
-0
dialog_pad_properties.cpp
pcbnew/dialogs/dialog_pad_properties.cpp
+5
-4
gen_drill_report_files.cpp
pcbnew/exporters/gen_drill_report_files.cpp
+1
-1
gendrill_Excellon_writer.cpp
pcbnew/exporters/gendrill_Excellon_writer.cpp
+9
-2
gendrill_Excellon_writer.h
pcbnew/exporters/gendrill_Excellon_writer.h
+6
-2
help_common_strings.h
pcbnew/help_common_strings.h
+2
-0
menubar_modedit.cpp
pcbnew/menubar_modedit.cpp
+26
-26
menubar_pcbframe.cpp
pcbnew/menubar_pcbframe.cpp
+7
-0
pad_edition_functions.cpp
pcbnew/pad_edition_functions.cpp
+4
-2
pcbframe.cpp
pcbnew/pcbframe.cpp
+3
-0
pcbnew_config.cpp
pcbnew/pcbnew_config.cpp
+11
-0
pcbnew_id.h
pcbnew/pcbnew_id.h
+1
-0
ratsnest_data.cpp
pcbnew/ratsnest_data.cpp
+20
-7
tool_pcb.cpp
pcbnew/tool_pcb.cpp
+11
-6
toolbars_update_user_interface.cpp
pcbnew/toolbars_update_user_interface.cpp
+6
-0
No files found.
3d-viewer/3d_canvas.h
View file @
5ed0980d
...
...
@@ -84,7 +84,7 @@ public:
GLuint
DisplayCubeforTest
();
// Just a test function
void
SetView3D
(
int
keycode
);
void
DisplayStatus
();
void
Redraw
(
bool
finish
=
false
);
void
Redraw
();
void
Render
();
/**
...
...
3d-viewer/3d_class.cpp
View file @
5ed0980d
...
...
@@ -52,8 +52,15 @@ void S3D_MATERIAL::SetMaterial()
#if 0
glColorMaterial( GL_FRONT_AND_BACK, GL_SPECULAR );
glColor3f( m_SpecularColor.x, m_SpecularColor.y, m_SpecularColor.z );
#endif
glColorMaterial( GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE );
#endif
}
void
S3D_MASTER
::
Insert
(
S3D_MATERIAL
*
aMaterial
)
{
aMaterial
->
SetNext
(
m_Materials
);
m_Materials
=
aMaterial
;
}
...
...
3d-viewer/3d_draw.cpp
View file @
5ed0980d
...
...
@@ -50,7 +50,6 @@
#include <3d_draw_basic_functions.h>
// Imported function:
extern
void
Set_Object_Data
(
std
::
vector
<
S3D_VERTEX
>&
aVertices
,
double
aBiuTo3DUnits
);
extern
void
CheckGLError
();
/* returns true if aLayer should be displayed, false otherwise
...
...
@@ -99,7 +98,7 @@ static void BuildPadShapeThickOutlineAsPolygon( D_PAD* aPad,
}
void
EDA_3D_CANVAS
::
Redraw
(
bool
finish
)
void
EDA_3D_CANVAS
::
Redraw
()
{
// SwapBuffer requires the window to be shown before calling
if
(
!
IsShown
()
)
...
...
@@ -139,11 +138,6 @@ void EDA_3D_CANVAS::Redraw( bool finish )
else
CreateDrawGL_List
();
glFlush
();
if
(
finish
)
glFinish
();
SwapBuffers
();
}
...
...
@@ -593,8 +587,11 @@ void EDA_3D_CANVAS::BuildBoard3DView()
}
// draw modules 3D shapes
for
(
MODULE
*
module
=
pcb
->
m_Modules
;
module
!=
NULL
;
module
=
module
->
Next
()
)
module
->
ReadAndInsert3DComponentShape
(
this
);
if
(
g_Parm_3D_Visu
.
GetFlag
(
FL_MODULE
)
)
{
for
(
MODULE
*
module
=
pcb
->
m_Modules
;
module
;
module
=
module
->
Next
()
)
module
->
ReadAndInsert3DComponentShape
(
this
);
}
}
...
...
@@ -831,41 +828,32 @@ void EDA_3D_CANVAS::Draw3DViaHole( SEGVIA* aVia )
void
MODULE
::
ReadAndInsert3DComponentShape
(
EDA_3D_CANVAS
*
glcanvas
)
{
// Draw module shape: 3D shape if exists (or module outlines if not exists)
S3D_MASTER
*
struct3D
=
m_3D_Drawings
;
if
(
g_Parm_3D_Visu
.
GetFlag
(
FL_MODULE
)
)
{
double
zpos
;
if
(
IsFlipped
()
)
zpos
=
g_Parm_3D_Visu
.
GetModulesZcoord3DIU
(
true
);
else
zpos
=
g_Parm_3D_Visu
.
GetModulesZcoord3DIU
(
false
);
// Read from disk and draws the footprint 3D shapes if exists
S3D_MASTER
*
shape3D
=
m_3D_Drawings
;
double
zpos
=
g_Parm_3D_Visu
.
GetModulesZcoord3DIU
(
IsFlipped
()
);
glPushMatrix
();
glPushMatrix
();
glTranslatef
(
m_Pos
.
x
*
g_Parm_3D_Visu
.
m_BiuTo3Dunits
,
-
m_Pos
.
y
*
g_Parm_3D_Visu
.
m_BiuTo3Dunits
,
zpos
);
glTranslatef
(
m_Pos
.
x
*
g_Parm_3D_Visu
.
m_BiuTo3Dunits
,
-
m_Pos
.
y
*
g_Parm_3D_Visu
.
m_BiuTo3Dunits
,
zpos
);
if
(
m_Orient
)
glRotatef
(
(
double
)
m_Orient
/
10
,
0.0
,
0.0
,
1.0
);
if
(
m_Orient
)
glRotatef
(
(
double
)
m_Orient
/
10
,
0.0
,
0.0
,
1.0
);
if
(
IsFlipped
()
)
{
glRotatef
(
180.0
,
0.0
,
1.0
,
0.0
);
glRotatef
(
180.0
,
0.0
,
0.0
,
1.0
);
}
for
(
;
struct3D
!=
NULL
;
struct3D
=
struct3D
->
Next
()
)
{
if
(
struct3D
->
Is3DType
(
S3D_MASTER
::
FILE3D_VRML
)
)
struct3D
->
ReadData
();
}
if
(
IsFlipped
()
)
{
glRotatef
(
180.0
,
0.0
,
1.0
,
0.0
);
glRotatef
(
180.0
,
0.0
,
0.0
,
1.0
);
}
glPopMatrix
();
for
(
;
shape3D
!=
NULL
;
shape3D
=
shape3D
->
Next
()
)
{
if
(
shape3D
->
Is3DType
(
S3D_MASTER
::
FILE3D_VRML
)
)
shape3D
->
ReadData
();
}
glPopMatrix
();
}
...
...
3d-viewer/3d_read_mesh.cpp
View file @
5ed0980d
...
...
@@ -38,9 +38,6 @@
#include "3d_struct.h"
#include "modelparsers.h"
// Imported function:
extern
void
Set_Object_Data
(
std
::
vector
<
S3D_VERTEX
>&
aVertices
,
double
aBiuTo3DUnits
);
S3D_MODEL_PARSER
*
S3D_MODEL_PARSER
::
Create
(
S3D_MASTER
*
aMaster
,
const
wxString
aExtension
)
...
...
@@ -96,9 +93,7 @@ const wxString S3D_MASTER::GetShape3DFullFilename()
int
S3D_MASTER
::
ReadData
()
{
if
(
m_Shape3DName
.
IsEmpty
()
)
{
return
1
;
}
wxString
filename
=
GetShape3DFullFilename
();
...
...
@@ -135,15 +130,3 @@ int S3D_MASTER::ReadData()
return
-
1
;
}
int
STRUCT_3D_SHAPE
::
ReadData
(
FILE
*
file
,
int
*
LineNum
)
{
char
line
[
512
];
while
(
GetLine
(
file
,
line
,
LineNum
,
512
)
)
{
}
return
-
1
;
}
3d-viewer/3d_struct.h
View file @
5ed0980d
...
...
@@ -117,12 +117,7 @@ public:
S3D_MASTER
*
Next
()
const
{
return
(
S3D_MASTER
*
)
Pnext
;
}
S3D_MASTER
*
Back
()
const
{
return
(
S3D_MASTER
*
)
Pback
;
}
void
Insert
(
S3D_MATERIAL
*
aMaterial
)
{
aMaterial
->
SetNext
(
m_Materials
);
m_Materials
=
aMaterial
;
}
void
Insert
(
S3D_MATERIAL
*
aMaterial
);
void
Copy
(
S3D_MASTER
*
pattern
);
int
ReadData
();
...
...
@@ -171,8 +166,6 @@ public:
STRUCT_3D_SHAPE
*
Next
()
const
{
return
(
STRUCT_3D_SHAPE
*
)
Pnext
;
}
STRUCT_3D_SHAPE
*
Back
()
const
{
return
(
STRUCT_3D_SHAPE
*
)
Pback
;
}
int
ReadData
(
FILE
*
file
,
int
*
LineNum
);
#if defined(DEBUG)
void
Show
(
int
nestLevel
,
std
::
ostream
&
os
)
const
{
ShowDummy
(
os
);
}
// override
#endif
...
...
3d-viewer/info3d_visu.cpp
View file @
5ed0980d
...
...
@@ -88,8 +88,8 @@ void INFO3D_VISU::InitSettings( BOARD* aBoard )
if
(
bbbox
.
GetWidth
()
==
0
&&
bbbox
.
GetHeight
()
==
0
)
{
bbbox
.
SetWidth
(
100
*
IU_PER_MM
);
bbbox
.
SetHeight
(
100
*
IU_PER_MM
);
bbbox
.
SetWidth
(
Millimeter2iu
(
100
)
);
bbbox
.
SetHeight
(
Millimeter2iu
(
100
)
);
}
m_BoardSettings
=
&
aBoard
->
GetDesignSettings
();
...
...
@@ -131,6 +131,7 @@ void INFO3D_VISU::InitSettings( BOARD* aBoard )
// Fill remaining unused copper layers and front layer zpos
// with m_EpoxyThickness
// Solder mask and Solder paste have the same Z position
for
(
;
layer
<=
LAST_COPPER_LAYER
;
layer
++
)
{
m_LayerZcoord
[
layer
]
=
m_EpoxyThickness
;
...
...
@@ -144,19 +145,19 @@ void INFO3D_VISU::InitSettings( BOARD* aBoard )
switch
(
layer_id
)
{
case
ADHESIVE_N_BACK
:
zpos
=
zpos_copper_back
-
4
*
zpos_offset
;
zpos
=
zpos_copper_back
-
3
*
zpos_offset
;
break
;
case
ADHESIVE_N_FRONT
:
zpos
=
zpos_copper_front
+
4
*
zpos_offset
;
zpos
=
zpos_copper_front
+
3
*
zpos_offset
;
break
;
case
SOLDERPASTE_N_BACK
:
zpos
=
zpos_copper_back
-
3
*
zpos_offset
;
zpos
=
zpos_copper_back
-
1
*
zpos_offset
;
break
;
case
SOLDERPASTE_N_FRONT
:
zpos
=
zpos_copper_front
+
3
*
zpos_offset
;
zpos
=
zpos_copper_front
+
1
*
zpos_offset
;
break
;
case
SOLDERMASK_N_BACK
:
...
...
@@ -177,7 +178,7 @@ void INFO3D_VISU::InitSettings( BOARD* aBoard )
default
:
zpos
=
zpos_copper_front
+
(
layer_id
-
FIRST_NON_COPPER_LAYER
+
5
)
*
zpos_offset
;
(
layer_id
-
FIRST_NON_COPPER_LAYER
+
4
)
*
zpos_offset
;
break
;
}
...
...
3d-viewer/info3d_visu.h
View file @
5ed0980d
...
...
@@ -148,9 +148,10 @@ public: INFO3D_VISU();
*/
int
GetCopperThicknessBIU
()
const
{
bool
use_copper_thickness
=
GetFlag
(
FL_USE_COPPER_THICKNESS
)
||
GetFlag
(
FL_USE_REALISTIC_MODE
);
return
use_copper_thickness
?
bool
use_thickness
=
GetFlag
(
FL_USE_COPPER_THICKNESS
)
// || GetFlag( FL_USE_REALISTIC_MODE )
;
return
use_thickness
?
KiROUND
(
m_CopperThickness
/
m_BiuTo3Dunits
)
:
0
;
}
...
...
@@ -173,9 +174,10 @@ public: INFO3D_VISU();
*/
int
GetNonCopperLayerThicknessBIU
()
const
{
bool
use_copper_thickness
=
GetFlag
(
FL_USE_COPPER_THICKNESS
)
||
GetFlag
(
FL_USE_REALISTIC_MODE
);
return
use_copper_thickness
?
bool
use_thickness
=
GetFlag
(
FL_USE_COPPER_THICKNESS
)
// || GetFlag( FL_USE_REALISTIC_MODE )
;
return
use_thickness
?
KiROUND
(
m_NonCopperLayerThickness
/
m_BiuTo3Dunits
)
:
0
;
}
...
...
3d-viewer/vrmlmodelparser.cpp
View file @
5ed0980d
...
...
@@ -68,6 +68,8 @@ void VRML_MODEL_PARSER::Load( const wxString aFilename )
while
(
GetLine
(
file
,
line
,
&
LineNum
,
512
)
)
{
text
=
strtok
(
line
,
sep_chars
);
if
(
text
==
NULL
)
continue
;
if
(
stricmp
(
text
,
"DEF"
)
==
0
||
stricmp
(
text
,
"Group"
)
==
0
)
{
...
...
@@ -280,8 +282,6 @@ int VRML_MODEL_PARSER::readAppearance( FILE* file, int* LineNum )
}
#define BUFSIZE 2000
void
VRML_MODEL_PARSER
::
readCoordsList
(
FILE
*
file
,
char
*
text_buffer
,
std
::
vector
<
double
>&
aList
,
int
*
LineNum
)
{
...
...
@@ -371,6 +371,9 @@ int VRML_MODEL_PARSER::readGeometry( FILE* file, int* LineNum )
strcpy
(
buffer
,
line
);
text
=
strtok
(
buffer
,
sep_chars
);
if
(
text
==
NULL
)
continue
;
if
(
*
text
==
'}'
)
{
err
=
0
;
...
...
@@ -381,7 +384,7 @@ int VRML_MODEL_PARSER::readGeometry( FILE* file, int* LineNum )
{
text
=
strtok
(
NULL
,
" ,
\t\n\r
"
);
if
(
stricmp
(
text
,
"true"
)
==
0
)
if
(
text
&&
stricmp
(
text
,
"true"
)
==
0
)
{
}
else
...
...
@@ -395,7 +398,7 @@ int VRML_MODEL_PARSER::readGeometry( FILE* file, int* LineNum )
{
text
=
strtok
(
NULL
,
" ,
\t\n\r
"
);
if
(
stricmp
(
text
,
"true"
)
==
0
)
if
(
text
&&
stricmp
(
text
,
"true"
)
==
0
)
{
}
else
...
...
CMakeLists.txt
View file @
5ed0980d
...
...
@@ -66,8 +66,6 @@ option( KICAD_BUILD_DYNAMIC
)
# WARNING: KiCad developers strongly advise you to build Boost with supplied patches,
# as it is known to work with KiCad. Other versions may contain bugs that may result
# WARNING: KiCad developers strongly advise you to build Boost with supplied patches,
# as it is known to work with KiCad. Other versions may contain bugs that may result
# in KiCad errors.
...
...
@@ -100,9 +98,9 @@ set( DOWNLOAD_DIR ${PROJECT_SOURCE_DIR}/.downloads-by-cmake
LINK_DIRECTORIES
(
${
LINK_DIRECTORIES_PATH
}
)
if
(
UNIX
)
set
(
KICAD_USER_CONFIG_DIR $ENV{HOME} CACHE PATH
"Location of user specifi
g
KiCad config files"
)
set
(
KICAD_USER_CONFIG_DIR $ENV{HOME} CACHE PATH
"Location of user specifi
c
KiCad config files"
)
elseif
(
MINGW
)
set
(
KICAD_USER_CONFIG_DIR $ENV{%APPDATA%} CACHE PATH
"Location of user specifi
g
KiCad config files"
)
set
(
KICAD_USER_CONFIG_DIR $ENV{%APPDATA%} CACHE PATH
"Location of user specifi
c
KiCad config files"
)
endif
()
mark_as_advanced
(
KICAD_USER_CONFIG_DIR
)
...
...
Documentation/compiling/COMPILING.txt
View file @
5ed0980d
...
...
@@ -212,4 +212,5 @@ Make the Debug binaries:
make
See ./cmake_config.txt for customizing the KiCad build setting.
See Documentation/compiling/build-config.txt for a list of all CMake options
available when compiling KiCad.
Documentation/compiling/build-config.txt
View file @
5ed0980d
Bazaar
------
======
KiCad uses the Bazaar version control system to track source code changes,
and download the boost libraries needed by Kicad.
The easiest way to get a copy of the KiCad source is to use Bazaar.
...
...
@@ -11,7 +12,8 @@ Be sure bzrtools is also installed.
boost libraries will be downloaded the first time you build Kicad.
CMake
-----
=====
KiCad uses CMake to generate the build files specific for the target platform
specified by the developer. This document attempts to define some of the more
common CMake and KiCad build configuration settings. You can use CMake either
...
...
@@ -23,7 +25,8 @@ http://www.cmake.org/cmake/help/documentation.html.
Useful CMake Build Settings.
----------------------------
============================
This section defines some of the more common CMake build configuration setting
used when configuring KiCad. These settings are valid for all projects that
use CMake.
...
...
@@ -39,14 +42,18 @@ switch on the command line. Please note, only a small subset of these project
generators are supported. If you want to use Eclipse on Linux to build KiCad,
you may be in for a lot of work.
CMAKE_BUILD_TYPE (Release/Debug/RelWithDebInfo/MinSizeRel)
----------------------------------------------------------
Default: Release
When configuring the KiCad build for the command line you must specify build
type. To create a debug build, set CMAKE_BUILD_TYPE to Debug. To create a
release build, set CMAKE_BUILD_TYPE to Release. See the CMake documentation
for other build types. For IDE project files, the build type can be selected
by the IDE configuration manager.
CMAKE_INSTALL_PATH (InstallPath)
--------------------------------
By default CMake will select the correct install path for your platform. If
...
...
@@ -57,7 +64,8 @@ installed on your system.
wxWidgets Library Configuration.
--------------------------------
================================
KiCad is built using the wxWidgets library. The following options allow you
to specifically tailor the wxWidgets library configuration. For the complete
list of wxWidgets setting see CMakeModules/FindwxWidgets.cmake in the KiCad
...
...
@@ -69,85 +77,147 @@ CMake looks in the standard platform locations to find the default version of
the wxWidgets library. If you wish to use a custom built wxWidgets library,
set wxWidgets_ROOT_DIR to the correct path.
wxWidgets_USE_DEBUG (ON/OFF)
----------------------------
Default: OFF
When creating a debug build of KiCad, it is often useful to link against the
debug build of the wxWidgets. To use the debug build of wxWidgets, set
wxWidgets_USE_DEBUG to ON.
wxWidgets_USE_UNICODE (ON/OFF)
------------------------------
Default: ON (wxWidgets 2.9 or later), OFF (older versions)
If your platform supports Unicode and you wish to build KiCad with Unicode
support, set wxWidgets_USE_UNICODE to ON. Please note as of the 2.9 branch
this option is not required.
KiCad Specific Options
----------------------
======================
All of the configuration settings below are specific to the KiCad project.
If for any reason you add or remove a build option to the KiCad CMake files,
please update the list below.
KICAD_SKIP_BOOST (ON/OFF)
--------------------------
Skips building the required boost library components.
WARNING: KiCad developers strongly advise you to build the bundled boost library, as it is
known to work with KiCad. Other versions may contain bugs that may result in KiCad errors.
Default: OFF
Use the version of the Boost library installed on the system rather than
building a local copy.
WARNING: The KiCad developers strongly advise you to build the bundled copy of
the Boost library, as it is known to work with KiCad. Other versions may
contain bugs that may result in KiCad errors.
USE_WX_GRAPHICS_CONTEXT (ON/OFF)
--------------------------------
This option is *Experimental* and used the advanced drawing library code
using wxGraphicsContext and should only be used for testing purposes.
Under Windows, a very recent version of mingw is needed. It also requires
wxWidgets to be built with the --enable-graphics_ctx configuration switch.
Default: OFF
This option is *Experimental*. It enables advanced drawing library code using
wxGraphicsContext and should only be used for testing purposes. Under Windows,
a very recent version of mingw is needed. It also requires wxWidgets to be
built with the --enable-graphics_ctx configuration switch.
USE_IMAGES_IN_MENUS (ON/OFF)
----------------------------
Default: OFF for OSX, ON for other platforms.
This option is used to enable or disable building KiCad with images in menu
items. If this is not defined when CMake is used to create the build files,
images will be included in menu items on all platforms except OSX.
DOWNLOAD_DIR (PATH)
-------------------
Default: <source directory>/.downloads-by-cmake
Some external dependencies are automatically download and built when you
compile KiCad. This option specifies which directory they are stored in. If you
are building multiple copies of KiCad (e.g., to test different features or your
own modifications), it is recommended you set this option to a global directory
to avoid download and building the dependencies multiple times.
KICAD_USER_CONFIG_DIR (PATH)
----------------------------
Default: Home directory (Unix-based systems), Application data directory (Windows)
This option specifies where to store user-specific configuration information.
KICAD_KEEPCASE (ON/OFF)
-----------------------
This option enables or disables turning off the automatic component name
conversion to uppercase. The default is OFF which means component names will
be converted to upper case.
Default: ON
If this is OFF, component names are automatically converted to uppercase meaning
they are case insensitive. If it is ON, component names are not changed and
are therefore case sensitive.
USE_WX_OVERLAY (ON/OFF)
-----------------------
This option enables or disables wxOverlay for drawing operation on OSX. It is
OFF by default on all platforms except OSX. Warning, this is experimental!
Default: ON for OSX, OFF for other platforms.
This option enables or disables the use of wxOverlay for drawing operations.
Warning, this is experimental!
KICAD_SCRIPTING (ON/OFF)
------------------------
This option enables or disables building Python scripting support for KiCad.
The default is OFF. Currently only Pcbnew is supported. This option requires
that SWIG and Python are installed on the system.
Default: OFF
This option enables or disables building Python scripting support within KiCad.
Currently only Pcbnew is supported. This option requires SWIG and Python to be
installed on the system.
KICAD_SCRIPTING_MODULES (ON/OFF)
--------------------------------
This option enables or disables building the KiCad modules that can be used
from scripting languages. The default is OFF. Currently only Pcbnew is
supported. This option requires that SWIG and Python are installed on the
system.
Default: OFF
This option enables or disables building KiCad Python modules that can be used
externally by Python. Currently only Pcbnew is supported. This option
requires SWIG and Python to be installed on the system.
KICAD_SCRIPTING_WXPYTHON (ON/OFF)
---------------------------------
This option enables or disables building wxPython support into KiCad for
python and py.shell. The default is OFF. Currently only Pcbnew is
supported. This option requires that SWIG, Python, and wxPython are
installed on the system.
Default: OFF
This option enables or disables building wxPython support into the KiCad
scripting support. Currently only Pcbnew is supported. This option requires
SWIG, Python, and wxPython to be installed on the system.
PYTHON_SITE_PACKAGE_PATH (PATH)
-------------------------------
Default: System site library path
When building KiCad with Python scripting enable, the Python site library path
is used by default. If you want to install the KiCad Python extension in a
different path, set this variable to the desired path.
USE_FP_LIB_TABLE (ON/OFF)
-------------------------
This option enable or disables building KiCad with the new footprint library
table support. The default setting (OFF) builds KiCad with the legacy library
path support. This option is experimental until the library table support is
ready for release.
BUILD_GITHUB_PLUGIN (ON/OFF)
----------------------------
Default: OFF
This option enables or disables building KiCad with a pcbnew plugin for loading
footprints from a GitHub repository.
KICAD_REPO_NAME (STRING)
------------------------
Default: "product"
The name of the repository this copy of KiCad was compiled from. This is
reported in the "About" dialog and is useful for people who are working with
multiple copies of the code from different sources. The default value is
"product", the name of the main development branch on Launchpad.
INSTALL.txt
View file @
5ed0980d
...
...
@@ -170,6 +170,9 @@ build directory.
Important parameters to cmake
-----------------------------
See Documentation/compiling/build-config.txt for a list of all CMake options
available when compiling KiCad.
-DCMAKE_BUILD_TYPE=<buildtype>
<buildtype> may current one of "Debug" and "Release".
...
...
common/dialogs/dialog_page_settings.cpp
View file @
5ed0980d
...
...
@@ -119,7 +119,7 @@ void DIALOG_PAGES_SETTINGS::initDialog()
// The first shows translated strings, the second contains not translated strings
m_paperSizeComboBox
->
Clear
();
for
(
unsigned
ii
=
0
;
ii
<
DIM
(
pageFmts
);
ii
++
)
for
(
unsigned
ii
=
0
;
ii
<
DIM
(
pageFmts
);
ii
++
)
{
m_pageFmt
.
Add
(
pageFmts
[
ii
]
);
m_paperSizeComboBox
->
Append
(
wxGetTranslation
(
pageFmts
[
ii
]
)
);
...
...
common/dialogs/dialog_page_settings_base.cpp
View file @
5ed0980d
...
...
@@ -35,7 +35,7 @@ DIALOG_PAGES_SETTINGS_BASE::DIALOG_PAGES_SETTINGS_BASE( wxWindow* parent, wxWind
wxString
m_paperSizeComboBoxChoices
[]
=
{
_
(
"dummy text"
)
};
int
m_paperSizeComboBoxNChoices
=
sizeof
(
m_paperSizeComboBoxChoices
)
/
sizeof
(
wxString
);
m_paperSizeComboBox
=
new
wxChoice
(
this
,
ID_CHICE_PAGE_SIZE
,
wxDefaultPosition
,
wxDefaultSize
,
m_paperSizeComboBoxNChoices
,
m_paperSizeComboBoxChoices
,
0
);
m_paperSizeComboBox
=
new
wxChoice
(
this
,
wxID_ANY
,
wxDefaultPosition
,
wxDefaultSize
,
m_paperSizeComboBoxNChoices
,
m_paperSizeComboBoxChoices
,
0
);
m_paperSizeComboBox
->
SetSelection
(
0
);
bleftSizer
->
Add
(
m_paperSizeComboBox
,
0
,
wxEXPAND
|
wxBOTTOM
|
wxRIGHT
|
wxLEFT
,
5
);
...
...
common/dialogs/dialog_page_settings_base.fbp
View file @
5ed0980d
...
...
@@ -390,7 +390,7 @@
<property
name=
"font"
></property>
<property
name=
"gripper"
>
0
</property>
<property
name=
"hidden"
>
0
</property>
<property
name=
"id"
>
ID_CHICE_PAGE_SIZE
</property>
<property
name=
"id"
>
wxID_ANY
</property>
<property
name=
"max_size"
></property>
<property
name=
"maximize_button"
>
0
</property>
<property
name=
"maximum_size"
></property>
...
...
common/dialogs/dialog_page_settings_base.h
View file @
5ed0980d
...
...
@@ -37,27 +37,26 @@ class DIALOG_SHIM;
///////////////////////////////////////////////////////////////////////////
#define ID_CHICE_PAGE_SIZE 1000
#define ID_CHOICE_PAGE_ORIENTATION 1001
#define ID_TEXTCTRL_USER_PAGE_SIZE_Y 1002
#define ID_TEXTCTRL_USER_PAGE_SIZE_X 1003
#define ID_TEXTCTRL_DATE 1004
#define ID_BTN_APPLY_DATE 1005
#define ID_PICKER_DATE 1006
#define ID_CHECKBOX_DATE 1007
#define ID_TEXTCTRL_REVISION 1008
#define ID_CHECKBOX_REVISION 1009
#define ID_TEXTCTRL_TITLE 1010
#define ID_TEXTCTRL_COMPANY 1011
#define ID_CHECKBOX_COMPANY 1012
#define ID_TEXTCTRL_COMMENT1 1013
#define ID_CHECKBOX_COMMENT1 1014
#define ID_TEXTCTRL_COMMENT2 1015
#define ID_CHECKBOX_COMMENT2 1016
#define ID_TEXTCTRL_COMMENT3 1017
#define ID_CHECKBOX_COMMENT3 1018
#define ID_TEXTCTRL_COMMENT4 1019
#define ID_CHECKBOX_COMMENT4 1020
#define ID_CHOICE_PAGE_ORIENTATION 1000
#define ID_TEXTCTRL_USER_PAGE_SIZE_Y 1001
#define ID_TEXTCTRL_USER_PAGE_SIZE_X 1002
#define ID_TEXTCTRL_DATE 1003
#define ID_BTN_APPLY_DATE 1004
#define ID_PICKER_DATE 1005
#define ID_CHECKBOX_DATE 1006
#define ID_TEXTCTRL_REVISION 1007
#define ID_CHECKBOX_REVISION 1008
#define ID_TEXTCTRL_TITLE 1009
#define ID_TEXTCTRL_COMPANY 1010
#define ID_CHECKBOX_COMPANY 1011
#define ID_TEXTCTRL_COMMENT1 1012
#define ID_CHECKBOX_COMMENT1 1013
#define ID_TEXTCTRL_COMMENT2 1014
#define ID_CHECKBOX_COMMENT2 1015
#define ID_TEXTCTRL_COMMENT3 1016
#define ID_CHECKBOX_COMMENT3 1017
#define ID_TEXTCTRL_COMMENT4 1018
#define ID_CHECKBOX_COMMENT4 1019
///////////////////////////////////////////////////////////////////////////////
/// Class DIALOG_PAGES_SETTINGS_BASE
...
...
common/fp_lib_table.cpp
View file @
5ed0980d
...
...
@@ -799,10 +799,13 @@ bool FP_LIB_TABLE::ConvertFromLegacy( NETLIST& aNetList, const wxArrayString& aL
wxString
uri
=
cur
->
rows
[
i
].
GetFullURI
(
true
);
if
(
wxFileName
::
GetPathSeparator
()
==
wxChar
(
'\\'
)
&&
uri
.
Find
(
wxChar
(
'/'
)
)
>=
0
)
&&
uri
.
Find
(
wxChar
(
'/'
)
)
>=
0
)
uri
.
Replace
(
wxT
(
"/"
),
wxT
(
"
\\
"
)
);
#ifdef __WINDOWS__
if
(
uri
.
CmpNoCase
(
libPath
)
)
#else
if
(
uri
==
libPath
)
#endif
{
libNickname
=
cur
->
rows
[
i
].
GetNickName
();
break
;
...
...
@@ -827,7 +830,6 @@ bool FP_LIB_TABLE::ConvertFromLegacy( NETLIST& aNetList, const wxArrayString& aL
else
{
FPID
newFPID
=
lastFPID
;
newFPID
.
SetLibNickname
(
libNickname
);
if
(
!
newFPID
.
IsValid
()
)
...
...
cvpcb/common_help_msg.h
View file @
5ed0980d
#ifndef HELP_MESSAGE_FILE_H
#define HELP_MESSAGE_FILE_H
#define LOAD_FILE_HELP _( "Open
a net
list file" )
#define SAVE_HLP_MSG _( "Save
the
component/footprint link file (.cmp file)" )
#define SAVE_AS_HLP_MSG _( "Save
the component/footprint link file (.cmp file) with a
new name" )
#define LOAD_FILE_HELP _( "Open
net
list file" )
#define SAVE_HLP_MSG _( "Save component/footprint link file (.cmp file)" )
#define SAVE_AS_HLP_MSG _( "Save
component/footprint link file (.cmp file) with
new name" )
#endif // HELP_MESSAGE_FILE_H
cvpcb/cvframe.cpp
View file @
5ed0980d
...
...
@@ -606,6 +606,9 @@ void CVPCB_MAINFRAME::OnSelectComponent( wxListEvent& event )
libraryName
=
m_LibraryList
->
GetSelectedLibrary
();
m_FootprintList
->
SetFootprints
(
m_footprints
,
libraryName
,
component
,
filter
);
// Tell AuiMgr that objects are changed !
m_auimgr
.
Update
();
if
(
component
==
NULL
)
return
;
...
...
cvpcb/menubar.cpp
View file @
5ed0980d
...
...
@@ -66,7 +66,7 @@ void CVPCB_MAINFRAME::ReCreateMenuBar()
// Open
AddMenuItem
(
filesMenu
,
ID_LOAD_PROJECT
,
_
(
"&Open"
),
LOAD_FILE_HELP
,
KiBitmap
(
open_document_xpm
)
);
_
(
"&Open
Netlist
"
),
LOAD_FILE_HELP
,
KiBitmap
(
open_document_xpm
)
);
// Open Recent submenu
static
wxMenu
*
openRecentMenu
;
...
...
@@ -81,7 +81,7 @@ void CVPCB_MAINFRAME::ReCreateMenuBar()
wxGetApp
().
GetFileHistory
().
AddFilesToMenu
();
AddMenuItem
(
filesMenu
,
openRecentMenu
,
-
1
,
_
(
"Open &Recent"
),
_
(
"Open
a recent opened netlist documen
t"
),
_
(
"Open
recent netlis
t"
),
KiBitmap
(
open_project_xpm
)
);
// Separator
...
...
@@ -111,7 +111,7 @@ void CVPCB_MAINFRAME::ReCreateMenuBar()
wxMenu
*
preferencesMenu
=
new
wxMenu
;
AddMenuItem
(
preferencesMenu
,
ID_CVPCB_LIB_TABLE_EDIT
,
_
(
"
Li&brary Tables
"
),
_
(
"Setup footprint libraries"
),
_
(
"
Edit Li&brary Table
"
),
_
(
"Setup footprint libraries"
),
KiBitmap
(
library_table_xpm
)
);
// Language submenu
...
...
@@ -134,7 +134,7 @@ void CVPCB_MAINFRAME::ReCreateMenuBar()
AddMenuItem
(
preferencesMenu
,
ID_SAVE_PROJECT_AS
,
_
(
"&Save Project File As"
),
_
(
"Save changes to
the project configuration to a new
file"
),
_
(
"Save changes to
a new project configuration
file"
),
KiBitmap
(
save_setup_xpm
)
);
// Menu Help:
...
...
@@ -143,12 +143,12 @@ void CVPCB_MAINFRAME::ReCreateMenuBar()
// Version info
AddHelpVersionInfoMenuEntry
(
helpMenu
);
// Contents
AddMenuItem
(
helpMenu
,
wxID_HELP
,
_
(
"&C
ontents
"
),
_
(
"Open
the CvPcb handbook
"
),
//
Manual
Contents
AddMenuItem
(
helpMenu
,
wxID_HELP
,
_
(
"&C
vPcb Manual
"
),
_
(
"Open
CvPcb manual
"
),
KiBitmap
(
online_help_xpm
)
);
// About
// About
CvPcb
AddMenuItem
(
helpMenu
,
wxID_ABOUT
,
_
(
"&About CvPcb"
),
_
(
"About CvPcb footprint selector"
),
...
...
cvpcb/tool_cvpcb.cpp
View file @
5ed0980d
...
...
@@ -58,7 +58,7 @@ void CVPCB_MAINFRAME::ReCreateHToolbar()
m_mainToolBar
->
AddSeparator
();
m_mainToolBar
->
AddTool
(
ID_CVPCB_CREATE_CONFIGWINDOW
,
wxEmptyString
,
KiBitmap
(
config_xpm
),
_
(
"
Configuration
"
)
);
_
(
"
Set CvPcb config (paths and equ files)
"
)
);
m_mainToolBar
->
AddSeparator
();
m_mainToolBar
->
AddTool
(
ID_CVPCB_CREATE_SCREENCMP
,
wxEmptyString
,
...
...
@@ -72,21 +72,21 @@ void CVPCB_MAINFRAME::ReCreateHToolbar()
m_mainToolBar
->
AddSeparator
();
m_mainToolBar
->
AddTool
(
ID_CVPCB_GOTO_PREVIOUSNA
,
wxEmptyString
,
KiBitmap
(
left_xpm
),
_
(
"Select previous
free
component"
)
);
_
(
"Select previous
unlinked
component"
)
);
m_mainToolBar
->
AddTool
(
ID_CVPCB_GOTO_FIRSTNA
,
wxEmptyString
,
KiBitmap
(
right_xpm
),
_
(
"Select next
free
component"
)
);
_
(
"Select next
unlinked
component"
)
);
m_mainToolBar
->
AddSeparator
();
m_mainToolBar
->
AddTool
(
ID_CVPCB_DEL_ASSOCIATIONS
,
wxEmptyString
,
KiBitmap
(
delete_association_xpm
),
_
(
"Delete all associations"
)
);
_
(
"Delete all associations
(links)
"
)
);
m_mainToolBar
->
AddSeparator
();
m_mainToolBar
->
AddTool
(
ID_PCB_DISPLAY_FOOTPRINT_DOC
,
wxEmptyString
,
KiBitmap
(
datasheet_xpm
),
_
(
"Display footprint
s list
documentation"
)
);
_
(
"Display footprint documentation"
)
);
m_mainToolBar
->
AddSeparator
();
m_mainToolBar
->
AddSeparator
();
...
...
@@ -94,20 +94,20 @@ void CVPCB_MAINFRAME::ReCreateHToolbar()
KiBitmap
(
module_filtered_list_xpm
),
wxNullBitmap
,
true
,
NULL
,
_
(
"Filter
the footprint list for the current component key
words"
),
_
(
"Filter
footprint list by key
words"
),
wxEmptyString
);
m_mainToolBar
->
AddTool
(
ID_CVPCB_FOOTPRINT_DISPLAY_PIN_FILTERED_LIST
,
KiBitmap
(
module_pin_filtered_list_xpm
),
wxNullBitmap
,
true
,
NULL
,
_
(
"Filter
the footprint list by pin count for the current compone
nt"
),
_
(
"Filter
footprint list by pin cou
nt"
),
wxEmptyString
);
m_mainToolBar
->
AddTool
(
ID_CVPCB_FOOTPRINT_DISPLAY_BY_LIBRARY_LIST
,
KiBitmap
(
module_library_list_xpm
),
wxNullBitmap
,
true
,
NULL
,
_
(
"Filter
the footprint list by the selected
library"
),
_
(
"Filter
footprint list by
library"
),
wxEmptyString
);
if
(
config
)
...
...
eeschema/component_tree_search_container.cpp
View file @
5ed0980d
...
...
@@ -141,8 +141,6 @@ void COMPONENT_TREE_SEARCH_CONTAINER::AddAliasList( const wxString& aNodeName,
const
wxArrayString
&
aAliasNameList
,
CMP_LIBRARY
*
aOptionalLib
)
{
static
const
wxChar
unitLetter
[]
=
wxT
(
"ABCDEFGHIJKLMNOPQRSTUVWXYZ"
);
TREE_NODE
*
const
lib_node
=
new
TREE_NODE
(
TREE_NODE
::
TYPE_LIB
,
NULL
,
NULL
,
aNodeName
,
wxEmptyString
,
wxEmptyString
);
nodes
.
push_back
(
lib_node
);
...
...
@@ -168,9 +166,20 @@ void COMPONENT_TREE_SEARCH_CONTAINER::AddAliasList( const wxString& aNodeName,
if
(
!
a
->
GetDescription
().
empty
()
)
{
// Preformatting. Unfortunately, the tree widget doesn't have columns
display_info
.
Printf
(
wxT
(
" %s[ %s ]"
),
(
a
->
GetName
().
length
()
<=
8
)
?
wxT
(
"
\t\t
"
)
:
wxT
(
"
\t
"
),
GetChars
(
a
->
GetDescription
()
)
);
// and using tabs does not work very well or does not work at all
// (depending on OS versions). So indent with spaces in fixed-font width.
// The 98%-ile of length of strings found in the standard library is 15
// characters. Use this as a reasonable cut-off point for aligned indentation.
// For the few component names longer than that, the description is indented a
// bit more.
// The max found in the default lib would be 20 characters, but that creates too
// much visible whitespace for the less extreme component names.
const
int
COLUMN_DESCR_POS
=
15
;
const
int
indent_len
=
COLUMN_DESCR_POS
-
a
->
GetName
().
length
();
display_info
=
wxString
::
Format
(
wxT
(
" %*s [ %s ]"
),
indent_len
>
0
?
indent_len
:
0
,
wxT
(
""
),
GetChars
(
a
->
GetDescription
()
)
);
}
TREE_NODE
*
alias_node
=
new
TREE_NODE
(
TREE_NODE
::
TYPE_ALIAS
,
lib_node
,
...
...
@@ -178,21 +187,28 @@ void COMPONENT_TREE_SEARCH_CONTAINER::AddAliasList( const wxString& aNodeName,
nodes
.
push_back
(
alias_node
);
if
(
a
->
GetComponent
()
->
IsMulti
()
)
// Add all units as sub-nodes.
for
(
int
u
=
0
;
u
<
a
->
GetComponent
()
->
GetPartCount
();
++
u
)
{
for
(
int
u
=
1
;
u
<=
a
->
GetComponent
()
->
GetPartCount
();
++
u
)
{
const
wxString
unitName
=
unitLetter
[
u
];
TREE_NODE
*
unit_node
=
new
TREE_NODE
(
TREE_NODE
::
TYPE_UNIT
,
alias_node
,
a
,
_
(
"Unit "
)
+
unitName
,
wxEmptyString
,
wxEmptyString
);
unit_node
->
Unit
=
u
+
1
;
wxString
unitName
=
_
(
"Unit"
);
unitName
+=
wxT
(
" "
)
+
LIB_COMPONENT
::
ReturnSubReference
(
u
,
false
);
TREE_NODE
*
unit_node
=
new
TREE_NODE
(
TREE_NODE
::
TYPE_UNIT
,
alias_node
,
a
,
unitName
,
wxEmptyString
,
wxEmptyString
);
unit_node
->
Unit
=
u
;
nodes
.
push_back
(
unit_node
);
}
}
}
}
LIB_ALIAS
*
COMPONENT_TREE_SEARCH_CONTAINER
::
GetSelectedAlias
(
int
*
aUnit
)
{
if
(
tree
==
NULL
)
return
NULL
;
const
wxTreeItemId
&
select_id
=
tree
->
GetSelection
();
BOOST_FOREACH
(
TREE_NODE
*
node
,
nodes
)
...
...
eeschema/component_tree_search_container.h
View file @
5ed0980d
...
...
@@ -97,7 +97,7 @@ public:
/** Function GetSelectedAlias
*
* @param if not-NULL, the selected sub-unit is set here.
* @return the selected alias or NULL if there is none.
* @return the selected alias or NULL if there is none
, or there is no tree
.
*/
LIB_ALIAS
*
GetSelectedAlias
(
int
*
aUnit
);
...
...
eeschema/dialogs/dialog_choose_component.cpp
View file @
5ed0980d
...
...
@@ -47,19 +47,29 @@ DIALOG_CHOOSE_COMPONENT::DIALOG_CHOOSE_COMPONENT( wxWindow* aParent, const wxStr
m_search_container
->
SetTree
(
m_libraryComponentTree
);
m_searchBox
->
SetFocus
();
m_componentDetails
->
SetEditable
(
false
);
#if wxCHECK_VERSION( 3, 0, 0 )
m_libraryComponentTree
->
ScrollTo
(
m_libraryComponentTree
->
GetFocusedItem
()
);
#endif
// The tree showing libs and component uses a fixed font,
// because we want controle the position of some info when drawing the
// tree. Using tabs does not work very well (does not work on Windows)
wxFont
font
=
wxSystemSettings
::
GetFont
(
wxSYS_DEFAULT_GUI_FONT
);
m_libraryComponentTree
->
SetFont
(
wxFont
(
font
.
GetPointSize
(),
wxFONTFAMILY_MODERN
,
wxFONTSTYLE_NORMAL
,
wxFONTWEIGHT_NORMAL
)
);
}
// After this dialog is done: return the alias that has been selected, or an
// empty string if there is none.
wxString
DIALOG_CHOOSE_COMPONENT
::
GetSelectedAliasName
(
int
*
aUnit
)
const
DIALOG_CHOOSE_COMPONENT
::~
DIALOG_CHOOSE_COMPONENT
()
{
LIB_ALIAS
*
alias
=
m_search_container
->
GetSelectedAlias
(
aUnit
);
m_search_container
->
SetTree
(
NULL
);
}
if
(
alias
)
return
alias
->
GetName
();
return
wxEmptyString
;
LIB_ALIAS
*
DIALOG_CHOOSE_COMPONENT
::
GetSelectedAlias
(
int
*
aUnit
)
const
{
return
m_search_container
->
GetSelectedAlias
(
aUnit
);
}
...
...
@@ -131,7 +141,11 @@ void DIALOG_CHOOSE_COMPONENT::OnTreeSelect( wxTreeEvent& aEvent )
}
void
DIALOG_CHOOSE_COMPONENT
::
OnDoubleClickTreeSelect
(
wxTreeEvent
&
aEvent
)
// Test strategy for OnDoubleClickTreeActivation()/OnTreeMouseUp() work around wxWidgets bug:
// - search for an item.
// - use the mouse to double-click on an item in the tree.
// -> The dialog should close, and the component should _not_ be immediately placed
void
DIALOG_CHOOSE_COMPONENT
::
OnDoubleClickTreeActivation
(
wxTreeEvent
&
aEvent
)
{
if
(
!
updateSelection
()
)
return
;
...
...
@@ -152,6 +166,27 @@ void DIALOG_CHOOSE_COMPONENT::OnTreeMouseUp( wxMouseEvent& aMouseEvent )
aMouseEvent
.
Skip
();
// Let upstream handle it.
}
// Test strategy to see if OnInterceptTreeEnter() works:
// - search for an item.
// - click into the tree once to set focus on tree; navigate. Press 'Enter'
// -> The dialog should close and the component be available to place.
void
DIALOG_CHOOSE_COMPONENT
::
OnInterceptTreeEnter
(
wxKeyEvent
&
aEvent
)
{
// We have to do some special handling for double-click on a tree-item because
// of some superfluous event delivery bug in wxWidgets (see OnDoubleClickTreeActivation()).
// In tree-activation, we assume we got a double-click and need to take special precaution
// that the mouse-up event is not delivered to the window one level up by going through
// a state-sequence OnDoubleClickTreeActivation() -> OnTreeMouseUp().
// Pressing 'Enter' within a tree will also call OnDoubleClickTreeActivation(),
// but since this is not due to the double-click and we have no way of knowing that it is
// not, we need to intercept the 'Enter' key before that to know that it is time to exit.
if
(
aEvent
.
GetKeyCode
()
==
WXK_RETURN
)
EndModal
(
wxID_OK
);
// Dialog is done.
else
aEvent
.
Skip
();
// Let tree handle that key for navigation.
}
void
DIALOG_CHOOSE_COMPONENT
::
OnStartComponentBrowser
(
wxMouseEvent
&
aEvent
)
{
...
...
eeschema/dialogs/dialog_choose_component.h
View file @
5ed0980d
...
...
@@ -27,27 +27,39 @@
#include <dialog_choose_component_base.h>
class
COMPONENT_TREE_SEARCH_CONTAINER
;
class
LIB_ALIAS
;
class
LIB_COMPONENT
;
class
wxTreeItemId
;
class
DIALOG_CHOOSE_COMPONENT
:
public
DIALOG_CHOOSE_COMPONENT_BASE
{
public
:
/**
* Create dialog to choose component.
*
* @param aParent Parent window.
* @param aTitle Dialog title.
* @param aSearchContainer The tree selection search container. Needs to be pre-populated
* This dialog does not take over ownership of this object.
* @param aDeMorganConvert preferred deMorgan conversion (TODO: should happen in dialog)
*/
DIALOG_CHOOSE_COMPONENT
(
wxWindow
*
aParent
,
const
wxString
&
aTitle
,
COMPONENT_TREE_SEARCH_CONTAINER
*
aSearch
_c
ontainer
,
COMPONENT_TREE_SEARCH_CONTAINER
*
aSearch
C
ontainer
,
int
aDeMorganConvert
);
virtual
~
DIALOG_CHOOSE_COMPONENT
();
/** Function GetSelectedAlias
Name
/** Function GetSelectedAlias
* To be called after this dialog returns from ShowModal().
*
* @param aUnit if not NULL, the selected unit is filled in here.
* @return the alias that has been selected, or
an empty string
if there is none.
* @return the alias that has been selected, or
NULL
if there is none.
*/
wxString
GetSelectedAliasName
(
int
*
aUnit
)
const
;
LIB_ALIAS
*
GetSelectedAlias
(
int
*
aUnit
)
const
;
/** Function IsExternalBrowserSelected
*
* @return true, iff the browser pressed the browsing button.
* @return true, iff the user pressed the thumbnail view of the component to
* launch the component browser.
*/
bool
IsExternalBrowserSelected
()
const
{
return
m_external_browser_requested
;
}
...
...
@@ -57,7 +69,8 @@ protected:
virtual
void
OnInterceptSearchBoxKey
(
wxKeyEvent
&
aEvent
);
virtual
void
OnTreeSelect
(
wxTreeEvent
&
aEvent
);
virtual
void
OnDoubleClickTreeSelect
(
wxTreeEvent
&
aEvent
);
virtual
void
OnDoubleClickTreeActivation
(
wxTreeEvent
&
aEvent
);
virtual
void
OnInterceptTreeEnter
(
wxKeyEvent
&
aEvent
);
virtual
void
OnTreeMouseUp
(
wxMouseEvent
&
aMouseEvent
);
virtual
void
OnStartComponentBrowser
(
wxMouseEvent
&
aEvent
);
...
...
eeschema/dialogs/dialog_choose_component_base.cpp
View file @
5ed0980d
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version
Nov 6 2013
)
// C++ code generated with wxFormBuilder (version
Feb 22 2014
)
// http://www.wxformbuilder.org/
//
// PLEASE DO "NOT" EDIT THIS FILE!
...
...
@@ -75,8 +75,9 @@ DIALOG_CHOOSE_COMPONENT_BASE::DIALOG_CHOOSE_COMPONENT_BASE( wxWindow* parent, wx
m_searchBox
->
Connect
(
wxEVT_KEY_DOWN
,
wxKeyEventHandler
(
DIALOG_CHOOSE_COMPONENT_BASE
::
OnInterceptSearchBoxKey
),
NULL
,
this
);
m_searchBox
->
Connect
(
wxEVT_COMMAND_TEXT_UPDATED
,
wxCommandEventHandler
(
DIALOG_CHOOSE_COMPONENT_BASE
::
OnSearchBoxChange
),
NULL
,
this
);
m_searchBox
->
Connect
(
wxEVT_COMMAND_TEXT_ENTER
,
wxCommandEventHandler
(
DIALOG_CHOOSE_COMPONENT_BASE
::
OnSearchBoxEnter
),
NULL
,
this
);
m_libraryComponentTree
->
Connect
(
wxEVT_KEY_UP
,
wxKeyEventHandler
(
DIALOG_CHOOSE_COMPONENT_BASE
::
OnInterceptTreeEnter
),
NULL
,
this
);
m_libraryComponentTree
->
Connect
(
wxEVT_LEFT_UP
,
wxMouseEventHandler
(
DIALOG_CHOOSE_COMPONENT_BASE
::
OnTreeMouseUp
),
NULL
,
this
);
m_libraryComponentTree
->
Connect
(
wxEVT_COMMAND_TREE_ITEM_ACTIVATED
,
wxTreeEventHandler
(
DIALOG_CHOOSE_COMPONENT_BASE
::
OnDoubleClickTree
Select
),
NULL
,
this
);
m_libraryComponentTree
->
Connect
(
wxEVT_COMMAND_TREE_ITEM_ACTIVATED
,
wxTreeEventHandler
(
DIALOG_CHOOSE_COMPONENT_BASE
::
OnDoubleClickTree
Activation
),
NULL
,
this
);
m_libraryComponentTree
->
Connect
(
wxEVT_COMMAND_TREE_SEL_CHANGED
,
wxTreeEventHandler
(
DIALOG_CHOOSE_COMPONENT_BASE
::
OnTreeSelect
),
NULL
,
this
);
m_componentView
->
Connect
(
wxEVT_LEFT_UP
,
wxMouseEventHandler
(
DIALOG_CHOOSE_COMPONENT_BASE
::
OnStartComponentBrowser
),
NULL
,
this
);
m_componentView
->
Connect
(
wxEVT_PAINT
,
wxPaintEventHandler
(
DIALOG_CHOOSE_COMPONENT_BASE
::
OnHandlePreviewRepaint
),
NULL
,
this
);
...
...
@@ -88,8 +89,9 @@ DIALOG_CHOOSE_COMPONENT_BASE::~DIALOG_CHOOSE_COMPONENT_BASE()
m_searchBox
->
Disconnect
(
wxEVT_KEY_DOWN
,
wxKeyEventHandler
(
DIALOG_CHOOSE_COMPONENT_BASE
::
OnInterceptSearchBoxKey
),
NULL
,
this
);
m_searchBox
->
Disconnect
(
wxEVT_COMMAND_TEXT_UPDATED
,
wxCommandEventHandler
(
DIALOG_CHOOSE_COMPONENT_BASE
::
OnSearchBoxChange
),
NULL
,
this
);
m_searchBox
->
Disconnect
(
wxEVT_COMMAND_TEXT_ENTER
,
wxCommandEventHandler
(
DIALOG_CHOOSE_COMPONENT_BASE
::
OnSearchBoxEnter
),
NULL
,
this
);
m_libraryComponentTree
->
Disconnect
(
wxEVT_KEY_UP
,
wxKeyEventHandler
(
DIALOG_CHOOSE_COMPONENT_BASE
::
OnInterceptTreeEnter
),
NULL
,
this
);
m_libraryComponentTree
->
Disconnect
(
wxEVT_LEFT_UP
,
wxMouseEventHandler
(
DIALOG_CHOOSE_COMPONENT_BASE
::
OnTreeMouseUp
),
NULL
,
this
);
m_libraryComponentTree
->
Disconnect
(
wxEVT_COMMAND_TREE_ITEM_ACTIVATED
,
wxTreeEventHandler
(
DIALOG_CHOOSE_COMPONENT_BASE
::
OnDoubleClickTree
Select
),
NULL
,
this
);
m_libraryComponentTree
->
Disconnect
(
wxEVT_COMMAND_TREE_ITEM_ACTIVATED
,
wxTreeEventHandler
(
DIALOG_CHOOSE_COMPONENT_BASE
::
OnDoubleClickTree
Activation
),
NULL
,
this
);
m_libraryComponentTree
->
Disconnect
(
wxEVT_COMMAND_TREE_SEL_CHANGED
,
wxTreeEventHandler
(
DIALOG_CHOOSE_COMPONENT_BASE
::
OnTreeSelect
),
NULL
,
this
);
m_componentView
->
Disconnect
(
wxEVT_LEFT_UP
,
wxMouseEventHandler
(
DIALOG_CHOOSE_COMPONENT_BASE
::
OnStartComponentBrowser
),
NULL
,
this
);
m_componentView
->
Disconnect
(
wxEVT_PAINT
,
wxPaintEventHandler
(
DIALOG_CHOOSE_COMPONENT_BASE
::
OnHandlePreviewRepaint
),
NULL
,
this
);
...
...
eeschema/dialogs/dialog_choose_component_base.fbp
View file @
5ed0980d
...
...
@@ -338,7 +338,7 @@
<event
name=
"OnEnterWindow"
></event>
<event
name=
"OnEraseBackground"
></event>
<event
name=
"OnKeyDown"
></event>
<event
name=
"OnKeyUp"
></event>
<event
name=
"OnKeyUp"
>
OnInterceptTreeEnter
</event>
<event
name=
"OnKillFocus"
></event>
<event
name=
"OnLeaveWindow"
></event>
<event
name=
"OnLeftDClick"
></event>
...
...
@@ -363,7 +363,7 @@
<event
name=
"OnTreeEndDrag"
></event>
<event
name=
"OnTreeEndLabelEdit"
></event>
<event
name=
"OnTreeGetInfo"
></event>
<event
name=
"OnTreeItemActivated"
>
OnDoubleClickTree
Select
</event>
<event
name=
"OnTreeItemActivated"
>
OnDoubleClickTree
Activation
</event>
<event
name=
"OnTreeItemCollapsed"
></event>
<event
name=
"OnTreeItemCollapsing"
></event>
<event
name=
"OnTreeItemExpanded"
></event>
...
...
eeschema/dialogs/dialog_choose_component_base.h
View file @
5ed0980d
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version
Nov 6 2013
)
// C++ code generated with wxFormBuilder (version
Feb 22 2014
)
// http://www.wxformbuilder.org/
//
// PLEASE DO "NOT" EDIT THIS FILE!
...
...
@@ -50,8 +50,9 @@ class DIALOG_CHOOSE_COMPONENT_BASE : public DIALOG_SHIM
virtual
void
OnInterceptSearchBoxKey
(
wxKeyEvent
&
event
)
{
event
.
Skip
();
}
virtual
void
OnSearchBoxChange
(
wxCommandEvent
&
event
)
{
event
.
Skip
();
}
virtual
void
OnSearchBoxEnter
(
wxCommandEvent
&
event
)
{
event
.
Skip
();
}
virtual
void
OnInterceptTreeEnter
(
wxKeyEvent
&
event
)
{
event
.
Skip
();
}
virtual
void
OnTreeMouseUp
(
wxMouseEvent
&
event
)
{
event
.
Skip
();
}
virtual
void
OnDoubleClickTree
Select
(
wxTreeEvent
&
event
)
{
event
.
Skip
();
}
virtual
void
OnDoubleClickTree
Activation
(
wxTreeEvent
&
event
)
{
event
.
Skip
();
}
virtual
void
OnTreeSelect
(
wxTreeEvent
&
event
)
{
event
.
Skip
();
}
virtual
void
OnStartComponentBrowser
(
wxMouseEvent
&
event
)
{
event
.
Skip
();
}
virtual
void
OnHandlePreviewRepaint
(
wxPaintEvent
&
event
)
{
event
.
Skip
();
}
...
...
eeschema/getpart.cpp
View file @
5ed0980d
...
...
@@ -52,8 +52,8 @@
#include <boost/foreach.hpp>
// TODO(hzeller): would be good if we could give a pre-selected component.
wxString
SCH_BASE_FRAME
::
SelectComponentFromLibBrowser
(
void
)
wxString
SCH_BASE_FRAME
::
SelectComponentFromLibBrowser
(
LIB_ALIAS
*
aPreselectedAlias
,
int
*
aUnit
,
int
*
aConvert
)
{
wxSemaphore
semaphore
(
0
,
1
);
wxString
cmpname
;
...
...
@@ -64,7 +64,21 @@ wxString SCH_BASE_FRAME::SelectComponentFromLibBrowser( void )
viewlibFrame
->
Destroy
();
viewlibFrame
=
new
LIB_VIEW_FRAME
(
this
,
NULL
,
&
semaphore
,
KICAD_DEFAULT_DRAWFRAME_STYLE
|
wxFRAME_FLOAT_ON_PARENT
);
KICAD_DEFAULT_DRAWFRAME_STYLE
|
wxFRAME_FLOAT_ON_PARENT
);
if
(
aPreselectedAlias
)
{
viewlibFrame
->
SetSelectedLibrary
(
aPreselectedAlias
->
GetLibraryName
()
);
viewlibFrame
->
SetSelectedComponent
(
aPreselectedAlias
->
GetName
()
);
}
if
(
aUnit
&&
*
aUnit
>
0
)
viewlibFrame
->
SetUnit
(
*
aUnit
);
if
(
aConvert
&&
*
aConvert
>
0
)
viewlibFrame
->
SetConvert
(
*
aConvert
);
viewlibFrame
->
Refresh
();
// Show the library viewer frame until it is closed
// Wait for viewer closing event:
while
(
semaphore
.
TryWait
()
==
wxSEMA_BUSY
)
...
...
@@ -74,6 +88,13 @@ wxString SCH_BASE_FRAME::SelectComponentFromLibBrowser( void )
}
cmpname
=
viewlibFrame
->
GetSelectedComponent
();
if
(
aUnit
)
*
aUnit
=
viewlibFrame
->
GetUnit
();
if
(
aConvert
)
*
aConvert
=
viewlibFrame
->
GetConvert
();
viewlibFrame
->
Destroy
();
return
cmpname
;
...
...
@@ -114,7 +135,13 @@ wxString SCH_BASE_FRAME::SelectComponentFromLibrary( const wxString& aLibname,
{
// This is good for a transition for experineced users: giving them a History. Ideally,
// we actually make this part even faster to access with a popup on ALT-a or something.
search_container
.
AddAliasList
(
_
(
"-- History --"
),
aHistoryList
,
NULL
);
// the history is under a node named "-- History --"
// However, because it is translatable, and we need to have a node name starting by "-- "
// because we (later) sort all node names alphabetically and this node should be the first,
// we build it with only with "History" string translatable
wxString
nodename
;
nodename
<<
wxT
(
"-- "
)
<<
_
(
"History"
)
<<
wxT
(
" --"
);
search_container
.
AddAliasList
(
nodename
,
aHistoryList
,
NULL
);
search_container
.
SetPreselectNode
(
aHistoryList
[
0
],
aHistoryLastUnit
);
}
...
...
@@ -125,18 +152,13 @@ wxString SCH_BASE_FRAME::SelectComponentFromLibrary( const wxString& aLibname,
if
(
dlg
.
ShowModal
()
==
wxID_CANCEL
)
return
wxEmptyString
;
wxString
cmpName
=
dlg
.
GetSelectedAliasName
(
aUnit
);
if
(
dlg
.
IsExternalBrowserSelected
()
)
{
cmpName
=
SelectComponentFromLibBrowser
();
// Would be good if we could pre-select.
if
(
aUnit
)
*
aUnit
=
LIB_VIEW_FRAME
::
GetUnit
();
wxString
cmpName
;
LIB_ALIAS
*
const
alias
=
dlg
.
GetSelectedAlias
(
aUnit
);
if
(
alias
)
cmpName
=
alias
->
GetName
();
if
(
aConvert
)
*
aConvert
=
LIB_VIEW_FRAME
::
GetConvert
();
}
if
(
dlg
.
IsExternalBrowserSelected
()
)
// User requested big component browser.
cmpName
=
SelectComponentFromLibBrowser
(
alias
,
aUnit
,
aConvert
);
if
(
!
cmpName
.
empty
()
)
{
...
...
eeschema/help_common_strings.h
View file @
5ed0980d
...
...
@@ -47,7 +47,7 @@
"Place hierarchical pin imported from the corresponding hierarchical label" )
#define HELP_PLACE_SHEETPIN _( "Place hierarchical pin in sheet" )
#define HELP_PLACE_GRAPHICLINES _( "Place graphic lines or polygons" )
#define HELP_PLACE_GRAPHICTEXTS _( "Place
graphic text/commen
t" )
#define HELP_PLACE_GRAPHICTEXTS _( "Place
tex
t" )
#define HELP_ANNOTATE _( "Annotate schematic components" )
#define HELP_RUN_LIB_EDITOR _( "Library Editor - Create/edit components" )
...
...
eeschema/libeditframe.cpp
View file @
5ed0980d
...
...
@@ -221,6 +221,13 @@ LIB_EDIT_FRAME::LIB_EDIT_FRAME( SCH_EDIT_FRAME* aParent,
LoadSettings
();
// Ensure m_LastGridSizeId is an offset inside the allowed schematic range
if
(
m_LastGridSizeId
<
ID_POPUP_GRID_LEVEL_50
-
ID_POPUP_GRID_LEVEL_1000
)
m_LastGridSizeId
=
ID_POPUP_GRID_LEVEL_50
-
ID_POPUP_GRID_LEVEL_1000
;
if
(
m_LastGridSizeId
>
ID_POPUP_GRID_LEVEL_1
-
ID_POPUP_GRID_LEVEL_1000
)
m_LastGridSizeId
=
ID_POPUP_GRID_LEVEL_1
-
ID_POPUP_GRID_LEVEL_1000
;
SetSize
(
m_FramePos
.
x
,
m_FramePos
.
y
,
m_FrameSize
.
x
,
m_FrameSize
.
y
);
GetScreen
()
->
SetGrid
(
ID_POPUP_GRID_LEVEL_1000
+
m_LastGridSizeId
);
...
...
eeschema/menubar.cpp
View file @
5ed0980d
...
...
@@ -71,10 +71,10 @@ void SCH_EDIT_FRAME::ReCreateMenuBar()
KiBitmap
(
new_xpm
)
);
// Open
text
=
AddHotkeyName
(
_
(
"&Open Schematic
Shee
t"
),
s_Schematic_Hokeys_Descr
,
HK_LOAD_SCH
);
text
=
AddHotkeyName
(
_
(
"&Open Schematic
Projec
t"
),
s_Schematic_Hokeys_Descr
,
HK_LOAD_SCH
);
AddMenuItem
(
fileMenu
,
ID_LOAD_PROJECT
,
text
,
_
(
"Open an existing schematic
sheet
"
),
_
(
"Open an existing schematic
hierarchy
"
),
KiBitmap
(
open_document_xpm
)
);
// Open Recent submenu
...
...
@@ -399,8 +399,8 @@ void SCH_EDIT_FRAME::ReCreateMenuBar()
// Library
AddMenuItem
(
preferencesMenu
,
ID_CONFIG_REQ
,
_
(
"Set
&Library Path
"
),
_
(
"Set
library preference
s"
),
_
(
"Set
Active &Libraries
"
),
_
(
"Set
active library list and library path
s"
),
KiBitmap
(
library_xpm
)
);
// Colors
...
...
@@ -497,7 +497,7 @@ void SCH_EDIT_FRAME::ReCreateMenuBar()
//Run CvPcb
AddMenuItem
(
toolsMenu
,
ID_TO_CVPCB
,
_
(
"A&ssign Component Footprint
s
"
),
_
(
"A&ssign Component Footprint"
),
_
(
"Run CvPcb"
),
KiBitmap
(
cvpcb_xpm
)
);
...
...
eeschema/operations_on_items_lists.cpp
View file @
5ed0980d
...
...
@@ -59,11 +59,6 @@ void RotateListOfItems( PICKED_ITEMS_LIST& aItemsList, wxPoint& rotationPoint )
}
void
DeleteItemsInList
(
EDA_DRAW_PANEL
*
panel
,
PICKED_ITEMS_LIST
&
aItemsList
);
void
DuplicateItemsInList
(
SCH_SCREEN
*
screen
,
PICKED_ITEMS_LIST
&
aItemsList
,
const
wxPoint
aMoveVector
);
void
MirrorY
(
PICKED_ITEMS_LIST
&
aItemsList
,
wxPoint
&
aMirrorPoint
)
{
for
(
unsigned
ii
=
0
;
ii
<
aItemsList
.
GetCount
();
ii
++
)
...
...
eeschema/sch_component.cpp
View file @
5ed0980d
...
...
@@ -764,14 +764,14 @@ void SCH_COMPONENT::SetOrientation( int aOrientation )
m_transform
.
x2
=
m_transform
.
y1
=
0
;
break
;
case
CMP_ROTATE_C
LOCKWISE
:
// Rotate + (incremental rotation)
case
CMP_ROTATE_C
OUNTERCLOCKWISE
:
// Rotate + (incremental rotation)
temp
.
x1
=
temp
.
y2
=
0
;
temp
.
y1
=
1
;
temp
.
x2
=
-
1
;
transform
=
true
;
break
;
case
CMP_ROTATE_C
OUNTERCLOCKWISE
:
// Rotate - (incremental rotation)
case
CMP_ROTATE_C
LOCKWISE
:
// Rotate - (incremental rotation)
temp
.
x1
=
temp
.
y2
=
0
;
temp
.
y1
=
-
1
;
temp
.
x2
=
1
;
...
...
@@ -1534,8 +1534,7 @@ void SCH_COMPONENT::Rotate( wxPoint aPosition )
RotatePoint
(
&
m_Pos
,
aPosition
,
900
);
//SetOrientation( CMP_ROTATE_COUNTERCLOCKWISE );
SetOrientation
(
CMP_ROTATE_CLOCKWISE
);
SetOrientation
(
CMP_ROTATE_COUNTERCLOCKWISE
);
for
(
int
ii
=
0
;
ii
<
GetFieldCount
();
ii
++
)
{
...
...
eeschema/schframe.cpp
View file @
5ed0980d
...
...
@@ -215,6 +215,13 @@ SCH_EDIT_FRAME::SCH_EDIT_FRAME( wxWindow* aParent, const wxString& aTitle,
/* Get config */
LoadSettings
();
// Ensure m_LastGridSizeId is an offset inside the allowed schematic range
if
(
m_LastGridSizeId
<
ID_POPUP_GRID_LEVEL_50
-
ID_POPUP_GRID_LEVEL_1000
)
m_LastGridSizeId
=
ID_POPUP_GRID_LEVEL_50
-
ID_POPUP_GRID_LEVEL_1000
;
if
(
m_LastGridSizeId
>
ID_POPUP_GRID_LEVEL_1
-
ID_POPUP_GRID_LEVEL_1000
)
m_LastGridSizeId
=
ID_POPUP_GRID_LEVEL_1
-
ID_POPUP_GRID_LEVEL_1000
;
SetSize
(
m_FramePos
.
x
,
m_FramePos
.
y
,
m_FrameSize
.
x
,
m_FrameSize
.
y
);
if
(
m_canvas
)
...
...
eeschema/tool_sch.cpp
View file @
5ed0980d
...
...
@@ -195,7 +195,7 @@ void SCH_EDIT_FRAME::ReCreateVToolbar()
m_drawToolBar
->
AddTool
(
ID_HIERARCHY_PUSH_POP_BUTT
,
wxEmptyString
,
KiBitmap
(
hierarchy_cursor_xpm
),
_
(
"Ascend
or
descend hierarchy"
),
wxITEM_CHECK
);
_
(
"Ascend
/
descend hierarchy"
),
wxITEM_CHECK
);
m_drawToolBar
->
AddTool
(
ID_SCH_PLACE_COMPONENT
,
wxEmptyString
,
KiBitmap
(
add_component_xpm
),
HELP_PLACE_COMPONENTS
,
wxITEM_CHECK
);
...
...
@@ -251,7 +251,7 @@ void SCH_EDIT_FRAME::ReCreateVToolbar()
HELP_PLACE_GRAPHICTEXTS
,
wxITEM_CHECK
);
m_drawToolBar
->
AddTool
(
ID_ADD_IMAGE_BUTT
,
wxEmptyString
,
KiBitmap
(
image_xpm
),
_
(
"Add
a
bitmap image"
),
wxITEM_CHECK
);
_
(
"Add bitmap image"
),
wxITEM_CHECK
);
m_drawToolBar
->
AddTool
(
ID_SCHEMATIC_DELETE_ITEM_BUTT
,
wxEmptyString
,
KiBitmap
(
delete_xpm
),
...
...
@@ -282,11 +282,11 @@ void SCH_EDIT_FRAME::ReCreateOptToolbar()
m_optionsToolBar
->
AddTool
(
ID_TB_OPTIONS_SELECT_UNIT_INCH
,
wxEmptyString
,
KiBitmap
(
unit_inch_xpm
),
_
(
"
Units in inches
"
),
wxITEM_CHECK
);
_
(
"
Set unit to inch
"
),
wxITEM_CHECK
);
m_optionsToolBar
->
AddTool
(
ID_TB_OPTIONS_SELECT_UNIT_MM
,
wxEmptyString
,
KiBitmap
(
unit_mm_xpm
),
_
(
"
Units in millimeters
"
),
wxITEM_CHECK
);
_
(
"
Set unit to mm
"
),
wxITEM_CHECK
);
m_optionsToolBar
->
AddTool
(
ID_TB_OPTIONS_SELECT_CURSOR
,
wxEmptyString
,
KiBitmap
(
cursor_shape_xpm
),
...
...
eeschema/viewlib_frame.cpp
View file @
5ed0980d
...
...
@@ -402,16 +402,24 @@ void LIB_VIEW_FRAME::ClickOnLibList( wxCommandEvent& event )
if
(
ii
<
0
)
return
;
wxString
name
=
m_libList
->
GetString
(
ii
);
SetSelectedLibrary
(
m_libList
->
GetString
(
ii
)
);
}
if
(
m_libraryName
==
name
)
void
LIB_VIEW_FRAME
::
SetSelectedLibrary
(
const
wxString
&
aLibraryName
)
{
if
(
m_libraryName
==
aLibraryName
)
return
;
m_libraryName
=
n
ame
;
m_libraryName
=
aLibraryN
ame
;
ReCreateListCmp
();
m_canvas
->
Refresh
();
DisplayLibInfos
();
ReCreateHToolbar
();
// Ensure the corresponding line in m_libList is selected
// (which is not necessary the case if SetSelectedLibrary is called
// by an other caller than ClickOnLibList.
m_libList
->
SetStringSelection
(
m_libraryName
,
true
);
}
...
...
@@ -422,11 +430,19 @@ void LIB_VIEW_FRAME::ClickOnCmpList( wxCommandEvent& event )
if
(
ii
<
0
)
return
;
wxString
name
=
m_cmpList
->
GetString
(
ii
);
SetSelectedComponent
(
m_cmpList
->
GetString
(
ii
)
);
}
if
(
m_entryName
.
CmpNoCase
(
name
)
!=
0
)
void
LIB_VIEW_FRAME
::
SetSelectedComponent
(
const
wxString
&
aComponentName
)
{
if
(
m_entryName
.
CmpNoCase
(
aComponentName
)
!=
0
)
{
m_entryName
=
name
;
m_entryName
=
aComponentName
;
// Ensure the corresponding line in m_cmpList is selected
// (which is not necessary the case if SetSelectedComponent is called
// by an other caller than ClickOnCmpList.
m_cmpList
->
SetStringSelection
(
aComponentName
,
true
);
DisplayLibInfos
();
m_unit
=
1
;
m_convert
=
1
;
...
...
@@ -436,6 +452,7 @@ void LIB_VIEW_FRAME::ClickOnCmpList( wxCommandEvent& event )
}
}
void
LIB_VIEW_FRAME
::
DClickOnCmpList
(
wxCommandEvent
&
event
)
{
if
(
m_semaphore
)
...
...
@@ -480,10 +497,10 @@ void LIB_VIEW_FRAME::LoadSettings( )
cfg
->
Read
(
CMPLIST_WIDTH_KEY
,
&
m_cmpListWidth
,
100
);
// Set parameters to a reasonable value.
if
(
m_libListWidth
>
m_FrameSize
.
x
/
2
)
if
(
m_libListWidth
>
m_FrameSize
.
x
/
2
)
m_libListWidth
=
m_FrameSize
.
x
/
2
;
if
(
m_cmpListWidth
>
m_FrameSize
.
x
/
2
)
if
(
m_cmpListWidth
>
m_FrameSize
.
x
/
2
)
m_cmpListWidth
=
m_FrameSize
.
x
/
2
;
}
...
...
eeschema/viewlib_frame.h
View file @
5ed0980d
...
...
@@ -47,29 +47,6 @@ class CMP_LIBRARY;
*/
class
LIB_VIEW_FRAME
:
public
SCH_BASE_FRAME
{
private
:
wxComboBox
*
m_selpartBox
;
// List of libraries (for selection )
wxListBox
*
m_libList
;
// The list of libs
int
m_libListWidth
;
// Last width of the window
// List of components in the selected library
wxListBox
*
m_cmpList
;
// The list of components
int
m_cmpListWidth
;
// Last width of the window
// Flags
wxSemaphore
*
m_semaphore
;
// != NULL if the frame must emulate a modal dialog
wxString
m_configPath
;
// subpath for configuration
protected
:
static
wxString
m_libraryName
;
static
wxString
m_entryName
;
static
wxString
m_exportToEeschemaCmpName
;
// When the viewer is used to select a component
// in schematic, the selected component is here
static
int
m_unit
;
static
int
m_convert
;
public
:
LIB_VIEW_FRAME
(
SCH_BASE_FRAME
*
aParent
,
CMP_LIBRARY
*
aLibrary
=
NULL
,
wxSemaphore
*
aSemaphore
=
NULL
,
...
...
@@ -134,11 +111,26 @@ public:
*/
void
SaveSettings
();
wxString
&
GetEntryName
(
void
)
const
{
return
m_entryName
;
}
wxString
&
GetSelectedComponent
(
void
)
const
{
return
m_exportToEeschemaCmpName
;
}
/**
* Set the selected library in the library window.
*
* @param aLibName name of the library to be selected.
*/
void
SetSelectedLibrary
(
const
wxString
&
aLibName
);
/**
* Set the selected component.
*
* @param the alias name of the component to be selected.
*/
void
SetSelectedComponent
(
const
wxString
&
aComponentName
);
const
wxString
&
GetSelectedComponent
(
void
)
const
{
return
m_exportToEeschemaCmpName
;
}
void
SetUnit
(
int
aUnit
)
{
m_unit
=
aUnit
;
}
int
GetUnit
(
void
)
{
return
m_unit
;
}
static
int
GetUnit
(
void
)
{
return
m_uni
t
;
}
static
int
GetConvert
(
void
)
{
return
m_convert
;
}
void
SetConvert
(
int
aConvert
)
{
m_convert
=
aConver
t
;
}
int
GetConvert
(
void
)
{
return
m_convert
;
}
private
:
/**
...
...
@@ -160,6 +152,33 @@ private:
bool
OnRightClick
(
const
wxPoint
&
MousePos
,
wxMenu
*
PopMenu
);
void
DClickOnCmpList
(
wxCommandEvent
&
event
);
wxComboBox
*
m_selpartBox
;
// List of libraries (for selection )
wxListBox
*
m_libList
;
// The list of libs
int
m_libListWidth
;
// Last width of the window
// List of components in the selected library
wxListBox
*
m_cmpList
;
// The list of components
int
m_cmpListWidth
;
// Last width of the window
// Flags
wxSemaphore
*
m_semaphore
;
// != NULL if the frame must emulate a modal dialog
wxString
m_configPath
;
// subpath for configuration
// TODO(hzeller): looks like these members were chosen to be static to survive different
// instances of this browser and communicate it to the next instance. This looks like an
// ugly hack, and should be solved differently.
static
wxString
m_libraryName
;
// TODO(hzeller): figure out what the difference between these is and the motivation to
// have this distinction. Shouldn't these essentially be the same ?
static
wxString
m_entryName
;
static
wxString
m_exportToEeschemaCmpName
;
// When the viewer is used to select a component
// in schematic, the selected component is here
static
int
m_unit
;
static
int
m_convert
;
DECLARE_EVENT_TABLE
()
};
...
...
include/sch_base_frame.h
View file @
5ed0980d
...
...
@@ -31,7 +31,7 @@ class PAGE_INFO;
class
TITLE_BLOCK
;
class
LIB_VIEW_FRAME
;
class
LIB_EDIT_FRAME
;
class
LIB_ALIAS
;
/**
* Class SCH_BASE_FRAME
...
...
@@ -80,9 +80,15 @@ protected:
* Calls the library viewer to select component to import into schematic.
* if the library viewer is currently running, it is closed and reopened
* in modal mode.
* @param aPreslectedAlias Preselected component alias. NULL if none.
* @param aUnit Pointer to Unit-number. Input is the pre-selected unit, output
* is the finally selected unit by the user. Can be NULL.
* @param aConvert Pointer to deMorgan conversion. Input is what is pre-selected,
* output is the finally selected deMorgan type by the user.
* @return the component name
*/
wxString
SelectComponentFromLibBrowser
(
void
);
wxString
SelectComponentFromLibBrowser
(
LIB_ALIAS
*
aPreselectedAlias
,
int
*
aUnit
,
int
*
aConvert
);
/**
* Function SelectComponentFromLib
...
...
include/wxPcbStruct.h
View file @
5ed0980d
...
...
@@ -279,6 +279,7 @@ public:
void
OnUpdateSelectAutoTrackWidth
(
wxUpdateUIEvent
&
aEvent
);
void
OnUpdateAutoPlaceModulesMode
(
wxUpdateUIEvent
&
aEvent
);
void
OnUpdateAutoPlaceTracksMode
(
wxUpdateUIEvent
&
aEvent
);
void
OnUpdateMuWaveToolbar
(
wxUpdateUIEvent
&
aEvent
);
/**
* Function RecordMacros.
...
...
kicad/commandframe.cpp
View file @
5ed0980d
...
...
@@ -78,7 +78,7 @@ void LAUNCHER_PANEL::CreateCommandToolbar( void )
btn
=
AddBitmapButton
(
ID_TO_BITMAP_CONVERTER
,
KiBitmap
(
icon_bitmap2component_xpm
)
);
btn
->
SetToolTip
(
_
(
"Bitmap2Component - Convert bitmap images to Eeschema
\n
"
"or Pcbnew elements
.
"
)
);
"or Pcbnew elements"
)
);
btn
=
AddBitmapButton
(
ID_TO_PCB_CALCULATOR
,
KiBitmap
(
icon_pcbcalculator_xpm
)
);
btn
->
SetToolTip
(
_
(
"Pcb calculator - Calculator for components, track width, etc."
)
);
...
...
packaging/windows/nsis/install.nsi
View file @
5ed0980d
...
...
@@ -17,27 +17,31 @@
; General Product Description Definitions
!define PRODUCT_NAME "KiCad"
!define PRODUCT_VERSION "2013.03.13"
!define PRODUCT_WEB_SITE "http://iut-tice.ujf-grenoble.fr/kicad/"
!define SOURCEFORGE_WEB_SITE "http://kicad.sourceforge.net/"
!define PRODUCT_VERSION "2014.03.05"
!define ALT_DOWNLOAD_WEB_SITE "http://iut-tice.ujf-grenoble.fr/kicad/"
!define LIBRARIES_WEB_SITE "https://github.com/KiCad/"
!define KICAD_MAIN_SITE "www.kicad-pcb.org/"
!define COMPANY_NAME ""
!define TRADE_MARKS ""
!define COPYRIGHT "Kicad Developers Team"
!define COMMENTS ""
!define HELP_WEB_SITE "http://groups.yahoo.com/group/kicad-users/"
!define DEVEL_WEB_SITE "https://launchpad.net/
~kicad-developers
/"
!define DEVEL_WEB_SITE "https://launchpad.net/
kicad
/"
!define WINGS3D_WEB_SITE "http://www.wings3d.com"
!define PRODUCT_UNINST_KEY "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}"
!define UNINST_ROOT "HKLM"
;Comment out the following SetCompressor command while testing this script
SetCompressor /final /solid lzma
;SetCompressor /final /solid lzma
CRCCheck force
XPStyle on
Name "${PRODUCT_NAME} ${PRODUCT_VERSION}"
OutFile "${PRODUCT_NAME}_stable-${PRODUCT_VERSION}-BZR4000_Win_full_version.exe"
InstallDir "$PROGRAMFILES\KiCad"
OutFile "${PRODUCT_NAME}_stable-${PRODUCT_VERSION}-BZR4xxx_Win_full_version.exe"
;InstallDir "$PROGRAMFILES\KiCad"
InstallDir "C:\KiCad"
ShowInstDetails hide
ShowUnInstDetails hide
...
...
@@ -72,21 +76,25 @@ ShowUnInstDetails hide
!insertmacro MUI_UNPAGE_INSTFILES
; Language files
; - To add another language; add an insert macro line here and in
lc
ude a language file as below
; - To add another language; add an insert macro line here and in
cl
ude a language file as below
; - This must be after all page macros have been inserted
!insertmacro MUI_LANGUAGE "English" ;first language is the default language
!insertmacro MUI_LANGUAGE "French"
!insertmacro MUI_LANGUAGE "Italian"
!insertmacro MUI_LANGUAGE "Polish"
!insertmacro MUI_LANGUAGE "Portuguese"
!insertmacro MUI_LANGUAGE "Dutch"
!insertmacro MUI_LANGUAGE "Russian"
!insertmacro MUI_LANGUAGE "Japanese"
!include "English.nsh"
!include "French.nsh"
!include "Polish.nsh"
!include "Dutch.nsh"
!include "
Russ
ian.nsh"
!include "
Ital
ian.nsh"
!include "Japanese.nsh"
!include "Polish.nsh"
!include "Portuguese.nsh"
!include "Russian.nsh"
; MUI end ------
...
...
@@ -150,20 +158,22 @@ SectionEnd
Section -CreateShortcuts
SetOutPath $INSTDIR
WriteIniStr "$INSTDIR\HomePage.url" "InternetShortcut" "URL" "${PRODUCT_WEB_SITE}"
WriteIniStr "$INSTDIR\SourceForge.url" "InternetShortcut" "URL" "${SOURCEFORGE_WEB_SITE}"
WriteIniStr "$INSTDIR\UserGroup.url" "InternetShortcut" "URL" "${HELP_WEB_SITE}"
WriteIniStr "$INSTDIR\DevelGroup.url" "InternetShortcut" "URL" "${DEVEL_WEB_SITE}"
WriteIniStr "$INSTDIR\Wings3D.url" "InternetShortcut" "URL" "${WINGS3D_WEB_SITE}"
WriteIniStr "$INSTDIR\HomePage.url" "InternetShortcut" "URL" "${KICAD_MAIN_SITE}"
WriteIniStr "$INSTDIR\AltDownloadSite.url" "InternetShortcut" "URL" "${ALT_DOWNLOAD_WEB_SITE}"
WriteIniStr "$INSTDIR\UserGroup.url" "InternetShortcut" "URL" "${HELP_WEB_SITE}"
WriteIniStr "$INSTDIR\DevelGroup.url" "InternetShortcut" "URL" "${DEVEL_WEB_SITE}"
WriteIniStr "$INSTDIR\LibrariesGroup.url" "InternetShortcut" "URL" "${LIBRARIES_WEB_SITE}"
WriteIniStr "$INSTDIR\Wings3D.url" "InternetShortcut" "URL" "${WINGS3D_WEB_SITE}"
SetShellVarContext all
CreateDirectory "$SMPROGRAMS\KiCad"
CreateShortCut "$SMPROGRAMS\KiCad\Home Page.lnk" "$INSTDIR\HomePage.url"
CreateShortCut "$SMPROGRAMS\KiCad\Kicad SourceForge.lnk" "$INSTDIR\SourceForge.url"
CreateShortCut "$SMPROGRAMS\KiCad\Kicad Alternate Download.lnk" "$INSTDIR\AltDownloadSite.url"
CreateShortCut "$SMPROGRAMS\KiCad\Kicad Libraries.lnk" "$INSTDIR\LibrariesGroup.url"
CreateShortCut "$SMPROGRAMS\KiCad\Wings3D.lnk" "$INSTDIR\Wings3D.url"
CreateShortCut "$SMPROGRAMS\KiCad\User Group.lnk" "$INSTDIR\UserGroup.url"
CreateShortCut "$SMPROGRAMS\KiCad\Devel Group.lnk" "$INSTDIR\DevelGroup.url"
CreateShortCut "$SMPROGRAMS\KiCad\Uninstall.lnk" "$INSTDIR\uninstaller.exe"
CreateShortCut "$SMPROGRAMS\KiCad\KiCad.lnk" "$INSTDIR\bin\kicad.exe"
CreateShortCut "$SMPROGRAMS\KiCad\Wings3D.lnk" "$INSTDIR\Wings3D.url"
CreateShortCut "$DESKTOP\KiCad.lnk" "$INSTDIR\bin\kicad.exe"
SectionEnd
...
...
@@ -172,13 +182,13 @@ Section -CreateAddRemoveEntry
WriteRegStr ${UNINST_ROOT} "${PRODUCT_UNINST_KEY}" "DisplayVersion" "${PRODUCT_VERSION}"
WriteRegStr ${UNINST_ROOT} "${PRODUCT_UNINST_KEY}" "Publisher" "${COMPANY_NAME}"
WriteRegStr ${UNINST_ROOT} "${PRODUCT_UNINST_KEY}" "UninstallString" "$INSTDIR\uninstaller.exe"
WriteRegStr ${UNINST_ROOT} "${PRODUCT_UNINST_KEY}" "URLInfoAbout" "${
PRODUCT_WEB
_SITE}"
WriteRegStr ${UNINST_ROOT} "${PRODUCT_UNINST_KEY}" "URLInfoAbout" "${
KICAD_MAIN
_SITE}"
WriteRegStr ${UNINST_ROOT} "${PRODUCT_UNINST_KEY}" "DisplayIcon" "$INSTDIR\bin\kicad.exe"
WriteRegDWORD ${UNINST_ROOT} "${PRODUCT_UNINST_KEY}" "NoModify" "1"
WriteRegDWORD ${UNINST_ROOT} "${PRODUCT_UNINST_KEY}" "NoRepair" "1"
WriteRegStr ${UNINST_ROOT} "${PRODUCT_UNINST_KEY}" "Comments" "${COMMENTS}"
WriteRegStr ${UNINST_ROOT} "${PRODUCT_UNINST_KEY}" "HelpLink" "${HELP_WEB_SITE}"
WriteRegStr ${UNINST_ROOT} "${PRODUCT_UNINST_KEY}" "URLUpdateInfo" "${
PRODUCT_WEB
_SITE}"
WriteRegStr ${UNINST_ROOT} "${PRODUCT_UNINST_KEY}" "URLUpdateInfo" "${
KICAD_MAIN
_SITE}"
WriteRegStr ${UNINST_ROOT} "${PRODUCT_UNINST_KEY}" "InstallLocation" "$INSTDIR"
WriteUninstaller "$INSTDIR\uninstaller.exe"
...
...
@@ -213,6 +223,9 @@ Section Uninstall
;remove start menu shortcuts and web page links
SetShellVarContext all
Delete "$SMPROGRAMS\KiCad\Home Page.lnk"
Delete "$SMPROGRAMS\KiCad\Kicad Libraries.lnk"
Delete "$SMPROGRAMS\KiCad\Kicad Alternate Download.lnk"
Delete "$SMPROGRAMS\KiCad\Devel Group.lnk"
Delete "$SMPROGRAMS\KiCad\User Group.lnk"
Delete "$SMPROGRAMS\KiCad\Uninstall.lnk"
Delete "$SMPROGRAMS\KiCad\KiCad.lnk"
...
...
@@ -221,6 +234,9 @@ Section Uninstall
Delete "$INSTDIR\Wings3D.url"
Delete "$INSTDIR\HomePage.url"
Delete "$INSTDIR\UserGroup.url"
Delete "$INSTDIR\AltDownloadSite.url"
Delete "$INSTDIR\DevelGroup.url"
Delete "$INSTDIR\LibrariesGroup.url"
RMDir "$SMPROGRAMS\KiCad"
;remove all program files now
...
...
pcbnew/CMakeLists.txt
View file @
5ed0980d
...
...
@@ -4,6 +4,10 @@ set( MAKE_LINK_MAPS false )
add_definitions
(
-DPCBNEW
)
add_subdirectory
(
router
)
# psnrouter depends on make_lexer outputs in common (bug # 1285878 )
add_dependencies
(
pnsrouter pcbcommon
)
if
(
KICAD_SCRIPTING OR KICAD_SCRIPTING_MODULES
)
file
(
MAKE_DIRECTORY
${
CMAKE_CURRENT_BINARY_DIR
}
/scripting
)
find_package
(
SWIG REQUIRED
)
...
...
@@ -617,6 +621,13 @@ if( KICAD_SCRIPTING )
# fix bundle after copying wxpython, fixing and copying
add_dependencies
(
osx_fix_bundles pcbnew_copy_wxpython_scripting
)
if
(
KICAD_SCRIPTING_MODULES
)
#they do more or less the same job, avoid race between them
#Cmake copy goes in error otherwise
add_dependencies
(
pcbnew_copy_wxpython_scripting pcbnew_copy_wxpython_module
)
endif
()
endif
()
endif
()
...
...
pcbnew/autorouter/spread_footprints.cpp
View file @
5ed0980d
...
...
@@ -184,23 +184,23 @@ void PCB_EDIT_FRAME::SpreadFootprints( bool aFootprintsOutsideBoardOnly )
// Build candidate list
// calculate also the area needed by these footprints
MODULE
*
M
odule
=
GetBoard
()
->
m_Modules
;
MODULE
*
m
odule
=
GetBoard
()
->
m_Modules
;
std
::
vector
<
MODULE
*>
moduleList
;
for
(
;
Module
!=
NULL
;
Module
=
M
odule
->
Next
()
)
for
(
;
module
!=
NULL
;
module
=
m
odule
->
Next
()
)
{
M
odule
->
CalculateBoundingBox
();
m
odule
->
CalculateBoundingBox
();
if
(
outsideBrdFilter
)
{
if
(
bbox
.
Contains
(
M
odule
->
GetPosition
()
)
)
if
(
bbox
.
Contains
(
m
odule
->
GetPosition
()
)
)
continue
;
}
if
(
M
odule
->
IsLocked
()
)
if
(
m
odule
->
IsLocked
()
)
continue
;
moduleList
.
push_back
(
M
odule
);
moduleList
.
push_back
(
m
odule
);
}
if
(
moduleList
.
size
()
==
0
)
// Nothing to do
...
...
@@ -216,18 +216,17 @@ void PCB_EDIT_FRAME::SpreadFootprints( bool aFootprintsOutsideBoardOnly )
for
(
unsigned
ii
=
0
;
ii
<
moduleList
.
size
();
ii
++
)
{
M
odule
=
moduleList
[
ii
];
m
odule
=
moduleList
[
ii
];
// Undo: add copy of module to undo list
picker
.
SetItem
(
M
odule
);
picker
.
SetLink
(
M
odule
->
Clone
()
);
picker
.
SetItem
(
m
odule
);
picker
.
SetLink
(
m
odule
->
Clone
()
);
undoList
.
PushItem
(
picker
);
}
// Extract and place footprints by sheet
std
::
vector
<
MODULE
*>
moduleListBySheet
;
std
::
vector
<
EDA_RECT
>
placementSheetAreas
;
wxString
curr_sheetPath
;
double
subsurface
;
double
placementsurface
=
0.0
;
...
...
@@ -253,22 +252,23 @@ void PCB_EDIT_FRAME::SpreadFootprints( bool aFootprintsOutsideBoardOnly )
for
(
int
pass
=
0
;
pass
<
2
;
pass
++
)
{
int
subareaIdx
=
0
;
curr_sheetPath
=
moduleList
[
0
]
->
GetPath
().
BeforeLast
(
'/'
);
moduleListBySheet
.
clear
();
subsurface
=
0.0
;
for
(
unsigned
ii
=
0
;
ii
<
moduleList
.
size
();
ii
++
)
{
M
odule
=
moduleList
[
ii
];
bool
is
currPath
=
curr_sheetPath
==
moduleList
[
ii
]
->
GetPath
().
BeforeLast
(
'/'
)
;
m
odule
=
moduleList
[
ii
];
bool
is
lastItem
=
false
;
if
(
iscurrPath
)
{
moduleListBySheet
.
push_back
(
Module
);
subsurface
+=
Module
->
GetArea
();
}
if
(
ii
==
moduleList
.
size
()
-
1
||
(
moduleList
[
ii
]
->
GetPath
().
BeforeLast
(
'/'
)
!=
moduleList
[
ii
+
1
]
->
GetPath
().
BeforeLast
(
'/'
)
)
)
islastItem
=
true
;
moduleListBySheet
.
push_back
(
module
);
subsurface
+=
module
->
GetArea
();
if
(
!
iscurrPath
||
(
ii
==
moduleList
.
size
()
-
1
)
)
if
(
islastItem
)
{
// end of the footprint sublist relative to the same sheet path
// calculate placement of the current sublist
...
...
@@ -306,14 +306,9 @@ void PCB_EDIT_FRAME::SpreadFootprints( bool aFootprintsOutsideBoardOnly )
sub_area
.
GetHeight
();
}
curr_sheetPath
=
moduleList
[
ii
]
->
GetPath
().
BeforeLast
(
'/'
);
// Prepare buffers for next sheet
subsurface
=
0.0
;
moduleListBySheet
.
clear
();
// Enter first module of next sheet
moduleListBySheet
.
push_back
(
Module
);
subsurface
+=
Module
->
GetArea
();
subareaIdx
++
;
}
}
...
...
@@ -350,7 +345,14 @@ void PCB_EDIT_FRAME::SpreadFootprints( bool aFootprintsOutsideBoardOnly )
}
// Sort function, used to group footprints by sheet.
// Footprints are sorted by their sheet path.
// (the full sheet path restricted to the time stamp of the sheet itself,
// without the time stamp of the footprint ).
static
bool
sortModulesbySheetPath
(
MODULE
*
ref
,
MODULE
*
compare
)
{
return
compare
->
GetPath
().
Cmp
(
ref
->
GetPath
()
)
<
0
;
if
(
ref
->
GetPath
().
Length
()
==
compare
->
GetPath
().
Length
()
)
return
ref
->
GetPath
().
BeforeLast
(
'/'
).
Cmp
(
compare
->
GetPath
().
BeforeLast
(
'/'
)
)
<
0
;
return
ref
->
GetPath
().
Length
()
<
compare
->
GetPath
().
Length
();
}
pcbnew/board_items_to_polygon_shape_transform.cpp
View file @
5ed0980d
...
...
@@ -23,6 +23,21 @@
#include <class_edge_mod.h>
#include <convert_basic_shapes_to_polygon.h>
// These variables are parameters used in addTextSegmToPoly.
// But addTextSegmToPoly is a call-back function,
// so we cannot send them as arguments.
int
s_textWidth
;
int
s_textCircle2SegmentCount
;
CPOLYGONS_LIST
*
s_cornerBuffer
;
// This is a call back function, used by DrawGraphicText to draw the 3D text shape:
static
void
addTextSegmToPoly
(
int
x0
,
int
y0
,
int
xf
,
int
yf
)
{
TransformRoundedEndsSegmentToPolygon
(
*
s_cornerBuffer
,
wxPoint
(
x0
,
y0
),
wxPoint
(
xf
,
yf
),
s_textCircle2SegmentCount
,
s_textWidth
);
}
/* generate pads shapes on layer aLayer as polygons,
* and adds these polygons to aCornerBuffer
* aCornerBuffer = the buffer to store polygons
...
...
@@ -91,12 +106,16 @@ void MODULE::TransformGraphicShapesWithClearanceToPolygonSet(
int
aCircleToSegmentsCount
,
double
aCorrectionFactor
)
{
std
::
vector
<
TEXTE_MODULE
*>
texts
;
// List of TEXTE_MODULE to convert
EDGE_MODULE
*
outline
;
for
(
EDA_ITEM
*
item
=
GraphicalItems
();
item
!=
NULL
;
item
=
item
->
Next
()
)
{
switch
(
item
->
Type
()
)
{
case
PCB_MODULE_TEXT_T
:
if
(
((
TEXTE_MODULE
*
)
item
)
->
GetLayer
()
==
aLayer
)
texts
.
push_back
(
(
TEXTE_MODULE
*
)
item
);
break
;
case
PCB_MODULE_EDGE_T
:
...
...
@@ -153,6 +172,33 @@ void MODULE::TransformGraphicShapesWithClearanceToPolygonSet(
break
;
}
}
// Convert texts sur modules
if
(
Reference
().
GetLayer
()
==
aLayer
&&
Reference
().
IsVisible
()
)
texts
.
push_back
(
&
Reference
()
);
if
(
Value
().
GetLayer
()
==
aLayer
&&
Value
().
IsVisible
()
)
texts
.
push_back
(
&
Value
()
);
s_cornerBuffer
=
&
aCornerBuffer
;
s_textCircle2SegmentCount
=
aCircleToSegmentsCount
;
for
(
unsigned
ii
=
0
;
ii
<
texts
.
size
();
ii
++
)
{
TEXTE_MODULE
*
textmod
=
texts
[
ii
];
s_textWidth
=
textmod
->
GetThickness
()
+
(
2
*
aInflateValue
);
wxSize
size
=
textmod
->
GetSize
();
if
(
textmod
->
IsMirrored
()
)
NEGATE
(
size
.
x
);
DrawGraphicText
(
NULL
,
NULL
,
textmod
->
GetTextPosition
(),
BLACK
,
textmod
->
GetText
(),
textmod
->
GetDrawRotation
(),
size
,
textmod
->
GetHorizJustify
(),
textmod
->
GetVertJustify
(),
textmod
->
GetThickness
(),
textmod
->
IsItalic
(),
true
,
addTextSegmToPoly
);
}
}
/* Function TransformSolidAreasShapesToPolygonSet
...
...
@@ -257,20 +303,6 @@ void TEXTE_PCB::TransformBoundingBoxWithClearanceToPolygon(
* clearance when the circle is approximated by segment bigger or equal
* to the real clearance value (usually near from 1.0)
*/
// These variables are parameters used in addTextSegmToPoly.
// But addTextSegmToPoly is a call-back function,
// so we cannot send them as arguments.
int
s_textWidth
;
int
s_textCircle2SegmentCount
;
CPOLYGONS_LIST
*
s_cornerBuffer
;
// This is a call back function, used by DrawGraphicText to draw the 3D text shape:
static
void
addTextSegmToPoly
(
int
x0
,
int
y0
,
int
xf
,
int
yf
)
{
TransformRoundedEndsSegmentToPolygon
(
*
s_cornerBuffer
,
wxPoint
(
x0
,
y0
),
wxPoint
(
xf
,
yf
),
s_textCircle2SegmentCount
,
s_textWidth
);
}
void
TEXTE_PCB
::
TransformShapeWithClearanceToPolygonSet
(
CPOLYGONS_LIST
&
aCornerBuffer
,
...
...
@@ -309,7 +341,7 @@ void TEXTE_PCB::TransformShapeWithClearanceToPolygonSet(
}
else
{
DrawGraphicText
(
NULL
,
NULL
,
GetTextPosition
(),
(
EDA_COLOR_T
)
color
,
DrawGraphicText
(
NULL
,
NULL
,
GetTextPosition
(),
color
,
GetText
(),
GetOrientation
(),
size
,
GetHorizJustify
(),
GetVertJustify
(),
GetThickness
(),
IsItalic
(),
...
...
pcbnew/dialogs/dialog_gendrill.cpp
View file @
5ed0980d
...
...
@@ -47,6 +47,7 @@
#define PrecisionKey wxT( "DrilltPrecisionOpt" )
#define MirrorKey wxT( "DrillMirrorYOpt" )
#define MinimalHeaderKey wxT( "DrillMinHeader" )
#define MergePTHNPTHKey wxT( "DrillMergePTHNPTH" )
#define UnitDrillInchKey wxT( "DrillUnit" )
#define DrillOriginIsAuxAxisKey wxT( "DrillAuxAxis" )
#define DrillMapFileTypeKey wxT( "DrillMapFileType" )
...
...
@@ -68,7 +69,6 @@ void PCB_EDIT_FRAME::InstallDrillFrame( wxCommandEvent& event )
}
DIALOG_GENDRILL
::
DIALOG_GENDRILL
(
PCB_EDIT_FRAME
*
parent
)
:
DIALOG_GENDRILL_BASE
(
parent
)
{
...
...
@@ -88,6 +88,7 @@ int DIALOG_GENDRILL::m_UnitDrillIsInch = true;
int
DIALOG_GENDRILL
::
m_ZerosFormat
=
EXCELLON_WRITER
::
DECIMAL_FORMAT
;
bool
DIALOG_GENDRILL
::
m_MinimalHeader
=
false
;
bool
DIALOG_GENDRILL
::
m_Mirror
=
false
;
bool
DIALOG_GENDRILL
::
m_Merge_PTH_NPTH
=
false
;
bool
DIALOG_GENDRILL
::
m_DrillOriginIsAuxAxis
=
false
;
int
DIALOG_GENDRILL
::
m_mapFileType
=
1
;
...
...
@@ -102,6 +103,7 @@ void DIALOG_GENDRILL::initDialog()
{
m_config
->
Read
(
ZerosFormatKey
,
&
m_ZerosFormat
);
m_config
->
Read
(
MirrorKey
,
&
m_Mirror
);
m_config
->
Read
(
MergePTHNPTHKey
,
&
m_Merge_PTH_NPTH
);
m_config
->
Read
(
MinimalHeaderKey
,
&
m_MinimalHeader
);
m_config
->
Read
(
UnitDrillInchKey
,
&
m_UnitDrillIsInch
);
m_config
->
Read
(
DrillOriginIsAuxAxisKey
,
&
m_DrillOriginIsAuxAxis
);
...
...
@@ -124,6 +126,7 @@ void DIALOG_GENDRILL::InitDisplayParams()
m_Choice_Drill_Offset
->
SetSelection
(
1
);
m_Check_Mirror
->
SetValue
(
m_Mirror
);
m_Check_Merge_PTH_NPTH
->
SetValue
(
m_Merge_PTH_NPTH
);
m_Choice_Drill_Map
->
SetSelection
(
m_mapFileType
);
m_ViaDrillValue
->
SetLabel
(
_
(
"Use Netclasses values"
)
);
m_MicroViaDrillValue
->
SetLabel
(
_
(
"Use Netclasses values"
)
);
...
...
@@ -213,6 +216,7 @@ void DIALOG_GENDRILL::UpdateConfig()
m_config
->
Write
(
ZerosFormatKey
,
m_ZerosFormat
);
m_config
->
Write
(
MirrorKey
,
m_Mirror
);
m_config
->
Write
(
MinimalHeaderKey
,
m_MinimalHeader
);
m_config
->
Write
(
MergePTHNPTHKey
,
m_Merge_PTH_NPTH
);
m_config
->
Write
(
UnitDrillInchKey
,
m_UnitDrillIsInch
);
m_config
->
Write
(
DrillOriginIsAuxAxisKey
,
m_DrillOriginIsAuxAxis
);
m_config
->
Write
(
DrillMapFileTypeKey
,
m_mapFileType
);
...
...
@@ -229,6 +233,7 @@ void DIALOG_GENDRILL::OnGenMapFile( wxCommandEvent& event )
GenDrillAndMapFiles
(
false
,
true
);
}
void
DIALOG_GENDRILL
::
OnGenDrillFile
(
wxCommandEvent
&
event
)
{
GenDrillAndMapFiles
(
true
,
false
);
...
...
@@ -264,6 +269,7 @@ void DIALOG_GENDRILL::UpdatePrecisionOptions()
m_staticTextPrecision
->
Enable
(
true
);
}
void
DIALOG_GENDRILL
::
OnOutputDirectoryBrowseClicked
(
wxCommandEvent
&
event
)
{
// Build the absolute path of current output plot directory
...
...
@@ -292,14 +298,14 @@ void DIALOG_GENDRILL::OnOutputDirectoryBrowseClicked( wxCommandEvent& event )
wxString
boardFilePath
=
(
(
wxFileName
)
m_parent
->
GetBoard
()
->
GetFileName
()
).
GetPath
();
if
(
!
dirName
.
MakeRelativeTo
(
boardFilePath
)
)
wxMessageBox
(
_
(
"Cannot make path relative (target volume different from board file volume)!"
),
wxMessageBox
(
_
(
"Cannot make path relative. The target volume is different from board file volume!"
),
_
(
"Plot Output Directory"
),
wxOK
|
wxICON_ERROR
);
}
m_outputDirectoryName
->
SetValue
(
dirName
.
GetFullPath
()
);
}
void
DIALOG_GENDRILL
::
SetParams
()
{
wxString
msg
;
...
...
@@ -315,6 +321,7 @@ void DIALOG_GENDRILL::SetParams()
m_UnitDrillIsInch
=
(
m_Choice_Unit
->
GetSelection
()
==
0
)
?
false
:
true
;
m_MinimalHeader
=
m_Check_Minimal
->
IsChecked
();
m_Mirror
=
m_Check_Mirror
->
IsChecked
();
m_Merge_PTH_NPTH
=
m_Check_Merge_PTH_NPTH
->
IsChecked
();
m_ZerosFormat
=
m_Choice_Zeros_Format
->
GetSelection
();
m_DrillOriginIsAuxAxis
=
m_Choice_Drill_Offset
->
GetSelection
();
...
...
@@ -331,16 +338,7 @@ void DIALOG_GENDRILL::SetParams()
m_board
->
SetPlotOptions
(
m_plotOpts
);
}
/**
* Function GenDrillAndMapFiles
* Calls the functions to create EXCELLON drill files and/or drill map files
* >When all holes are through holes, only one excellon file is created.
* >When there are some partial holes (some blind or buried vias),
* one excellon file is created, for all plated through holes,
* and one file per layer pair, which have one or more holes, excluding
* through holes, already in the first file.
* one file for all Not Plated through holes
*/
void
DIALOG_GENDRILL
::
GenDrillAndMapFiles
(
bool
aGenDrill
,
bool
aGenMap
)
{
wxString
layer_extend
;
/* added to the Board FileName to
...
...
@@ -369,14 +367,14 @@ void DIALOG_GENDRILL::GenDrillAndMapFiles(bool aGenDrill, bool aGenMap)
excellonWriter
.
SetFormat
(
!
m_UnitDrillIsInch
,
(
EXCELLON_WRITER
::
zeros_fmt
)
m_ZerosFormat
,
m_Precision
.
m_lhs
,
m_Precision
.
m_rhs
);
excellonWriter
.
SetOptions
(
m_Mirror
,
m_MinimalHeader
,
m_FileDrillOffset
);
excellonWriter
.
SetOptions
(
m_Mirror
,
m_MinimalHeader
,
m_FileDrillOffset
,
m_Merge_PTH_NPTH
);
wxFileName
fn
;
for
(
;
;
)
{
excellonWriter
.
BuildHolesList
(
layer1
,
layer2
,
gen_through_holes
?
false
:
true
,
gen_NPTH_holes
);
excellonWriter
.
BuildHolesList
(
layer1
,
layer2
,
gen_through_holes
?
false
:
true
,
gen_NPTH_holes
,
m_Merge_PTH_NPTH
);
if
(
excellonWriter
.
GetHolesCount
()
>
0
)
// has holes?
{
...
...
@@ -393,6 +391,7 @@ void DIALOG_GENDRILL::GenDrillAndMapFiles(bool aGenDrill, bool aGenMap)
layer_extend
<<
wxT
(
"-back"
);
else
layer_extend
<<
wxT
(
"-inner"
)
<<
layer1
;
if
(
layer2
==
LAYER_N_FRONT
)
layer_extend
<<
wxT
(
"-front"
);
else
...
...
@@ -401,6 +400,7 @@ void DIALOG_GENDRILL::GenDrillAndMapFiles(bool aGenDrill, bool aGenMap)
fn
.
SetName
(
fn
.
GetName
()
+
layer_extend
);
wxString
defaultPath
=
m_plotOpts
.
GetOutputDirectory
();
if
(
defaultPath
.
IsEmpty
()
)
defaultPath
=
::
wxGetCwd
();
...
...
@@ -466,6 +466,7 @@ void DIALOG_GENDRILL::GenDrillAndMapFiles(bool aGenDrill, bool aGenMap)
gen_NPTH_holes
=
true
;
continue
;
}
layer1
++
;
layer2
++
;
// use next layer pair
...
...
@@ -482,11 +483,6 @@ void DIALOG_GENDRILL::GenDrillAndMapFiles(bool aGenDrill, bool aGenMap)
}
/*
* Create a plain text report file giving a list of drill values and drill count
* for through holes, oblong holes, and for buried vias,
* drill values and drill count per layer pair
*/
void
DIALOG_GENDRILL
::
OnGenReportFile
(
wxCommandEvent
&
event
)
{
UpdateConfig
();
// set params and Save drill options
...
...
@@ -497,6 +493,7 @@ void DIALOG_GENDRILL::OnGenReportFile( wxCommandEvent& event )
fn
.
SetExt
(
ReportFileExtension
);
wxString
defaultPath
=
m_plotOpts
.
GetOutputDirectory
();
if
(
defaultPath
.
IsEmpty
()
)
defaultPath
=
::
wxGetCwd
();
...
...
@@ -512,7 +509,7 @@ void DIALOG_GENDRILL::OnGenReportFile( wxCommandEvent& event )
excellonWriter
.
SetFormat
(
!
m_UnitDrillIsInch
,
(
EXCELLON_WRITER
::
zeros_fmt
)
m_ZerosFormat
,
m_Precision
.
m_lhs
,
m_Precision
.
m_rhs
);
excellonWriter
.
SetOptions
(
m_Mirror
,
m_MinimalHeader
,
m_FileDrillOffset
);
excellonWriter
.
SetOptions
(
m_Mirror
,
m_MinimalHeader
,
m_FileDrillOffset
,
m_Merge_PTH_NPTH
);
bool
success
=
excellonWriter
.
GenDrillReportFile
(
dlg
.
GetPath
()
);
...
...
@@ -572,7 +569,7 @@ void DIALOG_GENDRILL::GenDrillMap( const wxString aFullFileNameWithoutExt,
break
;
default
:
wxLogMessage
(
wxT
(
"DIALOG_GENDRILL::GenDrillMap() error, fmt % unkown"
),
format
);
wxLogMessage
(
wxT
(
"DIALOG_GENDRILL::GenDrillMap() error, fmt % unk
n
own"
),
format
);
return
;
}
...
...
@@ -581,15 +578,14 @@ void DIALOG_GENDRILL::GenDrillMap( const wxString aFullFileNameWithoutExt,
fullFilename
<<
wxT
(
"."
)
<<
ext
;
bool
success
=
aExcellonWriter
.
GenDrillMapFile
(
fullFilename
,
m_parent
->
GetPageSettings
(),
format
);
m_parent
->
GetPageSettings
(),
format
);
wxString
msg
;
if
(
!
success
)
{
msg
.
Printf
(
_
(
"** Unable to create %s **
\n
"
),
GetChars
(
fullFilename
)
);
msg
.
Printf
(
_
(
"** Unable to create %s **
\n
"
),
GetChars
(
fullFilename
)
);
m_messagesBox
->
AppendText
(
msg
);
return
;
}
...
...
@@ -598,5 +594,4 @@ void DIALOG_GENDRILL::GenDrillMap( const wxString aFullFileNameWithoutExt,
msg
.
Printf
(
_
(
"Plot: %s OK
\n
"
),
GetChars
(
fullFilename
)
);
m_messagesBox
->
AppendText
(
msg
);
}
}
pcbnew/dialogs/dialog_gendrill.h
View file @
5ed0980d
...
...
@@ -41,6 +41,7 @@ public:
static
int
m_ZerosFormat
;
static
bool
m_MinimalHeader
;
static
bool
m_Mirror
;
static
bool
m_Merge_PTH_NPTH
;
static
bool
m_DrillOriginIsAuxAxis
;
/* Axis selection (main / auxiliary)
* for drill origin coordinates */
DRILL_PRECISION
m_Precision
;
// Selected precision for drill files
...
...
@@ -69,15 +70,34 @@ private:
// event functions
void
OnSelDrillUnitsSelected
(
wxCommandEvent
&
event
);
void
OnSelZerosFmtSelected
(
wxCommandEvent
&
event
);
void
OnGenDrillFile
(
wxCommandEvent
&
event
);
void
OnGenMapFile
(
wxCommandEvent
&
event
);
void
OnGenReportFile
(
wxCommandEvent
&
event
);
void
OnGenDrillFile
(
wxCommandEvent
&
event
);
void
OnGenMapFile
(
wxCommandEvent
&
event
);
/*
* Create a plain text report file giving a list of drill values and drill count
* for through holes, oblong holes, and for buried vias,
* drill values and drill count per layer pair
*/
void
OnGenReportFile
(
wxCommandEvent
&
event
);
void
OnCancelClick
(
wxCommandEvent
&
event
);
void
OnOutputDirectoryBrowseClicked
(
wxCommandEvent
&
event
);
// Specific functions:
void
SetParams
(
void
);
void
GenDrillAndMapFiles
(
bool
aGenDrill
,
bool
aGenMap
);
/**
* Function GenDrillAndMapFiles
* Calls the functions to create EXCELLON drill files and/or drill map files
* >When all holes are through holes, only one excellon file is created.
* >When there are some partial holes (some blind or buried vias),
* one excellon file is created, for all plated through holes,
* and one file per layer pair, which have one or more holes, excluding
* through holes, already in the first file.
* one file for all Not Plated through holes
*/
void
GenDrillAndMapFiles
(
bool
aGenDrill
,
bool
aGenMap
);
void
GenDrillMap
(
const
wxString
aFileName
,
EXCELLON_WRITER
&
aExcellonWriter
,
PlotFormat
format
);
...
...
pcbnew/dialogs/dialog_gendrill_base.cpp
View file @
5ed0980d
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version
Oct 8 2012
)
// C++ code generated with wxFormBuilder (version
Feb 26 2014
)
// http://www.wxformbuilder.org/
//
// PLEASE DO "NOT" EDIT THIS FILE!
...
...
@@ -88,6 +88,9 @@ DIALOG_GENDRILL_BASE::DIALOG_GENDRILL_BASE( wxWindow* parent, wxWindowID id, con
m_Check_Minimal
=
new
wxCheckBox
(
this
,
wxID_ANY
,
_
(
"Minimal header"
),
wxDefaultPosition
,
wxDefaultSize
,
0
);
sbOptSizer
->
Add
(
m_Check_Minimal
,
0
,
wxTOP
|
wxRIGHT
|
wxLEFT
,
5
);
m_Check_Merge_PTH_NPTH
=
new
wxCheckBox
(
this
,
wxID_ANY
,
_
(
"Merge PTH and NPTH holes into one file"
),
wxDefaultPosition
,
wxDefaultSize
,
0
);
sbOptSizer
->
Add
(
m_Check_Merge_PTH_NPTH
,
0
,
wxALL
,
5
);
bMiddleBoxSizer
->
Add
(
sbOptSizer
,
0
,
wxEXPAND
|
wxRIGHT
|
wxLEFT
,
5
);
...
...
pcbnew/dialogs/dialog_gendrill_base.fbp
View file @
5ed0980d
...
...
@@ -20,8 +20,10 @@
<property
name=
"path"
>
.
</property>
<property
name=
"precompiled_header"
></property>
<property
name=
"relative_path"
>
1
</property>
<property
name=
"skip_lua_events"
>
1
</property>
<property
name=
"skip_php_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_microsoft_bom"
>
0
</property>
<object
class=
"Dialog"
expanded=
"1"
>
...
...
@@ -879,6 +881,94 @@
<event
name=
"OnUpdateUI"
></event>
</object>
</object>
<object
class=
"sizeritem"
expanded=
"1"
>
<property
name=
"border"
>
5
</property>
<property
name=
"flag"
>
wxALL
</property>
<property
name=
"proportion"
>
0
</property>
<object
class=
"wxCheckBox"
expanded=
"1"
>
<property
name=
"BottomDockable"
>
1
</property>
<property
name=
"LeftDockable"
>
1
</property>
<property
name=
"RightDockable"
>
1
</property>
<property
name=
"TopDockable"
>
1
</property>
<property
name=
"aui_layer"
></property>
<property
name=
"aui_name"
></property>
<property
name=
"aui_position"
></property>
<property
name=
"aui_row"
></property>
<property
name=
"best_size"
></property>
<property
name=
"bg"
></property>
<property
name=
"caption"
></property>
<property
name=
"caption_visible"
>
1
</property>
<property
name=
"center_pane"
>
0
</property>
<property
name=
"checked"
>
0
</property>
<property
name=
"close_button"
>
1
</property>
<property
name=
"context_help"
></property>
<property
name=
"context_menu"
>
1
</property>
<property
name=
"default_pane"
>
0
</property>
<property
name=
"dock"
>
Dock
</property>
<property
name=
"dock_fixed"
>
0
</property>
<property
name=
"docking"
>
Left
</property>
<property
name=
"enabled"
>
1
</property>
<property
name=
"fg"
></property>
<property
name=
"floatable"
>
1
</property>
<property
name=
"font"
></property>
<property
name=
"gripper"
>
0
</property>
<property
name=
"hidden"
>
0
</property>
<property
name=
"id"
>
wxID_ANY
</property>
<property
name=
"label"
>
Merge PTH and NPTH holes into one file
</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_Check_Merge_PTH_NPTH
</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>
</object>
<object
class=
"sizeritem"
expanded=
"1"
>
...
...
pcbnew/dialogs/dialog_gendrill_base.h
View file @
5ed0980d
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version
Oct 8 2012
)
// C++ code generated with wxFormBuilder (version
Feb 26 2014
)
// http://www.wxformbuilder.org/
//
// PLEASE DO "NOT" EDIT THIS FILE!
...
...
@@ -48,6 +48,7 @@ class DIALOG_GENDRILL_BASE : public DIALOG_SHIM
wxRadioBox
*
m_Choice_Drill_Map
;
wxCheckBox
*
m_Check_Mirror
;
wxCheckBox
*
m_Check_Minimal
;
wxCheckBox
*
m_Check_Merge_PTH_NPTH
;
wxRadioBox
*
m_Choice_Drill_Offset
;
wxStaticBoxSizer
*
m_DefaultViasDrillSizer
;
wxStaticText
*
m_ViaDrillValue
;
...
...
pcbnew/dialogs/dialog_general_options.cpp
View file @
5ed0980d
...
...
@@ -237,6 +237,10 @@ void PCB_EDIT_FRAME::OnSelectOptionToolbar( wxCommandEvent& event )
m_show_microwave_tools
=
state
;
m_auimgr
.
GetPane
(
wxT
(
"m_microWaveToolBar"
)
).
Show
(
m_show_microwave_tools
);
m_auimgr
.
Update
();
GetMenuBar
()
->
SetLabel
(
ID_MENU_PCB_SHOW_HIDE_MUWAVE_TOOLBAR
,
m_show_microwave_tools
?
_
(
"Hide Microwave Toolbar"
)
:
_
(
"Show Microwave Toolbar"
));
break
;
case
ID_TB_OPTIONS_SHOW_MANAGE_LAYERS_VERTICAL_TOOLBAR
:
...
...
pcbnew/dialogs/dialog_global_deletion.cpp
View file @
5ed0980d
...
...
@@ -27,9 +27,11 @@ DIALOG_GLOBAL_DELETION::DIALOG_GLOBAL_DELETION( PCB_EDIT_FRAME* parent )
m_TrackFilterLocked
->
Enable
(
m_DelTracks
->
GetValue
()
);
m_TrackFilterNormal
->
Enable
(
m_DelTracks
->
GetValue
()
);
m_TrackFilterVias
->
Enable
(
m_DelTracks
->
GetValue
()
);
m_ModuleFilterLocked
->
Enable
(
m_DelModules
->
GetValue
()
);
m_ModuleFilterNormal
->
Enable
(
m_DelModules
->
GetValue
()
);
SetFocus
();
GetSizer
()
->
SetSizeHints
(
this
);
GetSizer
()
->
SetSizeHints
(
this
);
Centre
();
}
...
...
@@ -42,12 +44,14 @@ void PCB_EDIT_FRAME::InstallPcbGlobalDeleteFrame( const wxPoint& pos )
dlg
.
ShowModal
();
}
void
DIALOG_GLOBAL_DELETION
::
SetCurrentLayer
(
LAYER_NUM
aLayer
)
{
m_currentLayer
=
aLayer
;
m_textCtrlCurrLayer
->
SetValue
(
m_Parent
->
GetBoard
()
->
GetLayerName
(
aLayer
)
);
}
void
DIALOG_GLOBAL_DELETION
::
OnCheckDeleteTracks
(
wxCommandEvent
&
event
)
{
m_TrackFilterAR
->
Enable
(
m_DelTracks
->
GetValue
()
);
...
...
@@ -56,6 +60,14 @@ void DIALOG_GLOBAL_DELETION::OnCheckDeleteTracks( wxCommandEvent& event )
m_TrackFilterVias
->
Enable
(
m_DelTracks
->
GetValue
()
);
}
void
DIALOG_GLOBAL_DELETION
::
OnCheckDeleteModules
(
wxCommandEvent
&
event
)
{
m_ModuleFilterLocked
->
Enable
(
m_DelModules
->
GetValue
()
);
m_ModuleFilterNormal
->
Enable
(
m_DelModules
->
GetValue
()
);
}
void
DIALOG_GLOBAL_DELETION
::
AcceptPcbDelete
(
)
{
bool
gen_rastnest
=
false
;
...
...
@@ -68,72 +80,102 @@ void DIALOG_GLOBAL_DELETION::AcceptPcbDelete( )
}
else
{
if
(
!
IsOK
(
this
,
_
(
"OK to delete selected items ?"
)
)
)
if
(
!
IsOK
(
this
,
_
(
"Are you sure you want to delete the selected items?"
)
)
)
return
;
BOARD
*
pcb
=
m_Parent
->
GetBoard
();
BOARD
*
pcb
=
m_Parent
->
GetBoard
();
PICKED_ITEMS_LIST
pickersList
;
ITEM_PICKER
itemPicker
(
NULL
,
UR_DELETED
);
BOARD_ITEM
*
item
,
*
nextitem
;
LAYER_MSK
layers_filter
=
ALL_LAYERS
;
if
(
m_rbLayersOption
->
GetSelection
()
!=
0
)
// Use current layer only
layers_filter
=
GetLayerMask
(
m_currentLayer
);
if
(
m_DelZones
->
GetValue
()
)
{
gen_rastnest
=
true
;
int
area_index
=
0
;
item
=
pcb
->
GetArea
(
area_index
);
/* SEG_ZONE items used in Zone filling selection are now deprecated :
* and are deleted but not put in undo buffer if exist
*/
pcb
->
m_Zone
.
DeleteAll
();
while
(
pcb
->
GetAreaCount
()
)
while
(
item
!=
NULL
)
{
item
=
pcb
->
GetArea
(
0
);
itemPicker
.
SetItem
(
item
);
pickersList
.
PushItem
(
itemPicker
);
pcb
->
Remove
(
item
);
if
(
GetLayerMask
(
item
->
GetLayer
()
)
&
layers_filter
)
{
itemPicker
.
SetItem
(
item
);
pickersList
.
PushItem
(
itemPicker
);
pcb
->
Remove
(
item
);
gen_rastnest
=
true
;
}
else
{
area_index
++
;
}
item
=
pcb
->
GetArea
(
area_index
);
}
}
LAYER_MSK
masque_layer
=
NO_LAYERS
;
LAYER_MSK
layers_filter
=
ALL_LAYERS
;
if
(
m_rbLayersOption
->
GetSelection
()
!=
0
)
// Use current layer only
layers_filter
=
GetLayerMask
(
m_currentLayer
);
if
(
m_DelDrawings
->
GetValue
()
||
m_DelBoardEdges
->
GetValue
()
)
{
LAYER_MSK
masque_layer
=
NO_LAYERS
;
if
(
m_DelDrawings
->
GetValue
()
)
masque_layer
=
(
~
EDGE_LAYER
)
&
ALL_NO_CU_LAYERS
;
if
(
m_DelDrawing
s
->
GetValue
()
)
masque_layer
=
(
~
EDGE_LAYER
)
&
ALL_NO_CU_LAYERS
;
if
(
m_DelBoardEdge
s
->
GetValue
()
)
masque_layer
|=
EDGE_LAYER
;
if
(
m_DelBoardEdges
->
GetValue
()
)
masque_layer
|=
EDGE_LAYER
;
masque_layer
&=
layers_filter
;
layers_filter
&=
layers_filter
;
for
(
item
=
pcb
->
m_Drawings
;
item
!=
NULL
;
item
=
nextitem
)
{
nextitem
=
item
->
Next
();
for
(
item
=
pcb
->
m_Drawings
;
item
!=
NULL
;
item
=
nextitem
)
{
nextitem
=
item
->
Next
();
bool
removeme
=
GetLayerMask
(
item
->
GetLayer
()
)
&
masque_layer
;
if
(
(
item
->
Type
()
==
PCB_LINE_T
)
&&
(
GetLayerMask
(
item
->
GetLayer
()
)
&
masque_layer
)
)
{
itemPicker
.
SetItem
(
item
);
pickersList
.
PushItem
(
itemPicker
);
item
->
UnLink
();
}
}
}
if
(
(
item
->
Type
()
==
PCB_TEXT_T
)
&&
m_DelTexts
->
GetValue
()
)
removeme
=
true
;
if
(
m_DelTexts
->
GetValue
()
)
{
LAYER_MSK
del_text_layers
=
ALL_LAYERS
&
layers_filter
;
if
(
removeme
)
for
(
item
=
pcb
->
m_Drawings
;
item
!=
NULL
;
item
=
nextitem
)
{
itemPicker
.
SetItem
(
item
);
pickersList
.
PushItem
(
itemPicker
);
item
->
UnLink
();
nextitem
=
item
->
Next
();
if
(
(
item
->
Type
()
==
PCB_TEXT_T
)
&&
(
GetLayerMask
(
item
->
GetLayer
()
)
&
del_text_layers
)
)
{
itemPicker
.
SetItem
(
item
);
pickersList
.
PushItem
(
itemPicker
);
item
->
UnLink
();
}
}
}
if
(
m_DelModules
->
GetValue
()
)
{
gen_rastnest
=
true
;
for
(
item
=
pcb
->
m_Modules
;
item
;
item
=
nextitem
)
{
nextitem
=
item
->
Next
();
itemPicker
.
SetItem
(
item
);
pickersList
.
PushItem
(
itemPicker
);
item
->
UnLink
();
if
(
(
GetLayerMask
(
item
->
GetLayer
()
)
&
layers_filter
)
&&
(
(
m_ModuleFilterNormal
->
GetValue
()
&&
!
item
->
IsLocked
()
)
||
(
m_ModuleFilterLocked
->
GetValue
()
&&
item
->
IsLocked
()
)
)
)
{
itemPicker
.
SetItem
(
item
);
pickersList
.
PushItem
(
itemPicker
);
item
->
UnLink
();
gen_rastnest
=
true
;
}
}
}
...
...
@@ -148,6 +190,7 @@ void DIALOG_GLOBAL_DELETION::AcceptPcbDelete( )
track_mask_filter
|=
TRACK_AR
;
TRACK
*
nexttrack
;
for
(
TRACK
*
track
=
pcb
->
m_Track
;
track
!=
NULL
;
track
=
nexttrack
)
{
nexttrack
=
track
->
Next
();
...
...
@@ -180,6 +223,7 @@ void DIALOG_GLOBAL_DELETION::AcceptPcbDelete( )
if
(
gen_rastnest
)
m_Parent
->
Compile_Ratsnest
(
NULL
,
true
);
}
m_Parent
->
GetCanvas
()
->
Refresh
();
...
...
@@ -187,4 +231,3 @@ void DIALOG_GLOBAL_DELETION::AcceptPcbDelete( )
EndModal
(
1
);
}
pcbnew/dialogs/dialog_global_deletion.h
View file @
5ed0980d
...
...
@@ -30,6 +30,7 @@ private:
void
AcceptPcbDelete
();
void
OnCheckDeleteTracks
(
wxCommandEvent
&
event
);
void
OnCheckDeleteModules
(
wxCommandEvent
&
event
);
};
#endif // _DIALOG_GLOBAL_DELETION_H_
pcbnew/dialogs/dialog_global_deletion_base.cpp
View file @
5ed0980d
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version
Oct 8 2012
)
// C++ code generated with wxFormBuilder (version
Feb 26 2014
)
// http://www.wxformbuilder.org/
//
// PLEASE DO "NOT" EDIT THIS FILE!
...
...
@@ -52,25 +52,32 @@ DIALOG_GLOBAL_DELETION_BASE::DIALOG_GLOBAL_DELETION_BASE( wxWindow* parent, wxWi
wxBoxSizer
*
bSizerRight
;
bSizerRight
=
new
wxBoxSizer
(
wxVERTICAL
);
sb
TrackFilter
=
new
wxStaticBoxSizer
(
new
wxStaticBox
(
this
,
wxID_ANY
,
_
(
"Track Filter
"
)
),
wxVERTICAL
);
sb
Filter
=
new
wxStaticBoxSizer
(
new
wxStaticBox
(
this
,
wxID_ANY
,
_
(
"Filter Settings
"
)
),
wxVERTICAL
);
m_TrackFilterAR
=
new
wxCheckBox
(
this
,
wxID_ANY
,
_
(
"Automatically routed tracks"
),
wxDefaultPosition
,
wxDefaultSize
,
0
);
m_TrackFilterAR
->
SetValue
(
true
);
sb
Track
Filter
->
Add
(
m_TrackFilterAR
,
0
,
wxTOP
|
wxRIGHT
|
wxLEFT
,
5
);
sbFilter
->
Add
(
m_TrackFilterAR
,
0
,
wxTOP
|
wxRIGHT
|
wxLEFT
,
5
);
m_TrackFilterLocked
=
new
wxCheckBox
(
this
,
wxID_ANY
,
_
(
"Locked tracks"
),
wxDefaultPosition
,
wxDefaultSize
,
0
);
sb
Track
Filter
->
Add
(
m_TrackFilterLocked
,
0
,
wxTOP
|
wxRIGHT
|
wxLEFT
,
5
);
sbFilter
->
Add
(
m_TrackFilterLocked
,
0
,
wxTOP
|
wxRIGHT
|
wxLEFT
,
5
);
m_TrackFilterNormal
=
new
wxCheckBox
(
this
,
wxID_ANY
,
_
(
"
Normal
tracks"
),
wxDefaultPosition
,
wxDefaultSize
,
0
);
m_TrackFilterNormal
=
new
wxCheckBox
(
this
,
wxID_ANY
,
_
(
"
Unlocked
tracks"
),
wxDefaultPosition
,
wxDefaultSize
,
0
);
m_TrackFilterNormal
->
SetValue
(
true
);
sb
Track
Filter
->
Add
(
m_TrackFilterNormal
,
0
,
wxTOP
|
wxRIGHT
|
wxLEFT
,
5
);
sbFilter
->
Add
(
m_TrackFilterNormal
,
0
,
wxTOP
|
wxRIGHT
|
wxLEFT
,
5
);
m_TrackFilterVias
=
new
wxCheckBox
(
this
,
wxID_ANY
,
_
(
"Vias"
),
wxDefaultPosition
,
wxDefaultSize
,
0
);
m_TrackFilterVias
->
SetValue
(
true
);
sb
Track
Filter
->
Add
(
m_TrackFilterVias
,
0
,
wxALL
,
5
);
sbFilter
->
Add
(
m_TrackFilterVias
,
0
,
wxALL
,
5
);
m_ModuleFilterLocked
=
new
wxCheckBox
(
this
,
wxID_ANY
,
_
(
"Locked footprints"
),
wxDefaultPosition
,
wxDefaultSize
,
0
);
sbFilter
->
Add
(
m_ModuleFilterLocked
,
0
,
wxALL
,
5
);
bSizerRight
->
Add
(
sbTrackFilter
,
0
,
wxALL
|
wxEXPAND
,
5
);
m_ModuleFilterNormal
=
new
wxCheckBox
(
this
,
wxID_ANY
,
_
(
"Unlocked footprints"
),
wxDefaultPosition
,
wxDefaultSize
,
0
);
m_ModuleFilterNormal
->
SetValue
(
true
);
sbFilter
->
Add
(
m_ModuleFilterNormal
,
0
,
wxALL
,
5
);
bSizerRight
->
Add
(
sbFilter
,
0
,
wxALL
|
wxEXPAND
,
5
);
wxString
m_rbLayersOptionChoices
[]
=
{
_
(
"All layers"
),
_
(
"Current layer only"
)
};
int
m_rbLayersOptionNChoices
=
sizeof
(
m_rbLayersOptionChoices
)
/
sizeof
(
wxString
);
...
...
@@ -112,6 +119,7 @@ DIALOG_GLOBAL_DELETION_BASE::DIALOG_GLOBAL_DELETION_BASE( wxWindow* parent, wxWi
this
->
Centre
(
wxBOTH
);
// Connect Events
m_DelModules
->
Connect
(
wxEVT_COMMAND_CHECKBOX_CLICKED
,
wxCommandEventHandler
(
DIALOG_GLOBAL_DELETION_BASE
::
OnCheckDeleteModules
),
NULL
,
this
);
m_DelTracks
->
Connect
(
wxEVT_COMMAND_CHECKBOX_CLICKED
,
wxCommandEventHandler
(
DIALOG_GLOBAL_DELETION_BASE
::
OnCheckDeleteTracks
),
NULL
,
this
);
m_sdbSizer1Cancel
->
Connect
(
wxEVT_COMMAND_BUTTON_CLICKED
,
wxCommandEventHandler
(
DIALOG_GLOBAL_DELETION_BASE
::
OnCancelClick
),
NULL
,
this
);
m_sdbSizer1OK
->
Connect
(
wxEVT_COMMAND_BUTTON_CLICKED
,
wxCommandEventHandler
(
DIALOG_GLOBAL_DELETION_BASE
::
OnOkClick
),
NULL
,
this
);
...
...
@@ -120,6 +128,7 @@ DIALOG_GLOBAL_DELETION_BASE::DIALOG_GLOBAL_DELETION_BASE( wxWindow* parent, wxWi
DIALOG_GLOBAL_DELETION_BASE
::~
DIALOG_GLOBAL_DELETION_BASE
()
{
// Disconnect Events
m_DelModules
->
Disconnect
(
wxEVT_COMMAND_CHECKBOX_CLICKED
,
wxCommandEventHandler
(
DIALOG_GLOBAL_DELETION_BASE
::
OnCheckDeleteModules
),
NULL
,
this
);
m_DelTracks
->
Disconnect
(
wxEVT_COMMAND_CHECKBOX_CLICKED
,
wxCommandEventHandler
(
DIALOG_GLOBAL_DELETION_BASE
::
OnCheckDeleteTracks
),
NULL
,
this
);
m_sdbSizer1Cancel
->
Disconnect
(
wxEVT_COMMAND_BUTTON_CLICKED
,
wxCommandEventHandler
(
DIALOG_GLOBAL_DELETION_BASE
::
OnCancelClick
),
NULL
,
this
);
m_sdbSizer1OK
->
Disconnect
(
wxEVT_COMMAND_BUTTON_CLICKED
,
wxCommandEventHandler
(
DIALOG_GLOBAL_DELETION_BASE
::
OnOkClick
),
NULL
,
this
);
...
...
pcbnew/dialogs/dialog_global_deletion_base.fbp
View file @
5ed0980d
This diff is collapsed.
Click to expand it.
pcbnew/dialogs/dialog_global_deletion_base.h
View file @
5ed0980d
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version
Oct 8 2012
)
// C++ code generated with wxFormBuilder (version
Feb 26 2014
)
// http://www.wxformbuilder.org/
//
// PLEASE DO "NOT" EDIT THIS FILE!
...
...
@@ -48,11 +48,13 @@ class DIALOG_GLOBAL_DELETION_BASE : public DIALOG_SHIM
wxCheckBox
*
m_DelTracks
;
wxCheckBox
*
m_DelMarkers
;
wxCheckBox
*
m_DelAlls
;
wxStaticBoxSizer
*
sb
Track
Filter
;
wxStaticBoxSizer
*
sbFilter
;
wxCheckBox
*
m_TrackFilterAR
;
wxCheckBox
*
m_TrackFilterLocked
;
wxCheckBox
*
m_TrackFilterNormal
;
wxCheckBox
*
m_TrackFilterVias
;
wxCheckBox
*
m_ModuleFilterLocked
;
wxCheckBox
*
m_ModuleFilterNormal
;
wxRadioBox
*
m_rbLayersOption
;
wxStaticText
*
m_staticText1
;
wxTextCtrl
*
m_textCtrlCurrLayer
;
...
...
@@ -62,6 +64,7 @@ class DIALOG_GLOBAL_DELETION_BASE : public DIALOG_SHIM
wxButton
*
m_sdbSizer1Cancel
;
// Virtual event handlers, overide them in your derived class
virtual
void
OnCheckDeleteModules
(
wxCommandEvent
&
event
)
{
event
.
Skip
();
}
virtual
void
OnCheckDeleteTracks
(
wxCommandEvent
&
event
)
{
event
.
Skip
();
}
virtual
void
OnCancelClick
(
wxCommandEvent
&
event
)
{
event
.
Skip
();
}
virtual
void
OnOkClick
(
wxCommandEvent
&
event
)
{
event
.
Skip
();
}
...
...
pcbnew/dialogs/dialog_layers_setup.cpp
View file @
5ed0980d
...
...
@@ -294,6 +294,7 @@ DIALOG_LAYERS_SETUP::DIALOG_LAYERS_SETUP( PCB_EDIT_FRAME* parent ) :
m_TitlePanel
->
SetMinSize
(
wxSize
(
-
1
,
m_AdhesFrontName
->
GetSize
().
y
+
10
)
);
Layout
();
Fit
();
Center
();
...
...
pcbnew/dialogs/dialog_pad_properties.cpp
View file @
5ed0980d
...
...
@@ -681,13 +681,14 @@ bool DIALOG_PAD_PROPERTIES::padValuesOK()
{
if
(
m_dummyPad
->
GetDrillSize
().
x
||
m_dummyPad
->
GetDrillSize
().
y
)
{
msg
=
_
(
"Error: pad is not on a copper layer and has a hole"
);
// Note: he message is shown in an HTML window
msg
=
_
(
"Error: the pad is not on a copper layer and has a hole"
);
if
(
m_dummyPad
->
GetAttribute
()
==
PAD_HOLE_NOT_PLATED
)
{
msg
+=
wxT
(
"
\n
"
);
msg
+=
_
(
"For NPTH pad, set pad
drill value to pad size value,
\n
"
"if you do not want this pad plotted in gerber files"
msg
+=
wxT
(
"
<br><br><i>
"
);
msg
+=
_
(
"For NPTH pad, set pad
size value to pad drill value,
"
"
if you do not want this pad plotted in gerber files"
);
}
...
...
pcbnew/exporters/gen_drill_report_files.cpp
View file @
5ed0980d
...
...
@@ -360,7 +360,7 @@ bool EXCELLON_WRITER::GenDrillReportFile( const wxString& aFullFileName )
for
(
;
;
)
{
BuildHolesList
(
layer1
,
layer2
,
gen_through_holes
?
false
:
true
,
gen_NPTH_holes
);
gen_through_holes
?
false
:
true
,
gen_NPTH_holes
,
false
);
totalHoleCount
=
0
;
...
...
pcbnew/exporters/gendrill_Excellon_writer.cpp
View file @
5ed0980d
...
...
@@ -442,11 +442,13 @@ static bool CmpHoleDiameterValue( const HOLE_INFO& a, const HOLE_INFO& b )
* param aGenerateNPTH_list :
* true to create NPTH only list (with no plated holes)
* false to created plated holes list (with no NPTH )
* param aMergePTHNPTH : if true, merge PTH and NPTH holes into one file by treating all holes as PTH
*/
void
EXCELLON_WRITER
::
BuildHolesList
(
int
aFirstLayer
,
int
aLastLayer
,
bool
aExcludeThroughHoles
,
bool
aGenerateNPTH_list
)
bool
aGenerateNPTH_list
,
bool
aMergePTHNPTH
)
{
HOLE_INFO
new_hole
;
int
hole_value
;
...
...
@@ -460,6 +462,11 @@ void EXCELLON_WRITER::BuildHolesList( int aFirstLayer,
EXCHG
(
aFirstLayer
,
aLastLayer
);
}
if
(
aGenerateNPTH_list
&&
aMergePTHNPTH
)
{
return
;
}
/* build hole list for vias
*/
if
(
!
aGenerateNPTH_list
)
// vias are always plated !
...
...
@@ -507,7 +514,7 @@ void EXCELLON_WRITER::BuildHolesList( int aFirstLayer,
// Read and analyse pads
for
(
D_PAD
*
pad
=
module
->
Pads
();
pad
;
pad
=
pad
->
Next
()
)
{
if
(
!
aGenerateNPTH_list
&&
pad
->
GetAttribute
()
==
PAD_HOLE_NOT_PLATED
)
if
(
!
aGenerateNPTH_list
&&
pad
->
GetAttribute
()
==
PAD_HOLE_NOT_PLATED
&&
!
aMergePTHNPTH
)
continue
;
if
(
aGenerateNPTH_list
&&
pad
->
GetAttribute
()
!=
PAD_HOLE_NOT_PLATED
)
...
...
pcbnew/exporters/gendrill_Excellon_writer.h
View file @
5ed0980d
...
...
@@ -135,6 +135,7 @@ private:
// (i.e inches or mm)
bool
m_mirror
;
wxPoint
m_offset
;
// Drill offset ooordinates
bool
m_mergePTHNPTH
;
std
::
vector
<
HOLE_INFO
>
m_holeListBuffer
;
// Buffer containing holes
std
::
vector
<
DRILL_TOOL
>
m_toolListBuffer
;
// Buffer containing tools
...
...
@@ -146,6 +147,7 @@ public: EXCELLON_WRITER( BOARD* aPcb, wxPoint aOffset )
m_conversionUnits
=
0
.
0001
;
m_unitsDecimal
=
false
;
m_mirror
=
false
;
m_mergePTHNPTH
=
false
;
m_minimalHeader
=
false
;
}
...
...
@@ -177,11 +179,12 @@ public: EXCELLON_WRITER( BOARD* aPcb, wxPoint aOffset )
* @param aMinimalHeader = true to use a minimal header (no comments, no info)
* @param aOffset = drill coordinates offset
*/
void
SetOptions
(
bool
aMirror
,
bool
aMinimalHeader
,
wxPoint
aOffset
)
void
SetOptions
(
bool
aMirror
,
bool
aMinimalHeader
,
wxPoint
aOffset
,
bool
aMergePTHNPTH
)
{
m_mirror
=
aMirror
;
m_offset
=
aOffset
;
m_minimalHeader
=
aMinimalHeader
;
m_mergePTHNPTH
=
aMergePTHNPTH
;
}
/**
...
...
@@ -199,7 +202,8 @@ public: EXCELLON_WRITER( BOARD* aPcb, wxPoint aOffset )
*/
void
BuildHolesList
(
int
aFirstLayer
,
int
aLastLayer
,
bool
aExcludeThroughHoles
,
bool
aGenerateNPTH_list
);
bool
aGenerateNPTH_list
,
bool
aMergePTHNPTH
);
int
GetHolesCount
()
const
{
return
m_holeListBuffer
.
size
();
}
...
...
pcbnew/help_common_strings.h
View file @
5ed0980d
...
...
@@ -22,3 +22,5 @@
#define HELP_ZOOM_REDRAW _( "Redraw the screen of the board" )
#define HELP_SHOW_HIDE_LAYERMANAGER _( "Show/hide the layers manager toolbar" )
#define HELP_SHOW_HIDE_MICROWAVE_TOOLS _( "Show/hide the toolbar for microwave tools\nThis is a experimental feature (under development)" )
pcbnew/menubar_modedit.cpp
View file @
5ed0980d
...
...
@@ -62,7 +62,7 @@ void FOOTPRINT_EDIT_FRAME::ReCreateMenuBar()
wxMenu
*
fileMenu
=
new
wxMenu
;
// Active library selection
AddMenuItem
(
fileMenu
,
ID_MODEDIT_SELECT_CURRENT_LIB
,
_
(
"
Current
Library"
),
AddMenuItem
(
fileMenu
,
ID_MODEDIT_SELECT_CURRENT_LIB
,
_
(
"
Set Active
Library"
),
_
(
"Select active library"
),
KiBitmap
(
open_library_xpm
)
);
fileMenu
->
AppendSeparator
();
...
...
@@ -77,32 +77,32 @@ void FOOTPRINT_EDIT_FRAME::ReCreateMenuBar()
// from File
AddMenuItem
(
openSubmenu
,
ID_MODEDIT_IMPORT_PART
,
_
(
"&Import Module
f
rom File"
),
_
(
"Import
a
footprint from an existing file"
),
_
(
"&Import Module
F
rom File"
),
_
(
"Import footprint from an existing file"
),
KiBitmap
(
import_module_xpm
)
);
// from Library
AddMenuItem
(
openSubmenu
,
ID_MODEDIT_LOAD_MODULE
,
_
(
"Load Module
f
rom Current Li&brary"
),
_
(
"Open a footprint module from
a L
ibrary"
),
_
(
"Load Module
F
rom Current Li&brary"
),
_
(
"Open a footprint module from
l
ibrary"
),
KiBitmap
(
module_xpm
)
);
// from current Board
AddMenuItem
(
openSubmenu
,
ID_MODEDIT_LOAD_MODULE_FROM_BOARD
,
_
(
"Load Module
f
rom &Current Board"
),
_
(
"Load a footprint module from the current
loaded
board"
),
_
(
"Load Module
F
rom &Current Board"
),
_
(
"Load a footprint module from the current board"
),
KiBitmap
(
load_module_board_xpm
)
);
/* Append openSubmenu to fileMenu */
AddMenuItem
(
fileMenu
,
openSubmenu
,
-
1
,
_
(
"&Load Module"
),
_
(
"Load
a
footprint module"
),
_
(
"Load footprint module"
),
KiBitmap
(
open_document_xpm
)
);
fileMenu
->
AppendSeparator
();
// Save the currently loaded legacy library as an s-expression library.
AddMenuItem
(
fileMenu
,
ID_MODEDIT_SAVE_LIBRARY_AS
,
_
(
"Save Current Library
as
..."
),
_
(
"Save Current Library
As
..."
),
_
(
"Save entire current library under a new name."
),
wxNullBitmap
);
...
...
@@ -116,21 +116,21 @@ void FOOTPRINT_EDIT_FRAME::ReCreateMenuBar()
// Save module in new lib
AddMenuItem
(
fileMenu
,
ID_MODEDIT_CREATE_NEW_LIB_AND_SAVE_CURRENT_PART
,
_
(
"S&ave Module in
to a
New Library"
),
_
(
"S&ave Module in New Library"
),
_
(
"Create a new library and save current module into it"
),
KiBitmap
(
new_library_xpm
)
);
// Export module
AddMenuItem
(
fileMenu
,
ID_MODEDIT_EXPORT_PART
,
_
(
"&Export Module"
),
_
(
"Save
the current loaded module to a
file"
),
_
(
"Save
current loaded module into
file"
),
KiBitmap
(
export_module_xpm
)
);
fileMenu
->
AppendSeparator
();
// Print
AddMenuItem
(
fileMenu
,
wxID_PRINT
,
_
(
"&Print"
),
_
(
"Print
the
current module"
),
_
(
"Print current module"
),
KiBitmap
(
plot_xpm
)
);
// Separator
...
...
@@ -139,7 +139,7 @@ void FOOTPRINT_EDIT_FRAME::ReCreateMenuBar()
// Close editor
AddMenuItem
(
fileMenu
,
wxID_EXIT
,
_
(
"Cl&ose"
),
_
(
"Close
the
footprint editor"
),
_
(
"Close footprint editor"
),
KiBitmap
(
exit_xpm
)
);
// Menu Edit:
...
...
@@ -148,18 +148,18 @@ void FOOTPRINT_EDIT_FRAME::ReCreateMenuBar()
// Undo
text
=
AddHotkeyName
(
_
(
"&Undo"
),
g_Module_Editor_Hokeys_Descr
,
HK_UNDO
);
AddMenuItem
(
editMenu
,
wxID_UNDO
,
text
,
_
(
"Undo last
edit
"
),
text
,
_
(
"Undo last
action
"
),
KiBitmap
(
undo_xpm
)
);
// Redo
text
=
AddHotkeyName
(
_
(
"&Redo"
),
g_Module_Editor_Hokeys_Descr
,
HK_REDO
);
AddMenuItem
(
editMenu
,
wxID_REDO
,
text
,
_
(
"Redo
the last undo
action"
),
text
,
_
(
"Redo
last
action"
),
KiBitmap
(
redo_xpm
)
);
// Delete items
AddMenuItem
(
editMenu
,
ID_MODEDIT_DELETE_TOOL
,
_
(
"&Delete"
),
_
(
"Delete objects with
the
eraser"
),
_
(
"&Delete"
),
_
(
"Delete objects with eraser"
),
KiBitmap
(
delete_xpm
)
);
// Separator
...
...
@@ -167,7 +167,7 @@ void FOOTPRINT_EDIT_FRAME::ReCreateMenuBar()
// Properties
AddMenuItem
(
editMenu
,
ID_MODEDIT_EDIT_MODULE_PROPERTIES
,
_
(
"&Properties"
),
_
(
"
Edit
&Properties"
),
_
(
"Edit module properties"
),
KiBitmap
(
module_options_xpm
)
);
...
...
@@ -176,13 +176,13 @@ void FOOTPRINT_EDIT_FRAME::ReCreateMenuBar()
// Sizes and Widths
AddMenuItem
(
dimensions_Submenu
,
ID_PCB_DRAWINGS_WIDTHS_SETUP
,
_
(
"&Size
s and Widths
"
),
_
(
"&Size
and Width
"
),
_
(
"Adjust width for texts and drawings"
),
KiBitmap
(
options_text_xpm
)
);
// Pad settings
AddMenuItem
(
dimensions_Submenu
,
ID_MODEDIT_PAD_SETTINGS
,
_
(
"&Pad Setting
s"
),
_
(
"Edit the
settings for new pads"
),
_
(
"&Pad Setting
"
),
_
(
"Edit
settings for new pads"
),
KiBitmap
(
pad_dimensions_xpm
)
);
// User grid size
...
...
@@ -195,25 +195,25 @@ void FOOTPRINT_EDIT_FRAME::ReCreateMenuBar()
// Zoom In
AddMenuItem
(
viewMenu
,
ID_ZOOM_IN
,
_
(
"Zoom &In"
),
_
(
"Zoom in
on the module
"
),
_
(
"Zoom &In"
),
_
(
"Zoom in"
),
KiBitmap
(
zoom_in_xpm
)
);
// Zoom Out
AddMenuItem
(
viewMenu
,
ID_ZOOM_OUT
,
_
(
"Zoom &Out"
),
_
(
"Zoom out
on the module
"
),
_
(
"Zoom &Out"
),
_
(
"Zoom out"
),
KiBitmap
(
zoom_out_xpm
)
);
// Fit on Screen
AddMenuItem
(
viewMenu
,
ID_ZOOM_PAGE
,
_
(
"&Fit on Screen"
),
_
(
"Zoom
and
fit the module in the window"
),
_
(
"Zoom
to
fit the module in the window"
),
KiBitmap
(
zoom_fit_in_page_xpm
)
);
viewMenu
->
AppendSeparator
();
// Redraw
AddMenuItem
(
viewMenu
,
ID_ZOOM_REDRAW
,
_
(
"&Redraw"
),
_
(
"Redraw
the
window's viewport"
),
_
(
"&Redraw"
),
_
(
"Redraw window's viewport"
),
KiBitmap
(
zoom_redraw_xpm
)
);
// 3D view
...
...
@@ -258,7 +258,7 @@ void FOOTPRINT_EDIT_FRAME::ReCreateMenuBar()
// Anchor
AddMenuItem
(
placeMenu
,
ID_MODEDIT_ANCHOR_TOOL
,
_
(
"A&nchor"
),
_
(
"Place
the
footprint module reference anchor"
),
_
(
"Place footprint module reference anchor"
),
KiBitmap
(
anchor_xpm
)
);
// Menu Help:
...
...
@@ -269,8 +269,8 @@ void FOOTPRINT_EDIT_FRAME::ReCreateMenuBar()
// Contents
AddMenuItem
(
helpMenu
,
wxID_HELP
,
_
(
"
&Contents
"
),
_
(
"Open the Pcbnew
handbook
"
),
_
(
"
P&cbnew Manual
"
),
_
(
"Open the Pcbnew
manual
"
),
KiBitmap
(
online_help_xpm
)
);
AddMenuItem
(
helpMenu
,
wxID_INDEX
,
...
...
pcbnew/menubar_pcbframe.cpp
View file @
5ed0980d
...
...
@@ -477,6 +477,13 @@ void PCB_EDIT_FRAME::ReCreateMenuBar()
HELP_SHOW_HIDE_LAYERMANAGER
,
KiBitmap
(
layers_manager_xpm
)
);
AddMenuItem
(
configmenu
,
ID_MENU_PCB_SHOW_HIDE_MUWAVE_TOOLBAR
,
m_show_microwave_tools
?
_
(
"Hide Microwave Toolbar"
)
:
_
(
"Show Microwave Toolbar"
),
HELP_SHOW_HIDE_MICROWAVE_TOOLS
,
KiBitmap
(
mw_toolbar_xpm
)
);
// General
#ifdef __WXMAC__
configmenu
->
Append
(
wxID_PREFERENCES
);
...
...
pcbnew/pad_edition_functions.cpp
View file @
5ed0980d
...
...
@@ -121,6 +121,8 @@ void PCB_BASE_FRAME::Import_Pad_Settings( D_PAD* aPad, bool aDraw )
m_canvas
->
RefreshDrawingRect
(
aPad
->
GetBoundingBox
()
);
aPad
->
GetParent
()
->
SetLastEditTime
();
OnModify
();
}
/** Compute the 'next' pad number for autoincrement
...
...
@@ -132,8 +134,8 @@ static wxString GetNextPadName( wxString aPadName )
int
ponder
=
1
;
// Trim and extract the trailing numeric part
while
(
aPadName
.
Len
()
&&
aPadName
.
Last
()
>=
'0'
while
(
aPadName
.
Len
()
&&
aPadName
.
Last
()
>=
'0'
&&
aPadName
.
Last
()
<=
'9'
)
{
num
+=
(
aPadName
.
Last
()
-
'0'
)
*
ponder
;
...
...
pcbnew/pcbframe.cpp
View file @
5ed0980d
...
...
@@ -139,6 +139,7 @@ BEGIN_EVENT_TABLE( PCB_EDIT_FRAME, PCB_BASE_FRAME )
EVT_MENU_RANGE
(
ID_PREFERENCES_HOTKEY_START
,
ID_PREFERENCES_HOTKEY_END
,
PCB_EDIT_FRAME
::
Process_Config
)
EVT_MENU
(
ID_MENU_PCB_SHOW_HIDE_LAYERS_MANAGER_DIALOG
,
PCB_EDIT_FRAME
::
Process_Config
)
EVT_MENU
(
ID_MENU_PCB_SHOW_HIDE_MUWAVE_TOOLBAR
,
PCB_EDIT_FRAME
::
Process_Config
)
EVT_MENU
(
wxID_PREFERENCES
,
PCB_EDIT_FRAME
::
Process_Config
)
EVT_MENU
(
ID_PCB_LAYERS_SETUP
,
PCB_EDIT_FRAME
::
Process_Config
)
EVT_MENU
(
ID_PCB_MASK_CLEARANCE
,
PCB_EDIT_FRAME
::
Process_Config
)
...
...
@@ -290,6 +291,8 @@ BEGIN_EVENT_TABLE( PCB_EDIT_FRAME, PCB_BASE_FRAME )
PCB_EDIT_FRAME
::
OnUpdateVerticalToolbar
)
EVT_UPDATE_UI_RANGE
(
ID_TB_OPTIONS_SHOW_ZONES
,
ID_TB_OPTIONS_SHOW_ZONES_OUTLINES_ONLY
,
PCB_EDIT_FRAME
::
OnUpdateZoneDisplayStyle
)
EVT_UPDATE_UI_RANGE
(
ID_PCB_MUWAVE_START_CMD
,
ID_PCB_MUWAVE_END_CMD
,
PCB_EDIT_FRAME
::
OnUpdateMuWaveToolbar
)
END_EVENT_TABLE
()
...
...
pcbnew/pcbnew_config.cpp
View file @
5ed0980d
...
...
@@ -77,6 +77,17 @@ void PCB_EDIT_FRAME::Process_Config( wxCommandEvent& event )
_
(
"Hide &Layers Manager"
)
:
_
(
"Show &Layers Manager"
));
break
;
case
ID_MENU_PCB_SHOW_HIDE_MUWAVE_TOOLBAR
:
m_show_microwave_tools
=
!
m_show_microwave_tools
;
m_auimgr
.
GetPane
(
wxT
(
"m_microWaveToolBar"
)
).
Show
(
m_show_microwave_tools
);
m_auimgr
.
Update
();
GetMenuBar
()
->
SetLabel
(
ID_MENU_PCB_SHOW_HIDE_MUWAVE_TOOLBAR
,
m_show_microwave_tools
?
_
(
"Hide Microwave Toolbar"
)
:
_
(
"Show Microwave Toolbar"
));
break
;
case
ID_PCB_LAYERS_SETUP
:
InstallDialogLayerSetup
();
break
;
...
...
pcbnew/pcbnew_id.h
View file @
5ed0980d
...
...
@@ -280,6 +280,7 @@ enum pcbnew_ids
ID_PCB_LIB_TABLE_EDIT
,
ID_MENU_PCB_SHOW_DESIGN_RULES_DIALOG
,
ID_MENU_PCB_SHOW_HIDE_LAYERS_MANAGER_DIALOG
,
ID_MENU_PCB_SHOW_HIDE_MUWAVE_TOOLBAR
,
ID_TB_OPTIONS_SHOW_MANAGE_LAYERS_VERTICAL_TOOLBAR
,
ID_TB_OPTIONS_SHOW_ZONES
,
...
...
pcbnew/ratsnest_data.cpp
View file @
5ed0980d
...
...
@@ -40,7 +40,6 @@
#include <class_zone.h>
#include <boost/range/adaptor/map.hpp>
#include <boost/pointer_cast.hpp>
#include <boost/scoped_ptr.hpp>
#include <boost/make_shared.hpp>
#include <boost/bind.hpp>
...
...
@@ -953,26 +952,40 @@ void RN_DATA::ProcessBoard()
{
m_nets
.
clear
();
m_nets
.
resize
(
m_board
->
GetNetCount
()
);
int
netCode
;
// Iterate over all items that may need to be connected
for
(
MODULE
*
module
=
m_board
->
m_Modules
;
module
;
module
=
module
->
Next
()
)
{
for
(
D_PAD
*
pad
=
module
->
Pads
().
GetFirst
();
pad
;
pad
=
pad
->
Next
()
)
m_nets
[
pad
->
GetNetCode
()].
AddItem
(
pad
);
{
netCode
=
pad
->
GetNetCode
();
if
(
netCode
>
0
)
m_nets
[
netCode
].
AddItem
(
pad
);
}
}
for
(
TRACK
*
track
=
m_board
->
m_Track
;
track
;
track
=
track
->
Next
()
)
{
if
(
track
->
Type
()
==
PCB_VIA_T
)
m_nets
[
track
->
GetNetCode
()].
AddItem
(
static_cast
<
SEGVIA
*>
(
track
)
);
else
if
(
track
->
Type
()
==
PCB_TRACE_T
)
m_nets
[
track
->
GetNetCode
()].
AddItem
(
track
);
netCode
=
track
->
GetNetCode
();
if
(
netCode
>
0
)
{
if
(
track
->
Type
()
==
PCB_VIA_T
)
m_nets
[
netCode
].
AddItem
(
static_cast
<
SEGVIA
*>
(
track
)
);
else
if
(
track
->
Type
()
==
PCB_TRACE_T
)
m_nets
[
netCode
].
AddItem
(
track
);
}
}
for
(
int
i
=
0
;
i
<
m_board
->
GetAreaCount
();
++
i
)
{
ZONE_CONTAINER
*
zone
=
m_board
->
GetArea
(
i
);
m_nets
[
zone
->
GetNetCode
()].
AddItem
(
zone
);
netCode
=
zone
->
GetNetCode
();
if
(
netCode
>
0
)
m_nets
[
netCode
].
AddItem
(
zone
);
}
}
...
...
pcbnew/tool_pcb.cpp
View file @
5ed0980d
...
...
@@ -398,7 +398,7 @@ void PCB_EDIT_FRAME::ReCreateOptToolbar()
m_optionsToolBar
->
AddTool
(
ID_TB_OPTIONS_SHOW_EXTRA_VERTICAL_TOOLBAR_MICROWAVE
,
wxEmptyString
,
KiBitmap
(
mw_toolbar_xpm
),
_
(
"Show/hide the toolbar for microwaves tools
\n
This is a experimental feature (under development)"
)
,
HELP_SHOW_HIDE_MICROWAVE_TOOLS
,
wxITEM_CHECK
);
...
...
@@ -500,25 +500,30 @@ void PCB_EDIT_FRAME::ReCreateMicrowaveVToolbar()
// Set up toolbar
m_microWaveToolBar
->
AddTool
(
ID_PCB_MUWAVE_TOOL_SELF_CMD
,
wxEmptyString
,
KiBitmap
(
mw_add_line_xpm
),
_
(
"Create line of specified length for microwave applications"
)
);
_
(
"Create line of specified length for microwave applications"
),
wxITEM_CHECK
);
m_microWaveToolBar
->
AddTool
(
ID_PCB_MUWAVE_TOOL_GAP_CMD
,
wxEmptyString
,
KiBitmap
(
mw_add_gap_xpm
),
_
(
"Create gap of specified length for microwave applications"
)
);
_
(
"Create gap of specified length for microwave applications"
),
wxITEM_CHECK
);
m_microWaveToolBar
->
AddSeparator
();
m_microWaveToolBar
->
AddTool
(
ID_PCB_MUWAVE_TOOL_STUB_CMD
,
wxEmptyString
,
KiBitmap
(
mw_add_stub_xpm
),
_
(
"Create stub of specified length for microwave applications"
)
);
_
(
"Create stub of specified length for microwave applications"
),
wxITEM_CHECK
);
m_microWaveToolBar
->
AddTool
(
ID_PCB_MUWAVE_TOOL_STUB_ARC_CMD
,
wxEmptyString
,
KiBitmap
(
mw_add_stub_arc_xpm
),
_
(
"Create stub (arc) of specified length for microwave applications"
)
);
_
(
"Create stub (arc) of specified length for microwave applications"
),
wxITEM_CHECK
);
m_microWaveToolBar
->
AddTool
(
ID_PCB_MUWAVE_TOOL_FUNCTION_SHAPE_CMD
,
wxEmptyString
,
KiBitmap
(
mw_add_shape_xpm
),
_
(
"Create a polynomial shape for microwave applications"
)
);
_
(
"Create a polynomial shape for microwave applications"
),
wxITEM_CHECK
);
m_microWaveToolBar
->
Realize
();
}
...
...
pcbnew/toolbars_update_user_interface.cpp
View file @
5ed0980d
...
...
@@ -204,6 +204,12 @@ void PCB_EDIT_FRAME::OnUpdateVerticalToolbar( wxUpdateUIEvent& aEvent )
aEvent
.
Check
(
GetToolId
()
==
aEvent
.
GetId
()
);
}
void
PCB_EDIT_FRAME
::
OnUpdateMuWaveToolbar
(
wxUpdateUIEvent
&
aEvent
)
{
if
(
aEvent
.
GetEventObject
()
==
m_microWaveToolBar
)
aEvent
.
Check
(
GetToolId
()
==
aEvent
.
GetId
()
);
}
void
PCB_EDIT_FRAME
::
OnUpdateAutoPlaceTracksMode
(
wxUpdateUIEvent
&
aEvent
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment