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
73f83c05
Commit
73f83c05
authored
Jan 17, 2010
by
jerryjacobs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
See CHANGELOG.txt
parent
bf02bc4d
Changes
17
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
783 additions
and
128 deletions
+783
-128
CHANGELOG.txt
CHANGELOG.txt
+10
-0
eeschema_id.h
eeschema/eeschema_id.h
+1
-0
hotkeys.cpp
eeschema/hotkeys.cpp
+137
-74
hotkeys.h
eeschema/hotkeys.h
+3
-2
libedit_onrightclick.cpp
eeschema/libedit_onrightclick.cpp
+3
-0
libeditfrm.h
eeschema/libeditfrm.h
+1
-0
libframe.cpp
eeschema/libframe.cpp
+2
-0
locate.cpp
eeschema/locate.cpp
+6
-0
menubar.cpp
eeschema/menubar.cpp
+14
-9
onrightclick.cpp
eeschema/onrightclick.cpp
+60
-20
pinedit.cpp
eeschema/pinedit.cpp
+32
-0
CMakeLists.txt
pcbnew/CMakeLists.txt
+2
-2
dialog_display_options.cpp
pcbnew/dialog_display_options.cpp
+1
-15
dialog_display_options.h
pcbnew/dialog_display_options.h
+20
-0
hotkeys.h
pcbnew/hotkeys.h
+7
-6
menubar_modedit.cpp
pcbnew/menubar_modedit.cpp
+0
-0
menubar_pcbframe.cpp
pcbnew/menubar_pcbframe.cpp
+484
-0
No files found.
CHANGELOG.txt
View file @
73f83c05
...
@@ -4,6 +4,16 @@ KiCad ChangeLog 2010
...
@@ -4,6 +4,16 @@ KiCad ChangeLog 2010
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.
2010-Jan-17 UPDATE Jerry Jacobs <xor.gate.engineering[at]gmail[dot]com>
================================================================================
+ EESchema
+ Added Torsten Huter's patch for hotkeys
+ Moved recent opened documents to submenu
+ Pcbnew
+ Big (re)organisation of pcbframe menubar and cleanup
2010-Jan-13 UPDATE Wayne Stambaugh <stambaughw@verizon.net>
2010-Jan-13 UPDATE Wayne Stambaugh <stambaughw@verizon.net>
================================================================================
================================================================================
Minor bug fixes, compiler warning fixes and code cleaning.
Minor bug fixes, compiler warning fixes and code cleaning.
...
...
eeschema/eeschema_id.h
View file @
73f83c05
...
@@ -163,6 +163,7 @@ enum id_eeschema_frm
...
@@ -163,6 +163,7 @@ enum id_eeschema_frm
/* Library editor context menu IDs */
/* Library editor context menu IDs */
ID_LIBEDIT_EDIT_PIN
,
ID_LIBEDIT_EDIT_PIN
,
ID_LIBEDIT_ROTATE_PIN
,
ID_POPUP_LIBEDIT_PIN_GLOBAL_CHANGE_ITEM
,
ID_POPUP_LIBEDIT_PIN_GLOBAL_CHANGE_ITEM
,
ID_POPUP_LIBEDIT_PIN_GLOBAL_CHANGE_PINSIZE_ITEM
,
ID_POPUP_LIBEDIT_PIN_GLOBAL_CHANGE_PINSIZE_ITEM
,
ID_POPUP_LIBEDIT_PIN_GLOBAL_CHANGE_PINNAMESIZE_ITEM
,
ID_POPUP_LIBEDIT_PIN_GLOBAL_CHANGE_PINNAMESIZE_ITEM
,
...
...
eeschema/hotkeys.cpp
View file @
73f83c05
This diff is collapsed.
Click to expand it.
eeschema/hotkeys.h
View file @
73f83c05
...
@@ -20,18 +20,19 @@ enum hotkey_id_commnand {
...
@@ -20,18 +20,19 @@ enum hotkey_id_commnand {
HK_REPEAT_LAST
,
HK_REPEAT_LAST
,
HK_EDIT_PIN
,
HK_EDIT_PIN
,
HK_LIBEDIT_MOVE_GRAPHIC_ITEM
,
HK_LIBEDIT_MOVE_GRAPHIC_ITEM
,
HK_LIBEDIT_ROTATE_PIN
,
HK_DELETE_PIN
,
HK_DELETE_PIN
,
HK_UNDO
,
HK_UNDO
,
HK_REDO
,
HK_REDO
,
HK_MOVEBLOCK_TO_DRAGBLOCK
,
HK_MOVEBLOCK_TO_DRAGBLOCK
,
HK_ROTATE_COMPONENT_OR_
LABEL
,
HK_ROTATE_COMPONENT_OR_
ITEM
,
HK_EDIT_COMPONENT_OR_LABEL
,
HK_EDIT_COMPONENT_OR_LABEL
,
HK_EDIT_COMPONENT_VALUE
,
HK_EDIT_COMPONENT_VALUE
,
HK_EDIT_COMPONENT_FOOTPRINT
,
HK_EDIT_COMPONENT_FOOTPRINT
,
HK_MIRROR_X_COMPONENT
,
HK_MIRROR_X_COMPONENT
,
HK_MIRROR_Y_COMPONENT
,
HK_MIRROR_Y_COMPONENT
,
HK_ORIENT_NORMAL_COMPONENT
,
HK_ORIENT_NORMAL_COMPONENT
,
HK_MOVE_COMPONENT_OR_
LABEL
,
HK_MOVE_COMPONENT_OR_
ITEM
,
HK_COPY_COMPONENT_OR_LABEL
,
HK_COPY_COMPONENT_OR_LABEL
,
HK_DRAG_COMPONENT
,
HK_DRAG_COMPONENT
,
HK_ADD_NEW_COMPONENT
,
HK_ADD_NEW_COMPONENT
,
...
...
eeschema/libedit_onrightclick.cpp
View file @
73f83c05
...
@@ -239,6 +239,9 @@ void AddMenusForPin( wxMenu* PopMenu,
...
@@ -239,6 +239,9 @@ void AddMenusForPin( wxMenu* PopMenu,
msg
=
AddHotkeyName
(
_
(
"Edit Pin "
),
s_Libedit_Hokeys_Descr
,
HK_EDIT_PIN
);
msg
=
AddHotkeyName
(
_
(
"Edit Pin "
),
s_Libedit_Hokeys_Descr
,
HK_EDIT_PIN
);
ADD_MENUITEM
(
PopMenu
,
ID_LIBEDIT_EDIT_PIN
,
msg
,
edit_xpm
);
ADD_MENUITEM
(
PopMenu
,
ID_LIBEDIT_EDIT_PIN
,
msg
,
edit_xpm
);
msg
=
AddHotkeyName
(
_
(
"Rotate Pin "
),
s_Libedit_Hokeys_Descr
,
HK_LIBEDIT_ROTATE_PIN
);
ADD_MENUITEM
(
PopMenu
,
ID_LIBEDIT_ROTATE_PIN
,
msg
,
rotate_pin_xpm
);
if
(
not_in_move
)
if
(
not_in_move
)
{
{
msg
=
AddHotkeyName
(
_
(
"Delete Pin "
),
s_Libedit_Hokeys_Descr
,
msg
=
AddHotkeyName
(
_
(
"Delete Pin "
),
s_Libedit_Hokeys_Descr
,
...
...
eeschema/libeditfrm.h
View file @
73f83c05
...
@@ -54,6 +54,7 @@ public:
...
@@ -54,6 +54,7 @@ public:
void
OnCheckComponent
(
wxCommandEvent
&
event
);
void
OnCheckComponent
(
wxCommandEvent
&
event
);
void
OnSelectBodyStyle
(
wxCommandEvent
&
event
);
void
OnSelectBodyStyle
(
wxCommandEvent
&
event
);
void
OnEditPin
(
wxCommandEvent
&
event
);
void
OnEditPin
(
wxCommandEvent
&
event
);
void
OnRotatePin
(
wxCommandEvent
&
event
);
void
OnUpdateEditingPart
(
wxUpdateUIEvent
&
event
);
void
OnUpdateEditingPart
(
wxUpdateUIEvent
&
event
);
void
OnUpdateNotEditingPart
(
wxUpdateUIEvent
&
event
);
void
OnUpdateNotEditingPart
(
wxUpdateUIEvent
&
event
);
...
...
eeschema/libframe.cpp
View file @
73f83c05
...
@@ -115,6 +115,8 @@ BEGIN_EVENT_TABLE( WinEDA_LibeditFrame, WinEDA_DrawFrame )
...
@@ -115,6 +115,8 @@ BEGIN_EVENT_TABLE( WinEDA_LibeditFrame, WinEDA_DrawFrame )
/* Context menu events and commands. */
/* Context menu events and commands. */
EVT_MENU
(
ID_LIBEDIT_EDIT_PIN
,
WinEDA_LibeditFrame
::
OnEditPin
)
EVT_MENU
(
ID_LIBEDIT_EDIT_PIN
,
WinEDA_LibeditFrame
::
OnEditPin
)
EVT_MENU
(
ID_LIBEDIT_ROTATE_PIN
,
WinEDA_LibeditFrame
::
OnRotatePin
)
EVT_MENU_RANGE
(
ID_POPUP_LIBEDIT_PIN_GLOBAL_CHANGE_ITEM
,
EVT_MENU_RANGE
(
ID_POPUP_LIBEDIT_PIN_GLOBAL_CHANGE_ITEM
,
ID_POPUP_LIBEDIT_ROTATE_GRAPHIC_TEXT
,
ID_POPUP_LIBEDIT_ROTATE_GRAPHIC_TEXT
,
WinEDA_LibeditFrame
::
Process_Special_Functions
)
WinEDA_LibeditFrame
::
Process_Special_Functions
)
...
...
eeschema/locate.cpp
View file @
73f83c05
...
@@ -412,6 +412,12 @@ bool IsItemInBox( EDA_Rect& aBox, SCH_ITEM* DrawStruct )
...
@@ -412,6 +412,12 @@ bool IsItemInBox( EDA_Rect& aBox, SCH_ITEM* DrawStruct )
break
;
break
;
case
DRAW_JUNCTION_STRUCT_TYPE
:
case
DRAW_JUNCTION_STRUCT_TYPE
:
#undef STRUCT
#define STRUCT ( (SCH_JUNCTION*) DrawStruct )
if
(
aBox
.
Inside
(
STRUCT
->
m_Pos
)
)
return
true
;
break
;
case
DRAW_NOCONNECT_STRUCT_TYPE
:
case
DRAW_NOCONNECT_STRUCT_TYPE
:
case
TYPE_SCH_LABEL
:
case
TYPE_SCH_LABEL
:
case
TYPE_SCH_TEXT
:
case
TYPE_SCH_TEXT
:
...
...
eeschema/menubar.cpp
View file @
73f83c05
...
@@ -49,13 +49,12 @@ void WinEDA_SchematicFrame::ReCreateMenuBar()
...
@@ -49,13 +49,12 @@ void WinEDA_SchematicFrame::ReCreateMenuBar()
item
->
SetBitmap
(
open_xpm
);
item
->
SetBitmap
(
open_xpm
);
filesMenu
->
Append
(
item
);
filesMenu
->
Append
(
item
);
filesMenu
->
AppendSeparator
();
/* Open Recent submenu */
item
=
new
wxMenuItem
(
filesMenu
,
ID_SAVE_PROJECT
,
_
(
"&Save Project"
),
wxMenu
*
openRecentMenu
=
new
wxMenu
();
_
(
"Save all sheets in the schematic project"
)
);
wxGetApp
().
m_fileHistory
.
AddFilesToMenu
(
openRecentMenu
);
item
->
SetBitmap
(
save_project_xpm
);
filesMenu
->
AppendSubMenu
(
openRecentMenu
,
_
(
"Open &Recent"
),
filesMenu
->
Append
(
item
);
_
(
"Open a recent opened document"
)
);
filesMenu
->
AppendSeparator
();
item
=
new
wxMenuItem
(
filesMenu
,
ID_SAVE_ONE_SHEET
,
_
(
"&Save"
),
item
=
new
wxMenuItem
(
filesMenu
,
ID_SAVE_ONE_SHEET
,
_
(
"&Save"
),
_
(
"Save only current schematic sheet"
)
);
_
(
"Save only current schematic sheet"
)
);
item
->
SetBitmap
(
save_xpm
);
item
->
SetBitmap
(
save_xpm
);
...
@@ -66,8 +65,15 @@ void WinEDA_SchematicFrame::ReCreateMenuBar()
...
@@ -66,8 +65,15 @@ void WinEDA_SchematicFrame::ReCreateMenuBar()
item
->
SetBitmap
(
save_as_xpm
);
item
->
SetBitmap
(
save_as_xpm
);
filesMenu
->
Append
(
item
);
filesMenu
->
Append
(
item
);
// Print and Plot section:
filesMenu
->
AppendSeparator
();
filesMenu
->
AppendSeparator
();
item
=
new
wxMenuItem
(
filesMenu
,
ID_SAVE_PROJECT
,
_
(
"&Save Project"
),
_
(
"Save all sheets in the schematic project"
)
);
item
->
SetBitmap
(
save_project_xpm
);
filesMenu
->
Append
(
item
);
filesMenu
->
AppendSeparator
();
// Print and Plot section:
item
=
new
wxMenuItem
(
filesMenu
,
ID_GEN_PRINT
,
_
(
"P&rint"
),
item
=
new
wxMenuItem
(
filesMenu
,
ID_GEN_PRINT
,
_
(
"P&rint"
),
_
(
"Print schematic sheet"
)
);
_
(
"Print schematic sheet"
)
);
item
->
SetBitmap
(
print_button
);
item
->
SetBitmap
(
print_button
);
...
@@ -116,8 +122,7 @@ void WinEDA_SchematicFrame::ReCreateMenuBar()
...
@@ -116,8 +122,7 @@ void WinEDA_SchematicFrame::ReCreateMenuBar()
item
->
SetBitmap
(
exit_xpm
);
item
->
SetBitmap
(
exit_xpm
);
filesMenu
->
Append
(
item
);
filesMenu
->
Append
(
item
);
/* Add the file history */
wxGetApp
().
m_fileHistory
.
AddFilesToMenu
(
filesMenu
);
// Menu Edit:
// Menu Edit:
wxMenu
*
editMenu
=
new
wxMenu
;
wxMenu
*
editMenu
=
new
wxMenu
;
...
...
eeschema/onrightclick.cpp
View file @
73f83c05
...
@@ -15,6 +15,9 @@
...
@@ -15,6 +15,9 @@
#include "protos.h"
#include "protos.h"
#include "hotkeys.h"
#include "hotkeys.h"
#include "class_library.h"
#include "class_library.h"
#include <iostream>
using
namespace
std
;
static
void
AddMenusForBlock
(
wxMenu
*
PopMenu
,
WinEDA_SchematicFrame
*
frame
);
static
void
AddMenusForBlock
(
wxMenu
*
PopMenu
,
WinEDA_SchematicFrame
*
frame
);
...
@@ -57,10 +60,17 @@ bool WinEDA_SchematicFrame::OnRightClick( const wxPoint& MousePos,
...
@@ -57,10 +60,17 @@ bool WinEDA_SchematicFrame::OnRightClick( const wxPoint& MousePos,
return
true
;
return
true
;
}
}
if
(
DrawStruct
)
cout
<<
"Drawstruct Type before: "
<<
DrawStruct
->
Type
()
<<
endl
;
// Try to locate items at cursor position.
// Try to locate items at cursor position.
if
(
(
DrawStruct
==
NULL
)
||
(
DrawStruct
->
m_Flags
==
0
)
)
if
(
(
DrawStruct
==
NULL
)
||
(
DrawStruct
->
m_Flags
==
0
)
)
{
{
DrawStruct
=
SchematicGeneralLocateAndDisplay
(
false
);
DrawStruct
=
SchematicGeneralLocateAndDisplay
(
false
);
if
(
DrawStruct
)
cout
<<
"Drawstruct Type locate : "
<<
DrawStruct
->
Type
()
<<
endl
;
if
(
DrawStruct
&&
(
DrawStruct
->
Type
()
==
DRAW_SHEET_STRUCT_TYPE
)
)
if
(
DrawStruct
&&
(
DrawStruct
->
Type
()
==
DRAW_SHEET_STRUCT_TYPE
)
)
{
{
SCH_SHEET_PIN
*
slabel
;
SCH_SHEET_PIN
*
slabel
;
...
@@ -71,6 +81,9 @@ bool WinEDA_SchematicFrame::OnRightClick( const wxPoint& MousePos,
...
@@ -71,6 +81,9 @@ bool WinEDA_SchematicFrame::OnRightClick( const wxPoint& MousePos,
}
}
}
}
if
(
DrawStruct
)
cout
<<
"Drawstruct Type : "
<<
DrawStruct
->
Type
()
<<
endl
;
// If Command in progress: add "cancel" and "end tool" menu
// If Command in progress: add "cancel" and "end tool" menu
if
(
m_ID_current_state
)
if
(
m_ID_current_state
)
{
{
...
@@ -125,9 +138,13 @@ bool WinEDA_SchematicFrame::OnRightClick( const wxPoint& MousePos,
...
@@ -125,9 +138,13 @@ bool WinEDA_SchematicFrame::OnRightClick( const wxPoint& MousePos,
break
;
break
;
case
DRAW_BUSENTRY_STRUCT_TYPE
:
case
DRAW_BUSENTRY_STRUCT_TYPE
:
if
(
!
flags
)
if
(
!
flags
){
wxString
msg
=
AddHotkeyName
(
_
(
"Move Bus Entry"
),
s_Schematic_Hokeys_Descr
,
HK_MOVE_COMPONENT_OR_ITEM
);
ADD_MENUITEM
(
PopMenu
,
ID_POPUP_SCH_MOVE_ITEM_REQUEST
,
ADD_MENUITEM
(
PopMenu
,
ID_POPUP_SCH_MOVE_ITEM_REQUEST
,
_
(
"Move Bus Entry"
),
move_xpm
);
msg
,
move_xpm
);
}
if
(
GetBusEntryShape
(
(
SCH_BUS_ENTRY
*
)
DrawStruct
)
==
'\\'
)
if
(
GetBusEntryShape
(
(
SCH_BUS_ENTRY
*
)
DrawStruct
)
==
'\\'
)
PopMenu
->
Append
(
ID_POPUP_SCH_ENTRY_SELECT_SLASH
,
PopMenu
->
Append
(
ID_POPUP_SCH_ENTRY_SELECT_SLASH
,
_
(
"Set Bus Entry /"
)
);
_
(
"Set Bus Entry /"
)
);
...
@@ -229,11 +246,19 @@ DrawType %d" ),
...
@@ -229,11 +246,19 @@ DrawType %d" ),
void
AddMenusForComponentField
(
wxMenu
*
PopMenu
,
SCH_FIELD
*
Field
)
void
AddMenusForComponentField
(
wxMenu
*
PopMenu
,
SCH_FIELD
*
Field
)
{
{
if
(
!
Field
->
m_Flags
)
wxString
msg
;
if
(
!
Field
->
m_Flags
){
msg
=
AddHotkeyName
(
_
(
"Move Field"
),
s_Schematic_Hokeys_Descr
,
HK_MOVE_COMPONENT_OR_ITEM
);
ADD_MENUITEM
(
PopMenu
,
ID_POPUP_SCH_MOVE_ITEM_REQUEST
,
ADD_MENUITEM
(
PopMenu
,
ID_POPUP_SCH_MOVE_ITEM_REQUEST
,
_
(
"Move Field"
),
move_text_xpm
);
msg
,
move_text_xpm
);
}
msg
=
AddHotkeyName
(
_
(
"Rotate Field"
),
s_Schematic_Hokeys_Descr
,
HK_ROTATE_COMPONENT_OR_ITEM
);
ADD_MENUITEM
(
PopMenu
,
ID_POPUP_SCH_ROTATE_FIELD
,
ADD_MENUITEM
(
PopMenu
,
ID_POPUP_SCH_ROTATE_FIELD
,
_
(
"Rotate Field"
)
,
rotate_field_xpm
);
msg
,
rotate_field_xpm
);
ADD_MENUITEM
(
PopMenu
,
ID_POPUP_SCH_EDIT_FIELD
,
ADD_MENUITEM
(
PopMenu
,
ID_POPUP_SCH_EDIT_FIELD
,
_
(
"Edit Field"
),
edit_text_xpm
);
_
(
"Edit Field"
),
edit_text_xpm
);
}
}
...
@@ -265,7 +290,7 @@ void AddMenusForComponent( wxMenu* PopMenu, SCH_COMPONENT* Component )
...
@@ -265,7 +290,7 @@ void AddMenusForComponent( wxMenu* PopMenu, SCH_COMPONENT* Component )
{
{
msg
=
_
(
"Move Component"
);
msg
=
_
(
"Move Component"
);
msg
<<
wxT
(
" "
)
<<
Component
->
GetField
(
REFERENCE
)
->
m_Text
;
msg
<<
wxT
(
" "
)
<<
Component
->
GetField
(
REFERENCE
)
->
m_Text
;
msg
=
AddHotkeyName
(
msg
,
s_Schematic_Hokeys_Descr
,
HK_MOVE_COMPONENT_OR_
LABEL
);
msg
=
AddHotkeyName
(
msg
,
s_Schematic_Hokeys_Descr
,
HK_MOVE_COMPONENT_OR_
ITEM
);
ADD_MENUITEM
(
PopMenu
,
ID_POPUP_SCH_MOVE_CMP_REQUEST
,
ADD_MENUITEM
(
PopMenu
,
ID_POPUP_SCH_MOVE_CMP_REQUEST
,
msg
,
move_xpm
);
msg
,
move_xpm
);
msg
=
AddHotkeyName
(
_
(
"Drag Component"
),
s_Schematic_Hokeys_Descr
,
msg
=
AddHotkeyName
(
_
(
"Drag Component"
),
s_Schematic_Hokeys_Descr
,
...
@@ -276,7 +301,7 @@ void AddMenusForComponent( wxMenu* PopMenu, SCH_COMPONENT* Component )
...
@@ -276,7 +301,7 @@ void AddMenusForComponent( wxMenu* PopMenu, SCH_COMPONENT* Component )
wxMenu
*
orientmenu
=
new
wxMenu
;
wxMenu
*
orientmenu
=
new
wxMenu
;
msg
=
AddHotkeyName
(
_
(
"Rotate +"
),
s_Schematic_Hokeys_Descr
,
msg
=
AddHotkeyName
(
_
(
"Rotate +"
),
s_Schematic_Hokeys_Descr
,
HK_ROTATE_COMPONENT_OR_
LABEL
);
HK_ROTATE_COMPONENT_OR_
ITEM
);
ADD_MENUITEM
(
orientmenu
,
ID_POPUP_SCH_ROTATE_CMP_COUNTERCLOCKWISE
,
ADD_MENUITEM
(
orientmenu
,
ID_POPUP_SCH_ROTATE_CMP_COUNTERCLOCKWISE
,
msg
,
rotate_pos_xpm
);
msg
,
rotate_pos_xpm
);
ADD_MENUITEM
(
orientmenu
,
ID_POPUP_SCH_ROTATE_CMP_CLOCKWISE
,
ADD_MENUITEM
(
orientmenu
,
ID_POPUP_SCH_ROTATE_CMP_CLOCKWISE
,
...
@@ -367,7 +392,7 @@ void AddMenusForGLabel( wxMenu* PopMenu, SCH_GLOBALLABEL* GLabel )
...
@@ -367,7 +392,7 @@ void AddMenusForGLabel( wxMenu* PopMenu, SCH_GLOBALLABEL* GLabel )
if
(
!
GLabel
->
m_Flags
)
if
(
!
GLabel
->
m_Flags
)
{
{
msg
=
AddHotkeyName
(
_
(
"Move Global Label"
),
msg
=
AddHotkeyName
(
_
(
"Move Global Label"
),
s_Schematic_Hokeys_Descr
,
HK_MOVE_COMPONENT_OR_
LABEL
);
s_Schematic_Hokeys_Descr
,
HK_MOVE_COMPONENT_OR_
ITEM
);
ADD_MENUITEM
(
PopMenu
,
ID_POPUP_SCH_MOVE_ITEM_REQUEST
,
ADD_MENUITEM
(
PopMenu
,
ID_POPUP_SCH_MOVE_ITEM_REQUEST
,
msg
,
move_text_xpm
);
msg
,
move_text_xpm
);
msg
=
AddHotkeyName
(
_
(
"Copy Global Label"
),
msg
=
AddHotkeyName
(
_
(
"Copy Global Label"
),
...
@@ -377,7 +402,7 @@ void AddMenusForGLabel( wxMenu* PopMenu, SCH_GLOBALLABEL* GLabel )
...
@@ -377,7 +402,7 @@ void AddMenusForGLabel( wxMenu* PopMenu, SCH_GLOBALLABEL* GLabel )
msg
,
copy_button
);
msg
,
copy_button
);
}
}
msg
=
AddHotkeyName
(
_
(
"Rotate Global Label"
),
s_Schematic_Hokeys_Descr
,
msg
=
AddHotkeyName
(
_
(
"Rotate Global Label"
),
s_Schematic_Hokeys_Descr
,
HK_ROTATE_COMPONENT_OR_
LABEL
);
HK_ROTATE_COMPONENT_OR_
ITEM
);
ADD_MENUITEM
(
PopMenu
,
ID_POPUP_SCH_ROTATE_TEXT
,
ADD_MENUITEM
(
PopMenu
,
ID_POPUP_SCH_ROTATE_TEXT
,
msg
,
rotate_glabel_xpm
);
msg
,
rotate_glabel_xpm
);
msg
=
AddHotkeyName
(
_
(
"Edit Global Label"
),
s_Schematic_Hokeys_Descr
,
msg
=
AddHotkeyName
(
_
(
"Edit Global Label"
),
s_Schematic_Hokeys_Descr
,
...
@@ -411,7 +436,7 @@ void AddMenusForHLabel( wxMenu* PopMenu, SCH_HIERLABEL* HLabel )
...
@@ -411,7 +436,7 @@ void AddMenusForHLabel( wxMenu* PopMenu, SCH_HIERLABEL* HLabel )
{
{
msg
=
AddHotkeyName
(
_
(
"Move Hierarchical Label"
),
msg
=
AddHotkeyName
(
_
(
"Move Hierarchical Label"
),
s_Schematic_Hokeys_Descr
,
s_Schematic_Hokeys_Descr
,
HK_MOVE_COMPONENT_OR_
LABEL
);
HK_MOVE_COMPONENT_OR_
ITEM
);
ADD_MENUITEM
(
PopMenu
,
ID_POPUP_SCH_MOVE_ITEM_REQUEST
,
ADD_MENUITEM
(
PopMenu
,
ID_POPUP_SCH_MOVE_ITEM_REQUEST
,
msg
,
move_text_xpm
);
msg
,
move_text_xpm
);
msg
=
AddHotkeyName
(
_
(
"Copy Hierarchical Label"
),
msg
=
AddHotkeyName
(
_
(
"Copy Hierarchical Label"
),
...
@@ -421,7 +446,7 @@ void AddMenusForHLabel( wxMenu* PopMenu, SCH_HIERLABEL* HLabel )
...
@@ -421,7 +446,7 @@ void AddMenusForHLabel( wxMenu* PopMenu, SCH_HIERLABEL* HLabel )
msg
,
copy_button
);
msg
,
copy_button
);
}
}
msg
=
AddHotkeyName
(
_
(
"Rotate Hierarchical Label"
),
s_Schematic_Hokeys_Descr
,
msg
=
AddHotkeyName
(
_
(
"Rotate Hierarchical Label"
),
s_Schematic_Hokeys_Descr
,
HK_ROTATE_COMPONENT_OR_
LABEL
);
HK_ROTATE_COMPONENT_OR_
ITEM
);
ADD_MENUITEM
(
PopMenu
,
ID_POPUP_SCH_ROTATE_TEXT
,
ADD_MENUITEM
(
PopMenu
,
ID_POPUP_SCH_ROTATE_TEXT
,
_
(
"Rotate Hierarchical Label"
),
rotate_glabel_xpm
);
_
(
"Rotate Hierarchical Label"
),
rotate_glabel_xpm
);
msg
=
AddHotkeyName
(
_
(
"Edit Hierarchical Label"
),
s_Schematic_Hokeys_Descr
,
msg
=
AddHotkeyName
(
_
(
"Edit Hierarchical Label"
),
s_Schematic_Hokeys_Descr
,
...
@@ -454,7 +479,7 @@ void AddMenusForLabel( wxMenu* PopMenu, SCH_LABEL* Label )
...
@@ -454,7 +479,7 @@ void AddMenusForLabel( wxMenu* PopMenu, SCH_LABEL* Label )
if
(
!
Label
->
m_Flags
)
if
(
!
Label
->
m_Flags
)
{
{
msg
=
AddHotkeyName
(
_
(
"Move Label"
),
s_Schematic_Hokeys_Descr
,
msg
=
AddHotkeyName
(
_
(
"Move Label"
),
s_Schematic_Hokeys_Descr
,
HK_MOVE_COMPONENT_OR_
LABEL
);
HK_MOVE_COMPONENT_OR_
ITEM
);
ADD_MENUITEM
(
PopMenu
,
ID_POPUP_SCH_MOVE_ITEM_REQUEST
,
ADD_MENUITEM
(
PopMenu
,
ID_POPUP_SCH_MOVE_ITEM_REQUEST
,
msg
,
move_text_xpm
);
msg
,
move_text_xpm
);
msg
=
AddHotkeyName
(
_
(
"Copy Label"
),
msg
=
AddHotkeyName
(
_
(
"Copy Label"
),
...
@@ -464,7 +489,7 @@ void AddMenusForLabel( wxMenu* PopMenu, SCH_LABEL* Label )
...
@@ -464,7 +489,7 @@ void AddMenusForLabel( wxMenu* PopMenu, SCH_LABEL* Label )
msg
,
copy_button
);
msg
,
copy_button
);
}
}
msg
=
AddHotkeyName
(
_
(
"Rotate Label"
),
s_Schematic_Hokeys_Descr
,
msg
=
AddHotkeyName
(
_
(
"Rotate Label"
),
s_Schematic_Hokeys_Descr
,
HK_ROTATE_COMPONENT_OR_
LABEL
);
HK_ROTATE_COMPONENT_OR_
ITEM
);
ADD_MENUITEM
(
PopMenu
,
ID_POPUP_SCH_ROTATE_TEXT
,
ADD_MENUITEM
(
PopMenu
,
ID_POPUP_SCH_ROTATE_TEXT
,
msg
,
rotate_pos_xpm
);
msg
,
rotate_pos_xpm
);
msg
=
AddHotkeyName
(
_
(
"Edit Label"
),
s_Schematic_Hokeys_Descr
,
msg
=
AddHotkeyName
(
_
(
"Edit Label"
),
s_Schematic_Hokeys_Descr
,
...
@@ -498,7 +523,7 @@ void AddMenusForText( wxMenu* PopMenu, SCH_TEXT* Text )
...
@@ -498,7 +523,7 @@ void AddMenusForText( wxMenu* PopMenu, SCH_TEXT* Text )
{
{
msg
=
AddHotkeyName
(
_
(
"Move Text"
),
msg
=
AddHotkeyName
(
_
(
"Move Text"
),
s_Schematic_Hokeys_Descr
,
s_Schematic_Hokeys_Descr
,
HK_MOVE_COMPONENT_OR_
LABEL
);
HK_MOVE_COMPONENT_OR_
ITEM
);
ADD_MENUITEM
(
PopMenu
,
ID_POPUP_SCH_MOVE_ITEM_REQUEST
,
ADD_MENUITEM
(
PopMenu
,
ID_POPUP_SCH_MOVE_ITEM_REQUEST
,
msg
,
move_text_xpm
);
msg
,
move_text_xpm
);
msg
=
AddHotkeyName
(
_
(
"Copy Text"
),
msg
=
AddHotkeyName
(
_
(
"Copy Text"
),
...
@@ -508,7 +533,7 @@ void AddMenusForText( wxMenu* PopMenu, SCH_TEXT* Text )
...
@@ -508,7 +533,7 @@ void AddMenusForText( wxMenu* PopMenu, SCH_TEXT* Text )
msg
,
copy_button
);
msg
,
copy_button
);
}
}
msg
=
AddHotkeyName
(
_
(
"Rotate Text"
),
s_Schematic_Hokeys_Descr
,
msg
=
AddHotkeyName
(
_
(
"Rotate Text"
),
s_Schematic_Hokeys_Descr
,
HK_ROTATE_COMPONENT_OR_
LABEL
);
HK_ROTATE_COMPONENT_OR_
ITEM
);
ADD_MENUITEM
(
PopMenu
,
ID_POPUP_SCH_ROTATE_TEXT
,
msg
,
ADD_MENUITEM
(
PopMenu
,
ID_POPUP_SCH_ROTATE_TEXT
,
msg
,
rotate_pos_xpm
);
rotate_pos_xpm
);
msg
=
AddHotkeyName
(
_
(
"Edit Text"
),
s_Schematic_Hokeys_Descr
,
msg
=
AddHotkeyName
(
_
(
"Edit Text"
),
s_Schematic_Hokeys_Descr
,
...
@@ -584,7 +609,9 @@ void AddMenusForWire( wxMenu* PopMenu, SCH_LINE* Wire,
...
@@ -584,7 +609,9 @@ void AddMenusForWire( wxMenu* PopMenu, SCH_LINE* Wire,
return
;
return
;
}
}
ADD_MENUITEM
(
PopMenu
,
ID_POPUP_SCH_DRAG_WIRE_REQUEST
,
_
(
"Drag Wire"
),
msg
=
AddHotkeyName
(
_
(
"Drag Wire"
),
s_Schematic_Hokeys_Descr
,
HK_DRAG_COMPONENT
);
ADD_MENUITEM
(
PopMenu
,
ID_POPUP_SCH_DRAG_WIRE_REQUEST
,
msg
,
move_track_xpm
);
move_track_xpm
);
PopMenu
->
AppendSeparator
();
PopMenu
->
AppendSeparator
();
msg
=
AddHotkeyName
(
_
(
"Delete Wire"
),
s_Schematic_Hokeys_Descr
,
msg
=
AddHotkeyName
(
_
(
"Delete Wire"
),
s_Schematic_Hokeys_Descr
,
...
@@ -649,13 +676,17 @@ void AddMenusForBus( wxMenu* PopMenu, SCH_LINE* Bus,
...
@@ -649,13 +676,17 @@ void AddMenusForBus( wxMenu* PopMenu, SCH_LINE* Bus,
void
AddMenusForHierchicalSheet
(
wxMenu
*
PopMenu
,
SCH_SHEET
*
Sheet
)
void
AddMenusForHierchicalSheet
(
wxMenu
*
PopMenu
,
SCH_SHEET
*
Sheet
)
{
{
wxString
msg
;
if
(
!
Sheet
->
m_Flags
)
if
(
!
Sheet
->
m_Flags
)
{
{
ADD_MENUITEM
(
PopMenu
,
ID_POPUP_SCH_ENTER_SHEET
,
ADD_MENUITEM
(
PopMenu
,
ID_POPUP_SCH_ENTER_SHEET
,
_
(
"Enter Sheet"
),
enter_sheet_xpm
);
_
(
"Enter Sheet"
),
enter_sheet_xpm
);
PopMenu
->
AppendSeparator
();
PopMenu
->
AppendSeparator
();
msg
=
AddHotkeyName
(
_
(
"Move Sheet"
),
s_Schematic_Hokeys_Descr
,
HK_MOVE_COMPONENT_OR_ITEM
);
ADD_MENUITEM
(
PopMenu
,
ID_POPUP_SCH_MOVE_ITEM_REQUEST
,
ADD_MENUITEM
(
PopMenu
,
ID_POPUP_SCH_MOVE_ITEM_REQUEST
,
_
(
"Move Sheet"
)
,
move_sheet_xpm
);
msg
,
move_sheet_xpm
);
}
}
if
(
Sheet
->
m_Flags
)
if
(
Sheet
->
m_Flags
)
...
@@ -665,8 +696,12 @@ void AddMenusForHierchicalSheet( wxMenu* PopMenu, SCH_SHEET* Sheet )
...
@@ -665,8 +696,12 @@ void AddMenusForHierchicalSheet( wxMenu* PopMenu, SCH_SHEET* Sheet )
}
}
else
else
{
{
ADD_MENUITEM
(
PopMenu
,
ID_POPUP_SCH_EDIT_SHEET
,
_
(
"Edit Sheet"
),
msg
=
AddHotkeyName
(
_
(
"Edit Sheet"
),
s_Schematic_Hokeys_Descr
,
HK_EDIT_COMPONENT_OR_LABEL
);
ADD_MENUITEM
(
PopMenu
,
ID_POPUP_SCH_EDIT_SHEET
,
msg
,
edit_sheet_xpm
);
edit_sheet_xpm
);
ADD_MENUITEM
(
PopMenu
,
ID_POPUP_SCH_RESIZE_SHEET
,
_
(
"Resize Sheet"
),
ADD_MENUITEM
(
PopMenu
,
ID_POPUP_SCH_RESIZE_SHEET
,
_
(
"Resize Sheet"
),
resize_sheet_xpm
);
resize_sheet_xpm
);
PopMenu
->
AppendSeparator
();
PopMenu
->
AppendSeparator
();
...
@@ -684,9 +719,14 @@ void AddMenusForHierchicalSheet( wxMenu* PopMenu, SCH_SHEET* Sheet )
...
@@ -684,9 +719,14 @@ void AddMenusForHierchicalSheet( wxMenu* PopMenu, SCH_SHEET* Sheet )
void
AddMenusForPinSheet
(
wxMenu
*
PopMenu
,
SCH_SHEET_PIN
*
PinSheet
)
void
AddMenusForPinSheet
(
wxMenu
*
PopMenu
,
SCH_SHEET_PIN
*
PinSheet
)
{
{
if
(
!
PinSheet
->
m_Flags
)
wxString
msg
;
if
(
!
PinSheet
->
m_Flags
){
msg
=
AddHotkeyName
(
_
(
"Move PinSheet"
),
s_Schematic_Hokeys_Descr
,
HK_MOVE_COMPONENT_OR_ITEM
);
ADD_MENUITEM
(
PopMenu
,
ID_POPUP_SCH_MOVE_PINSHEET
,
ADD_MENUITEM
(
PopMenu
,
ID_POPUP_SCH_MOVE_PINSHEET
,
_
(
"Move PinSheet"
),
move_xpm
);
msg
,
move_xpm
);
}
ADD_MENUITEM
(
PopMenu
,
ID_POPUP_SCH_EDIT_PINSHEET
,
_
(
"Edit PinSheet"
),
ADD_MENUITEM
(
PopMenu
,
ID_POPUP_SCH_EDIT_PINSHEET
,
_
(
"Edit PinSheet"
),
edit_xpm
);
edit_xpm
);
...
...
eeschema/pinedit.cpp
View file @
73f83c05
...
@@ -37,6 +37,38 @@ static bool LastPinCommonConvert = false;
...
@@ -37,6 +37,38 @@ static bool LastPinCommonConvert = false;
static
bool
LastPinCommonUnit
=
false
;
static
bool
LastPinCommonUnit
=
false
;
static
bool
LastPinVisible
=
true
;
static
bool
LastPinVisible
=
true
;
void
WinEDA_LibeditFrame
::
OnRotatePin
(
wxCommandEvent
&
event
){
// Check, if the item is a pin, else return
if
(
m_drawItem
==
NULL
||
m_drawItem
->
Type
()
!=
COMPONENT_PIN_DRAW_TYPE
)
return
;
// save flags to restore them after rotating
int
item_flags
=
m_drawItem
->
m_Flags
;
LIB_PIN
*
pin
=
(
LIB_PIN
*
)
m_drawItem
;
// Save old pin orientation
LastPinOrient
=
pin
->
m_Orient
;
SaveCopyInUndoList
(
pin
->
GetParent
()
);
// Get the actual pin orientation index
int
orientationIndex
=
pin
->
GetOrientationCodeIndex
(
pin
->
m_Orient
);
// Compute the next orientation, swap lower two bits for the right order
orientationIndex
=
((
orientationIndex
&
2
)
>>
1
)
|
((
orientationIndex
&
1
)
<<
1
);
orientationIndex
=
orientationIndex
+
1
;
orientationIndex
=
((
orientationIndex
&
2
)
>>
1
)
|
((
orientationIndex
&
1
)
<<
1
);
// Set the new orientation
pin
->
SetOrientation
(
pin
->
GetOrientationCode
(
orientationIndex
));
GetScreen
()
->
SetModify
();
pin
->
DisplayInfo
(
this
);
DrawPanel
->
Refresh
();
// Restore pin flags
pin
->
m_Flags
=
item_flags
;
}
void
WinEDA_LibeditFrame
::
OnEditPin
(
wxCommandEvent
&
event
)
void
WinEDA_LibeditFrame
::
OnEditPin
(
wxCommandEvent
&
event
)
{
{
...
...
pcbnew/CMakeLists.txt
View file @
73f83c05
...
@@ -115,8 +115,8 @@ set(PCBNEW_SRCS
...
@@ -115,8 +115,8 @@ set(PCBNEW_SRCS
loadcmp.cpp
loadcmp.cpp
locate.cpp
locate.cpp
magnetic_tracks_functions.cpp
magnetic_tracks_functions.cpp
menubarmodedit.cpp
menubar
_
modedit.cpp
menubar
pcb
.cpp
menubar
_pcbframe
.cpp
mirepcb.cpp
mirepcb.cpp
modedit.cpp
modedit.cpp
modedit_onclick.cpp
modedit_onclick.cpp
...
...
pcbnew/dialog_display_options.cpp
View file @
73f83c05
...
@@ -14,24 +14,10 @@
...
@@ -14,24 +14,10 @@
#include "pcbnew_id.h"
#include "pcbnew_id.h"
#include "dialog_display_options.h"
#include "dialog_display_options_base.h"
#include "dialog_display_options_base.h"
class
Dialog_Display_Options
:
public
DialogDisplayOptions_base
{
private
:
WinEDA_BasePcbFrame
*
m_Parent
;
void
init
();
public
:
Dialog_Display_Options
(
WinEDA_BasePcbFrame
*
parent
);
~
Dialog_Display_Options
(
)
{
};
void
OnOkClick
(
wxCommandEvent
&
event
);
void
OnCancelClick
(
wxCommandEvent
&
event
);
};
void
WinEDA_PcbFrame
::
InstallDisplayOptionsDialog
(
wxCommandEvent
&
aEvent
)
void
WinEDA_PcbFrame
::
InstallDisplayOptionsDialog
(
wxCommandEvent
&
aEvent
)
{
{
Dialog_Display_Options
*
DisplayOptionsDialog
=
Dialog_Display_Options
*
DisplayOptionsDialog
=
...
...
pcbnew/dialog_display_options.h
0 → 100644
View file @
73f83c05
/**
* @file dialog_display_options.h
*/
#include "dialog_display_options_base.h"
class
Dialog_Display_Options
:
public
DialogDisplayOptions_base
{
private
:
WinEDA_BasePcbFrame
*
m_Parent
;
void
init
();
public
:
Dialog_Display_Options
(
WinEDA_BasePcbFrame
*
parent
);
Dialog_Display_Options
(
WinEDA_BasePcbFrame
*
,
wxWindow
*
);
~
Dialog_Display_Options
(
)
{
};
void
OnOkClick
(
wxCommandEvent
&
event
);
void
OnCancelClick
(
wxCommandEvent
&
event
);
};
pcbnew/hotkeys.h
View file @
73f83c05
/***************/
/**
/* hotkeys.h */
* @file hotkeys.h
/***************/
* PCBNew hotkeys
#ifndef KOTKEYS_H
*/
#define KOTKEYS_H
#ifndef _PCBNEW_KOTKEYS_H
#define _PCBNEW_HOTKEYS_H
#include "hotkeys_basic.h"
#include "hotkeys_basic.h"
...
@@ -63,4 +64,4 @@ extern struct Ki_HotkeyInfoSectionDescriptor s_Board_Editor_Hokeys_Descr[];
...
@@ -63,4 +64,4 @@ extern struct Ki_HotkeyInfoSectionDescriptor s_Board_Editor_Hokeys_Descr[];
// List of hotkey descriptors for the footprint editor only
// List of hotkey descriptors for the footprint editor only
extern
struct
Ki_HotkeyInfoSectionDescriptor
s_Module_Editor_Hokeys_Descr
[];
extern
struct
Ki_HotkeyInfoSectionDescriptor
s_Module_Editor_Hokeys_Descr
[];
#endif
// KOTKEYS_H
#endif
/* _PCBNEW_HOTKEYS_H_ */
pcbnew/menubarmodedit.cpp
→
pcbnew/menubar
_
modedit.cpp
View file @
73f83c05
File moved
pcbnew/menubar
pcb
.cpp
→
pcbnew/menubar
_pcbframe
.cpp
View file @
73f83c05
This diff is collapsed.
Click to expand it.
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