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
ba04f832
Commit
ba04f832
authored
Sep 22, 2007
by
CHARRAS
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
small change on hotkey management. Added: drag component
parent
3e3ae892
Changes
15
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
814 additions
and
670 deletions
+814
-670
change_log.txt
change_log.txt
+12
-0
common_plotPS_functions.cpp
common/common_plotPS_functions.cpp
+5
-4
dcsvg.cpp
common/dcsvg.cpp
+530
-417
hotkeys_basic.cpp
common/hotkeys_basic.cpp
+156
-151
cvpcb.h
cvpcb/cvpcb.h
+1
-1
hotkeys.cpp
eeschema/hotkeys.cpp
+51
-47
hotkeys.h
eeschema/hotkeys.h
+1
-0
onrightclick.cpp
eeschema/onrightclick.cpp
+3
-0
schedit.cpp
eeschema/schedit.cpp
+11
-4
hotkeys.cpp
gerbview/hotkeys.cpp
+3
-2
build_version.h
include/build_version.h
+1
-1
hotkeys_basic.h
include/hotkeys_basic.h
+18
-17
id.h
include/id.h
+1
-1
libs.linux
libs.linux
+9
-16
hotkeys.cpp
pcbnew/hotkeys.cpp
+12
-9
No files found.
change_log.txt
View file @
ba04f832
...
...
@@ -4,6 +4,18 @@ Started 2007-June-11
Please add newer entries at the top, list the date and your name with
email address.
2007-sept-22 UPDATE Jean-Pierre Charras <jean-pierre.charras@inpg.fr>
================================================================================
+ all
* small change in hotkeys handling
(Ki_HotkeyInfo: new member m_IdMenuEvent to call an existing event handler from a hotkey list)
+ eeschema:
* added drag component in pop up menu and hotkeys
* plot svg format: incorrect arc draw fixed
2007-Sep-22 UPDATE Dick Hollenbeck <dick@softplc.com>
================================================================================
+ pcbnew
...
...
common/common_plotPS_functions.cpp
View file @
ba04f832
...
...
@@ -166,10 +166,11 @@ char Line[256];
void
PlotPolyPS
(
int
nb_segm
,
int
*
coord
,
int
fill
,
int
width
)
/*****************************************************************/
/* Trace un polygone ( ferme si rempli ) en format POSTSCRIPT
* coord = tableau des coord des sommets
* nb_segm = nombre de coord ( 1 coord = 2 elements: X et Y du tableau )
* fill : si != 0 polygone rempli
/* Draw a polygon ( a filled polygon if fill == 1 ) in POSTSCRIPT format
* @param nb_segm = corner count
* @param coord = corner list (a corner uses 2 int = X coordinate followed by Y coordinate
* @param fill :if == 0 : filled polygon
* @param width = line width
*/
{
int
ii
;
...
...
common/dcsvg.cpp
View file @
ba04f832
This diff is collapsed.
Click to expand it.
common/hotkeys_basic.cpp
View file @
ba04f832
...
...
@@ -18,11 +18,12 @@
* This class allows the real key code changed by user from a key code list file
*/
Ki_HotkeyInfo
::
Ki_HotkeyInfo
(
const
wxChar
*
infomsg
,
int
idcommand
,
int
keycode
)
Ki_HotkeyInfo
::
Ki_HotkeyInfo
(
const
wxChar
*
infomsg
,
int
idcommand
,
int
keycode
,
int
idmenuevent
)
{
m_KeyCode
=
keycode
;
// Key code (ascii value for ascii keys or wxWidgets code for function key
m_InfoMsg
=
infomsg
;
// info message.
m_Idcommand
=
idcommand
;
// internal id for the corresponding command (see hotkey_id_commnand list)
m_IdMenuEvent
=
idmenuevent
;
// id to call the corresponding event (if any) (see id.h)
}
...
...
@@ -315,25 +316,25 @@ void DisplayHotkeyList( WinEDA_DrawFrame* frame, struct Ki_HotkeyInfoSectionDesc
}
/******************************************************************/
int
GetCommandCode
FromHotkey
(
int
key
,
Ki_HotkeyInfo
**
List
)
/******************************************************************/
/******************************************************************
******
/
Ki_HotkeyInfo
*
GetDescriptor
FromHotkey
(
int
key
,
Ki_HotkeyInfo
**
List
)
/******************************************************************
*****
/
/*
* Return a
n id identifi
er fron a key code for OnHotKey() function
* Return a
Ki_HotkeyInfo * point
er fron a key code for OnHotKey() function
* @param key = key code (ascii value, or wxWidgets value for function keys
* @param List = pointer to a Ki_HotkeyInfo list of commands
* @return the corresponding
function identifi
er from the Ki_HotkeyInfo List
* @return the corresponding
Ki_HotkeyInfo * point
er from the Ki_HotkeyInfo List
*/
{
for
(
;
*
List
!=
NULL
;
List
++
)
{
Ki_HotkeyInfo
*
hk_decr
=
*
List
;
if
(
hk_decr
->
m_KeyCode
==
key
)
return
hk_decr
->
m_Idcommand
;
return
hk_decr
;
}
return
0
;
return
NULL
;
}
...
...
@@ -607,7 +608,8 @@ void AddHotkeyConfigMenu( wxMenu* menu )
return
;
item
=
new
wxMenuItem
(
menu
,
ID_PREFERENCES_CREATE_CONFIG_HOTKEYS
,
_
(
"Create Hotkey config file"
),
_
(
"Create or Recreate the hotkey config file from current hotkey list"
)
);
_
(
"Create or Recreate the hotkey config file from current hotkey list"
)
);
item
->
SetBitmap
(
save_setup_xpm
);
menu
->
Append
(
item
);
item
=
new
wxMenuItem
(
menu
,
ID_PREFERENCES_READ_CONFIG_HOTKEYS
,
...
...
@@ -637,45 +639,49 @@ void AddHotkeyConfigMenu( wxMenu* menu )
ADD_MENUITEM_WITH_HELP_AND_SUBMENU
(
menu
,
submenu_hkcfg
,
-
1
,
_
(
"Hotkey config location"
),
_
(
"Hotkey config file location selection (home directory or kicad tree)"
),
_
(
"Hotkey config file location selection (home directory or kicad tree)"
),
right_xpm
);
submenu_hkcfg
->
Check
(
ID_PREFERENCES_HOTKEY_PATH_IS_HOME
,
g_ConfigFileLocationChoice
==
0
);
submenu_hkcfg
->
Check
(
ID_PREFERENCES_HOTKEY_PATH_IS_KICAD
,
g_ConfigFileLocationChoice
==
1
);
submenu_hkcfg
->
Check
(
ID_PREFERENCES_HOTKEY_PATH_IS_HOME
,
g_ConfigFileLocationChoice
==
0
);
submenu_hkcfg
->
Check
(
ID_PREFERENCES_HOTKEY_PATH_IS_KICAD
,
g_ConfigFileLocationChoice
==
1
);
}
/************************************************************************/
void
HandleHotkeyConfigMenuSelection
(
WinEDA_DrawFrame
*
frame
,
int
id
)
void
HandleHotkeyConfigMenuSelection
(
WinEDA_DrawFrame
*
frame
,
int
id
)
/************************************************************************/
/* called on hotkey file location selecton menu
* @param frame = current WinEDA_DrawFrame
* @param id = selected menu id
* @return g_ConfigFileLocationChoice (global) = new selection
*/
* @param frame = current WinEDA_DrawFrame
* @param id = selected menu id
* @return g_ConfigFileLocationChoice (global) = new selection
*/
{
wxMenuBar
*
menu
=
frame
->
GetMenuBar
();
wxMenuBar
*
menu
=
frame
->
GetMenuBar
();
switch
(
id
)
switch
(
id
)
{
case
ID_PREFERENCES_HOTKEY_PATH_IS_HOME
:
if
(
g_ConfigFileLocationChoice
!=
0
)
if
(
g_ConfigFileLocationChoice
!=
0
)
{
g_ConfigFileLocationChoice
=
0
;
menu
->
Check
(
ID_PREFERENCES_HOTKEY_PATH_IS_HOME
,
true
);
menu
->
Check
(
ID_PREFERENCES_HOTKEY_PATH_IS_KICAD
,
false
);
frame
->
m_Parent
->
m_EDA_CommonConfig
->
Write
(
HOTKEY_CFG_PATH_OPT
,
g_ConfigFileLocationChoice
);
menu
->
Check
(
ID_PREFERENCES_HOTKEY_PATH_IS_HOME
,
true
);
menu
->
Check
(
ID_PREFERENCES_HOTKEY_PATH_IS_KICAD
,
false
);
frame
->
m_Parent
->
m_EDA_CommonConfig
->
Write
(
HOTKEY_CFG_PATH_OPT
,
g_ConfigFileLocationChoice
);
}
break
;
case
ID_PREFERENCES_HOTKEY_PATH_IS_KICAD
:
if
(
g_ConfigFileLocationChoice
!=
1
)
if
(
g_ConfigFileLocationChoice
!=
1
)
{
g_ConfigFileLocationChoice
=
1
;
menu
->
Check
(
ID_PREFERENCES_HOTKEY_PATH_IS_HOME
,
false
);
menu
->
Check
(
ID_PREFERENCES_HOTKEY_PATH_IS_KICAD
,
true
);
frame
->
m_Parent
->
m_EDA_CommonConfig
->
Write
(
HOTKEY_CFG_PATH_OPT
,
g_ConfigFileLocationChoice
);
menu
->
Check
(
ID_PREFERENCES_HOTKEY_PATH_IS_HOME
,
false
);
menu
->
Check
(
ID_PREFERENCES_HOTKEY_PATH_IS_KICAD
,
true
);
frame
->
m_Parent
->
m_EDA_CommonConfig
->
Write
(
HOTKEY_CFG_PATH_OPT
,
g_ConfigFileLocationChoice
);
}
break
;
...
...
@@ -683,4 +689,3 @@ wxMenuBar * menu = frame->GetMenuBar();
break
;
}
}
cvpcb/cvpcb.h
View file @
ba04f832
...
...
@@ -15,7 +15,7 @@
#include "colors.h"
// Define print format d to display a schematic component line
#define CMP_FORMAT wxT("%3d %
+8s - %+
16s : %-.32s")
#define CMP_FORMAT wxT("%3d %
8s - %
16s : %-.32s")
#define FILTERFOOTPRINTKEY "FilterFootprint"
...
...
eeschema/hotkeys.cpp
View file @
ba04f832
...
...
@@ -27,7 +27,7 @@
* add the HkMyNewEntry pointer in the s_Schematic_Hotkey_List list or the s_LibEdit_Hotkey_List list
* ( or s_Common_Hotkey_List if the same command is added both in eeschema and libedit)
* Add the new code in the switch in OnHotKey() function.
* when the variable
PopupOn
is true, an item is currently edited.
* when the variable
ItemInEdit
is true, an item is currently edited.
* This can be usefull if the new function cannot be executed while an item is currently being edited
* ( For example, one cannot start a new wire when a component is moving.)
*
...
...
@@ -48,8 +48,8 @@ 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
HkHelp
(
wxT
(
"Help: this message"
),
HK_HELP
,
'?'
);
static
Ki_HotkeyInfo
HkResetLocalCoord
(
wxT
(
"Reset local coord."
),
HK_RESET_LOCAL_COORD
,
' '
);
static
Ki_HotkeyInfo
HkUndo
(
wxT
(
"Undo"
),
HK_UNDO
,
GR_KB_CTRL
+
'Z'
);
static
Ki_HotkeyInfo
HkRedo
(
wxT
(
"Redo"
),
HK_REDO
,
GR_KB_CTRL
+
'Y'
);
static
Ki_HotkeyInfo
HkUndo
(
wxT
(
"Undo"
),
HK_UNDO
,
GR_KB_CTRL
+
'Z'
,
(
int
)
ID_SCHEMATIC_UNDO
);
static
Ki_HotkeyInfo
HkRedo
(
wxT
(
"Redo"
),
HK_REDO
,
GR_KB_CTRL
+
'Y'
,
(
int
)
ID_SCHEMATIC_REDO
);
// Schematic editor
static
Ki_HotkeyInfo
HkBeginWire
(
wxT
(
"begin Wire"
),
HK_BEGIN_WIRE
,
'W'
);
...
...
@@ -62,7 +62,8 @@ static Ki_HotkeyInfo HkOrientNormalComponent( wxT(
"Orient Normal Component"
),
HK_ORIENT_NORMAL_COMPONENT
,
'N'
);
static
Ki_HotkeyInfo
HkRotateComponent
(
wxT
(
"Rotate Component"
),
HK_ROTATE_COMPONENT
,
'R'
);
static
Ki_HotkeyInfo
HkMoveComponent
(
wxT
(
"Move Component"
),
HK_MOVE_COMPONENT
,
'M'
);
static
Ki_HotkeyInfo
HkMoveComponent
(
wxT
(
"Move Component"
),
HK_MOVE_COMPONENT
,
'M'
,
ID_POPUP_SCH_MOVE_CMP_REQUEST
);
static
Ki_HotkeyInfo
HkDragComponent
(
wxT
(
"Drag Component"
),
HK_DRAG_COMPONENT
,
'G'
,
ID_POPUP_SCH_DRAG_CMP_REQUEST
);
static
Ki_HotkeyInfo
HkMove2Drag
(
wxT
(
"Switch move block to drag block"
),
HK_MOVEBLOCK_TO_DRAGBLOCK
,
'\t'
);
...
...
@@ -88,7 +89,7 @@ Ki_HotkeyInfo* s_Common_Hotkey_List[] =
Ki_HotkeyInfo
*
s_Schematic_Hotkey_List
[]
=
{
&
HkNextSearch
,
&
HkDelete
,
&
HkInsert
,
&
HkMove2Drag
,
&
HkMoveComponent
,
&
HkAddComponent
,
&
HkMoveComponent
,
&
Hk
DragComponent
,
&
Hk
AddComponent
,
&
HkRotateComponent
,
&
HkMirrorXComponent
,
&
HkMirrorYComponent
,
&
HkOrientNormalComponent
,
&
HkBeginWire
,
NULL
...
...
@@ -135,7 +136,7 @@ void WinEDA_SchematicFrame::OnHotKey( wxDC* DC, int hotkey,
* Commands are case insensitive
*/
{
bool
PopupOn
=
m_CurrentScreen
->
GetCurItem
()
bool
ItemInEdit
=
m_CurrentScreen
->
GetCurItem
()
&&
m_CurrentScreen
->
GetCurItem
()
->
m_Flags
;
bool
RefreshToolBar
=
FALSE
;
// We must refresh tool bar when the undo/redo tool state is modified
...
...
@@ -152,11 +153,12 @@ void WinEDA_SchematicFrame::OnHotKey( wxDC* DC, int hotkey,
hotkey
+=
'A'
-
'a'
;
// Search command from key :
int
CommandCode
=
GetCommandCodeFromHotkey
(
hotkey
,
s_Common_Hotkey_List
);
if
(
CommandCode
==
HK_NOT_FOUND
)
CommandCode
=
GetCommandCodeFromHotkey
(
hotkey
,
s_Schematic_Hotkey_List
);
Ki_HotkeyInfo
*
HK_Descr
=
GetDescriptorFromHotkey
(
hotkey
,
s_Common_Hotkey_List
);
if
(
HK_Descr
==
NULL
)
HK_Descr
=
GetDescriptorFromHotkey
(
hotkey
,
s_Schematic_Hotkey_List
);
if
(
HK_Descr
==
NULL
)
return
;
switch
(
CommandCode
)
switch
(
HK_Descr
->
m_Idcommand
)
{
default
:
case
HK_NOT_FOUND
:
...
...
@@ -188,16 +190,13 @@ void WinEDA_SchematicFrame::OnHotKey( wxDC* DC, int hotkey,
break
;
case
HK_UNDO
:
{
wxCommandEvent
event
(
wxEVT_COMMAND_TOOL_CLICKED
,
ID_SCHEMATIC_UNDO
);
wxPostEvent
(
this
,
event
);
}
break
;
case
HK_REDO
:
if
(
ItemInEdit
)
break
;
{
wxCommandEvent
event
(
wxEVT_COMMAND_TOOL_CLICKED
,
ID_SCHEMATIC_REDO
);
wxPostEvent
(
this
,
event
);
wxCommandEvent
event
(
wxEVT_COMMAND_TOOL_CLICKED
,
HK_Descr
->
m_IdMenuEvent
);
wxPostEvent
(
this
,
event
);
}
break
;
...
...
@@ -206,7 +205,7 @@ void WinEDA_SchematicFrame::OnHotKey( wxDC* DC, int hotkey,
break
;
case
HK_DELETE
:
if
(
PopupOn
)
if
(
ItemInEdit
)
break
;
RefreshToolBar
=
LocateAndDeleteItem
(
this
,
DC
);
m_CurrentScreen
->
SetModify
();
...
...
@@ -215,15 +214,17 @@ void WinEDA_SchematicFrame::OnHotKey( wxDC* DC, int hotkey,
break
;
case
HK_REPEAT_LAST
:
if
(
ItemInEdit
)
break
;
if
(
g_ItemToRepeat
&&
(
g_ItemToRepeat
->
m_Flags
==
0
)
)
{
RepeatDrawItem
(
DC
);
}
else
wxBell
();
break
;
case
HK_NEXT_SEARCH
:
if
(
ItemInEdit
)
break
;
if
(
g_LastSearchIsMarker
)
WinEDA_SchematicFrame
::
FindMarker
(
1
);
else
...
...
@@ -231,7 +232,7 @@ void WinEDA_SchematicFrame::OnHotKey( wxDC* DC, int hotkey,
break
;
case
HK_ADD_NEW_COMPONENT
:
// Add component
if
(
DrawStruct
&&
DrawStruct
->
m_Flags
)
if
(
ItemInEdit
)
break
;
// switch to m_ID_current_state = ID_COMPONENT_BUTT;
...
...
@@ -351,15 +352,18 @@ void WinEDA_SchematicFrame::OnHotKey( wxDC* DC, int hotkey,
}
break
;
case
HK_DRAG_COMPONENT
:
// Start drag Component
case
HK_MOVE_COMPONENT
:
// Start move Component
if
(
PopupOn
)
if
(
ItemInEdit
)
break
;
if
(
DrawStruct
==
NULL
)
DrawStruct
=
LocateSmallestComponent
(
GetScreen
()
);
if
(
DrawStruct
&&
(
DrawStruct
->
m_Flags
==
0
)
)
{
m_CurrentScreen
->
SetCurItem
(
DrawStruct
);
Process_Move_Item
(
m_CurrentScreen
->
GetCurItem
(),
DC
);
wxCommandEvent
event
(
wxEVT_COMMAND_TOOL_CLICKED
,
HK_Descr
->
m_IdMenuEvent
);
wxPostEvent
(
this
,
event
);
}
break
;
}
...
...
@@ -378,6 +382,8 @@ void WinEDA_LibeditFrame::OnHotKey( wxDC* DC, int hotkey,
* Commands are case insensitive
*/
{
bool
ItemInEdit
=
m_CurrentScreen
->
GetCurItem
()
&&
m_CurrentScreen
->
GetCurItem
()
->
m_Flags
;
bool
RefreshToolBar
=
FALSE
;
// We must refresh tool bar when the undo/redo tool state is modified
if
(
hotkey
==
0
)
...
...
@@ -391,11 +397,12 @@ void WinEDA_LibeditFrame::OnHotKey( wxDC* DC, int hotkey,
/* Convert lower to upper case (the usual toupper function has problem with non ascii codes like function keys */
if
(
(
hotkey
>=
'a'
)
&&
(
hotkey
<=
'z'
)
)
hotkey
+=
'A'
-
'a'
;
int
CommandCode
=
GetCommandCodeFromHotkey
(
hotkey
,
s_Common_Hotkey_List
);
if
(
CommandCode
==
HK_NOT_FOUND
)
CommandCode
=
GetCommandCodeFromHotkey
(
hotkey
,
s_LibEdit_Hotkey_List
);
Ki_HotkeyInfo
*
HK_Descr
=
GetDescriptorFromHotkey
(
hotkey
,
s_Common_Hotkey_List
);
if
(
HK_Descr
==
NULL
)
HK_Descr
=
GetDescriptorFromHotkey
(
hotkey
,
s_LibEdit_Hotkey_List
);
if
(
HK_Descr
==
NULL
)
return
;
switch
(
CommandCode
)
switch
(
HK_Descr
->
m_Idcommand
)
{
default
:
case
HK_NOT_FOUND
:
...
...
@@ -427,16 +434,13 @@ void WinEDA_LibeditFrame::OnHotKey( wxDC* DC, int hotkey,
break
;
case
HK_UNDO
:
{
wxCommandEvent
event
(
wxEVT_COMMAND_TOOL_CLICKED
,
ID_LIBEDIT_UNDO
);
wxPostEvent
(
this
,
event
);
}
break
;
case
HK_REDO
:
if
(
ItemInEdit
)
break
;
{
wxCommandEvent
event
(
wxEVT_COMMAND_TOOL_CLICKED
,
ID_LIBEDIT_REDO
);
wxPostEvent
(
this
,
event
);
wxCommandEvent
event
(
wxEVT_COMMAND_TOOL_CLICKED
,
HK_Descr
->
m_IdMenuEvent
);
wxPostEvent
(
this
,
event
);
}
break
;
...
...
eeschema/hotkeys.h
View file @
ba04f832
...
...
@@ -25,6 +25,7 @@ enum hotkey_id_commnand {
HK_MIRROR_Y_COMPONENT
,
HK_ORIENT_NORMAL_COMPONENT
,
HK_MOVE_COMPONENT
,
HK_DRAG_COMPONENT
,
HK_ADD_NEW_COMPONENT
,
HK_BEGIN_WIRE
};
...
...
eeschema/onrightclick.cpp
View file @
ba04f832
...
...
@@ -284,6 +284,9 @@ void AddMenusForComponent( wxMenu* PopMenu, EDA_SchComponentStruct* Component )
msg
=
AddHotkeyName
(
_
(
"Move Component"
),
s_Schematic_Hokeys_Descr
,
HK_MOVE_COMPONENT
);
ADD_MENUITEM
(
PopMenu
,
ID_POPUP_SCH_MOVE_CMP_REQUEST
,
msg
,
move_xpm
);
msg
=
AddHotkeyName
(
_
(
"Drag Component"
),
s_Schematic_Hokeys_Descr
,
HK_DRAG_COMPONENT
);
ADD_MENUITEM
(
PopMenu
,
ID_POPUP_SCH_DRAG_CMP_REQUEST
,
msg
,
move_xpm
);
}
// add menu orient et sous menu:
...
...
eeschema/schedit.cpp
View file @
ba04f832
...
...
@@ -53,6 +53,7 @@ void WinEDA_SchematicFrame::Process_Special_Functions( wxCommandEvent& event )
case
ID_POPUP_SCH_MOVE_PINSHEET
:
case
ID_POPUP_SCH_MOVE_ITEM_REQUEST
:
case
ID_POPUP_SCH_MOVE_CMP_REQUEST
:
case
ID_POPUP_SCH_DRAG_CMP_REQUEST
:
case
ID_POPUP_SCH_EDIT_CMP
:
case
ID_POPUP_SCH_MIROR_X_CMP
:
case
ID_POPUP_SCH_MIROR_Y_CMP
:
...
...
@@ -486,21 +487,27 @@ void WinEDA_SchematicFrame::Process_Special_Functions( wxCommandEvent& event )
m_CurrentScreen
->
GetCurItem
(),
&
dc
);
break
;
case
ID_POPUP_SCH_DRAG_CMP_REQUEST
:
case
ID_POPUP_SCH_MOVE_CMP_REQUEST
:
// Ensure the struct is a component (could be a struct of a component, like Field, text..)
if
(
m_CurrentScreen
->
GetCurItem
()
->
Type
()
!=
DRAW_LIB_ITEM_STRUCT_TYPE
)
m_CurrentScreen
->
SetCurItem
(
LocateSmallestComponent
(
GetScreen
()
)
);
if
(
m_CurrentScreen
->
GetCurItem
()
==
NULL
)
break
;
case
ID_POPUP_SCH_MOVE_ITEM_REQUEST
:
DrawPanel
->
MouseToCursorSchema
();
Process_Move_Item
(
m_CurrentScreen
->
GetCurItem
(),
&
dc
);
if
(
id
==
ID_POPUP_SCH_DRAG_CMP_REQUEST
)
{
// The easiest way to handle a drag component is simulate a block drag command
if
(
GetScreen
()
->
BlockLocate
.
m_State
==
STATE_NO_BLOCK
)
{
if
(
!
HandleBlockBegin
(
&
dc
,
BLOCK_DRAG
,
GetScreen
()
->
m_Curseur
)
)
break
;
HandleBlockEnd
(
&
dc
);
}
}
else
Process_Move_Item
(
m_CurrentScreen
->
GetCurItem
(),
&
dc
);
break
;
case
ID_POPUP_SCH_EDIT_CMP
:
// Ensure the struct is a component (could be a struct of a component, like Field, text..)
if
(
m_CurrentScreen
->
GetCurItem
()
->
Type
()
!=
DRAW_LIB_ITEM_STRUCT_TYPE
)
m_CurrentScreen
->
SetCurItem
(
LocateSmallestComponent
(
GetScreen
()
)
);
...
...
gerbview/hotkeys.cpp
View file @
ba04f832
...
...
@@ -91,9 +91,10 @@ void WinEDA_GerberFrame::OnHotKey( wxDC* DC, int hotkey,
if
(
(
hotkey
>=
'a'
)
&&
(
hotkey
<=
'z'
)
)
hotkey
+=
'A'
-
'a'
;
int
CommandCode
=
GetCommandCodeFromHotkey
(
hotkey
,
s_Gerbview_Hotkey_List
);
Ki_HotkeyInfo
*
HK_Descr
=
GetDescriptorFromHotkey
(
hotkey
,
s_Gerbview_Hotkey_List
);
if
(
HK_Descr
==
NULL
)
return
;
switch
(
CommandCode
)
switch
(
HK_Descr
->
m_Idcommand
)
{
default
:
case
HK_NOT_FOUND
:
...
...
include/build_version.h
View file @
ba04f832
...
...
@@ -5,7 +5,7 @@
COMMON_GLOBL
wxString
g_BuildVersion
#ifdef EDA_BASE
(
wxT
(
"(2007-09-
19
)"
))
(
wxT
(
"(2007-09-
22
)"
))
#endif
;
...
...
include/hotkeys_basic.h
View file @
ba04f832
...
...
@@ -19,7 +19,7 @@
#define DEFAULT_HOTKEY_FILENAME_PATH_IS_KICAD EDA_Appl->m_BinDir + wxT( "../template/" )
/* 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"
)
/* Class to handle hotkey commnands. hotkeys have a default value
...
...
@@ -31,9 +31,10 @@ public:
int
m_KeyCode
;
// Key code (ascii value for ascii keys or wxWidgets code for function key
wxString
m_InfoMsg
;
// info message.
int
m_Idcommand
;
// internal id for the corresponding command (see hotkey_id_commnand list)
int
m_IdMenuEvent
;
// id to call the corresponding event (if any) (see id.h)
public
:
Ki_HotkeyInfo
(
const
wxChar
*
infomsg
,
int
idcommand
,
int
keycode
);
Ki_HotkeyInfo
(
const
wxChar
*
infomsg
,
int
idcommand
,
int
keycode
,
int
idmenuevent
=
0
);
};
/* handle a Section name and the corresponding list of hotkeys (Ki_HotkeyInfo list)
...
...
@@ -92,7 +93,7 @@ COMMON_GLOBL int g_ConfigFileLocationChoice; /* 0 = files are in Home directo
*/
wxString
ReturnHotkeyConfigFilePath
(
int
choice
);
void
AddHotkeyConfigMenu
(
wxMenu
*
menu
);
void
HandleHotkeyConfigMenuSelection
(
WinEDA_DrawFrame
*
frame
,
int
id
);
void
HandleHotkeyConfigMenuSelection
(
WinEDA_DrawFrame
*
frame
,
int
id
);
wxString
ReturnKeyNameFromKeyCode
(
int
keycode
);
wxString
ReturnKeyNameFromCommandId
(
Ki_HotkeyInfo
**
List
,
int
CommandId
);
wxString
AddHotkeyName
(
const
wxString
&
text
,
Ki_HotkeyInfo
**
List
,
int
CommandId
);
...
...
@@ -101,7 +102,7 @@ wxString AddHotkeyName( const wxString& text,
int
CommandId
);
void
DisplayHotkeyList
(
WinEDA_DrawFrame
*
frame
,
struct
Ki_HotkeyInfoSectionDescriptor
*
List
);
int
GetCommandCode
FromHotkey
(
int
key
,
Ki_HotkeyInfo
**
List
);
Ki_HotkeyInfo
*
GetDescriptor
FromHotkey
(
int
key
,
Ki_HotkeyInfo
**
List
);
#endif // HOTKEYS_BASIC_H
include/id.h
View file @
ba04f832
...
...
@@ -282,7 +282,7 @@ enum main_id {
ID_POPUP_SCH_DELETE_NODE
,
ID_POPUP_SCH_MOVE_CMP_REQUEST
,
ID_POPUP_SCH_DELETE_CMP
,
ID_POPUP_SCH_
UNUSED_0
,
ID_POPUP_SCH_
DRAG_CMP_REQUEST
,
ID_POPUP_SCH_UNUSED_1
,
ID_POPUP_SCH_UNUSED_2
,
ID_POPUP_SCH_ENTRY_SELECT_SLASH
,
...
...
libs.linux
View file @
ba04f832
...
...
@@ -25,9 +25,9 @@ KICAD_TEMPLATE=$(KICAD_DATA)/template
else
# used by myself (JP Charras) to build a statically linked distribution intalled in /usr/local (with STD_INSTALL = 0)
PREFIX = /usr/local/
linux
KICAD_BIN = $(PREFIX)/
bin
KICAD_PLUGINS = $(
PREFIX)/linux
/plugins
PREFIX = /usr/local/
kicad
KICAD_BIN = $(PREFIX)/
linux
KICAD_PLUGINS = $(
KICAD_BIN)
/plugins
KICAD_DOCS=$(PREFIX)/help
KICAD_DATA=$(PREFIX)
KICAD_MODULES=$(KICAD_DATA)/modules
...
...
@@ -121,12 +121,15 @@ ifeq ($(KICAD_STATIC_LINK), 1)
LIBS3D = $(WXPATH)/$(PREFIX_WX_LIBS)$(SUFFIX_WX_LIBGL)\
$(MESALIBSPATH)/libGL.a $(MESALIBSPATH)/libGLU.a
AUXLIB = -lXxf86vm
#AUXLIB = /usr/X11R6/lib/libXinerama.a
WXSYSLIB= $(WXPATH)/$(PREFIX_WX_LIBS)-$(LIBVERSION).a \
$(WXPATH)/libwxpng-$(LIBVERSION).a\
$(WXPATH)/libwxjpeg-$(LIBVERSION).a\
$(WXPATH)/libwxzlib-$(LIBVERSION).a\
$(LIBREGEX)\
/usr/X11R6/lib/libXinerama.a
\
$(AUXLIB)
\
-lgtk-x11-2.0 -lgdk-x11-2.0 \
-latk-1.0 -lgdk_pixbuf-2.0 -lm -lpangoxft-1.0 -lpangox-1.0 -lgthread-2.0\
-lpango-1.0 -lgobject-2.0 -lgmodule-2.0 -ldl\
...
...
@@ -134,18 +137,8 @@ WXSYSLIB= $(WXPATH)/$(PREFIX_WX_LIBS)-$(LIBVERSION).a \
-L/usr/lib $(PYLIBS)
WXSYSLIB_WITH_GL= $(WXPATH)/$(PREFIX_WX_LIBS)-$(LIBVERSION).a \
$(WXPATH)/libwxpng-$(LIBVERSION).a\
$(WXPATH)/libwxjpeg-$(LIBVERSION).a\
$(WXPATH)/libwxzlib-$(LIBVERSION).a\
$(LIBS3D)\
/usr/X11R6/lib/libXinerama.a \
/usr/X11R6/lib/libXxf86vm.a \
-lgtk-x11-2.0 -lgdk-x11-2.0 \
-latk-1.0 -lgdk_pixbuf-2.0 -lm -lpangoxft-1.0 -lpangox-1.0 -lgthread-2.0\
-lpango-1.0 -lgobject-2.0 -lgmodule-2.0 -ldl\
-lglib-2.0 -lpangoft2-1.0 -lSM\
-L/usr/lib $(PYLIBS)
WXSYSLIB_WITH_GL= $(WXSYSLIB) $(LIBS3D)
else
ifeq ($(DEBUG), 1)
...
...
pcbnew/hotkeys.cpp
View file @
ba04f832
...
...
@@ -186,12 +186,14 @@ void WinEDA_PcbFrame::OnHotKey( wxDC* DC, int hotkey,
if
(
(
hotkey
>=
'a'
)
&&
(
hotkey
<=
'z'
)
)
hotkey
+=
'A'
-
'a'
;
int
CommandCode
=
GetCommandCodeFromHotkey
(
hotkey
,
s_Common_Hotkey_List
);
if
(
CommandCode
==
HK_NOT_FOUND
)
CommandCode
=
GetCommandCodeFromHotkey
(
hotkey
,
s_board_edit_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
)
return
;
int
ll
;
switch
(
CommandCode
)
switch
(
HK_Descr
->
m_Idcommand
)
{
default
:
case
HK_NOT_FOUND
:
...
...
@@ -465,7 +467,7 @@ void WinEDA_PcbFrame::OnHotKey( wxDC* DC, int hotkey,
SetCurItem
(
module
);
}
switch
(
CommandCode
)
switch
(
HK_Descr
->
m_Idcommand
)
{
case
HK_ROTATE_FOOTPRINT
:
// Rotation
Rotate_Module
(
DC
,
module
,
900
,
TRUE
);
...
...
@@ -506,11 +508,12 @@ void WinEDA_ModuleEditFrame::OnHotKey( wxDC* DC, int hotkey,
if
(
(
hotkey
>=
'a'
)
&&
(
hotkey
<=
'z'
)
)
hotkey
+=
'A'
-
'a'
;
int
CommandCode
=
GetCommandCodeFromHotkey
(
hotkey
,
s_Common_Hotkey_List
);
if
(
CommandCode
==
HK_NOT_FOUND
)
CommandCode
=
GetCommandCodeFromHotkey
(
hotkey
,
s_module_edit_Hotkey_List
);
Ki_HotkeyInfo
*
HK_Descr
=
GetDescriptorFromHotkey
(
hotkey
,
s_Common_Hotkey_List
);
if
(
HK_Descr
==
NULL
)
HK_Descr
=
GetDescriptorFromHotkey
(
hotkey
,
s_module_edit_Hotkey_List
);
if
(
HK_Descr
==
NULL
)
return
;
switch
(
CommandCode
)
switch
(
HK_Descr
->
m_Idcommand
)
{
default
:
case
HK_NOT_FOUND
:
...
...
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