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
db6630b8
Commit
db6630b8
authored
Jun 19, 2009
by
jerryjacobs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added hauptmech big patch, Updated documentation to match this patch. See CHANGELOG.txt
parent
831517fb
Changes
34
Hide whitespace changes
Inline
Side-by-side
Showing
34 changed files
with
989 additions
and
613 deletions
+989
-613
3d_draw.cpp
3d-viewer/3d_draw.cpp
+3
-2
CHANGELOG.txt
CHANGELOG.txt
+14
-0
COMPILING.txt
COMPILING.txt
+5
-2
CMakeLists.txt
bitmaps/CMakeLists.txt
+1
-0
invisible_text.xpm
bitmaps/invisible_text.xpm
+28
-0
drawframe.cpp
common/drawframe.cpp
+1
-0
gestfich.cpp
common/gestfich.cpp
+2
-1
hotkeys_basic.cpp
common/hotkeys_basic.cpp
+2
-2
eeconfig.cpp
eeschema/eeconfig.cpp
+1
-0
gerbview_config.cpp
gerbview/gerbview_config.cpp
+3
-0
base_struct.h
include/base_struct.h
+1
-0
bitmaps.h
include/bitmaps.h
+1
-0
hotkeys_basic.h
include/hotkeys_basic.h
+1
-1
id.h
include/id.h
+6
-2
pcbstruct.h
include/pcbstruct.h
+2
-0
wxPcbStruct.h
include/wxPcbStruct.h
+2
-0
wxstruct.h
include/wxstruct.h
+1
-0
CMakeLists.txt
kicad/minizip/CMakeLists.txt
+1
-1
classpcb.cpp
pcbnew/classpcb.cpp
+1
-0
dialog_general_options.cpp
pcbnew/dialog_general_options.cpp
+9
-1
dialog_track_options.cpp
pcbnew/dialog_track_options.cpp
+36
-0
edit.cpp
pcbnew/edit.cpp
+176
-4
editrack-part2.cpp
pcbnew/editrack-part2.cpp
+1
-0
files.cpp
pcbnew/files.cpp
+2
-1
hotkeys.cpp
pcbnew/hotkeys.cpp
+571
-576
hotkeys.h
pcbnew/hotkeys.h
+17
-12
initpcb.cpp
pcbnew/initpcb.cpp
+3
-1
ioascii.cpp
pcbnew/ioascii.cpp
+21
-0
loadcmp.cpp
pcbnew/loadcmp.cpp
+1
-1
pcbcfg.cpp
pcbnew/pcbcfg.cpp
+3
-0
pcbcfg.h
pcbnew/pcbcfg.h
+8
-0
pcbframe.cpp
pcbnew/pcbframe.cpp
+46
-3
specctra_import.cpp
pcbnew/specctra_import.cpp
+1
-0
tool_pcb.cpp
pcbnew/tool_pcb.cpp
+18
-3
No files found.
3d-viewer/3d_draw.cpp
View file @
db6630b8
...
@@ -110,8 +110,9 @@ GLuint Pcb3D_GLCanvas::CreateDrawGL_List()
...
@@ -110,8 +110,9 @@ GLuint Pcb3D_GLCanvas::CreateDrawGL_List()
g_Parm_3D_Visu
.
m_BoardSize
.
y
);
g_Parm_3D_Visu
.
m_BoardSize
.
y
);
// @TODO: epoxy_width (board thickness) must be set by user,
// @TODO: epoxy_width (board thickness) must be set by user,
// because all boards thickness no not match with this setup:
// because all boards thickness no not match with this setup:
double
epoxy_width
=
1.6
;
// epoxy width in mm
//double epoxy_width = 1.6; // epoxy width in mm
g_Parm_3D_Visu
.
m_Epoxy_Width
=
epoxy_width
/
2.54
*
1000
g_Parm_3D_Visu
.
m_Epoxy_Width
=
pcb
->
m_BoardSettings
->
m_LayerThickness
*
g_Parm_3D_Visu
.
m_BoardScale
;
*
g_Parm_3D_Visu
.
m_BoardScale
;
/* calculate z position for each layer */
/* calculate z position for each layer */
...
...
CHANGELOG.txt
View file @
db6630b8
...
@@ -4,6 +4,20 @@ KiCad ChangeLog 2009
...
@@ -4,6 +4,20 @@ KiCad ChangeLog 2009
Please add newer entries at the top, list the date and your name with
Please add newer entries at the top, list the date and your name with
email address.
email address.
2009-june-19 UPDATE Jerry Jacobs <jerkejacobs@gmail.com>
================================================================================
Added Hauptmech patch.
I Updated doc to match this patch.
++Pcbnew:
> * Board thickness in the 3D view can be set in *.pcb files (hand edit)
> * Hotkey files bug: incorrect file extension as default in some open/save dialogs.
> * Hotkeys made available for pcbnew [add track] and [add module] tools.
> * Drag and Move hotkeys extended to drag tracks and move nodes/vias when the [add track] tool is active.
> * Show/Hide Invisible Text button added to lefthand menu
> * Dropdown list of clearance history available next to trackwidth history.
2009-june-18 UPDATE Jean-Pierre Charras <jean-pierre.charras@gipsa-lab.inpg.fr>
2009-june-18 UPDATE Jean-Pierre Charras <jean-pierre.charras@gipsa-lab.inpg.fr>
================================================================================
================================================================================
++Pcbnew:
++Pcbnew:
...
...
COMPILING.txt
View file @
db6630b8
...
@@ -114,11 +114,14 @@ If linux, use your package manager to install zlib pre-built binaries.
...
@@ -114,11 +114,14 @@ If linux, use your package manager to install zlib pre-built binaries.
Note (JP Charras):
Note (JP Charras):
Under Linux, zlib is usually installed.
Under Linux, zlib is usually installed.
if not found by wxWidget installation, wxWidgets creates an alternate zlib
If it is not found by the wxWidget installation, wxWidgets creates an alternate zlib library.
Under Windows,
zlib is not installed, so my cmake buld
try to use the
Under Windows,
if zlib is not installed, my cmake build will
try to use the
wxWidgets zlib build. So, under windows kicad build should work without
wxWidgets zlib build. So, under windows kicad build should work without
zlib install.
zlib install.
If you are using the wxWidget zlib, make sure that the wxWidgets/src/zlib directory is copied
to ${wxWidgets_ROOT_DIR}/src/zlib
-----------------------------------------------------------------------------
-----------------------------------------------------------------------------
...
...
bitmaps/CMakeLists.txt
View file @
db6630b8
...
@@ -164,6 +164,7 @@ set(BITMAP_SRCS
...
@@ -164,6 +164,7 @@ set(BITMAP_SRCS
Info.xpm
Info.xpm
Insert_Module_Board.xpm
Insert_Module_Board.xpm
Invert_Module.xpm
Invert_Module.xpm
invisible_text.xpm
jigsaw.xpm
jigsaw.xpm
kicad_icon_small.xpm
kicad_icon_small.xpm
Label2GLabel.xpm
Label2GLabel.xpm
...
...
bitmaps/invisible_text.xpm
0 → 100644
View file @
db6630b8
/* XPM */
#ifndef XPMMAIN
extern const char *invisible_text_xpm[];
#else
const char *invisible_text_xpm[] = {
"16 16 4 1",
" c None",
". c #00009B",
"+ c #000098",
"@ c #00005D",
" .............. ",
" ",
" .+ .... .. ",
" .@ .... . ",
" ",
" ",
" .... ",
" .... ",
" ",
" .... ",
" ",
" .... ",
" ",
" .....+ ",
" ........ ",
" "};
#endif
common/drawframe.cpp
View file @
db6630b8
...
@@ -58,6 +58,7 @@ WinEDA_DrawFrame::WinEDA_DrawFrame( wxWindow* father, int idtype,
...
@@ -58,6 +58,7 @@ WinEDA_DrawFrame::WinEDA_DrawFrame( wxWindow* father, int idtype,
MsgPanel
=
NULL
;
MsgPanel
=
NULL
;
m_CurrentScreen
=
NULL
;
m_CurrentScreen
=
NULL
;
m_ID_current_state
=
0
;
m_ID_current_state
=
0
;
m_ID_last_state
=
0
;
m_HTOOL_current_state
=
0
;
m_HTOOL_current_state
=
0
;
m_Draw_Axis
=
FALSE
;
// TRUE pour avoir les axes dessines
m_Draw_Axis
=
FALSE
;
// TRUE pour avoir les axes dessines
m_Draw_Grid
=
FALSE
;
// TRUE pour avoir la axes dessinee
m_Draw_Grid
=
FALSE
;
// TRUE pour avoir la axes dessinee
...
...
common/gestfich.cpp
View file @
db6630b8
...
@@ -245,6 +245,7 @@ wxString EDA_FileSelector( const wxString& Title, /* Dialog ti
...
@@ -245,6 +245,7 @@ wxString EDA_FileSelector( const wxString& Title, /* Dialog ti
wxString
curr_cwd
=
wxGetCwd
();
wxString
curr_cwd
=
wxGetCwd
();
wxString
defaultname
=
FileName
;
wxString
defaultname
=
FileName
;
wxString
defaultpath
=
Path
;
wxString
defaultpath
=
Path
;
wxString
dotted_Ext
=
wxT
(
"."
)
+
Ext
;
defaultname
.
Replace
(
wxT
(
"/"
),
STRING_DIR_SEP
);
defaultname
.
Replace
(
wxT
(
"/"
),
STRING_DIR_SEP
);
defaultpath
.
Replace
(
wxT
(
"/"
),
STRING_DIR_SEP
);
defaultpath
.
Replace
(
wxT
(
"/"
),
STRING_DIR_SEP
);
...
@@ -268,7 +269,7 @@ wxString EDA_FileSelector( const wxString& Title, /* Dialog ti
...
@@ -268,7 +269,7 @@ wxString EDA_FileSelector( const wxString& Title, /* Dialog ti
fullfilename
=
wxFileSelector
(
wxString
(
Title
),
fullfilename
=
wxFileSelector
(
wxString
(
Title
),
defaultpath
,
defaultpath
,
defaultname
,
defaultname
,
Ext
,
dotted_
Ext
,
Mask
,
Mask
,
flag
,
/* open mode wxFD_OPEN, wxFD_SAVE .. */
flag
,
/* open mode wxFD_OPEN, wxFD_SAVE .. */
Frame
,
Frame
,
...
...
common/hotkeys_basic.cpp
View file @
db6630b8
...
@@ -381,7 +381,7 @@ int WinEDA_BasicFrame::WriteHotkeyConfigFile( const wxString&
...
@@ -381,7 +381,7 @@ int WinEDA_BasicFrame::WriteHotkeyConfigFile( const wxString&
{
{
wxString
Mask
,
Path
,
Ext
;
wxString
Mask
,
Path
,
Ext
;
Ext
=
DEFAULT_HOTKEY_FILENAME_EXT
;
Ext
=
DEFAULT_HOTKEY_FILENAME_EXT
;
Mask
=
wxT
(
"*"
)
+
Ext
;
Mask
=
wxT
(
"*
.
"
)
+
Ext
;
Path
=
ReturnHotkeyConfigFilePath
(
g_ConfigFileLocationChoice
);
Path
=
ReturnHotkeyConfigFilePath
(
g_ConfigFileLocationChoice
);
FullFilename
=
EDA_FileSelector
(
_
(
"Save Hotkey Configuration File:"
),
FullFilename
=
EDA_FileSelector
(
_
(
"Save Hotkey Configuration File:"
),
Path
,
/* Chemin par defaut */
Path
,
/* Chemin par defaut */
...
@@ -499,7 +499,7 @@ int WinEDA_BasicFrame::ReadHotkeyConfigFile( const wxString&
...
@@ -499,7 +499,7 @@ int WinEDA_BasicFrame::ReadHotkeyConfigFile( const wxString&
{
{
wxString
Mask
,
Path
,
Ext
;
wxString
Mask
,
Path
,
Ext
;
Ext
=
DEFAULT_HOTKEY_FILENAME_EXT
;
Ext
=
DEFAULT_HOTKEY_FILENAME_EXT
;
Mask
=
wxT
(
"*"
)
+
Ext
;
Mask
=
wxT
(
"*
.
"
)
+
Ext
;
Path
=
ReturnHotkeyConfigFilePath
(
g_ConfigFileLocationChoice
);
Path
=
ReturnHotkeyConfigFilePath
(
g_ConfigFileLocationChoice
);
FullFilename
=
EDA_FileSelector
(
_
(
"Open Hotkey Configuration File:"
),
FullFilename
=
EDA_FileSelector
(
_
(
"Open Hotkey Configuration File:"
),
Path
,
/* Chemin par defaut */
Path
,
/* Chemin par defaut */
...
...
eeschema/eeconfig.cpp
View file @
db6630b8
...
@@ -116,6 +116,7 @@ bool Read_Hotkey_Config( WinEDA_DrawFrame* frame, bool verbose )
...
@@ -116,6 +116,7 @@ bool Read_Hotkey_Config( WinEDA_DrawFrame* frame, bool verbose )
g_ConfigFileLocationChoice
);
g_ConfigFileLocationChoice
);
FullFileName
+=
HOTKEY_FILENAME
;
FullFileName
+=
HOTKEY_FILENAME
;
FullFileName
+=
wxT
(
"."
);
FullFileName
+=
DEFAULT_HOTKEY_FILENAME_EXT
;
FullFileName
+=
DEFAULT_HOTKEY_FILENAME_EXT
;
frame
->
ReadHotkeyConfigFile
(
FullFileName
,
frame
->
ReadHotkeyConfigFile
(
FullFileName
,
s_Eeschema_Hokeys_Descr
,
s_Eeschema_Hokeys_Descr
,
...
...
gerbview/gerbview_config.cpp
View file @
db6630b8
...
@@ -63,6 +63,7 @@ void WinEDA_GerberFrame::Process_Config( wxCommandEvent& event )
...
@@ -63,6 +63,7 @@ void WinEDA_GerberFrame::Process_Config( wxCommandEvent& event )
case
ID_PREFERENCES_CREATE_CONFIG_HOTKEYS
:
case
ID_PREFERENCES_CREATE_CONFIG_HOTKEYS
:
FullFileName
=
ReturnHotkeyConfigFilePath
(
g_ConfigFileLocationChoice
);
FullFileName
=
ReturnHotkeyConfigFilePath
(
g_ConfigFileLocationChoice
);
FullFileName
+=
HOTKEY_FILENAME
;
FullFileName
+=
HOTKEY_FILENAME
;
FullFileName
+=
wxT
(
"."
);
FullFileName
+=
DEFAULT_HOTKEY_FILENAME_EXT
;
FullFileName
+=
DEFAULT_HOTKEY_FILENAME_EXT
;
WriteHotkeyConfigFile
(
FullFileName
,
s_Gerbview_Hokeys_Descr
,
true
);
WriteHotkeyConfigFile
(
FullFileName
,
s_Gerbview_Hokeys_Descr
,
true
);
break
;
break
;
...
@@ -75,6 +76,7 @@ void WinEDA_GerberFrame::Process_Config( wxCommandEvent& event )
...
@@ -75,6 +76,7 @@ void WinEDA_GerberFrame::Process_Config( wxCommandEvent& event )
{
{
FullFileName
=
ReturnHotkeyConfigFilePath
(
g_ConfigFileLocationChoice
);
FullFileName
=
ReturnHotkeyConfigFilePath
(
g_ConfigFileLocationChoice
);
FullFileName
+=
HOTKEY_FILENAME
;
FullFileName
+=
HOTKEY_FILENAME
;
FullFileName
+=
wxT
(
"."
);
FullFileName
+=
DEFAULT_HOTKEY_FILENAME_EXT
;
FullFileName
+=
DEFAULT_HOTKEY_FILENAME_EXT
;
AddDelimiterString
(
FullFileName
);
AddDelimiterString
(
FullFileName
);
wxString
editorname
=
wxGetApp
().
GetEditorName
();
wxString
editorname
=
wxGetApp
().
GetEditorName
();
...
@@ -161,6 +163,7 @@ bool Read_Hotkey_Config( WinEDA_DrawFrame* frame, bool verbose )
...
@@ -161,6 +163,7 @@ bool Read_Hotkey_Config( WinEDA_DrawFrame* frame, bool verbose )
g_ConfigFileLocationChoice
);
g_ConfigFileLocationChoice
);
FullFileName
+=
HOTKEY_FILENAME
;
FullFileName
+=
HOTKEY_FILENAME
;
FullFileName
+=
wxT
(
"."
);
FullFileName
+=
DEFAULT_HOTKEY_FILENAME_EXT
;
FullFileName
+=
DEFAULT_HOTKEY_FILENAME_EXT
;
return
frame
->
ReadHotkeyConfigFile
(
FullFileName
,
return
frame
->
ReadHotkeyConfigFile
(
FullFileName
,
s_Gerbview_Hokeys_Descr
,
s_Gerbview_Hokeys_Descr
,
...
...
include/base_struct.h
View file @
db6630b8
...
@@ -33,6 +33,7 @@ enum KICAD_T {
...
@@ -33,6 +33,7 @@ enum KICAD_T {
TYPE_TEXTE_MODULE
,
TYPE_TEXTE_MODULE
,
TYPE_EDGE_MODULE
,
TYPE_EDGE_MODULE
,
TYPE_TRACK
,
TYPE_TRACK
,
TYPE_CLR
,
TYPE_ZONE
,
TYPE_ZONE
,
TYPE_VIA
,
TYPE_VIA
,
TYPE_MARKER
,
TYPE_MARKER
,
...
...
include/bitmaps.h
View file @
db6630b8
...
@@ -156,6 +156,7 @@ extern const char* import3d_xpm[];
...
@@ -156,6 +156,7 @@ extern const char* import3d_xpm[];
extern
const
char
*
info_xpm
[];
extern
const
char
*
info_xpm
[];
extern
const
char
*
insert_module_board_xpm
[];
extern
const
char
*
insert_module_board_xpm
[];
extern
const
char
*
invert_module_xpm
[];
extern
const
char
*
invert_module_xpm
[];
extern
const
char
*
invisible_text_xpm
[];
extern
const
char
*
jigsaw_xpm
[];
extern
const
char
*
jigsaw_xpm
[];
extern
const
char
*
kicad_icon_small_xpm
[];
extern
const
char
*
kicad_icon_small_xpm
[];
extern
const
char
*
kicad_icon_xpm
[];
extern
const
char
*
kicad_icon_xpm
[];
...
...
include/hotkeys_basic.h
View file @
db6630b8
...
@@ -8,7 +8,7 @@
...
@@ -8,7 +8,7 @@
#ifndef HOTKEYS_BASIC_H
#ifndef HOTKEYS_BASIC_H
#define HOTKEYS_BASIC_H
#define HOTKEYS_BASIC_H
#define DEFAULT_HOTKEY_FILENAME_EXT wxT( "
.
key" )
#define DEFAULT_HOTKEY_FILENAME_EXT wxT( "key" )
/* keyword idetifier in kicad config use ti store/retrieve path option */
/* keyword idetifier in kicad config use ti store/retrieve path option */
#define HOTKEY_CFG_PATH_OPT wxT( "HotkeyPathOption" )
#define HOTKEY_CFG_PATH_OPT wxT( "HotkeyPathOption" )
...
...
include/id.h
View file @
db6630b8
...
@@ -702,6 +702,7 @@ enum main_id {
...
@@ -702,6 +702,7 @@ enum main_id {
ID_AUX_TOOLBAR_PCB_VIA_SIZE
,
ID_AUX_TOOLBAR_PCB_VIA_SIZE
,
ID_AUX_TOOLBAR_PCB_TRACK_WIDTH
,
ID_AUX_TOOLBAR_PCB_TRACK_WIDTH
,
ID_AUX_TOOLBAR_PCB_CLR_WIDTH
,
ID_AUX_TOOLBAR_PCB_SELECT_LAYER_PAIR
,
ID_AUX_TOOLBAR_PCB_SELECT_LAYER_PAIR
,
ID_AUX_TOOLBAR_PCB_SELECT_AUTO_WIDTH
,
ID_AUX_TOOLBAR_PCB_SELECT_AUTO_WIDTH
,
ID_AUX_TOOLBAR_PCB_UNUSED3
,
ID_AUX_TOOLBAR_PCB_UNUSED3
,
...
@@ -804,10 +805,10 @@ enum main_id {
...
@@ -804,10 +805,10 @@ enum main_id {
ID_TB_OPTIONS_SHOW_MODULE_TEXT_SKETCH
,
ID_TB_OPTIONS_SHOW_MODULE_TEXT_SKETCH
,
ID_TB_OPTIONS_SHOW_MODULE_EDGE_SKETCH
,
ID_TB_OPTIONS_SHOW_MODULE_EDGE_SKETCH
,
ID_TB_OPTIONS_SHOW_DCODES
,
ID_TB_OPTIONS_SHOW_DCODES
,
ID_TB_OPTIONS_SHOW_HIGH
T
_CONTRAST_MODE
,
ID_TB_OPTIONS_SHOW_HIGH_CONTRAST_MODE
,
ID_TB_OPTIONS_SHOW_EXTRA_VERTICAL_TOOLBAR1
,
ID_TB_OPTIONS_SHOW_EXTRA_VERTICAL_TOOLBAR1
,
ID_TB_OPTIONS_SHOW_POLYGONS_SKETCH
,
ID_TB_OPTIONS_SHOW_POLYGONS_SKETCH
,
ID_TB_OPTIONS_
UNUSED6
,
ID_TB_OPTIONS_
SHOW_INVISIBLE_TEXT_MODE
,
ID_TB_OPTIONS_UNUSED7
,
ID_TB_OPTIONS_UNUSED7
,
ID_TB_OPTIONS_UNUSED8
,
ID_TB_OPTIONS_UNUSED8
,
...
@@ -866,6 +867,9 @@ enum main_id {
...
@@ -866,6 +867,9 @@ enum main_id {
ID_PCB_MUWAVE_UNUSED2
,
ID_PCB_MUWAVE_UNUSED2
,
ID_PCB_MUWAVE_END_CMD
,
ID_PCB_MUWAVE_END_CMD
,
ID_TOGGLE_PRESENT_COMMAND
,
ID_END_LIST
ID_END_LIST
};
};
...
...
include/pcbstruct.h
View file @
db6630b8
...
@@ -159,10 +159,12 @@ public:
...
@@ -159,10 +159,12 @@ public:
int
m_PcbTextWidth
;
// current Pcb (not module) Text width
int
m_PcbTextWidth
;
// current Pcb (not module) Text width
wxSize
m_PcbTextSize
;
// current Pcb (not module) Text size
wxSize
m_PcbTextSize
;
// current Pcb (not module) Text size
int
m_TrackClearence
;
// track to track and track to pads clearance
int
m_TrackClearence
;
// track to track and track to pads clearance
int
m_TrackClearenceHistory
[
HISTORY_NUMBER
];
// Last HISTORY_NUMBER used track widths
int
m_TrackMinWidth
;
// track min value for width ((min copper size value
int
m_TrackMinWidth
;
// track min value for width ((min copper size value
int
m_ViasMinSize
;
// vias (not micro vias) min diameter
int
m_ViasMinSize
;
// vias (not micro vias) min diameter
int
m_MicroViasMinSize
;
// micro vias (not vias) min diameter
int
m_MicroViasMinSize
;
// micro vias (not vias) min diameter
int
m_MaskMargin
;
// Solder mask margin
int
m_MaskMargin
;
// Solder mask margin
int
m_LayerThickness
;
// Layer Thickness for 3D viewer
// Color options for screen display of the Printed Board:
// Color options for screen display of the Printed Board:
int
m_PcbGridColor
;
// Grid color
int
m_PcbGridColor
;
// Grid color
...
...
include/wxPcbStruct.h
View file @
db6630b8
...
@@ -372,10 +372,12 @@ class WinEDA_PcbFrame : public WinEDA_BasePcbFrame
...
@@ -372,10 +372,12 @@ class WinEDA_PcbFrame : public WinEDA_BasePcbFrame
public
:
public
:
WinEDAChoiceBox
*
m_SelLayerBox
;
WinEDAChoiceBox
*
m_SelLayerBox
;
WinEDAChoiceBox
*
m_SelTrackWidthBox
;
WinEDAChoiceBox
*
m_SelTrackWidthBox
;
WinEDAChoiceBox
*
m_SelClrWidthBox
;
WinEDAChoiceBox
*
m_SelViaSizeBox
;
WinEDAChoiceBox
*
m_SelViaSizeBox
;
private
:
private
:
bool
m_SelTrackWidthBox_Changed
;
bool
m_SelTrackWidthBox_Changed
;
bool
m_SelClrWidthBox_Changed
;
bool
m_SelViaSizeBox_Changed
;
bool
m_SelViaSizeBox_Changed
;
DRC
*
m_drc
;
///< the DRC controller, see drc.cpp
DRC
*
m_drc
;
///< the DRC controller, see drc.cpp
...
...
include/wxstruct.h
View file @
db6630b8
...
@@ -156,6 +156,7 @@ public:
...
@@ -156,6 +156,7 @@ public:
int
m_CursorShape
;
// shape for cursor (0 = default cursor)
int
m_CursorShape
;
// shape for cursor (0 = default cursor)
int
m_ID_current_state
;
// Id of active button on the vertical toolbar
int
m_ID_current_state
;
// Id of active button on the vertical toolbar
int
m_ID_last_state
;
// Id of previous active button on the vertical toolbar
int
m_HTOOL_current_state
;
// Id of active button on horizontal toolbar
int
m_HTOOL_current_state
;
// Id of active button on horizontal toolbar
int
m_InternalUnits
;
// Internal units count in 1 inch
int
m_InternalUnits
;
// Internal units count in 1 inch
...
...
kicad/minizip/CMakeLists.txt
View file @
db6630b8
...
@@ -8,7 +8,7 @@ else(ZLIB_FOUND)
...
@@ -8,7 +8,7 @@ else(ZLIB_FOUND)
# include files are in ${wxWidgets_ROOT_DIR}/src/zlib
# include files are in ${wxWidgets_ROOT_DIR}/src/zlib
# and the corresponding library is libwxzlib-<version>.a (like libwxzlib-2.8.a)
# and the corresponding library is libwxzlib-<version>.a (like libwxzlib-2.8.a)
# and we try to use it
# and we try to use it
set
(
ZLIB_INCLUDE_DIR
${
wxWidgets_ROOT_DIR
}
/src/zlib
)
find_path
(
ZLIB_INCLUDE_DIR zlib.h PATHS
${
wxWidgets_ROOT_DIR
}
/src/zlib/ DOC
"location of zlib include files"
)
set
(
ZLIB_LIBRARIES
${
wxWidgets_ROOT_DIR
}
/lib/libwxzlib-2.8.a
)
set
(
ZLIB_LIBRARIES
${
wxWidgets_ROOT_DIR
}
/lib/libwxzlib-2.8.a
)
endif
(
ZLIB_FOUND
)
endif
(
ZLIB_FOUND
)
...
...
pcbnew/classpcb.cpp
View file @
db6630b8
...
@@ -205,6 +205,7 @@ EDA_BoardDesignSettings::EDA_BoardDesignSettings()
...
@@ -205,6 +205,7 @@ EDA_BoardDesignSettings::EDA_BoardDesignSettings()
for
(
ii
=
0
;
ii
<
HISTORY_NUMBER
;
ii
++
)
for
(
ii
=
0
;
ii
<
HISTORY_NUMBER
;
ii
++
)
{
{
m_TrackWidthHistory
[
ii
]
=
0
;
// Last HISTORY_NUMBER used track widths
m_TrackWidthHistory
[
ii
]
=
0
;
// Last HISTORY_NUMBER used track widths
m_TrackClearenceHistory
[
ii
]
=
0
;
m_ViaSizeHistory
[
ii
]
=
0
;
// Last HISTORY_NUMBER used via sizes
m_ViaSizeHistory
[
ii
]
=
0
;
// Last HISTORY_NUMBER used via sizes
}
}
...
...
pcbnew/dialog_general_options.cpp
View file @
db6630b8
...
@@ -221,6 +221,7 @@ void WinEDA_PcbFrame::OnSelectOptionToolbar( wxCommandEvent& event )
...
@@ -221,6 +221,7 @@ void WinEDA_PcbFrame::OnSelectOptionToolbar( wxCommandEvent& event )
if
(
id
==
ID_TB_OPTIONS_SELECT_UNIT_INCH
)
if
(
id
==
ID_TB_OPTIONS_SELECT_UNIT_INCH
)
g_UnitMetric
=
INCHES
;
g_UnitMetric
=
INCHES
;
m_SelTrackWidthBox_Changed
=
TRUE
;
m_SelTrackWidthBox_Changed
=
TRUE
;
m_SelClrWidthBox_Changed
=
TRUE
;
UpdateStatusBar
();
/* Reaffichage des coord curseur */
UpdateStatusBar
();
/* Reaffichage des coord curseur */
ReCreateAuxiliaryToolbar
();
ReCreateAuxiliaryToolbar
();
DisplayUnitsMsg
();
DisplayUnitsMsg
();
...
@@ -273,11 +274,18 @@ void WinEDA_PcbFrame::OnSelectOptionToolbar( wxCommandEvent& event )
...
@@ -273,11 +274,18 @@ void WinEDA_PcbFrame::OnSelectOptionToolbar( wxCommandEvent& event )
DrawPanel
->
Refresh
(
);
DrawPanel
->
Refresh
(
);
break
;
break
;
case
ID_TB_OPTIONS_SHOW_HIGH
T
_CONTRAST_MODE
:
case
ID_TB_OPTIONS_SHOW_HIGH_CONTRAST_MODE
:
DisplayOpt
.
ContrastModeDisplay
=
DisplayOpt
.
ContrastModeDisplay
=
m_OptionsToolBar
->
GetToolState
(
id
);
m_OptionsToolBar
->
GetToolState
(
id
);
DrawPanel
->
Refresh
(
);
DrawPanel
->
Refresh
(
);
break
;
break
;
case
ID_TB_OPTIONS_SHOW_INVISIBLE_TEXT_MODE
:
if
(
!
m_OptionsToolBar
->
GetToolState
(
id
))
g_ModuleTextNOVColor
&=
(
~
ITEM_NOT_SHOW
);
else
g_ModuleTextNOVColor
|=
(
ITEM_NOT_SHOW
);
DrawPanel
->
Refresh
(
);
break
;
case
ID_TB_OPTIONS_SHOW_EXTRA_VERTICAL_TOOLBAR1
:
case
ID_TB_OPTIONS_SHOW_EXTRA_VERTICAL_TOOLBAR1
:
if
(
m_OptionsToolBar
->
GetToolState
(
id
)
)
// show aux V toolbar (Microwave tool)
if
(
m_OptionsToolBar
->
GetToolState
(
id
)
)
// show aux V toolbar (Microwave tool)
...
...
pcbnew/dialog_track_options.cpp
View file @
db6630b8
...
@@ -118,6 +118,7 @@ void DIALOG_TRACKS_OPTIONS::OnButtonOkClick( wxCommandEvent& event )
...
@@ -118,6 +118,7 @@ void DIALOG_TRACKS_OPTIONS::OnButtonOkClick( wxCommandEvent& event )
m_Parent
->
AddHistory
(
g_DesignSettings
.
m_CurrentViaSize
,
TYPE_VIA
);
m_Parent
->
AddHistory
(
g_DesignSettings
.
m_CurrentViaSize
,
TYPE_VIA
);
m_Parent
->
AddHistory
(
g_DesignSettings
.
m_CurrentTrackWidth
,
TYPE_TRACK
);
m_Parent
->
AddHistory
(
g_DesignSettings
.
m_CurrentTrackWidth
,
TYPE_TRACK
);
m_Parent
->
AddHistory
(
g_DesignSettings
.
m_TrackClearence
,
TYPE_CLR
);
EndModal
(
1
);
EndModal
(
1
);
}
}
...
@@ -169,7 +170,42 @@ void WinEDA_BasePcbFrame::AddHistory( int value, KICAD_T type )
...
@@ -169,7 +170,42 @@ void WinEDA_BasePcbFrame::AddHistory( int value, KICAD_T type )
}
}
break
;
break
;
case
TYPE_CLR
:
for
(
ii
=
0
;
ii
<
HISTORY_NUMBER
;
ii
++
)
{
if
(
g_DesignSettings
.
m_TrackClearenceHistory
[
ii
]
==
value
)
{
addhistory
=
FALSE
;
break
;
}
}
if
(
!
addhistory
)
break
;
for
(
ii
=
HISTORY_NUMBER
-
1
;
ii
>
0
;
ii
--
)
{
g_DesignSettings
.
m_TrackClearenceHistory
[
ii
]
=
g_DesignSettings
.
m_TrackClearenceHistory
[
ii
-
1
];
}
g_DesignSettings
.
m_TrackClearenceHistory
[
0
]
=
value
;
// Reclassement par valeur croissante
for
(
ii
=
0
;
ii
<
HISTORY_NUMBER
-
1
;
ii
++
)
{
if
(
g_DesignSettings
.
m_TrackClearenceHistory
[
ii
+
1
]
==
0
)
break
;
// Fin de liste
if
(
g_DesignSettings
.
m_TrackClearenceHistory
[
ii
]
>
g_DesignSettings
.
m_TrackClearenceHistory
[
ii
+
1
]
)
{
EXCHG
(
g_DesignSettings
.
m_TrackClearenceHistory
[
ii
],
g_DesignSettings
.
m_TrackClearenceHistory
[
ii
+
1
]
);
}
}
break
;
case
TYPE_VIA
:
case
TYPE_VIA
:
for
(
ii
=
0
;
ii
<
HISTORY_NUMBER
;
ii
++
)
for
(
ii
=
0
;
ii
<
HISTORY_NUMBER
;
ii
++
)
{
{
...
...
pcbnew/edit.cpp
View file @
db6630b8
...
@@ -30,8 +30,12 @@ void WinEDA_PcbFrame::Process_Special_Functions( wxCommandEvent& event )
...
@@ -30,8 +30,12 @@ void WinEDA_PcbFrame::Process_Special_Functions( wxCommandEvent& event )
{
{
int
id
=
event
.
GetId
();
int
id
=
event
.
GetId
();
wxPoint
pos
;
wxPoint
pos
;
int
itmp
;
int
itmp
;
wxClientDC
dc
(
DrawPanel
);
wxClientDC
dc
(
DrawPanel
);
BOARD_ITEM
*
DrawStruct
=
GetCurItem
();
int
toggle
=
0
;
DrawPanel
->
CursorOff
(
&
dc
);
DrawPanel
->
CursorOff
(
&
dc
);
DrawPanel
->
PrepareGraphicContext
(
&
dc
);
DrawPanel
->
PrepareGraphicContext
(
&
dc
);
...
@@ -45,6 +49,7 @@ void WinEDA_PcbFrame::Process_Special_Functions( wxCommandEvent& event )
...
@@ -45,6 +49,7 @@ void WinEDA_PcbFrame::Process_Special_Functions( wxCommandEvent& event )
case
wxID_CUT
:
case
wxID_CUT
:
case
wxID_COPY
:
case
wxID_COPY
:
case
ID_AUX_TOOLBAR_PCB_TRACK_WIDTH
:
case
ID_AUX_TOOLBAR_PCB_TRACK_WIDTH
:
case
ID_AUX_TOOLBAR_PCB_CLR_WIDTH
:
case
ID_AUX_TOOLBAR_PCB_VIA_SIZE
:
case
ID_AUX_TOOLBAR_PCB_VIA_SIZE
:
case
ID_ON_GRID_SELECT
:
case
ID_ON_GRID_SELECT
:
case
ID_ON_ZOOM_SELECT
:
case
ID_ON_ZOOM_SELECT
:
...
@@ -156,7 +161,15 @@ void WinEDA_PcbFrame::Process_Special_Functions( wxCommandEvent& event )
...
@@ -156,7 +161,15 @@ void WinEDA_PcbFrame::Process_Special_Functions( wxCommandEvent& event )
else
else
SetCursor
(
DrawPanel
->
m_PanelCursor
=
DrawPanel
->
m_PanelDefaultCursor
);
SetCursor
(
DrawPanel
->
m_PanelCursor
=
DrawPanel
->
m_PanelDefaultCursor
);
break
;
break
;
case
ID_TOGGLE_PRESENT_COMMAND
:
/* if( DrawPanel->ManageCurseur
&& DrawPanel->ForceCloseManageCurseur )
{
DrawPanel->ForceCloseManageCurseur( DrawPanel, &dc );
}
*/
break
;
default
:
// Finish (abort ) the command
default
:
// Finish (abort ) the command
if
(
DrawPanel
->
ManageCurseur
if
(
DrawPanel
->
ManageCurseur
&&
DrawPanel
->
ForceCloseManageCurseur
)
&&
DrawPanel
->
ForceCloseManageCurseur
)
...
@@ -164,17 +177,160 @@ void WinEDA_PcbFrame::Process_Special_Functions( wxCommandEvent& event )
...
@@ -164,17 +177,160 @@ void WinEDA_PcbFrame::Process_Special_Functions( wxCommandEvent& event )
DrawPanel
->
ForceCloseManageCurseur
(
DrawPanel
,
&
dc
);
DrawPanel
->
ForceCloseManageCurseur
(
DrawPanel
,
&
dc
);
}
}
if
(
m_ID_current_state
!=
id
)
if
(
m_ID_current_state
!=
id
){
SetToolID
(
0
,
wxCURSOR_ARROW
,
wxEmptyString
);
if
(
m_ID_last_state
!=
m_ID_current_state
)
m_ID_last_state
=
m_ID_current_state
;
SetToolID
(
0
,
wxCURSOR_ARROW
,
wxEmptyString
);
}
break
;
break
;
}
}
switch
(
id
)
// Execute command
switch
(
id
)
// Execute command
{
{
case
0
:
break
;
case
ID_EXIT
:
case
ID_EXIT
:
Close
(
true
);
Close
(
true
);
break
;
break
;
case
ID_TOGGLE_PRESENT_COMMAND
:
switch
(
m_ID_current_state
)
{
case
0
:
/* if( (DrawStruct == NULL) || (DrawStruct->m_Flags == 0) )
{
DrawStruct = PcbGeneralLocateAndDisplay();
}
if( (DrawStruct == NULL) || (DrawStruct->m_Flags != 0) )
break;
SendMessageToEESCHEMA( DrawStruct );
// An item is found
SetCurItem( DrawStruct );
switch( DrawStruct->Type() )
{
case TYPE_TRACK:
case TYPE_VIA:
if( DrawStruct->m_Flags & IS_NEW )
{
End_Route( (TRACK*) DrawStruct, DC );
DrawPanel->m_AutoPAN_Request = false;
}
else if( DrawStruct->m_Flags == 0 )
{
Edit_TrackSegm_Width( DC, (TRACK*) DrawStruct );
}
break;
case TYPE_TEXTE:
InstallTextPCBOptionsFrame( (TEXTE_PCB*) DrawStruct, DC );
DrawPanel->MouseToCursorSchema();
break;
case TYPE_PAD:
InstallPadOptionsFrame( (D_PAD*) DrawStruct, &dc, pos );
DrawPanel->MouseToCursorSchema();
break;
case TYPE_MODULE:
InstallModuleOptionsFrame( (MODULE*) DrawStruct, &dc );
DrawPanel->MouseToCursorSchema();
break;
case TYPE_MIRE:
InstallMireOptionsFrame( (MIREPCB*) DrawStruct, &dc, pos );
DrawPanel->MouseToCursorSchema();
break;
case TYPE_COTATION:
Install_Edit_Cotation( (COTATION*) DrawStruct, &dc, pos );
DrawPanel->MouseToCursorSchema();
break;
case TYPE_TEXTE_MODULE:
InstallTextModOptionsFrame( (TEXTE_MODULE*) DrawStruct, &dc, pos );
DrawPanel->MouseToCursorSchema();
break;
case TYPE_DRAWSEGMENT:
InstallGraphicItemPropertiesDialog((DRAWSEGMENT*)DrawStruct, &dc);
break;
case TYPE_ZONE_CONTAINER:
if( DrawStruct->m_Flags )
break;
Edit_Zone_Params( &dc, (ZONE_CONTAINER*) DrawStruct );
break;
default:
break;
}
break; // end case 0
*/
toggle
=
1
;
break
;
case
ID_TRACK_BUTT
:
if
(
DrawStruct
&&
(
DrawStruct
->
m_Flags
&
IS_NEW
)
)
{
End_Route
(
(
TRACK
*
)
DrawStruct
,
&
dc
);
DrawPanel
->
m_AutoPAN_Request
=
false
;
}
else
toggle
=
1
;
break
;
case
ID_PCB_ZONES_BUTT
:
if
(
End_Zone
(
&
dc
)
)
{
DrawPanel
->
m_AutoPAN_Request
=
false
;
SetCurItem
(
NULL
);
}
else
toggle
=
1
;
break
;
case
ID_LINE_COMMENT_BUTT
:
case
ID_PCB_ARC_BUTT
:
case
ID_PCB_CIRCLE_BUTT
:
if
(
DrawStruct
==
NULL
)
{}
else
if
(
DrawStruct
->
Type
()
!=
TYPE_DRAWSEGMENT
)
{
DisplayError
(
this
,
wxT
(
"DrawStruct Type error"
)
);
DrawPanel
->
m_AutoPAN_Request
=
false
;
}
else
if
(
(
DrawStruct
->
m_Flags
&
IS_NEW
)
)
{
End_Edge
(
(
DRAWSEGMENT
*
)
DrawStruct
,
&
dc
);
DrawPanel
->
m_AutoPAN_Request
=
false
;
SetCurItem
(
NULL
);
}
else
toggle
=
1
;
break
;
default
:
toggle
=
1
;
break
;
}
if
(
toggle
){
int
swap
=
m_ID_last_state
;
m_ID_last_state
=
m_ID_current_state
;
SetToolID
(
0
,
wxCURSOR_ARROW
,
wxEmptyString
);
m_ID_current_state
=
swap
;
}
//SetCursor( DrawPanel->m_PanelCursor = DrawPanel->m_PanelDefaultCursor );
event
.
SetId
(
m_ID_current_state
);
Process_Special_Functions
(
event
);
break
;
case
ID_OPEN_MODULE_EDITOR
:
case
ID_OPEN_MODULE_EDITOR
:
if
(
m_ModuleEditFrame
==
NULL
)
if
(
m_ModuleEditFrame
==
NULL
)
{
{
...
@@ -921,6 +1077,18 @@ void WinEDA_PcbFrame::Process_Special_Functions( wxCommandEvent& event )
...
@@ -921,6 +1077,18 @@ void WinEDA_PcbFrame::Process_Special_Functions( wxCommandEvent& event )
g_DesignSettings
.
m_UseConnectedTrackWidth
=
false
;
g_DesignSettings
.
m_UseConnectedTrackWidth
=
false
;
}
}
break
;
break
;
case
ID_AUX_TOOLBAR_PCB_CLR_WIDTH
:
{
int
ii
=
m_SelClrWidthBox
->
GetChoice
();
g_DesignSettings
.
m_TrackClearence
=
g_DesignSettings
.
m_TrackClearenceHistory
[
ii
];
DisplayTrackSettings
();
m_SelTrackWidthBox_Changed
=
false
;
m_SelClrWidthBox_Changed
=
false
;
m_SelViaSizeBox_Changed
=
false
;
g_DesignSettings
.
m_UseConnectedTrackWidth
=
false
;
}
break
;
case
ID_POPUP_PCB_SELECT_WIDTH1
:
case
ID_POPUP_PCB_SELECT_WIDTH1
:
case
ID_POPUP_PCB_SELECT_WIDTH2
:
case
ID_POPUP_PCB_SELECT_WIDTH2
:
...
@@ -1050,8 +1218,12 @@ void WinEDA_PcbFrame::Process_Special_Functions( wxCommandEvent& event )
...
@@ -1050,8 +1218,12 @@ void WinEDA_PcbFrame::Process_Special_Functions( wxCommandEvent& event )
break
;
break
;
default
:
default
:
DisplayError
(
this
,
wxString
msg
;
wxT
(
"WinEDA_PcbFrame::Process_Special_Functions() id error"
)
);
msg
.
Printf
(
wxT
(
"WinEDA_PcbFrame::Process_Special_Functions() id %d error"
),
DrawStruct
->
Type
()
);
DisplayError
(
this
,
msg
);
break
;
break
;
}
}
...
...
pcbnew/editrack-part2.cpp
View file @
db6630b8
...
@@ -33,6 +33,7 @@ void WinEDA_PcbFrame::DisplayTrackSettings()
...
@@ -33,6 +33,7 @@ void WinEDA_PcbFrame::DisplayTrackSettings()
buftrc
.
GetData
(),
bufvia
.
GetData
()
);
buftrc
.
GetData
(),
bufvia
.
GetData
()
);
Affiche_Message
(
msg
);
Affiche_Message
(
msg
);
m_SelTrackWidthBox_Changed
=
TRUE
;
m_SelTrackWidthBox_Changed
=
TRUE
;
m_SelClrWidthBox_Changed
=
TRUE
;
m_SelViaSizeBox_Changed
=
TRUE
;
m_SelViaSizeBox_Changed
=
TRUE
;
}
}
...
...
pcbnew/files.cpp
View file @
db6630b8
...
@@ -154,6 +154,7 @@ int WinEDA_PcbFrame::LoadOnePcbFile( const wxString& FullFileName, bool Append )
...
@@ -154,6 +154,7 @@ int WinEDA_PcbFrame::LoadOnePcbFile( const wxString& FullFileName, bool Append )
}
}
m_SelTrackWidthBox_Changed
=
TRUE
;
m_SelTrackWidthBox_Changed
=
TRUE
;
m_SelClrWidthBox_Changed
=
TRUE
;
m_SelViaSizeBox_Changed
=
TRUE
;
m_SelViaSizeBox_Changed
=
TRUE
;
if
(
Append
)
if
(
Append
)
...
@@ -263,7 +264,7 @@ int WinEDA_PcbFrame::LoadOnePcbFile( const wxString& FullFileName, bool Append )
...
@@ -263,7 +264,7 @@ int WinEDA_PcbFrame::LoadOnePcbFile( const wxString& FullFileName, bool Append )
/* Rebuild the new pad list (for drc and ratsnet control ...) */
/* Rebuild the new pad list (for drc and ratsnet control ...) */
GetBoard
()
->
m_Status_Pcb
=
0
;
GetBoard
()
->
m_Status_Pcb
=
0
;
DrawPanel
->
Refresh
(
true
);
DrawPanel
->
Refresh
(
true
);
Compile_Ratsnest
(
NULL
,
true
);
Compile_Ratsnest
(
NULL
,
true
);
...
...
pcbnew/hotkeys.cpp
View file @
db6630b8
...
@@ -32,135 +32,111 @@
...
@@ -32,135 +32,111 @@
/* local variables */
/* local variables */
/* Hotkey list: */
/* Hotkey list: */
static
Ki_HotkeyInfo
HkSwitch2CopperLayer
(
wxT
(
static
Ki_HotkeyInfo
HkSwitch2CopperLayer
(
wxT
(
"Switch to Copper layer"
),
"Switch to Copper layer"
),
HK_SWITCH_LAYER_TO_COPPER
,
WXK_PAGEUP
);
HK_SWITCH_LAYER_TO_COPPER
,
WXK_PAGEUP
);
static
Ki_HotkeyInfo
HkSwitch2ComponentLayer
(
wxT
(
"Switch to Component layer"
),
static
Ki_HotkeyInfo
HkSwitch2ComponentLayer
(
wxT
(
HK_SWITCH_LAYER_TO_COMPONENT
,
WXK_PAGEDOWN
);
"Switch to Component layer"
),
static
Ki_HotkeyInfo
HkSwitch2InnerLayer1
(
wxT
(
"Switch to Inner layer 1"
),
HK_SWITCH_LAYER_TO_COMPONENT
,
WXK_PAGEDOWN
);
HK_SWITCH_LAYER_TO_INNER1
,
WXK_F5
);
static
Ki_HotkeyInfo
HkSwitch2InnerLayer1
(
wxT
(
static
Ki_HotkeyInfo
HkSwitch2InnerLayer2
(
wxT
(
"Switch to Inner layer 2"
),
"Switch to Inner layer 1"
),
HK_SWITCH_LAYER_TO_INNER2
,
WXK_F6
);
HK_SWITCH_LAYER_TO_INNER1
,
WXK_F5
);
static
Ki_HotkeyInfo
HkSwitch2InnerLayer3
(
wxT
(
"Switch to Inner layer 3"
),
static
Ki_HotkeyInfo
HkSwitch2InnerLayer2
(
wxT
(
HK_SWITCH_LAYER_TO_INNER3
,
WXK_F7
);
"Switch to Inner layer 2"
),
static
Ki_HotkeyInfo
HkSwitch2InnerLayer4
(
wxT
(
"Switch to Inner layer 4"
),
HK_SWITCH_LAYER_TO_INNER2
,
WXK_F6
);
HK_SWITCH_LAYER_TO_INNER4
,
WXK_F8
);
static
Ki_HotkeyInfo
HkSwitch2InnerLayer3
(
wxT
(
static
Ki_HotkeyInfo
HkSwitch2InnerLayer5
(
wxT
(
"Switch to Inner layer 5"
),
"Switch to Inner layer 3"
),
HK_SWITCH_LAYER_TO_INNER5
,
WXK_F9
);
HK_SWITCH_LAYER_TO_INNER3
,
WXK_F7
);
static
Ki_HotkeyInfo
HkSwitch2InnerLayer6
(
wxT
(
"Switch to Inner layer 6"
),
static
Ki_HotkeyInfo
HkSwitch2InnerLayer4
(
wxT
(
HK_SWITCH_LAYER_TO_INNER6
,
WXK_F10
);
"Switch to Inner layer 4"
),
HK_SWITCH_LAYER_TO_INNER4
,
WXK_F8
);
static
Ki_HotkeyInfo
HkSwitch2NextCopperLayer
(
wxT
(
"Switch to Next Layer"
),
static
Ki_HotkeyInfo
HkSwitch2InnerLayer5
(
wxT
(
HK_SWITCH_LAYER_TO_NEXT
,
'+'
);
"Switch to Inner layer 5"
),
static
Ki_HotkeyInfo
HkSwitch2PreviousCopperLayer
(
wxT
(
HK_SWITCH_LAYER_TO_INNER5
,
WXK_F9
);
"Switch to Previous Layer"
),
HK_SWITCH_LAYER_TO_PREVIOUS
,
'-'
);
static
Ki_HotkeyInfo
HkSwitch2InnerLayer6
(
wxT
(
"Switch to Inner layer 6"
),
static
Ki_HotkeyInfo
HkSavefile
(
wxT
(
"Save board"
),
HK_SAVE_BOARD
,
'S'
HK_SWITCH_LAYER_TO_INNER6
,
WXK_F10
);
+
GR_KB_CTRL
);
static
Ki_HotkeyInfo
HkLoadfile
(
wxT
(
"Load board"
),
HK_LOAD_BOARD
,
'L'
static
Ki_HotkeyInfo
HkSwitch2NextCopperLayer
(
wxT
(
+
GR_KB_CTRL
);
"Switch to Next Layer"
),
static
Ki_HotkeyInfo
HkFindItem
(
wxT
(
"Find Item"
),
HK_FIND_ITEM
,
'F'
HK_SWITCH_LAYER_TO_NEXT
,
'+'
);
+
GR_KB_CTRL
);
static
Ki_HotkeyInfo
HkSwitch2PreviousCopperLayer
(
wxT
(
static
Ki_HotkeyInfo
HkBackspace
(
wxT
(
"Delete track segment"
),
HK_BACK_SPACE
,
"Switch to Previous Layer"
),
WXK_BACK
);
HK_SWITCH_LAYER_TO_PREVIOUS
,
'-'
);
static
Ki_HotkeyInfo
HkAddVia
(
wxT
(
"Add Via"
),
HK_ADD_VIA
,
'V'
);
static
Ki_HotkeyInfo
HkAddMicroVia
(
wxT
(
"Add MicroVia"
),
HK_ADD_MICROVIA
,
'V'
static
Ki_HotkeyInfo
HkSavefile
(
wxT
(
"Save board"
),
HK_SAVE_BOARD
,
'S'
+
GR_KB_CTRL
);
+
GR_KB_CTRL
);
static
Ki_HotkeyInfo
HkLoadfile
(
wxT
(
"Load board"
),
HK_LOAD_BOARD
,
'L'
+
GR_KB_CTRL
);
static
Ki_HotkeyInfo
HkEndTrack
(
wxT
(
"End Track"
),
HK_END_TRACK
,
WXK_END
);
static
Ki_HotkeyInfo
HkFindItem
(
wxT
(
"Find Item"
),
HK_FIND_ITEM
,
'F'
+
GR_KB_CTRL
);
static
Ki_HotkeyInfo
HkFlipFootprint
(
wxT
(
"Flip Footprint"
),
HK_FLIP_FOOTPRINT
,
static
Ki_HotkeyInfo
HkBackspace
(
wxT
(
"Delete track segment"
),
HK_BACK_SPACE
,
WXK_BACK
);
'F'
);
static
Ki_HotkeyInfo
HkAddMicroVia
(
wxT
(
"Add Via"
),
HK_ADD_VIA
,
'V'
);
static
Ki_HotkeyInfo
HkRotateFootprint
(
wxT
(
"Rotate Footprint"
),
static
Ki_HotkeyInfo
HkAddVia
(
wxT
(
"Add MicroVia"
),
HK_ADD_MICROVIA
,
'V'
+
GR_KB_CTRL
);
HK_ROTATE_FOOTPRINT
,
'R'
);
static
Ki_HotkeyInfo
HkEndTrack
(
wxT
(
"End Track"
),
HK_END_TRACK
,
WXK_END
);
static
Ki_HotkeyInfo
HkMoveFootprint
(
wxT
(
"Move Footprint"
),
HK_MOVE_FOOTPRINT
,
static
Ki_HotkeyInfo
HkFlipFootprint
(
wxT
(
"Flip Footprint"
),
HK_FLIP_FOOTPRINT
,
'F'
);
'M'
);
static
Ki_HotkeyInfo
HkRotateFootprint
(
wxT
(
"Rotate Footprint"
),
HK_ROTATE_FOOTPRINT
,
'R'
);
static
Ki_HotkeyInfo
HkDragFootprint
(
wxT
(
"Drag Footprint"
),
HK_DRAG_FOOTPRINT
,
static
Ki_HotkeyInfo
HkMoveFootprint
(
wxT
(
"Move Footprint"
),
HK_MOVE_FOOTPRINT
,
'M'
);
'G'
);
static
Ki_HotkeyInfo
HkDragFootprint
(
wxT
(
"Drag Footprint"
),
HK_DRAG_FOOTPRINT
,
'G'
);
static
Ki_HotkeyInfo
HkGetAndMoveFootprint
(
wxT
(
"Get and Move Footprint"
),
static
Ki_HotkeyInfo
HkGetAndMoveFootprint
(
wxT
(
HK_GET_AND_MOVE_FOOTPRINT
,
'T'
);
"Get and Move Footprint"
),
static
Ki_HotkeyInfo
HkLock_Unlock_Footprint
(
wxT
(
"Lock/Unlock Footprint"
),
HK_GET_AND_MOVE_FOOTPRINT
,
'T'
);
HK_LOCK_UNLOCK_FOOTPRINT
,
'L'
);
static
Ki_HotkeyInfo
HkLock_Unlock_Footprint
(
wxT
(
static
Ki_HotkeyInfo
HkDelete
(
wxT
(
"Delete Track or Footprint"
),
HK_DELETE
,
"Lock/Unlock Footprint"
),
WXK_DELETE
);
HK_LOCK_UNLOCK_FOOTPRINT
,
'L'
);
static
Ki_HotkeyInfo
HkResetLocalCoord
(
wxT
(
"Reset local coord."
),
static
Ki_HotkeyInfo
HkDelete
(
wxT
(
"Delete Track or Footprint"
),
HK_DELETE
,
WXK_DELETE
);
HK_RESET_LOCAL_COORD
,
' '
);
static
Ki_HotkeyInfo
HkResetLocalCoord
(
wxT
(
"Reset local coord."
),
HK_RESET_LOCAL_COORD
,
' '
);
static
Ki_HotkeyInfo
HkZoomCenter
(
wxT
(
"Zoom Center"
),
HK_ZOOM_CENTER
,
WXK_F4
);
static
Ki_HotkeyInfo
HkZoomCenter
(
wxT
(
"Zoom Center"
),
HK_ZOOM_CENTER
,
WXK_F4
);
static
Ki_HotkeyInfo
HkZoomRedraw
(
wxT
(
"Zoom Redraw"
),
HK_ZOOM_REDRAW
,
WXK_F3
);
static
Ki_HotkeyInfo
HkZoomRedraw
(
wxT
(
"Zoom Redraw"
),
HK_ZOOM_REDRAW
,
WXK_F3
);
static
Ki_HotkeyInfo
HkZoomOut
(
wxT
(
"Zoom Out"
),
HK_ZOOM_OUT
,
WXK_F2
);
static
Ki_HotkeyInfo
HkZoomOut
(
wxT
(
"Zoom Out"
),
HK_ZOOM_OUT
,
WXK_F2
);
static
Ki_HotkeyInfo
HkZoomIn
(
wxT
(
"Zoom In"
),
HK_ZOOM_IN
,
WXK_F1
);
static
Ki_HotkeyInfo
HkZoomIn
(
wxT
(
"Zoom In"
),
HK_ZOOM_IN
,
WXK_F1
);
static
Ki_HotkeyInfo
HkHelp
(
wxT
(
"Help: this message"
),
HK_HELP
,
'?'
);
static
Ki_HotkeyInfo
HkHelp
(
wxT
(
"Help: this message"
),
HK_HELP
,
'?'
);
static
Ki_HotkeyInfo
HkSwitchUnits
(
wxT
(
"Switch Units"
),
HK_SWITCH_UNITS
,
'U'
static
Ki_HotkeyInfo
HkSwitchUnits
(
wxT
(
"Switch Units"
),
HK_SWITCH_UNITS
,
'U'
+
GR_KB_CTRL
);
+
GR_KB_CTRL
);
static
Ki_HotkeyInfo
HkTrackDisplayMode
(
wxT
(
static
Ki_HotkeyInfo
HkTrackDisplayMode
(
wxT
(
"Track Display Mode"
),
"Track Display Mode"
),
HK_SWITCH_TRACK_DISPLAY_MODE
,
'K'
);
HK_SWITCH_TRACK_DISPLAY_MODE
,
'K'
);
static
Ki_HotkeyInfo
HkAddModule
(
wxT
(
"Add Module"
),
HK_ADD_MODULE
,
'O'
);
static
Ki_HotkeyInfo
HkAddTrack
(
wxT
(
"Add Track or Via"
),
HK_ADD_TRACK
,
'J'
);
static
Ki_HotkeyInfo
HkToggle
(
wxT
(
"Toggle Present Command"
),
HK_TOGGLE
,
'E'
);
// List of common hotkey descriptors
// List of common hotkey descriptors
Ki_HotkeyInfo
*
s_Common_Hotkey_List
[]
=
{
Ki_HotkeyInfo
&
HkHelp
,
*
s_Common_Hotkey_List
[]
=
{
&
HkHelp
,
&
HkZoomIn
,
&
HkZoomOut
,
&
HkZoomIn
,
&
HkZoomOut
,
&
HkZoomRedraw
,
&
HkZoomCenter
,
&
HkZoomRedraw
,
&
HkZoomCenter
,
&
HkSwitchUnits
,
&
HkSwitchUnits
,
&
HkResetLocalCoord
,
&
HkResetLocalCoord
,
NULL
};
NULL
};
// List of hotkey descriptors for pcbnew
// List of hotkey descriptors for pcbnew
Ki_HotkeyInfo
*
s_board_edit_Hotkey_List
[]
=
{
Ki_HotkeyInfo
*
s_board_edit_Hotkey_List
[]
=
{
&
HkTrackDisplayMode
,
&
HkDelete
,
&
HkTrackDisplayMode
,
&
HkBackspace
,
&
HkAddVia
,
&
HkAddMicroVia
,
&
HkEndTrack
,
&
HkMoveFootprint
,
&
HkDelete
,
&
HkBackspace
,
&
HkFlipFootprint
,
&
HkRotateFootprint
,
&
HkDragFootprint
,
&
HkAddVia
,
&
HkGetAndMoveFootprint
,
&
HkLock_Unlock_Footprint
,
&
HkSavefile
,
&
HkAddMicroVia
,
&
HkLoadfile
,
&
HkFindItem
,
&
HkSwitch2CopperLayer
,
&
HkSwitch2InnerLayer1
,
&
HkEndTrack
,
&
HkSwitch2InnerLayer2
,
&
HkSwitch2InnerLayer3
,
&
HkSwitch2InnerLayer4
,
&
HkMoveFootprint
,
&
HkFlipFootprint
,
&
HkSwitch2InnerLayer5
,
&
HkSwitch2InnerLayer6
,
&
HkSwitch2ComponentLayer
,
&
HkRotateFootprint
,
&
HkDragFootprint
,
&
HkSwitch2NextCopperLayer
,
&
HkSwitch2PreviousCopperLayer
,
&
HkAddModule
,
&
HkGetAndMoveFootprint
,
&
HkAddTrack
,
&
HkToggle
,
NULL
};
&
HkLock_Unlock_Footprint
,
&
HkSavefile
,
&
HkLoadfile
,
&
HkFindItem
,
&
HkSwitch2CopperLayer
,
&
HkSwitch2InnerLayer1
,
&
HkSwitch2InnerLayer2
,
&
HkSwitch2InnerLayer3
,
&
HkSwitch2InnerLayer4
,
&
HkSwitch2InnerLayer5
,
&
HkSwitch2InnerLayer6
,
&
HkSwitch2ComponentLayer
,
&
HkSwitch2NextCopperLayer
,
&
HkSwitch2PreviousCopperLayer
,
NULL
};
// List of hotkey descriptors for the module editor
// List of hotkey descriptors for the module editor
Ki_HotkeyInfo
*
s_module_edit_Hotkey_List
[]
=
{
Ki_HotkeyInfo
*
s_module_edit_Hotkey_List
[]
=
{
NULL
};
NULL
};
// list of sections and corresponding hotkey list for pcbnew (used to create an hotkey config file)
// list of sections and corresponding hotkey list for pcbnew (used to create an hotkey config file)
struct
Ki_HotkeyInfoSectionDescriptor
s_Pcbnew_Editor_Hokeys_Descr
[]
=
struct
Ki_HotkeyInfoSectionDescriptor
s_Pcbnew_Editor_Hokeys_Descr
[]
=
{
{
{
&
g_CommonSectionTag
,
s_Common_Hotkey_List
,
"Common keys"
},
{
&
g_CommonSectionTag
,
s_Common_Hotkey_List
,
"Common keys"
},
{
&
g_BoardEditorSectionTag
,
s_board_edit_Hotkey_List
,
{
&
g_BoardEditorSectionTag
,
s_board_edit_Hotkey_List
,
"Board editor keys"
},
"Board editor keys"
},
{
&
g_ModuleEditSectionTag
,
{
&
g_ModuleEditSectionTag
,
s_module_edit_Hotkey_List
,
"Footprint editor keys"
},
s_module_edit_Hotkey_List
,
"Footprint editor keys"
},
{
NULL
,
{
NULL
,
NULL
,
NULL
}
NULL
,
NULL
}
};
};
// list of sections and corresponding hotkey list for the board editor (used to list current hotkeys)
// list of sections and corresponding hotkey list for the board editor (used to list current hotkeys)
struct
Ki_HotkeyInfoSectionDescriptor
s_Board_Editor_Hokeys_Descr
[]
=
struct
Ki_HotkeyInfoSectionDescriptor
s_Board_Editor_Hokeys_Descr
[]
=
{
{
{
&
g_CommonSectionTag
,
s_Common_Hotkey_List
,
NULL
},
{
{
&
g_CommonSectionTag
,
s_Common_Hotkey_List
,
NULL
},
&
g_BoardEditorSectionTag
,
s_board_edit_Hotkey_List
,
NULL
},
{
NULL
,
{
&
g_BoardEditorSectionTag
,
s_board_edit_Hotkey_List
,
NULL
},
NULL
,
NULL
}
};
{
NULL
,
NULL
,
NULL
}
};
// list of sections and corresponding hotkey list for the footprint editor (used to list current hotkeys)
// list of sections and corresponding hotkey list for the footprint editor (used to list current hotkeys)
struct
Ki_HotkeyInfoSectionDescriptor
s_Module_Editor_Hokeys_Descr
[]
=
struct
Ki_HotkeyInfoSectionDescriptor
s_Module_Editor_Hokeys_Descr
[]
=
{
{
{
&
g_CommonSectionTag
,
s_Common_Hotkey_List
,
NULL
},
{
{
&
g_CommonSectionTag
,
s_Common_Hotkey_List
,
NULL
},
&
g_ModuleEditSectionTag
,
s_module_edit_Hotkey_List
,
NULL
},
{
NULL
,
{
&
g_ModuleEditSectionTag
,
s_module_edit_Hotkey_List
,
NULL
},
NULL
,
NULL
}
};
{
NULL
,
NULL
,
NULL
}
};
/***********************************************************/
/***********************************************************/
void
WinEDA_PcbFrame
::
OnHotKey
(
wxDC
*
DC
,
int
hotkey
,
void
WinEDA_PcbFrame
::
OnHotKey
(
wxDC
*
DC
,
int
hotkey
,
EDA_BaseStruct
*
DrawStruct
)
EDA_BaseStruct
*
DrawStruct
)
/***********************************************************/
/***********************************************************/
/* Hot keys. Some commands are relatives to the item under the mouse cursor
/* Hot keys. Some commands are relatives to the item under the mouse cursor
...
@@ -171,432 +147,457 @@ void WinEDA_PcbFrame::OnHotKey( wxDC* DC, int hotkey,
...
@@ -171,432 +147,457 @@ void WinEDA_PcbFrame::OnHotKey( wxDC* DC, int hotkey,
*/
*/
{
{
wxCommandEvent
cmd
(
wxEVT_COMMAND_MENU_SELECTED
);
wxCommandEvent
cmd
(
wxEVT_COMMAND_MENU_SELECTED
);
cmd
.
SetEventObject
(
this
);
cmd
.
SetEventObject
(
this
);
bool
PopupOn
=
(
GetCurItem
()
&&
GetCurItem
()
->
m_Flags
);
bool
PopupOn
=
(
GetCurItem
()
&&
GetCurItem
()
->
m_Flags
);
bool
ItemFree
=
(
GetCurItem
()
==
0
||
GetCurItem
()
->
m_Flags
==
0
);
bool
ItemFree
=
(
GetCurItem
()
==
0
||
GetCurItem
()
->
m_Flags
==
0
);
if
(
hotkey
==
0
)
if
(
hotkey
==
0
)
return
;
return
;
MODULE
*
module
=
NULL
;
MODULE
*
module
=
NULL
;
// Remap the control key Ctrl A (0x01) to GR_KB_CTRL + 'A' (just easier to handle...)
// Remap the control key Ctrl A (0x01) to GR_KB_CTRL + 'A' (just easier to handle...)
if
(
(
hotkey
&
GR_KB_CTRL
)
!=
0
)
if
((
hotkey
&
GR_KB_CTRL
)
!=
0
)
hotkey
+=
'A'
-
1
;
hotkey
+=
'A'
-
1
;
/* Convert lower to upper case (the usual toupper function has problem with non ascii codes like function keys */
/* Convert lower to upper case (the usual toupper function has problem with non ascii codes like function keys */
if
(
(
hotkey
>=
'a'
)
&&
(
hotkey
<=
'z'
)
)
if
((
hotkey
>=
'a'
)
&&
(
hotkey
<=
'z'
))
hotkey
+=
'A'
-
'a'
;
hotkey
+=
'A'
-
'a'
;
Ki_HotkeyInfo
*
HK_Descr
=
GetDescriptorFromHotkey
(
hotkey
,
s_Common_Hotkey_List
);
Ki_HotkeyInfo
*
HK_Descr
=
GetDescriptorFromHotkey
(
hotkey
,
s_Common_Hotkey_List
);
if
(
HK_Descr
==
NULL
)
HK_Descr
=
GetDescriptorFromHotkey
(
hotkey
,
s_board_edit_Hotkey_List
);
if
(
HK_Descr
==
NULL
)
HK_Descr
=
GetDescriptorFromHotkey
(
hotkey
,
s_board_edit_Hotkey_List
);
if
(
HK_Descr
==
NULL
)
return
;
if
(
HK_Descr
==
NULL
)
return
;
int
ll
;
int
ll
;
switch
(
HK_Descr
->
m_Idcommand
)
{
switch
(
HK_Descr
->
m_Idcommand
)
{
default
:
default
:
case
HK_NOT_FOUND
:
case
HK_NOT_FOUND
:
return
;
return
;
break
;
break
;
case
HK_SWITCH_LAYER_TO_PREVIOUS
:
case
HK_SWITCH_LAYER_TO_PREVIOUS
:
ll
=
GetScreen
()
->
m_Active_Layer
;
ll
=
GetScreen
()
->
m_Active_Layer
;
if
(
(
ll
<=
COPPER_LAYER_N
)
||
(
ll
>
CMP_N
)
)
if
((
ll
<=
COPPER_LAYER_N
)
||
(
ll
>
CMP_N
))
break
;
break
;
if
(
GetBoard
()
->
m_BoardSettings
->
m_CopperLayerCount
<
2
)
// Single layer
if
(
GetBoard
()
->
m_BoardSettings
->
m_CopperLayerCount
<
2
)
// Single layer
ll
=
COPPER_LAYER_N
;
ll
=
COPPER_LAYER_N
;
else
if
(
ll
==
CMP_N
)
else
if
(
ll
==
CMP_N
)
ll
=
MAX
(
COPPER_LAYER_N
,
GetBoard
()
->
m_BoardSettings
->
m_CopperLayerCount
-
2
);
ll
=
MAX
(
COPPER_LAYER_N
,
else
GetBoard
()
->
m_BoardSettings
->
m_CopperLayerCount
-
2
);
ll
--
;
else
SwitchLayer
(
DC
,
ll
);
ll
--
;
break
;
SwitchLayer
(
DC
,
ll
);
break
;
case
HK_SWITCH_LAYER_TO_NEXT
:
ll
=
GetScreen
()
->
m_Active_Layer
;
case
HK_SWITCH_LAYER_TO_NEXT
:
if
(
(
ll
<
COPPER_LAYER_N
)
||
(
ll
>=
CMP_N
)
)
ll
=
GetScreen
()
->
m_Active_Layer
;
break
;
if
((
ll
<
COPPER_LAYER_N
)
||
(
ll
>=
CMP_N
))
if
(
GetBoard
()
->
m_BoardSettings
->
m_CopperLayerCount
<
2
)
// Single layer
break
;
ll
=
COPPER_LAYER_N
;
if
(
GetBoard
()
->
m_BoardSettings
->
m_CopperLayerCount
<
2
)
// Single layer
else
if
(
ll
>=
GetBoard
()
->
m_BoardSettings
->
m_CopperLayerCount
-
2
)
ll
=
COPPER_LAYER_N
;
ll
=
CMP_N
;
else
if
(
ll
>=
GetBoard
()
->
m_BoardSettings
->
m_CopperLayerCount
-
2
)
else
ll
=
CMP_N
;
ll
++
;
else
SwitchLayer
(
DC
,
ll
);
ll
++
;
break
;
SwitchLayer
(
DC
,
ll
);
break
;
case
HK_SWITCH_LAYER_TO_COMPONENT
:
SwitchLayer
(
DC
,
CMP_N
);
case
HK_SWITCH_LAYER_TO_COMPONENT
:
break
;
SwitchLayer
(
DC
,
CMP_N
);
break
;
case
HK_SWITCH_LAYER_TO_COPPER
:
SwitchLayer
(
DC
,
COPPER_LAYER_N
);
case
HK_SWITCH_LAYER_TO_COPPER
:
break
;
SwitchLayer
(
DC
,
COPPER_LAYER_N
);
break
;
case
HK_SWITCH_LAYER_TO_INNER1
:
SwitchLayer
(
DC
,
LAYER_N_2
);
case
HK_SWITCH_LAYER_TO_INNER1
:
break
;
SwitchLayer
(
DC
,
LAYER_N_2
);
break
;
case
HK_SWITCH_LAYER_TO_INNER2
:
SwitchLayer
(
DC
,
LAYER_N_3
);
case
HK_SWITCH_LAYER_TO_INNER2
:
break
;
SwitchLayer
(
DC
,
LAYER_N_3
);
break
;
case
HK_SWITCH_LAYER_TO_INNER3
:
SwitchLayer
(
DC
,
LAYER_N_4
);
case
HK_SWITCH_LAYER_TO_INNER3
:
break
;
SwitchLayer
(
DC
,
LAYER_N_4
);
break
;
case
HK_SWITCH_LAYER_TO_INNER4
:
SwitchLayer
(
DC
,
LAYER_N_5
);
case
HK_SWITCH_LAYER_TO_INNER4
:
break
;
SwitchLayer
(
DC
,
LAYER_N_5
);
break
;
case
HK_SWITCH_LAYER_TO_INNER5
:
SwitchLayer
(
DC
,
LAYER_N_6
);
case
HK_SWITCH_LAYER_TO_INNER5
:
break
;
SwitchLayer
(
DC
,
LAYER_N_6
);
break
;
case
HK_SWITCH_LAYER_TO_INNER6
:
SwitchLayer
(
DC
,
LAYER_N_7
);
case
HK_SWITCH_LAYER_TO_INNER6
:
break
;
SwitchLayer
(
DC
,
LAYER_N_7
);
break
;
case
HK_HELP
:
// Display Current hotkey list
DisplayHotkeyList
(
this
,
s_Board_Editor_Hokeys_Descr
);
case
HK_HELP
:
// Display Current hotkey list
break
;
DisplayHotkeyList
(
this
,
s_Board_Editor_Hokeys_Descr
);
break
;
case
HK_ZOOM_IN
:
cmd
.
SetId
(
ID_POPUP_ZOOM_IN
);
case
HK_ZOOM_IN
:
GetEventHandler
()
->
ProcessEvent
(
cmd
);
cmd
.
SetId
(
ID_POPUP_ZOOM_IN
);
break
;
GetEventHandler
()
->
ProcessEvent
(
cmd
);
break
;
case
HK_ZOOM_OUT
:
cmd
.
SetId
(
ID_POPUP_ZOOM_OUT
);
case
HK_ZOOM_OUT
:
GetEventHandler
()
->
ProcessEvent
(
cmd
);
cmd
.
SetId
(
ID_POPUP_ZOOM_OUT
);
break
;
GetEventHandler
()
->
ProcessEvent
(
cmd
);
break
;
case
HK_ZOOM_REDRAW
:
cmd
.
SetId
(
ID_ZOOM_REDRAW
);
case
HK_ZOOM_REDRAW
:
GetEventHandler
()
->
ProcessEvent
(
cmd
);
cmd
.
SetId
(
ID_ZOOM_REDRAW
);
break
;
GetEventHandler
()
->
ProcessEvent
(
cmd
);
break
;
case
HK_ZOOM_CENTER
:
cmd
.
SetId
(
ID_POPUP_ZOOM_CENTER
);
case
HK_ZOOM_CENTER
:
GetEventHandler
()
->
ProcessEvent
(
cmd
);
cmd
.
SetId
(
ID_POPUP_ZOOM_CENTER
);
break
;
GetEventHandler
()
->
ProcessEvent
(
cmd
);
break
;
case
HK_ADD_MODULE
:
case
HK_RESET_LOCAL_COORD
:
/*Reset the relative coord */
cmd
.
SetId
(
ID_COMPONENT_BUTT
);
GetScreen
()
->
m_O_Curseur
=
GetScreen
()
->
m_Curseur
;
GetEventHandler
()
->
ProcessEvent
(
cmd
);
break
;
break
;
case
HK_ADD_TRACK
:
cmd
.
SetId
(
ID_TRACK_BUTT
);
case
HK_SWITCH_UNITS
:
GetEventHandler
()
->
ProcessEvent
(
cmd
);
g_UnitMetric
=
(
g_UnitMetric
==
INCHES
)
?
MILLIMETRE
:
INCHES
;
break
;
break
;
case
HK_TOGGLE
:
cmd
.
SetId
(
ID_TOGGLE_PRESENT_COMMAND
);
case
HK_SWITCH_TRACK_DISPLAY_MODE
:
GetEventHandler
()
->
ProcessEvent
(
cmd
);
DisplayOpt
.
DisplayPcbTrackFill
^=
1
;
DisplayOpt
.
DisplayPcbTrackFill
&=
1
;
break
;
m_DisplayPcbTrackFill
=
DisplayOpt
.
DisplayPcbTrackFill
;
GetScreen
()
->
SetRefreshReq
();
case
HK_RESET_LOCAL_COORD
:
/*Reset the relative coord */
break
;
GetScreen
()
->
m_O_Curseur
=
GetScreen
()
->
m_Curseur
;
break
;
case
HK_DELETE
:
OnHotkeyDeleteItem
(
DC
,
DrawStruct
);
case
HK_SWITCH_UNITS
:
break
;
g_UnitMetric
=
(
g_UnitMetric
==
INCHES
)
?
MILLIMETRE
:
INCHES
;
break
;
case
HK_BACK_SPACE
:
if
(
m_ID_current_state
==
ID_TRACK_BUTT
&&
GetScreen
()
->
m_Active_Layer
<=
CMP_N
)
case
HK_SWITCH_TRACK_DISPLAY_MODE
:
{
DisplayOpt
.
DisplayPcbTrackFill
^=
1
;
if
(
ItemFree
)
DisplayOpt
.
DisplayPcbTrackFill
&=
1
;
{
m_DisplayPcbTrackFill
=
DisplayOpt
.
DisplayPcbTrackFill
;
// no track is currently being edited - select a segment and remove it.
GetScreen
()
->
SetRefreshReq
();
// @todo: possibly? pass the HK command code to PcbGeneralLocateAndDisplay() so it can restrict its search to specific item types.
break
;
// @todo: use PcbGeneralLocateAndDisplay() everywhere in this source file.
case
HK_DELETE
:
DrawStruct
=
PcbGeneralLocateAndDisplay
();
OnHotkeyDeleteItem
(
DC
,
DrawStruct
);
// don't let backspace delete modules!!
break
;
if
(
DrawStruct
&&
(
DrawStruct
->
Type
()
==
TYPE_TRACK
||
DrawStruct
->
Type
()
==
TYPE_VIA
)
)
case
HK_BACK_SPACE
:
{
if
(
m_ID_current_state
==
ID_TRACK_BUTT
&&
GetScreen
()
->
m_Active_Layer
Delete_Segment
(
DC
,
(
TRACK
*
)
DrawStruct
);
<=
CMP_N
)
{
SetCurItem
(
NULL
);
if
(
ItemFree
)
{
}
// no track is currently being edited - select a segment and remove it.
GetScreen
()
->
SetModify
();
// @todo: possibly? pass the HK command code to PcbGeneralLocateAndDisplay() so it can restrict its search to specific item types.
}
// @todo: use PcbGeneralLocateAndDisplay() everywhere in this source file.
else
if
(
GetCurItem
()
->
Type
()
==
TYPE_TRACK
)
{
DrawStruct
=
PcbGeneralLocateAndDisplay
();
// then an element is being edited - remove the last segment.
// don't let backspace delete modules!!
// simple lines for debugger:
if
(
DrawStruct
&&
(
DrawStruct
->
Type
()
==
TYPE_TRACK
TRACK
*
track
=
(
TRACK
*
)
GetCurItem
()
;
||
DrawStruct
->
Type
()
==
TYPE_VIA
))
{
track
=
Delete_Segment
(
DC
,
track
);
Delete_Segment
(
DC
,
(
TRACK
*
)
DrawStruct
);
SetCurItem
(
track
);
SetCurItem
(
NULL
);
GetScreen
()
->
SetModify
();
}
}
GetScreen
()
->
SetModify
();
}
}
else
if
(
GetCurItem
()
->
Type
()
==
TYPE_TRACK
)
{
break
;
// then an element is being edited - remove the last segment.
// simple lines for debugger:
case
HK_END_TRACK
:
TRACK
*
track
=
(
TRACK
*
)
GetCurItem
();
if
(
!
ItemFree
&&
(
GetCurItem
()
->
Type
()
==
TYPE_TRACK
)
&&
((
GetCurItem
()
->
m_Flags
&
IS_NEW
)
!=
0
)
)
track
=
Delete_Segment
(
DC
,
track
);
{
SetCurItem
(
track
);
// A new track is in progress: call to End_Route()
GetScreen
()
->
SetModify
();
DrawPanel
->
MouseToCursorSchema
();
}
End_Route
(
(
TRACK
*
)
GetCurItem
(),
DC
);
}
}
break
;
break
;
case
HK_END_TRACK
:
case
HK_GET_AND_MOVE_FOOTPRINT
:
if
(
!
ItemFree
&&
(
GetCurItem
()
->
Type
()
==
TYPE_TRACK
)
if
(
ItemFree
)
&&
((
GetCurItem
()
->
m_Flags
&
IS_NEW
)
!=
0
))
{
{
// A new track is in progress: call to End_Route()
wxCommandEvent
evt
;
DrawPanel
->
MouseToCursorSchema
();
evt
.
SetId
(
ID_POPUP_PCB_GET_AND_MOVE_MODULE_REQUEST
);
End_Route
((
TRACK
*
)
GetCurItem
(),
DC
);
Process_Special_Functions
(
evt
);
}
}
break
;
break
;
case
HK_GET_AND_MOVE_FOOTPRINT
:
case
HK_FIND_ITEM
:
if
(
ItemFree
)
{
if
(
ItemFree
)
wxCommandEvent
evt
;
{
evt
.
SetId
(
ID_POPUP_PCB_GET_AND_MOVE_MODULE_REQUEST
);
wxCommandEvent
evt
;
Process_Special_Functions
(
evt
);
evt
.
SetId
(
ID_FIND_ITEMS
);
}
Process_Special_Functions
(
evt
);
break
;
}
break
;
case
HK_FIND_ITEM
:
if
(
ItemFree
)
{
case
HK_LOAD_BOARD
:
wxCommandEvent
evt
;
if
(
ItemFree
)
evt
.
SetId
(
ID_FIND_ITEMS
);
{
Process_Special_Functions
(
evt
);
// try not to duplicate save, load code etc.
}
wxCommandEvent
evt
;
break
;
evt
.
SetId
(
ID_LOAD_FILE
);
Files_io
(
evt
);
case
HK_LOAD_BOARD
:
}
if
(
ItemFree
)
{
break
;
// try not to duplicate save, load code etc.
wxCommandEvent
evt
;
case
HK_SAVE_BOARD
:
evt
.
SetId
(
ID_LOAD_FILE
);
if
(
ItemFree
)
Files_io
(
evt
);
{
}
// try not to duplicate save, load code etc.
break
;
wxCommandEvent
evt
;
evt
.
SetId
(
ID_SAVE_BOARD
);
case
HK_SAVE_BOARD
:
Files_io
(
evt
);
if
(
ItemFree
)
{
}
// try not to duplicate save, load code etc.
break
;
wxCommandEvent
evt
;
evt
.
SetId
(
ID_SAVE_BOARD
);
case
HK_ADD_MICROVIA
:
// Place a micro via if a track is in progress
Files_io
(
evt
);
if
(
m_ID_current_state
!=
ID_TRACK_BUTT
)
}
return
;
break
;
if
(
ItemFree
)
// no track in progress: nothing to do
break
;
case
HK_ADD_MICROVIA
:
// Place a micro via if a track is in progress
if
(
GetCurItem
()
->
Type
()
!=
TYPE_TRACK
)
// Should not occur
if
(
m_ID_current_state
!=
ID_TRACK_BUTT
)
return
;
return
;
if
(
(
GetCurItem
()
->
m_Flags
&
IS_NEW
)
==
0
)
if
(
ItemFree
)
// no track in progress: nothing to do
return
;
break
;
if
(
GetCurItem
()
->
Type
()
!=
TYPE_TRACK
)
// Should not occur
// place micro via and switch layer
return
;
if
(
GetScreen
()
->
IsMicroViaAcceptable
()
)
if
((
GetCurItem
()
->
m_Flags
&
IS_NEW
)
==
0
)
{
return
;
int
v_type
=
g_DesignSettings
.
m_CurrentViaType
;
g_DesignSettings
.
m_CurrentViaType
=
VIA_MICROVIA
;
// place micro via and switch layer
Other_Layer_Route
(
(
TRACK
*
)
GetCurItem
(),
DC
);
if
(
GetScreen
()
->
IsMicroViaAcceptable
())
{
g_DesignSettings
.
m_CurrentViaType
=
v_type
;
int
v_type
=
g_DesignSettings
.
m_CurrentViaType
;
if
(
DisplayOpt
.
ContrastModeDisplay
)
g_DesignSettings
.
m_CurrentViaType
=
VIA_MICROVIA
;
GetScreen
()
->
SetRefreshReq
();
Other_Layer_Route
((
TRACK
*
)
GetCurItem
(),
DC
);
}
g_DesignSettings
.
m_CurrentViaType
=
v_type
;
break
;
if
(
DisplayOpt
.
ContrastModeDisplay
)
GetScreen
()
->
SetRefreshReq
();
case
HK_ADD_VIA
:
// Switch to alternate layer and Place a via if a track is in progress
}
if
(
m_ID_current_state
!=
ID_TRACK_BUTT
)
break
;
return
;
if
(
ItemFree
)
// no track in progress: switch layer only
case
HK_ADD_VIA
:
// Switch to alternate layer and Place a via if a track is in progress
{
if
(
m_ID_current_state
!=
ID_TRACK_BUTT
)
Other_Layer_Route
(
NULL
,
DC
);
return
;
break
;
if
(
ItemFree
)
// no track in progress: switch layer only
}
{
if
(
GetCurItem
()
->
Type
()
!=
TYPE_TRACK
)
Other_Layer_Route
(
NULL
,
DC
);
return
;
break
;
if
(
(
GetCurItem
()
->
m_Flags
&
IS_NEW
)
==
0
)
}
return
;
if
(
GetCurItem
()
->
Type
()
!=
TYPE_TRACK
)
Other_Layer_Route
(
(
TRACK
*
)
GetCurItem
(),
DC
);
// place via and switch layer
return
;
if
(
DisplayOpt
.
ContrastModeDisplay
)
if
((
GetCurItem
()
->
m_Flags
&
IS_NEW
)
==
0
)
GetScreen
()
->
SetRefreshReq
();
return
;
break
;
Other_Layer_Route
((
TRACK
*
)
GetCurItem
(),
DC
);
// place via and switch layer
if
(
DisplayOpt
.
ContrastModeDisplay
)
// Footprint edition:
GetScreen
()
->
SetRefreshReq
();
case
HK_LOCK_UNLOCK_FOOTPRINT
:
// toggle module "MODULE_is_LOCKED" status:
break
;
// get any module, locked or not locked and toggle its locked status
if
(
ItemFree
)
// Footprint edition:
module
=
Locate_Prefered_Module
(
GetBoard
(),
CURSEUR_OFF_GRILLE
|
VISIBLE_ONLY
);
case
HK_LOCK_UNLOCK_FOOTPRINT
:
// toggle module "MODULE_is_LOCKED" status:
else
if
(
GetCurItem
()
->
Type
()
==
TYPE_MODULE
)
// get any module, locked or not locked and toggle its locked status
module
=
(
MODULE
*
)
GetCurItem
();
if
(
ItemFree
)
if
(
module
)
module
=
Locate_Prefered_Module
(
GetBoard
(),
CURSEUR_OFF_GRILLE
{
|
VISIBLE_ONLY
);
SetCurItem
(
module
);
else
if
(
GetCurItem
()
->
Type
()
==
TYPE_MODULE
)
module
->
SetLocked
(
!
module
->
IsLocked
()
);
module
=
(
MODULE
*
)
GetCurItem
();
module
->
DisplayInfo
(
this
);
if
(
module
)
{
}
SetCurItem
(
module
);
break
;
module
->
SetLocked
(
!
module
->
IsLocked
());
module
->
DisplayInfo
(
this
);
case
HK_DRAG_FOOTPRINT
:
// Start move (and drag) module
}
case
HK_MOVE_FOOTPRINT
:
// Start move module
break
;
if
(
PopupOn
)
break
;
case
HK_DRAG_FOOTPRINT
:
// Start move (and drag) module
case
HK_MOVE_FOOTPRINT
:
// Start move module
case
HK_ROTATE_FOOTPRINT
:
// Rotation
if
(
PopupOn
)
case
HK_FLIP_FOOTPRINT
:
// move to other side
break
;
if
(
ItemFree
)
{
case
HK_ROTATE_FOOTPRINT
:
// Rotation
module
=
Locate_Prefered_Module
(
GetBoard
(),
case
HK_FLIP_FOOTPRINT
:
// move to other side
CURSEUR_OFF_GRILLE
|
IGNORE_LOCKED
|
VISIBLE_ONLY
int
exit
=
0
;
#if defined (USE_MATCH_LAYER)
if
(
m_ID_current_state
==
ID_TRACK_BUTT
)
{
|
MATCH_LAYER
if
(
ItemFree
)
#endif
DrawStruct
=
PcbGeneralLocateAndDisplay
();
);
else
DrawStruct
=
GetCurItem
();
if
(
module
==
NULL
)
// no footprint found
{
if
(
DrawStruct
&&
(
DrawStruct
->
Type
()
==
TYPE_TRACK
module
=
Locate_Prefered_Module
(
GetBoard
(),
CURSEUR_OFF_GRILLE
|
VISIBLE_ONLY
);
||
DrawStruct
->
Type
()
==
TYPE_VIA
))
if
(
module
)
switch
(
HK_Descr
->
m_Idcommand
)
{
{
// a footprint is found, but locked or on an other layer
case
HK_DRAG_FOOTPRINT
:
// Start move (and drag) module
if
(
module
->
IsLocked
()
)
DrawPanel
->
MouseToCursorSchema
();
{
//Start_DragTrackSegmentAndKeepSlope( (TRACK*) DrawStruct,DC );
wxString
msg
;
Start_MoveOneNodeOrSegment
((
TRACK
*
)
DrawStruct
,
DC
,
ID_POPUP_PCB_DRAG_TRACK_SEGMENT
);
msg
.
Printf
(
_
(
"Footprint %s found, but locked"
),
break
;
module
->
m_Reference
->
m_Text
.
GetData
()
);
// fall through
case
HK_MOVE_FOOTPRINT
:
// Start move module
DisplayInfoMessage
(
this
,
msg
);
DrawPanel
->
MouseToCursorSchema
();
}
Start_MoveOneNodeOrSegment
((
TRACK
*
)
DrawStruct
,
DC
,
module
=
NULL
;
ID_POPUP_PCB_MOVE_TRACK_NODE
);
}
break
;
}
}
}
else
else
if
(
GetCurItem
()
->
Type
()
==
TYPE_MODULE
)
exit
=
1
;
{
module
=
(
MODULE
*
)
GetCurItem
();
}
else
if
(
!
exit
)
{
// @todo: might need to add a layer check in if() below
if
(
ItemFree
)
{
if
(
(
GetCurItem
()
->
m_Flags
==
0
)
module
=
Locate_Prefered_Module
(
GetBoard
(),
CURSEUR_OFF_GRILLE
&&
module
->
IsLocked
()
)
|
IGNORE_LOCKED
|
VISIBLE_ONLY
module
=
NULL
;
// do not move, rotate ... it.
#if defined (USE_MATCH_LAYER)
}
|
MATCH_LAYER
if
(
module
==
NULL
)
#endif
break
;
);
/* I'd like to make sending to EESCHEMA edge triggered, but the
if
(
module
==
NULL
)
// no footprint found
* simple mouse click on a module when the arrow icon is in play
{
* does not set GetCurItem() at this time, nor does a mouse click
module
=
Locate_Prefered_Module
(
GetBoard
(),
* when the local ratsnest icon is in play set GetCurItem(), and these
CURSEUR_OFF_GRILLE
|
VISIBLE_ONLY
);
* actions also call SendMessageToEESCHEMA().
if
(
module
)
{
* if( GetCurItem() != module )
// a footprint is found, but locked or on an other layer
*/
if
(
module
->
IsLocked
())
{
{
wxString
msg
;
// Send the module via socket to EESCHEMA's search facility.
SendMessageToEESCHEMA
(
module
);
msg
.
Printf
(
_
(
"Footprint %s found, but locked"
),
module
->
m_Reference
->
m_Text
.
GetData
());
SetCurItem
(
module
);
}
DisplayInfoMessage
(
this
,
msg
);
}
switch
(
HK_Descr
->
m_Idcommand
)
module
=
NULL
;
{
}
case
HK_ROTATE_FOOTPRINT
:
// Rotation
}
Rotate_Module
(
DC
,
module
,
900
,
TRUE
);
}
else
if
(
GetCurItem
()
->
Type
()
==
TYPE_MODULE
)
{
break
;
module
=
(
MODULE
*
)
GetCurItem
();
case
HK_FLIP_FOOTPRINT
:
// move to other side
// @todo: might need to add a layer check in if() below
GetBoard
()
->
Change_Side_Module
(
module
,
DC
);
if
((
GetCurItem
()
->
m_Flags
==
0
)
&&
module
->
IsLocked
())
break
;
module
=
NULL
;
// do not move, rotate ... it.
}
case
HK_DRAG_FOOTPRINT
:
// Start move (and drag) module
if
(
module
==
NULL
)
g_Drag_Pistes_On
=
TRUE
;
break
;
// fall through
/* I'd like to make sending to EESCHEMA edge triggered, but the
case
HK_MOVE_FOOTPRINT
:
// Start move module
* simple mouse click on a module when the arrow icon is in play
StartMove_Module
(
module
,
DC
);
* does not set GetCurItem() at this time, nor does a mouse click
break
;
* when the local ratsnest icon is in play set GetCurItem(), and these
}
* actions also call SendMessageToEESCHEMA().
* if( GetCurItem() != module )
module
->
DisplayInfo
(
this
);
*/
break
;
{
}
// Send the module via socket to EESCHEMA's search facility.
SendMessageToEESCHEMA
(
module
);
SetCurItem
(
module
);
}
switch
(
HK_Descr
->
m_Idcommand
)
{
case
HK_ROTATE_FOOTPRINT
:
// Rotation
Rotate_Module
(
DC
,
module
,
900
,
TRUE
);
break
;
case
HK_FLIP_FOOTPRINT
:
// move to other side
GetBoard
()
->
Change_Side_Module
(
module
,
DC
);
break
;
case
HK_DRAG_FOOTPRINT
:
// Start move (and drag) module
g_Drag_Pistes_On
=
TRUE
;
// fall through
case
HK_MOVE_FOOTPRINT
:
// Start move module
StartMove_Module
(
module
,
DC
);
break
;
}
module
->
DisplayInfo
(
this
);
break
;
}
}
}
}
/***********************************************************/
/***********************************************************/
void
WinEDA_ModuleEditFrame
::
OnHotKey
(
wxDC
*
DC
,
int
hotkey
,
void
WinEDA_ModuleEditFrame
::
OnHotKey
(
wxDC
*
DC
,
int
hotkey
,
EDA_BaseStruct
*
DrawStruct
)
EDA_BaseStruct
*
DrawStruct
)
/***********************************************************/
/***********************************************************/
/* Hot keys. Some commands are relative to the item under the mouse cursor
/* Hot keys. Some commands are relative to the item under the mouse cursor
* Commands are case insensitive
* Commands are case insensitive
*/
*/
{
{
if
(
hotkey
==
0
)
if
(
hotkey
==
0
)
return
;
return
;
wxCommandEvent
cmd
(
wxEVT_COMMAND_MENU_SELECTED
);
wxCommandEvent
cmd
(
wxEVT_COMMAND_MENU_SELECTED
);
cmd
.
SetEventObject
(
this
);
cmd
.
SetEventObject
(
this
);
/* Convert lower to upper case (the usual toupper function has problem with non ascii codes like function keys */
/* Convert lower to upper case (the usual toupper function has problem with non ascii codes like function keys */
if
(
(
hotkey
>=
'a'
)
&&
(
hotkey
<=
'z'
)
)
if
((
hotkey
>=
'a'
)
&&
(
hotkey
<=
'z'
)
)
hotkey
+=
'A'
-
'a'
;
hotkey
+=
'A'
-
'a'
;
Ki_HotkeyInfo
*
HK_Descr
=
GetDescriptorFromHotkey
(
hotkey
,
s_Common_Hotkey_List
);
Ki_HotkeyInfo
*
HK_Descr
=
GetDescriptorFromHotkey
(
hotkey
,
if
(
HK_Descr
==
NULL
)
s_Common_Hotkey_List
);
HK_Descr
=
GetDescriptorFromHotkey
(
hotkey
,
s_module_edit_Hotkey_List
);
if
(
HK_Descr
==
NULL
)
if
(
HK_Descr
==
NULL
)
return
;
HK_Descr
=
GetDescriptorFromHotkey
(
hotkey
,
s_module_edit_Hotkey_List
)
;
if
(
HK_Descr
==
NULL
)
switch
(
HK_Descr
->
m_Idcommand
)
return
;
{
default
:
switch
(
HK_Descr
->
m_Idcommand
)
{
case
HK_NOT_FOUND
:
default
:
return
;
case
HK_NOT_FOUND
:
break
;
return
;
break
;
case
HK_HELP
:
// Display Current hotkey list
DisplayHotkeyList
(
this
,
s_Module_Editor_Hokeys_Descr
);
case
HK_HELP
:
// Display Current hotkey list
break
;
DisplayHotkeyList
(
this
,
s_Module_Editor_Hokeys_Descr
)
;
break
;
case
HK_RESET_LOCAL_COORD
:
/*Reset the relative coord */
GetScreen
()
->
m_O_Curseur
=
GetScreen
()
->
m_Curseur
;
case
HK_RESET_LOCAL_COORD
:
/*Reset the relative coord */
break
;
GetScreen
()
->
m_O_Curseur
=
GetScreen
()
->
m_Curseur
;
break
;
case
HK_SWITCH_UNITS
:
case
HK_SWITCH_UNITS
:
g_UnitMetric
=
(
g_UnitMetric
==
INCHES
)
?
MILLIMETRE
:
INCHES
;
g_UnitMetric
=
(
g_UnitMetric
==
INCHES
)
?
MILLIMETRE
:
INCHES
;
break
;
break
;
case
HK_ZOOM_IN
:
case
HK_ZOOM_IN
:
cmd
.
SetId
(
ID_POPUP_ZOOM_IN
);
cmd
.
SetId
(
ID_POPUP_ZOOM_IN
);
GetEventHandler
()
->
ProcessEvent
(
cmd
);
GetEventHandler
()
->
ProcessEvent
(
cmd
);
break
;
break
;
case
HK_ZOOM_OUT
:
case
HK_ZOOM_OUT
:
cmd
.
SetId
(
ID_POPUP_ZOOM_OUT
);
cmd
.
SetId
(
ID_POPUP_ZOOM_OUT
);
GetEventHandler
()
->
ProcessEvent
(
cmd
);
GetEventHandler
()
->
ProcessEvent
(
cmd
);
break
;
break
;
case
HK_ZOOM_REDRAW
:
case
HK_ZOOM_REDRAW
:
cmd
.
SetId
(
ID_ZOOM_REDRAW
);
cmd
.
SetId
(
ID_ZOOM_REDRAW
);
GetEventHandler
()
->
ProcessEvent
(
cmd
);
GetEventHandler
()
->
ProcessEvent
(
cmd
);
break
;
break
;
case
HK_ZOOM_CENTER
:
case
HK_ZOOM_CENTER
:
cmd
.
SetId
(
ID_POPUP_ZOOM_CENTER
);
cmd
.
SetId
(
ID_POPUP_ZOOM_CENTER
);
GetEventHandler
()
->
ProcessEvent
(
cmd
);
GetEventHandler
()
->
ProcessEvent
(
cmd
);
break
;
break
;
}
}
}
}
/******************************************************************************/
/******************************************************************************/
bool
WinEDA_PcbFrame
::
OnHotkeyDeleteItem
(
wxDC
*
DC
,
EDA_BaseStruct
*
DrawStruct
)
bool
WinEDA_PcbFrame
::
OnHotkeyDeleteItem
(
wxDC
*
DC
,
EDA_BaseStruct
*
DrawStruct
)
/******************************************************************************/
/******************************************************************************/
/* Delete the item foun under the mouse cursor
/* Delete the item foun under the mouse cursor
...
@@ -608,52 +609,46 @@ bool WinEDA_PcbFrame::OnHotkeyDeleteItem( wxDC* DC, EDA_BaseStruct* DrawStruct )
...
@@ -608,52 +609,46 @@ bool WinEDA_PcbFrame::OnHotkeyDeleteItem( wxDC* DC, EDA_BaseStruct* DrawStruct )
* Delete the module.
* Delete the module.
*/
*/
{
{
bool
ItemFree
=
(
GetCurItem
()
==
NULL
)
bool
ItemFree
=
(
GetCurItem
()
==
NULL
)
||
(
GetCurItem
()
->
m_Flags
==
0
);
||
(
GetCurItem
()
->
m_Flags
==
0
);
switch
(
m_ID_current_state
)
{
switch
(
m_ID_current_state
)
case
ID_TRACK_BUTT
:
{
if
(
GetScreen
()
->
m_Active_Layer
>
CMP_N
)
case
ID_TRACK_BUTT
:
return
FALSE
;
if
(
GetScreen
()
->
m_Active_Layer
>
CMP_N
)
if
(
ItemFree
)
{
return
FALSE
;
DrawStruct
=
PcbGeneralLocateAndDisplay
();
if
(
ItemFree
)
if
(
DrawStruct
&&
DrawStruct
->
Type
()
!=
TYPE_TRACK
)
{
return
FALSE
;
DrawStruct
=
PcbGeneralLocateAndDisplay
();
Delete_Track
(
DC
,
(
TRACK
*
)
DrawStruct
);
if
(
DrawStruct
&&
DrawStruct
->
Type
()
!=
TYPE_TRACK
)
}
else
if
(
GetCurItem
()
->
Type
()
==
TYPE_TRACK
)
{
return
FALSE
;
// simple lines for debugger:
Delete_Track
(
DC
,
(
TRACK
*
)
DrawStruct
);
TRACK
*
track
=
(
TRACK
*
)
GetCurItem
();
}
track
=
Delete_Segment
(
DC
,
track
);
else
if
(
GetCurItem
()
->
Type
()
==
TYPE_TRACK
)
SetCurItem
(
track
);
{
GetScreen
()
->
SetModify
();
// simple lines for debugger:
return
TRUE
;
TRACK
*
track
=
(
TRACK
*
)
GetCurItem
();
}
track
=
Delete_Segment
(
DC
,
track
);
break
;
SetCurItem
(
track
);
GetScreen
()
->
SetModify
();
case
ID_COMPONENT_BUTT
:
return
TRUE
;
if
(
ItemFree
)
{
}
MODULE
*
module
=
Locate_Prefered_Module
(
GetBoard
(),
break
;
CURSEUR_ON_GRILLE
);
if
(
module
==
NULL
)
case
ID_COMPONENT_BUTT
:
return
FALSE
;
if
(
ItemFree
)
if
(
!
IsOK
(
this
,
_
(
"Delete module?"
)))
{
return
FALSE
;
MODULE
*
module
=
Locate_Prefered_Module
(
GetBoard
(),
CURSEUR_ON_GRILLE
);
RemoveStruct
(
module
,
DC
);
if
(
module
==
NULL
)
}
else
return
FALSE
;
return
FALSE
;
if
(
!
IsOK
(
this
,
_
(
"Delete module?"
)
)
)
break
;
return
FALSE
;
RemoveStruct
(
module
,
DC
);
default
:
}
return
FALSE
;
else
}
return
FALSE
;
break
;
GetScreen
()
->
SetModify
();
SetCurItem
(
NULL
);
default
:
return
TRUE
;
return
FALSE
;
}
GetScreen
()
->
SetModify
();
SetCurItem
(
NULL
);
return
TRUE
;
}
}
pcbnew/hotkeys.h
View file @
db6630b8
...
@@ -20,14 +20,14 @@ enum hotkey_id_commnand {
...
@@ -20,14 +20,14 @@ enum hotkey_id_commnand {
HK_MOVE_FOOTPRINT
,
HK_MOVE_FOOTPRINT
,
HK_DRAG_FOOTPRINT
,
HK_DRAG_FOOTPRINT
,
HK_FLIP_FOOTPRINT
,
HK_FLIP_FOOTPRINT
,
HK_GET_AND_MOVE_FOOTPRINT
,
HK_GET_AND_MOVE_FOOTPRINT
,
HK_LOCK_UNLOCK_FOOTPRINT
,
HK_LOCK_UNLOCK_FOOTPRINT
,
HK_ADD_VIA
,
HK_ADD_VIA
,
HK_ADD_MICROVIA
,
HK_ADD_MICROVIA
,
HK_END_TRACK
,
HK_END_TRACK
,
HK_SAVE_BOARD
,
HK_LOAD_BOARD
,
HK_SAVE_BOARD
,
HK_LOAD_BOARD
,
HK_SWITCH_UNITS
,
HK_SWITCH_UNITS
,
HK_SWITCH_TRACK_DISPLAY_MODE
,
HK_SWITCH_TRACK_DISPLAY_MODE
,
HK_FIND_ITEM
,
HK_FIND_ITEM
,
HK_SWITCH_LAYER_TO_COPPER
,
HK_SWITCH_LAYER_TO_COPPER
,
HK_SWITCH_LAYER_TO_COMPONENT
,
HK_SWITCH_LAYER_TO_COMPONENT
,
...
@@ -39,14 +39,19 @@ enum hotkey_id_commnand {
...
@@ -39,14 +39,19 @@ enum hotkey_id_commnand {
HK_SWITCH_LAYER_TO_INNER4
,
HK_SWITCH_LAYER_TO_INNER4
,
HK_SWITCH_LAYER_TO_INNER5
,
HK_SWITCH_LAYER_TO_INNER5
,
HK_SWITCH_LAYER_TO_INNER6
,
HK_SWITCH_LAYER_TO_INNER6
,
HK_SWITCH_LAYER_TO_INNER7
,
HK_SWITCH_LAYER_TO_INNER7
,
HK_SWITCH_LAYER_TO_INNER8
,
HK_SWITCH_LAYER_TO_INNER8
,
HK_SWITCH_LAYER_TO_INNER9
,
HK_SWITCH_LAYER_TO_INNER9
,
HK_SWITCH_LAYER_TO_INNER10
,
HK_SWITCH_LAYER_TO_INNER10
,
HK_SWITCH_LAYER_TO_INNER11
,
HK_SWITCH_LAYER_TO_INNER11
,
HK_SWITCH_LAYER_TO_INNER12
,
HK_SWITCH_LAYER_TO_INNER12
,
HK_SWITCH_LAYER_TO_INNER13
,
HK_SWITCH_LAYER_TO_INNER13
,
HK_SWITCH_LAYER_TO_INNER14
HK_SWITCH_LAYER_TO_INNER14
,
HK_ADD_MODULE
,
HK_ADD_TRACK
,
HK_TOGGLE
,
HK_MOVE_TRACK
,
HK_SLIDE_TRACK
};
};
// List of hotkey descriptors for pcbnew
// List of hotkey descriptors for pcbnew
...
...
pcbnew/initpcb.cpp
View file @
db6630b8
...
@@ -162,10 +162,12 @@ bool WinEDA_BasePcbFrame::Clear_Pcb( bool query )
...
@@ -162,10 +162,12 @@ bool WinEDA_BasePcbFrame::Clear_Pcb( bool query )
{
{
g_DesignSettings
.
m_ViaSizeHistory
[
ii
]
=
g_DesignSettings
.
m_ViaSizeHistory
[
ii
]
=
g_DesignSettings
.
m_TrackWidthHistory
[
ii
]
=
0
;
g_DesignSettings
.
m_TrackWidthHistory
[
ii
]
=
0
;
g_DesignSettings
.
m_TrackClearenceHistory
[
ii
]
=
0
;
}
}
g_DesignSettings
.
m_TrackWidthHistory
[
0
]
=
g_DesignSettings
.
m_CurrentTrackWidth
;
g_DesignSettings
.
m_TrackWidthHistory
[
0
]
=
g_DesignSettings
.
m_CurrentTrackWidth
;
g_DesignSettings
.
m_ViaSizeHistory
[
0
]
=
g_DesignSettings
.
m_CurrentViaSize
;
g_DesignSettings
.
m_TrackClearenceHistory
[
0
]
=
g_DesignSettings
.
m_TrackClearence
;
g_DesignSettings
.
m_ViaSizeHistory
[
0
]
=
g_DesignSettings
.
m_CurrentViaSize
;
/* NO, this is a global setting, and changing it here changes a loaded board's layer count when loading a module in the module editor since
/* NO, this is a global setting, and changing it here changes a loaded board's layer count when loading a module in the module editor since
the module editor calls this when loading an existing module.
the module editor calls this when loading an existing module.
...
...
pcbnew/ioascii.cpp
View file @
db6630b8
...
@@ -205,6 +205,12 @@ int WinEDA_BasePcbFrame::ReadGeneralDescrPcb( FILE* File, int* LineNum )
...
@@ -205,6 +205,12 @@ int WinEDA_BasePcbFrame::ReadGeneralDescrPcb( FILE* File, int* LineNum )
continue
;
continue
;
}
}
if
(
stricmp
(
data
,
"LayerThickness"
)
==
0
)
{
data
=
strtok
(
NULL
,
" =
\n\r
"
);
GetBoard
()
->
m_BoardSettings
->
m_LayerThickness
=
atoi
(
data
);;
continue
;
}
if
(
strnicmp
(
data
,
"Links"
,
5
)
==
0
)
if
(
strnicmp
(
data
,
"Links"
,
5
)
==
0
)
{
{
...
@@ -360,6 +366,12 @@ int WinEDA_BasePcbFrame::ReadSetup( FILE* File, int* LineNum )
...
@@ -360,6 +366,12 @@ int WinEDA_BasePcbFrame::ReadSetup( FILE* File, int* LineNum )
g_DesignSettings
.
m_TrackMinWidth
=
atoi
(
data
);
g_DesignSettings
.
m_TrackMinWidth
=
atoi
(
data
);
continue
;
continue
;
}
}
if
(
stricmp
(
Line
,
"TrackClearenceHistory"
)
==
0
)
{
int
tmp
=
atoi
(
data
);
AddHistory
(
tmp
,
TYPE_CLR
);
continue
;
}
if
(
stricmp
(
Line
,
"ZoneClearence"
)
==
0
)
if
(
stricmp
(
Line
,
"ZoneClearence"
)
==
0
)
{
{
...
@@ -534,7 +546,15 @@ static int WriteSetup( FILE* aFile, WinEDA_BasePcbFrame* aFrame, BOARD* aBoard )
...
@@ -534,7 +546,15 @@ static int WriteSetup( FILE* aFile, WinEDA_BasePcbFrame* aFrame, BOARD* aBoard )
g_DesignSettings
.
m_TrackWidthHistory
[
ii
]
);
g_DesignSettings
.
m_TrackWidthHistory
[
ii
]
);
}
}
fprintf
(
aFile
,
"TrackClearence %d
\n
"
,
g_DesignSettings
.
m_TrackClearence
);
fprintf
(
aFile
,
"TrackClearence %d
\n
"
,
g_DesignSettings
.
m_TrackClearence
);
for
(
int
ii
=
0
;
ii
<
HISTORY_NUMBER
;
ii
++
)
{
if
(
g_DesignSettings
.
m_TrackClearenceHistory
[
ii
]
==
0
)
break
;
fprintf
(
aFile
,
"TrackClearenceHistory %d
\n
"
,
g_DesignSettings
.
m_TrackClearenceHistory
[
ii
]
);
}
fprintf
(
aFile
,
"ZoneClearence %d
\n
"
,
g_Zone_Default_Setting
.
m_ZoneClearance
);
fprintf
(
aFile
,
"ZoneClearence %d
\n
"
,
g_Zone_Default_Setting
.
m_ZoneClearance
);
fprintf
(
aFile
,
"TrackMinWidth %d
\n
"
,
g_DesignSettings
.
m_TrackMinWidth
);
fprintf
(
aFile
,
"TrackMinWidth %d
\n
"
,
g_DesignSettings
.
m_TrackMinWidth
);
...
@@ -613,6 +633,7 @@ bool WinEDA_PcbFrame::WriteGeneralDescrPcb( FILE* File )
...
@@ -613,6 +633,7 @@ bool WinEDA_PcbFrame::WriteGeneralDescrPcb( FILE* File )
fprintf
(
File
,
"Ndraw %d
\n
"
,
NbDrawItem
);
fprintf
(
File
,
"Ndraw %d
\n
"
,
NbDrawItem
);
fprintf
(
File
,
"Ntrack %d
\n
"
,
GetBoard
()
->
GetNumSegmTrack
()
);
fprintf
(
File
,
"Ntrack %d
\n
"
,
GetBoard
()
->
GetNumSegmTrack
()
);
fprintf
(
File
,
"Nzone %d
\n
"
,
GetBoard
()
->
GetNumSegmZone
()
);
fprintf
(
File
,
"Nzone %d
\n
"
,
GetBoard
()
->
GetNumSegmZone
()
);
fprintf
(
File
,
"LayerThickness %d
\n
"
,
GetBoard
()
->
m_BoardSettings
->
m_LayerThickness
);
fprintf
(
File
,
"Nmodule %d
\n
"
,
NbModules
);
fprintf
(
File
,
"Nmodule %d
\n
"
,
NbModules
);
fprintf
(
File
,
"Nnets %d
\n
"
,
GetBoard
()
->
m_NetInfo
->
GetNetsCount
()
);
fprintf
(
File
,
"Nnets %d
\n
"
,
GetBoard
()
->
m_NetInfo
->
GetNetsCount
()
);
...
...
pcbnew/loadcmp.cpp
View file @
db6630b8
...
@@ -344,7 +344,7 @@ wxString WinEDA_BasePcbFrame::Select_1_Module_From_List(
...
@@ -344,7 +344,7 @@ wxString WinEDA_BasePcbFrame::Select_1_Module_From_List(
WinEDAListBox
*
ListBox
=
new
WinEDAListBox
(
active_window
,
wxEmptyString
,
WinEDAListBox
*
ListBox
=
new
WinEDAListBox
(
active_window
,
wxEmptyString
,
NULL
,
OldName
,
DisplayCmpDoc
,
NULL
,
OldName
,
DisplayCmpDoc
,
wxColour
(
200
,
200
,
255
)
);
wxColour
(
200
,
200
,
255
)
,
GetScreen
()
->
m_Curseur
);
wxBeginBusyCursor
();
wxBeginBusyCursor
();
...
...
pcbnew/pcbcfg.cpp
View file @
db6630b8
...
@@ -140,6 +140,7 @@ bool Read_Hotkey_Config( WinEDA_DrawFrame* frame, bool verbose )
...
@@ -140,6 +140,7 @@ bool Read_Hotkey_Config( WinEDA_DrawFrame* frame, bool verbose )
g_ConfigFileLocationChoice
);
g_ConfigFileLocationChoice
);
FullFileName
+=
HOTKEY_FILENAME
;
FullFileName
+=
HOTKEY_FILENAME
;
FullFileName
+=
wxT
(
"."
);
FullFileName
+=
DEFAULT_HOTKEY_FILENAME_EXT
;
FullFileName
+=
DEFAULT_HOTKEY_FILENAME_EXT
;
return
frame
->
ReadHotkeyConfigFile
(
FullFileName
,
return
frame
->
ReadHotkeyConfigFile
(
FullFileName
,
s_Pcbnew_Editor_Hokeys_Descr
,
s_Pcbnew_Editor_Hokeys_Descr
,
...
@@ -178,11 +179,13 @@ bool Read_Config( const wxString& projectFileName )
...
@@ -178,11 +179,13 @@ bool Read_Config( const wxString& projectFileName )
/* Some parameters must be reinitialize after loading a new board or config: */
/* Some parameters must be reinitialize after loading a new board or config: */
g_DesignSettings
.
m_TrackWidthHistory
[
0
]
=
g_DesignSettings
.
m_CurrentTrackWidth
;
g_DesignSettings
.
m_TrackWidthHistory
[
0
]
=
g_DesignSettings
.
m_CurrentTrackWidth
;
g_DesignSettings
.
m_TrackClearenceHistory
[
0
]
=
g_DesignSettings
.
m_TrackClearence
;
g_DesignSettings
.
m_ViaSizeHistory
[
0
]
=
g_DesignSettings
.
m_CurrentViaSize
;
g_DesignSettings
.
m_ViaSizeHistory
[
0
]
=
g_DesignSettings
.
m_CurrentViaSize
;
for
(
ii
=
1
;
ii
<
HISTORY_NUMBER
;
ii
++
)
for
(
ii
=
1
;
ii
<
HISTORY_NUMBER
;
ii
++
)
{
{
g_DesignSettings
.
m_TrackWidthHistory
[
ii
]
=
0
;
g_DesignSettings
.
m_TrackWidthHistory
[
ii
]
=
0
;
g_DesignSettings
.
m_TrackClearenceHistory
[
ii
]
=
0
;
g_DesignSettings
.
m_ViaSizeHistory
[
ii
]
=
0
;
g_DesignSettings
.
m_ViaSizeHistory
[
ii
]
=
0
;
}
}
...
...
pcbnew/pcbcfg.h
View file @
db6630b8
...
@@ -79,6 +79,13 @@ static PARAM_CFG_INT ViaAltDrillCfg
...
@@ -79,6 +79,13 @@ static PARAM_CFG_INT ViaAltDrillCfg
250
,
/* Default value */
250
,
/* Default value */
0
,
0xFFFF
/* Min and max values*/
0
,
0xFFFF
/* Min and max values*/
);
);
static
PARAM_CFG_INT
LayerThicknessCfg
(
wxT
(
"LayerThickness"
),
/* Keyword */
&
g_DesignSettings
.
m_LayerThickness
,
/* Parameter address */
630
,
/* Default value */
0
,
0xFFFF
/* Min and max values*/
);
static
PARAM_CFG_INT
MicroViaDiametreCfg
static
PARAM_CFG_INT
MicroViaDiametreCfg
(
(
...
@@ -800,6 +807,7 @@ PARAM_CFG_BASE* ParamCfgList[] =
...
@@ -800,6 +807,7 @@ PARAM_CFG_BASE* ParamCfgList[] =
&
ViaShowHoleCfg
,
&
ViaShowHoleCfg
,
&
ShowNetNamesModeCfg
,
&
ShowNetNamesModeCfg
,
&
TrackClearenceCfg
,
&
TrackClearenceCfg
,
&
LayerThicknessCfg
,
&
LayerCountCfg
,
&
LayerCountCfg
,
&
TrackWidthCfg
,
&
TrackWidthCfg
,
&
RouteLayTopCfg
,
&
RouteLayTopCfg
,
...
...
pcbnew/pcbframe.cpp
View file @
db6630b8
...
@@ -137,6 +137,8 @@ BEGIN_EVENT_TABLE( WinEDA_PcbFrame, WinEDA_BasePcbFrame )
...
@@ -137,6 +137,8 @@ BEGIN_EVENT_TABLE( WinEDA_PcbFrame, WinEDA_BasePcbFrame )
WinEDA_PcbFrame
::
Process_Special_Functions
)
WinEDA_PcbFrame
::
Process_Special_Functions
)
EVT_KICAD_CHOICEBOX
(
ID_AUX_TOOLBAR_PCB_TRACK_WIDTH
,
EVT_KICAD_CHOICEBOX
(
ID_AUX_TOOLBAR_PCB_TRACK_WIDTH
,
WinEDA_PcbFrame
::
Process_Special_Functions
)
WinEDA_PcbFrame
::
Process_Special_Functions
)
EVT_KICAD_CHOICEBOX
(
ID_AUX_TOOLBAR_PCB_CLR_WIDTH
,
WinEDA_PcbFrame
::
Process_Special_Functions
)
EVT_KICAD_CHOICEBOX
(
ID_AUX_TOOLBAR_PCB_VIA_SIZE
,
EVT_KICAD_CHOICEBOX
(
ID_AUX_TOOLBAR_PCB_VIA_SIZE
,
WinEDA_PcbFrame
::
Process_Special_Functions
)
WinEDA_PcbFrame
::
Process_Special_Functions
)
EVT_TOOL
(
ID_TOOLBARH_PCB_AUTOPLACE
,
WinEDA_PcbFrame
::
AutoPlace
)
EVT_TOOL
(
ID_TOOLBARH_PCB_AUTOPLACE
,
WinEDA_PcbFrame
::
AutoPlace
)
...
@@ -153,6 +155,7 @@ BEGIN_EVENT_TABLE( WinEDA_PcbFrame, WinEDA_BasePcbFrame )
...
@@ -153,6 +155,7 @@ BEGIN_EVENT_TABLE( WinEDA_PcbFrame, WinEDA_BasePcbFrame )
EVT_TOOL
(
ID_PCB_HIGHLIGHT_BUTT
,
WinEDA_PcbFrame
::
Process_Special_Functions
)
EVT_TOOL
(
ID_PCB_HIGHLIGHT_BUTT
,
WinEDA_PcbFrame
::
Process_Special_Functions
)
EVT_TOOL
(
ID_COMPONENT_BUTT
,
WinEDA_PcbFrame
::
Process_Special_Functions
)
EVT_TOOL
(
ID_COMPONENT_BUTT
,
WinEDA_PcbFrame
::
Process_Special_Functions
)
EVT_TOOL
(
ID_TRACK_BUTT
,
WinEDA_PcbFrame
::
Process_Special_Functions
)
EVT_TOOL
(
ID_TRACK_BUTT
,
WinEDA_PcbFrame
::
Process_Special_Functions
)
EVT_TOOL
(
ID_TOGGLE_PRESENT_COMMAND
,
WinEDA_PcbFrame
::
Process_Special_Functions
)
EVT_TOOL
(
ID_PCB_ZONES_BUTT
,
WinEDA_PcbFrame
::
Process_Special_Functions
)
EVT_TOOL
(
ID_PCB_ZONES_BUTT
,
WinEDA_PcbFrame
::
Process_Special_Functions
)
EVT_TOOL
(
ID_PCB_MIRE_BUTT
,
WinEDA_PcbFrame
::
Process_Special_Functions
)
EVT_TOOL
(
ID_PCB_MIRE_BUTT
,
WinEDA_PcbFrame
::
Process_Special_Functions
)
EVT_TOOL
(
ID_PCB_ARC_BUTT
,
WinEDA_PcbFrame
::
Process_Special_Functions
)
EVT_TOOL
(
ID_PCB_ARC_BUTT
,
WinEDA_PcbFrame
::
Process_Special_Functions
)
...
@@ -210,9 +213,11 @@ WinEDA_PcbFrame::WinEDA_PcbFrame( wxWindow* father,
...
@@ -210,9 +213,11 @@ WinEDA_PcbFrame::WinEDA_PcbFrame( wxWindow* father,
m_Draw_Sheet_Ref
=
TRUE
;
// TRUE pour avoir le cartouche dessine
m_Draw_Sheet_Ref
=
TRUE
;
// TRUE pour avoir le cartouche dessine
m_Draw_Auxiliary_Axis
=
TRUE
;
m_Draw_Auxiliary_Axis
=
TRUE
;
m_SelTrackWidthBox
=
NULL
;
m_SelTrackWidthBox
=
NULL
;
m_SelClrWidthBox
=
NULL
;
m_SelViaSizeBox
=
NULL
;
m_SelViaSizeBox
=
NULL
;
m_SelLayerBox
=
NULL
;
m_SelLayerBox
=
NULL
;
m_SelTrackWidthBox_Changed
=
FALSE
;
m_SelTrackWidthBox_Changed
=
FALSE
;
m_SelClrWidthBox_Changed
=
FALSE
;
m_SelViaSizeBox_Changed
=
FALSE
;
m_SelViaSizeBox_Changed
=
FALSE
;
SetBoard
(
new
BOARD
(
NULL
,
this
)
);
SetBoard
(
new
BOARD
(
NULL
,
this
)
);
...
@@ -467,12 +472,18 @@ void WinEDA_PcbFrame::SetToolbars()
...
@@ -467,12 +472,18 @@ void WinEDA_PcbFrame::SetToolbars()
_
(
"Show Tracks Sketch mode"
)
:
_
(
"Show Tracks Sketch mode"
)
:
_
(
"Show Tracks filled mode"
)
);
_
(
"Show Tracks filled mode"
)
);
m_OptionsToolBar
->
ToggleTool
(
ID_TB_OPTIONS_SHOW_HIGH
T
_CONTRAST_MODE
,
m_OptionsToolBar
->
ToggleTool
(
ID_TB_OPTIONS_SHOW_HIGH_CONTRAST_MODE
,
DisplayOpt
.
ContrastModeDisplay
);
DisplayOpt
.
ContrastModeDisplay
);
m_OptionsToolBar
->
SetToolShortHelp
(
ID_TB_OPTIONS_SHOW_HIGH
T
_CONTRAST_MODE
,
m_OptionsToolBar
->
SetToolShortHelp
(
ID_TB_OPTIONS_SHOW_HIGH_CONTRAST_MODE
,
DisplayOpt
.
ContrastModeDisplay
?
DisplayOpt
.
ContrastModeDisplay
?
_
(
"Normal Contrast Mode Display"
)
:
_
(
"Normal Contrast Mode Display"
)
:
_
(
"Hight Contrast Mode Display"
)
);
_
(
"High Contrast Mode Display"
)
);
m_OptionsToolBar
->
ToggleTool
(
ID_TB_OPTIONS_SHOW_INVISIBLE_TEXT_MODE
,
g_ModuleTextNOVColor
&
ITEM_NOT_SHOW
);
m_OptionsToolBar
->
SetToolShortHelp
(
ID_TB_OPTIONS_SHOW_INVISIBLE_TEXT_MODE
,
g_ModuleTextNOVColor
&
(
ITEM_NOT_SHOW
)
?
_
(
"Show Invisible Text"
)
:
_
(
"Hide Invisible Text"
)
);
m_OptionsToolBar
->
ToggleTool
(
ID_TB_OPTIONS_SHOW_EXTRA_VERTICAL_TOOLBAR1
,
m_AuxVToolBar
?
true
:
false
);
m_OptionsToolBar
->
ToggleTool
(
ID_TB_OPTIONS_SHOW_EXTRA_VERTICAL_TOOLBAR1
,
m_AuxVToolBar
?
true
:
false
);
}
}
...
@@ -513,6 +524,38 @@ void WinEDA_PcbFrame::SetToolbars()
...
@@ -513,6 +524,38 @@ void WinEDA_PcbFrame::SetToolbars()
}
}
}
}
if
(
m_SelClrWidthBox
&&
m_SelClrWidthBox_Changed
)
{
m_SelClrWidthBox_Changed
=
FALSE
;
m_SelClrWidthBox
->
Clear
();
wxString
format
=
_
(
"Clearance"
);
if
(
g_UnitMetric
==
INCHES
)
format
+=
wxT
(
" %.1f"
);
else
format
+=
wxT
(
" %.3f"
);
for
(
ii
=
0
;
ii
<
HISTORY_NUMBER
;
ii
++
)
{
if
(
g_DesignSettings
.
m_TrackClearenceHistory
[
ii
]
==
0
)
break
;
// Fin de liste
double
value
=
To_User_Unit
(
g_UnitMetric
,
g_DesignSettings
.
m_TrackClearenceHistory
[
ii
],
PCB_INTERNAL_UNIT
);
if
(
g_UnitMetric
==
INCHES
)
msg
.
Printf
(
format
.
GetData
(),
value
*
1000
);
else
msg
.
Printf
(
format
.
GetData
(),
value
);
m_SelClrWidthBox
->
Append
(
msg
);
if
(
g_DesignSettings
.
m_TrackClearenceHistory
[
ii
]
==
g_DesignSettings
.
m_TrackClearence
)
m_SelClrWidthBox
->
SetSelection
(
ii
);
}
}
if
(
m_SelViaSizeBox
&&
m_SelViaSizeBox_Changed
)
if
(
m_SelViaSizeBox
&&
m_SelViaSizeBox_Changed
)
{
{
m_SelViaSizeBox_Changed
=
FALSE
;
m_SelViaSizeBox_Changed
=
FALSE
;
...
...
pcbnew/specctra_import.cpp
View file @
db6630b8
...
@@ -111,6 +111,7 @@ void WinEDA_PcbFrame::ImportSpecctraSession( wxCommandEvent& event )
...
@@ -111,6 +111,7 @@ void WinEDA_PcbFrame::ImportSpecctraSession( wxCommandEvent& event )
SetLocaleTo_Default
(
);
// revert to the current locale
SetLocaleTo_Default
(
);
// revert to the current locale
m_SelTrackWidthBox_Changed
=
TRUE
;
m_SelTrackWidthBox_Changed
=
TRUE
;
m_SelClrWidthBox_Changed
=
TRUE
;
m_SelViaSizeBox_Changed
=
TRUE
;
m_SelViaSizeBox_Changed
=
TRUE
;
GetScreen
()
->
SetModify
();
GetScreen
()
->
SetModify
();
...
...
pcbnew/tool_pcb.cpp
View file @
db6630b8
...
@@ -368,13 +368,21 @@ void WinEDA_PcbFrame::ReCreateOptToolbar()
...
@@ -368,13 +368,21 @@ void WinEDA_PcbFrame::ReCreateOptToolbar()
wxBitmap
(
showtrack_xpm
),
wxBitmap
(
showtrack_xpm
),
_
(
"Show Tracks Sketch"
),
wxITEM_CHECK
);
_
(
"Show Tracks Sketch"
),
wxITEM_CHECK
);
m_OptionsToolBar
->
AddTool
(
ID_TB_OPTIONS_SHOW_HIGH
T
_CONTRAST_MODE
,
m_OptionsToolBar
->
AddTool
(
ID_TB_OPTIONS_SHOW_HIGH_CONTRAST_MODE
,
wxEmptyString
,
wxEmptyString
,
wxBitmap
(
palette_xpm
),
wxBitmap
(
palette_xpm
),
_
(
"High
t
Contrast Mode Display"
),
_
(
"High Contrast Mode Display"
),
wxITEM_CHECK
);
wxITEM_CHECK
);
m_OptionsToolBar
->
ToggleTool
(
ID_TB_OPTIONS_SHOW_HIGH
T
_CONTRAST_MODE
,
m_OptionsToolBar
->
ToggleTool
(
ID_TB_OPTIONS_SHOW_HIGH_CONTRAST_MODE
,
DisplayOpt
.
ContrastModeDisplay
);
DisplayOpt
.
ContrastModeDisplay
);
m_OptionsToolBar
->
AddTool
(
ID_TB_OPTIONS_SHOW_INVISIBLE_TEXT_MODE
,
wxEmptyString
,
wxBitmap
(
invisible_text_xpm
),
_
(
"Show Invisible Text"
),
wxITEM_CHECK
);
m_OptionsToolBar
->
ToggleTool
(
ID_TB_OPTIONS_SHOW_INVISIBLE_TEXT_MODE
,
g_ModuleTextNOVColor
&
ITEM_NOT_SHOW
);
#ifdef MUWAVE_ENBL
#ifdef MUWAVE_ENBL
m_OptionsToolBar
->
AddSeparator
();
m_OptionsToolBar
->
AddSeparator
();
...
@@ -548,6 +556,12 @@ void WinEDA_PcbFrame::ReCreateAuxiliaryToolbar()
...
@@ -548,6 +556,12 @@ void WinEDA_PcbFrame::ReCreateAuxiliaryToolbar()
wxSize
(
LISTBOX_WIDTH
+
20
,
-
1
)
);
wxSize
(
LISTBOX_WIDTH
+
20
,
-
1
)
);
m_AuxiliaryToolBar
->
AddControl
(
m_SelTrackWidthBox
);
m_AuxiliaryToolBar
->
AddControl
(
m_SelTrackWidthBox
);
m_SelTrackWidthBox_Changed
=
TRUE
;
m_SelTrackWidthBox_Changed
=
TRUE
;
m_SelClrWidthBox
=
new
WinEDAChoiceBox
(
m_AuxiliaryToolBar
,
ID_AUX_TOOLBAR_PCB_CLR_WIDTH
,
wxPoint
(
-
1
,
-
1
),
wxSize
(
LISTBOX_WIDTH
+
20
,
-
1
)
);
m_AuxiliaryToolBar
->
AddControl
(
m_SelClrWidthBox
);
m_SelClrWidthBox_Changed
=
TRUE
;
m_AuxiliaryToolBar
->
AddTool
(
ID_AUX_TOOLBAR_PCB_SELECT_AUTO_WIDTH
,
m_AuxiliaryToolBar
->
AddTool
(
ID_AUX_TOOLBAR_PCB_SELECT_AUTO_WIDTH
,
wxEmptyString
,
wxEmptyString
,
...
@@ -626,6 +640,7 @@ void WinEDA_PcbFrame::ReCreateAuxiliaryToolbar()
...
@@ -626,6 +640,7 @@ void WinEDA_PcbFrame::ReCreateAuxiliaryToolbar()
m_SelViaSizeBox_Changed
=
TRUE
;
m_SelViaSizeBox_Changed
=
TRUE
;
m_SelTrackWidthBox_Changed
=
TRUE
;
m_SelTrackWidthBox_Changed
=
TRUE
;
m_SelClrWidthBox_Changed
=
TRUE
;
ReCreateLayerBox
(
NULL
);
ReCreateLayerBox
(
NULL
);
...
...
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