mirror of
https://gitlab.com/kicad/code/kicad.git
synced 2025-09-14 18:23:15 +02:00
See CHANGELOG.txt
This commit is contained in:
parent
bf02bc4d64
commit
73f83c0509
@ -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.
|
||||||
|
@ -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,
|
||||||
|
@ -74,8 +74,8 @@ static Ki_HotkeyInfo HkMirrorXComponent( wxT( "Mirror X Component" ),
|
|||||||
HK_MIRROR_X_COMPONENT, 'X' );
|
HK_MIRROR_X_COMPONENT, 'X' );
|
||||||
static Ki_HotkeyInfo HkOrientNormalComponent( wxT( "Orient Normal Component" ),
|
static Ki_HotkeyInfo HkOrientNormalComponent( wxT( "Orient Normal Component" ),
|
||||||
HK_ORIENT_NORMAL_COMPONENT, 'N' );
|
HK_ORIENT_NORMAL_COMPONENT, 'N' );
|
||||||
static Ki_HotkeyInfo HkRotateComponent( wxT( "Rotate Component or Label" ),
|
static Ki_HotkeyInfo HkRotateComponentOrItem( wxT( "Rotate Schematic Item" ),
|
||||||
HK_ROTATE_COMPONENT_OR_LABEL, 'R' );
|
HK_ROTATE_COMPONENT_OR_ITEM, 'R' );
|
||||||
static Ki_HotkeyInfo HkEditComponent( wxT( "Edit Component or Label" ),
|
static Ki_HotkeyInfo HkEditComponent( wxT( "Edit Component or Label" ),
|
||||||
HK_EDIT_COMPONENT_OR_LABEL, 'E' );
|
HK_EDIT_COMPONENT_OR_LABEL, 'E' );
|
||||||
static Ki_HotkeyInfo HkEditComponentValue( wxT( "Edit Component Value" ),
|
static Ki_HotkeyInfo HkEditComponentValue( wxT( "Edit Component Value" ),
|
||||||
@ -83,8 +83,8 @@ static Ki_HotkeyInfo HkEditComponentValue( wxT( "Edit Component Value" ),
|
|||||||
static Ki_HotkeyInfo HkEditComponentFootprint( wxT( "Edit Component Footprint" ),
|
static Ki_HotkeyInfo HkEditComponentFootprint( wxT( "Edit Component Footprint" ),
|
||||||
HK_EDIT_COMPONENT_FOOTPRINT,
|
HK_EDIT_COMPONENT_FOOTPRINT,
|
||||||
'F' );
|
'F' );
|
||||||
static Ki_HotkeyInfo HkMoveComponentOrText( wxT( "Move Component or Label" ),
|
static Ki_HotkeyInfo HkMoveComponentOrItem( wxT( "Move Schematic Item" ),
|
||||||
HK_MOVE_COMPONENT_OR_LABEL, 'M',
|
HK_MOVE_COMPONENT_OR_ITEM, 'M',
|
||||||
ID_POPUP_SCH_MOVE_CMP_REQUEST );
|
ID_POPUP_SCH_MOVE_CMP_REQUEST );
|
||||||
|
|
||||||
static Ki_HotkeyInfo HkCopyComponentOrText( wxT( "Copy Component or Label" ),
|
static Ki_HotkeyInfo HkCopyComponentOrText( wxT( "Copy Component or Label" ),
|
||||||
@ -107,6 +107,7 @@ static Ki_HotkeyInfo HkInsertPin( wxT( "Repeat Pin" ), HK_REPEAT_LAST,
|
|||||||
WXK_INSERT );
|
WXK_INSERT );
|
||||||
static Ki_HotkeyInfo HkEditPin( wxT( "Edit Pin" ), HK_EDIT_PIN, 'E' );
|
static Ki_HotkeyInfo HkEditPin( wxT( "Edit Pin" ), HK_EDIT_PIN, 'E' );
|
||||||
static Ki_HotkeyInfo HkMovePin( wxT( "Move Pin" ), HK_LIBEDIT_MOVE_GRAPHIC_ITEM, 'M' );
|
static Ki_HotkeyInfo HkMovePin( wxT( "Move Pin" ), HK_LIBEDIT_MOVE_GRAPHIC_ITEM, 'M' );
|
||||||
|
static Ki_HotkeyInfo HkRotatePin( wxT( "Rotate Pin" ), HK_LIBEDIT_ROTATE_PIN, 'R' );
|
||||||
static Ki_HotkeyInfo HkDeletePin( wxT( "Delete Pin" ), HK_DELETE_PIN,
|
static Ki_HotkeyInfo HkDeletePin( wxT( "Delete Pin" ), HK_DELETE_PIN,
|
||||||
WXK_DELETE );
|
WXK_DELETE );
|
||||||
|
|
||||||
@ -127,9 +128,9 @@ Ki_HotkeyInfo* s_Schematic_Hotkey_List[] =
|
|||||||
{
|
{
|
||||||
&HkNextSearch,
|
&HkNextSearch,
|
||||||
&HkDelete, &HkInsert, &HkMove2Drag,
|
&HkDelete, &HkInsert, &HkMove2Drag,
|
||||||
&HkMoveComponentOrText, &HkCopyComponentOrText,
|
&HkMoveComponentOrItem, &HkCopyComponentOrText,
|
||||||
&HkDragComponent, &HkAddComponent,
|
&HkDragComponent, &HkAddComponent,
|
||||||
&HkRotateComponent, &HkMirrorXComponent, &HkMirrorYComponent,
|
&HkRotateComponentOrItem, &HkMirrorXComponent, &HkMirrorYComponent,
|
||||||
&HkOrientNormalComponent,
|
&HkOrientNormalComponent,
|
||||||
&HkEditComponent,&HkEditComponentValue,&HkEditComponentFootprint,
|
&HkEditComponent,&HkEditComponentValue,&HkEditComponentFootprint,
|
||||||
&HkBeginWire,
|
&HkBeginWire,
|
||||||
@ -143,6 +144,7 @@ Ki_HotkeyInfo* s_LibEdit_Hotkey_List[] =
|
|||||||
&HkEditPin,
|
&HkEditPin,
|
||||||
&HkMovePin,
|
&HkMovePin,
|
||||||
&HkDeletePin,
|
&HkDeletePin,
|
||||||
|
&HkRotatePin,
|
||||||
NULL
|
NULL
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -333,48 +335,54 @@ void WinEDA_SchematicFrame::OnHotKey( wxDC* DC, int hotkey,
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case HK_ROTATE_COMPONENT_OR_LABEL: // Component Rotation
|
case HK_ROTATE_COMPONENT_OR_ITEM: // Component or other schematic item rotation
|
||||||
|
|
||||||
if( DrawStruct == NULL )
|
if( DrawStruct == NULL )
|
||||||
{
|
{
|
||||||
DrawStruct = PickStruct( GetScreen()->m_Curseur,
|
// Find the schematic object to rotate under the cursor
|
||||||
GetScreen(), LIBITEM | TEXTITEM |
|
DrawStruct = SchematicGeneralLocateAndDisplay( false );
|
||||||
LABELITEM );
|
|
||||||
if( DrawStruct == NULL )
|
if( DrawStruct == NULL )
|
||||||
break;
|
break;
|
||||||
|
|
||||||
if( DrawStruct->Type() == TYPE_SCH_COMPONENT )
|
if( DrawStruct->Type() == TYPE_SCH_COMPONENT )
|
||||||
DrawStruct = LocateSmallestComponent( GetScreen() );
|
DrawStruct = LocateSmallestComponent( GetScreen() );
|
||||||
|
|
||||||
if( DrawStruct == NULL )
|
if( DrawStruct == NULL )
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (DrawStruct)
|
||||||
|
{
|
||||||
|
GetScreen()->SetCurItem( (SCH_ITEM*) DrawStruct );
|
||||||
|
|
||||||
|
// Create the events for rotating a component or other schematic item
|
||||||
|
wxCommandEvent eventRotateComponent( wxEVT_COMMAND_TOOL_CLICKED,
|
||||||
|
ID_POPUP_SCH_ROTATE_CMP_COUNTERCLOCKWISE );
|
||||||
|
wxCommandEvent eventRotateText(wxEVT_COMMAND_TOOL_CLICKED,
|
||||||
|
ID_POPUP_SCH_ROTATE_TEXT );
|
||||||
|
wxCommandEvent eventRotateField(wxEVT_COMMAND_TOOL_CLICKED,
|
||||||
|
ID_POPUP_SCH_ROTATE_FIELD );
|
||||||
|
|
||||||
switch( DrawStruct->Type() )
|
switch( DrawStruct->Type() )
|
||||||
{
|
{
|
||||||
case TYPE_SCH_COMPONENT:
|
case TYPE_SCH_COMPONENT:
|
||||||
if( DrawStruct->m_Flags == 0 )
|
wxPostEvent( this, eventRotateComponent );
|
||||||
{
|
|
||||||
SaveCopyInUndoList( (SCH_ITEM*) DrawStruct, UR_CHANGED );
|
|
||||||
RefreshToolBar = TRUE;
|
|
||||||
}
|
|
||||||
|
|
||||||
CmpRotationMiroir( (SCH_COMPONENT*) DrawStruct, DC,
|
|
||||||
CMP_ROTATE_COUNTERCLOCKWISE );
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case TYPE_SCH_TEXT:
|
case TYPE_SCH_TEXT:
|
||||||
case TYPE_SCH_LABEL:
|
case TYPE_SCH_LABEL:
|
||||||
case TYPE_SCH_GLOBALLABEL:
|
case TYPE_SCH_GLOBALLABEL:
|
||||||
case TYPE_SCH_HIERLABEL:
|
case TYPE_SCH_HIERLABEL:
|
||||||
if( DrawStruct->m_Flags == 0 )
|
wxPostEvent( this, eventRotateText );
|
||||||
{
|
|
||||||
SaveCopyInUndoList( (SCH_ITEM*) DrawStruct, UR_CHANGED );
|
|
||||||
RefreshToolBar = TRUE;
|
|
||||||
}
|
|
||||||
ChangeTextOrient( (SCH_TEXT*) DrawStruct, DC );
|
|
||||||
break;
|
break;
|
||||||
|
case DRAW_PART_TEXT_STRUCT_TYPE:
|
||||||
|
wxPostEvent( this, eventRotateField );
|
||||||
|
|
||||||
default:
|
default:
|
||||||
;
|
;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@ -422,20 +430,33 @@ void WinEDA_SchematicFrame::OnHotKey( wxDC* DC, int hotkey,
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case HK_DRAG_COMPONENT: // Start drag component
|
case HK_DRAG_COMPONENT: // Start drag component
|
||||||
case HK_MOVE_COMPONENT_OR_LABEL: // Start move component or text/label
|
case HK_MOVE_COMPONENT_OR_ITEM: // Start move component or other schematic item
|
||||||
case HK_COPY_COMPONENT_OR_LABEL: // Duplicate component or text/label
|
case HK_COPY_COMPONENT_OR_LABEL: // Duplicate component or text/label
|
||||||
if( ItemInEdit )
|
if( ItemInEdit )
|
||||||
break;
|
break;
|
||||||
|
|
||||||
if( DrawStruct == NULL )
|
if( DrawStruct == NULL )
|
||||||
{
|
{
|
||||||
DrawStruct = PickStruct( GetScreen()->m_Curseur,
|
// Find the schematic object to move under the cursor
|
||||||
GetScreen(), LIBITEM | TEXTITEM |
|
DrawStruct = SchematicGeneralLocateAndDisplay( false );
|
||||||
LABELITEM );
|
|
||||||
if( DrawStruct == NULL )
|
if( DrawStruct == NULL )
|
||||||
break;
|
break;
|
||||||
if( DrawStruct->Type() == TYPE_SCH_COMPONENT )
|
if( DrawStruct->Type() == TYPE_SCH_COMPONENT )
|
||||||
DrawStruct = LocateSmallestComponent( GetScreen() );
|
DrawStruct = LocateSmallestComponent( GetScreen() );
|
||||||
|
if( DrawStruct->Type() == DRAW_SHEET_STRUCT_TYPE ){
|
||||||
|
// If it's a sheet, then check if a pinsheet is under the cursor
|
||||||
|
SCH_SHEET_PIN* slabel = LocateSheetLabel( (SCH_SHEET*) DrawStruct,
|
||||||
|
GetScreen()->m_Curseur );
|
||||||
|
if (slabel)
|
||||||
|
DrawStruct = slabel;
|
||||||
|
}
|
||||||
|
if (DrawStruct->Type() == DRAW_JUNCTION_STRUCT_TYPE){
|
||||||
|
// If it's a junction, pick the underlying wire instead
|
||||||
|
DrawStruct = PickStruct( GetScreen()->m_Curseur,
|
||||||
|
GetScreen(), WIREITEM);
|
||||||
|
}
|
||||||
|
|
||||||
if( DrawStruct == NULL )
|
if( DrawStruct == NULL )
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -449,33 +470,52 @@ void WinEDA_SchematicFrame::OnHotKey( wxDC* DC, int hotkey,
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if( DrawStruct && (DrawStruct->m_Flags == 0) ){
|
||||||
|
GetScreen()->SetCurItem( (SCH_ITEM*) DrawStruct );
|
||||||
|
|
||||||
|
// Create the events for moving a component or other schematic item
|
||||||
|
wxCommandEvent eventMoveComponent( wxEVT_COMMAND_TOOL_CLICKED,
|
||||||
|
HK_Descr->m_IdMenuEvent );
|
||||||
|
wxCommandEvent eventMoveItem(wxEVT_COMMAND_TOOL_CLICKED,
|
||||||
|
ID_POPUP_SCH_MOVE_ITEM_REQUEST );
|
||||||
|
wxCommandEvent eventMovePinsheet(wxEVT_COMMAND_TOOL_CLICKED,
|
||||||
|
ID_POPUP_SCH_MOVE_PINSHEET);
|
||||||
|
wxCommandEvent eventDragWire(wxEVT_COMMAND_TOOL_CLICKED,
|
||||||
|
ID_POPUP_SCH_DRAG_WIRE_REQUEST);
|
||||||
|
|
||||||
switch( DrawStruct->Type() )
|
switch( DrawStruct->Type() )
|
||||||
{
|
{
|
||||||
|
|
||||||
|
// select the correct event for moving an schematic object
|
||||||
|
// and add it to the event queue
|
||||||
case TYPE_SCH_COMPONENT:
|
case TYPE_SCH_COMPONENT:
|
||||||
if( DrawStruct && (DrawStruct->m_Flags ==0) )
|
wxPostEvent( this, eventMoveComponent );
|
||||||
{
|
|
||||||
GetScreen()->SetCurItem( (SCH_ITEM*) DrawStruct );
|
|
||||||
wxCommandEvent event( wxEVT_COMMAND_TOOL_CLICKED,
|
|
||||||
HK_Descr->m_IdMenuEvent );
|
|
||||||
wxPostEvent( this, event );
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case TYPE_SCH_TEXT:
|
case TYPE_SCH_TEXT:
|
||||||
case TYPE_SCH_LABEL:
|
case TYPE_SCH_LABEL:
|
||||||
case TYPE_SCH_GLOBALLABEL:
|
case TYPE_SCH_GLOBALLABEL:
|
||||||
case TYPE_SCH_HIERLABEL:
|
case TYPE_SCH_HIERLABEL:
|
||||||
if( DrawStruct->m_Flags == 0 )
|
case DRAW_SHEET_STRUCT_TYPE:
|
||||||
{
|
case DRAW_PART_TEXT_STRUCT_TYPE:
|
||||||
SaveCopyInUndoList( (SCH_ITEM*) DrawStruct, UR_CHANGED );
|
case DRAW_BUSENTRY_STRUCT_TYPE:
|
||||||
RefreshToolBar = TRUE;
|
wxPostEvent( this, eventMoveItem );
|
||||||
}
|
break;
|
||||||
StartMoveTexte( (SCH_TEXT*) DrawStruct, DC );
|
|
||||||
|
case DRAW_HIERARCHICAL_PIN_SHEET_STRUCT_TYPE:
|
||||||
|
wxPostEvent( this, eventMovePinsheet );
|
||||||
|
break;
|
||||||
|
|
||||||
|
case DRAW_SEGMENT_STRUCT_TYPE:
|
||||||
|
if (((SCH_ITEM*)DrawStruct)->GetLayer() == LAYER_WIRE)
|
||||||
|
wxPostEvent( this, eventDragWire );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
;
|
;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case HK_EDIT_COMPONENT_OR_LABEL:
|
case HK_EDIT_COMPONENT_OR_LABEL:
|
||||||
@ -486,7 +526,7 @@ void WinEDA_SchematicFrame::OnHotKey( wxDC* DC, int hotkey,
|
|||||||
{
|
{
|
||||||
DrawStruct = PickStruct( GetScreen()->m_Curseur,
|
DrawStruct = PickStruct( GetScreen()->m_Curseur,
|
||||||
GetScreen(), LIBITEM | TEXTITEM |
|
GetScreen(), LIBITEM | TEXTITEM |
|
||||||
LABELITEM );
|
LABELITEM | SHEETITEM );
|
||||||
if( DrawStruct == NULL )
|
if( DrawStruct == NULL )
|
||||||
break;
|
break;
|
||||||
if( DrawStruct->Type() == TYPE_SCH_COMPONENT )
|
if( DrawStruct->Type() == TYPE_SCH_COMPONENT )
|
||||||
@ -495,12 +535,22 @@ void WinEDA_SchematicFrame::OnHotKey( wxDC* DC, int hotkey,
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if( DrawStruct )
|
||||||
|
{
|
||||||
|
|
||||||
|
wxCommandEvent eventEditPinsheet(wxEVT_COMMAND_TOOL_CLICKED,
|
||||||
|
ID_POPUP_SCH_EDIT_SHEET);
|
||||||
switch( DrawStruct->Type() )
|
switch( DrawStruct->Type() )
|
||||||
{
|
{
|
||||||
case TYPE_SCH_COMPONENT:
|
case TYPE_SCH_COMPONENT:
|
||||||
InstallCmpeditFrame( this, MousePos,(SCH_COMPONENT*) DrawStruct );
|
InstallCmpeditFrame( this, MousePos,(SCH_COMPONENT*) DrawStruct );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case DRAW_SHEET_STRUCT_TYPE:
|
||||||
|
GetScreen()->SetCurItem( (SCH_ITEM*) DrawStruct );
|
||||||
|
wxPostEvent( this, eventEditPinsheet );
|
||||||
|
break;
|
||||||
|
|
||||||
case TYPE_SCH_TEXT:
|
case TYPE_SCH_TEXT:
|
||||||
case TYPE_SCH_LABEL:
|
case TYPE_SCH_LABEL:
|
||||||
case TYPE_SCH_GLOBALLABEL:
|
case TYPE_SCH_GLOBALLABEL:
|
||||||
@ -511,6 +561,7 @@ void WinEDA_SchematicFrame::OnHotKey( wxDC* DC, int hotkey,
|
|||||||
default:
|
default:
|
||||||
;
|
;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case HK_EDIT_COMPONENT_VALUE:
|
case HK_EDIT_COMPONENT_VALUE:
|
||||||
@ -654,6 +705,18 @@ void WinEDA_LibeditFrame::OnHotKey( wxDC* DC, int hotkey,
|
|||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case HK_LIBEDIT_ROTATE_PIN:
|
||||||
|
m_drawItem = LocateItemUsingCursor();
|
||||||
|
|
||||||
|
if( m_drawItem && m_drawItem->Type() == COMPONENT_PIN_DRAW_TYPE )
|
||||||
|
{
|
||||||
|
cmd.SetId( ID_LIBEDIT_ROTATE_PIN );
|
||||||
|
GetEventHandler()->ProcessEvent( cmd );
|
||||||
|
}
|
||||||
|
|
||||||
|
break;
|
||||||
|
|
||||||
|
|
||||||
case HK_DELETE_PIN:
|
case HK_DELETE_PIN:
|
||||||
m_drawItem = LocateItemUsingCursor();
|
m_drawItem = LocateItemUsingCursor();
|
||||||
|
|
||||||
|
@ -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,
|
||||||
|
@ -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,
|
||||||
|
@ -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 );
|
||||||
|
@ -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 )
|
||||||
|
@ -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:
|
||||||
|
@ -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()
|
|||||||
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()
|
|||||||
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;
|
||||||
|
@ -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,
|
|||||||
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,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
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,
|
|||||||
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" ),
|
|||||||
|
|
||||||
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 )
|
|||||||
{
|
{
|
||||||
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 )
|
|||||||
|
|
||||||
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 )
|
|||||||
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 )
|
|||||||
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 )
|
|||||||
{
|
{
|
||||||
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 )
|
|||||||
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 )
|
|||||||
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 )
|
|||||||
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 )
|
|||||||
{
|
{
|
||||||
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 )
|
|||||||
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,
|
|||||||
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,
|
|||||||
|
|
||||||
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 )
|
|||||||
}
|
}
|
||||||
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 )
|
|||||||
|
|
||||||
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 );
|
||||||
|
@ -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 )
|
||||||
{
|
{
|
||||||
|
@ -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
|
||||||
menubarpcb.cpp
|
menubar_pcbframe.cpp
|
||||||
mirepcb.cpp
|
mirepcb.cpp
|
||||||
modedit.cpp
|
modedit.cpp
|
||||||
modedit_onclick.cpp
|
modedit_onclick.cpp
|
||||||
|
@ -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 =
|
||||||
|
20
pcbnew/dialog_display_options.h
Normal file
20
pcbnew/dialog_display_options.h
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
/**
|
||||||
|
* @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 );
|
||||||
|
};
|
||||||
|
|
@ -1,8 +1,9 @@
|
|||||||
/***************/
|
/**
|
||||||
/* 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[];
|
|||||||
// 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_ */
|
||||||
|
484
pcbnew/menubar_pcbframe.cpp
Normal file
484
pcbnew/menubar_pcbframe.cpp
Normal file
@ -0,0 +1,484 @@
|
|||||||
|
/**
|
||||||
|
* @file menubarpcb.cpp
|
||||||
|
* PCBNew editor menu bar
|
||||||
|
*/
|
||||||
|
#include "fctsys.h"
|
||||||
|
#include "appl_wxstruct.h"
|
||||||
|
#include "common.h"
|
||||||
|
#include "pcbnew.h"
|
||||||
|
#include "wxPcbStruct.h"
|
||||||
|
#include "bitmaps.h"
|
||||||
|
#include "protos.h"
|
||||||
|
#include "hotkeys.h"
|
||||||
|
#include "pcbnew_id.h"
|
||||||
|
|
||||||
|
/**
|
||||||
|
* PCBNew mainframe menubar
|
||||||
|
*/
|
||||||
|
void
|
||||||
|
WinEDA_PcbFrame::ReCreateMenuBar()
|
||||||
|
{
|
||||||
|
wxString text;
|
||||||
|
wxMenuItem* item;
|
||||||
|
wxMenuBar* menuBar = GetMenuBar();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Destroy the existing menu bar so it can be rebuilt. This allows
|
||||||
|
* language changes of the menu text on the fly.
|
||||||
|
*/
|
||||||
|
if( menuBar )
|
||||||
|
SetMenuBar( NULL );
|
||||||
|
menuBar = new wxMenuBar();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* File Menu
|
||||||
|
*/
|
||||||
|
wxMenu* filesMenu = new wxMenu;
|
||||||
|
|
||||||
|
/* New Board */
|
||||||
|
item = new wxMenuItem( filesMenu, ID_NEW_BOARD, _( "&New" ),
|
||||||
|
_( "Clear current board and initialize a new one" ));
|
||||||
|
item->SetBitmap( new_xpm );
|
||||||
|
filesMenu->Append( item );
|
||||||
|
|
||||||
|
/* Load Board */
|
||||||
|
item = new wxMenuItem( filesMenu, ID_LOAD_FILE, _( "&Open" ),
|
||||||
|
_( "Delete current board and load new board" ) );
|
||||||
|
item->SetBitmap( open_xpm );
|
||||||
|
filesMenu->Append( item );
|
||||||
|
|
||||||
|
/* Load Recent submenu */
|
||||||
|
wxMenu* openRecentMenu = new wxMenu();
|
||||||
|
wxGetApp().m_fileHistory.AddFilesToMenu( openRecentMenu );
|
||||||
|
filesMenu->AppendSubMenu( openRecentMenu, _( "Open &Recent" ),
|
||||||
|
_("Open a recent opened document"));
|
||||||
|
|
||||||
|
/* Save */
|
||||||
|
item = new wxMenuItem( filesMenu, ID_SAVE_BOARD,
|
||||||
|
_( "&Save" ),
|
||||||
|
_( "Save current board" ) );
|
||||||
|
item->SetBitmap( save_xpm );
|
||||||
|
filesMenu->Append( item );
|
||||||
|
|
||||||
|
/* Save As */
|
||||||
|
item = new wxMenuItem( filesMenu, ID_SAVE_BOARD_AS,
|
||||||
|
_( "Save as..." ),
|
||||||
|
_( "Save the current board as.." ) );
|
||||||
|
item->SetBitmap( save_as_xpm );
|
||||||
|
filesMenu->Append( item );
|
||||||
|
|
||||||
|
/* Separator */
|
||||||
|
filesMenu->AppendSeparator();
|
||||||
|
|
||||||
|
/* Rescue */
|
||||||
|
item = new wxMenuItem( filesMenu, ID_MENU_RECOVER_BOARD, _( "&Rescue" ),
|
||||||
|
_( "Clear old board and get last rescue file" ) );
|
||||||
|
item->SetBitmap( hammer_xpm );
|
||||||
|
filesMenu->Append( item );
|
||||||
|
|
||||||
|
/* Revert */
|
||||||
|
item = new wxMenuItem( filesMenu, ID_MENU_READ_LAST_SAVED_VERSION_BOARD,
|
||||||
|
_( "&Revert" ),
|
||||||
|
_( "Clear old board and get old version of board" ) );
|
||||||
|
item->SetBitmap( jigsaw_xpm );
|
||||||
|
filesMenu->Append( item );
|
||||||
|
|
||||||
|
/* Separator */
|
||||||
|
filesMenu->AppendSeparator();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/* Fabrication Outputs submenu */
|
||||||
|
wxMenu* fabricationOutputsMenu = new wxMenu;
|
||||||
|
item = new wxMenuItem( fabricationOutputsMenu, ID_PCB_GEN_POS_MODULES_FILE,
|
||||||
|
_( "&Modules Position" ),
|
||||||
|
_( "Generate modules position file for pick and place" ) );
|
||||||
|
item->SetBitmap( post_compo_xpm );
|
||||||
|
fabricationOutputsMenu->Append( item );
|
||||||
|
|
||||||
|
item = new wxMenuItem( fabricationOutputsMenu, ID_PCB_GEN_DRILL_FILE,
|
||||||
|
_( "&Drill File" ),
|
||||||
|
_( "Generate excellon2 drill file" ) );
|
||||||
|
item->SetBitmap( post_drill_xpm );
|
||||||
|
fabricationOutputsMenu->Append( item );
|
||||||
|
|
||||||
|
/* Component File */
|
||||||
|
item = new wxMenuItem( fabricationOutputsMenu, ID_PCB_GEN_CMP_FILE,
|
||||||
|
_( "&Component File" ),
|
||||||
|
_( "(Re)create components file for CvPcb" ) );
|
||||||
|
item->SetBitmap( save_cmpstuff_xpm );
|
||||||
|
fabricationOutputsMenu->Append( item );
|
||||||
|
|
||||||
|
/* BOM File */
|
||||||
|
item = new wxMenuItem( fabricationOutputsMenu, ID_PCB_GEN_BOM_FILE_FROM_BOARD,
|
||||||
|
_( "&BOM File" ),
|
||||||
|
_( "(Re)create bill of materials file for CvPCB" ) );
|
||||||
|
item->SetBitmap( tools_xpm );
|
||||||
|
fabricationOutputsMenu->Append( item );
|
||||||
|
|
||||||
|
/* Fabrications Outputs submenu append */
|
||||||
|
filesMenu->AppendSubMenu( fabricationOutputsMenu,
|
||||||
|
_( "Fabrication Outputs "),
|
||||||
|
_( "Generate files for fabrication" ) );
|
||||||
|
|
||||||
|
/* Import submenu */
|
||||||
|
wxMenu* submenuImport = new wxMenu();
|
||||||
|
|
||||||
|
/* PCBNew Board */
|
||||||
|
item = new wxMenuItem( submenuImport, ID_APPEND_FILE, _( "PCBNew Board" ),
|
||||||
|
_( "Append a other PCBNew board to the current loaded board" ) );
|
||||||
|
item->SetBitmap( pcbnew_xpm );
|
||||||
|
submenuImport->Append( item );
|
||||||
|
|
||||||
|
/* Specctra Session */
|
||||||
|
item = new wxMenuItem( submenuImport, ID_GEN_IMPORT_SPECCTRA_SESSION,
|
||||||
|
_( "&Specctra Session" ),
|
||||||
|
_( "Import a routed \"Specctra Session\" (*.ses) file" ) );
|
||||||
|
item->SetBitmap( import_xpm ); // @todo need better bitmap
|
||||||
|
submenuImport->Append( item );
|
||||||
|
|
||||||
|
/**
|
||||||
|
* would be implemented in WinEDA_PcbFrame::ImportSpecctraDesign() in
|
||||||
|
* specctra_import.cpp
|
||||||
|
* item = new wxMenuItem(submenuImport, ID_GEN_IMPORT_SPECCTRA_DESIGN,
|
||||||
|
* _("&Specctra Design"), _("Import a \"Specctra Design\" (*.dsn) file") );
|
||||||
|
* item->SetBitmap(export_xpm); // @todo need better bitmap
|
||||||
|
* submenuImport->Append(item);
|
||||||
|
*/
|
||||||
|
|
||||||
|
ADD_MENUITEM_WITH_HELP_AND_SUBMENU( filesMenu, submenuImport,
|
||||||
|
ID_GEN_IMPORT_FILE, _( "Import" ),
|
||||||
|
_( "Import files" ), import_xpm );
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/* Export submenu */
|
||||||
|
wxMenu* submenuexport = new wxMenu();
|
||||||
|
|
||||||
|
/* Specctra DSN */
|
||||||
|
item = new wxMenuItem( submenuexport, ID_GEN_EXPORT_SPECCTRA,
|
||||||
|
_( "&Specctra DSN" ),
|
||||||
|
_( "Export the current board to a \"Specctra DSN\" file" ) );
|
||||||
|
item->SetBitmap( export_xpm );
|
||||||
|
submenuexport->Append( item );
|
||||||
|
|
||||||
|
/* Export GenCAD Format */
|
||||||
|
item = new wxMenuItem( submenuexport, ID_GEN_EXPORT_FILE_GENCADFORMAT,
|
||||||
|
_( "&GenCAD" ), _( "Export GenCAD Format" ) );
|
||||||
|
item->SetBitmap( export_xpm );
|
||||||
|
submenuexport->Append( item );
|
||||||
|
|
||||||
|
/* Module Report */
|
||||||
|
item = new wxMenuItem( submenuexport, ID_GEN_EXPORT_FILE_MODULE_REPORT,
|
||||||
|
_( "&Module Report" ),
|
||||||
|
_( "Create a report of all modules on the current board" ) );
|
||||||
|
item->SetBitmap( tools_xpm );
|
||||||
|
submenuexport->Append( item );
|
||||||
|
ADD_MENUITEM_WITH_HELP_AND_SUBMENU( filesMenu, submenuexport,
|
||||||
|
ID_GEN_EXPORT_FILE, _( "&Export" ),
|
||||||
|
_( "Export board" ), export_xpm );
|
||||||
|
|
||||||
|
/* Separator */
|
||||||
|
filesMenu->AppendSeparator();
|
||||||
|
|
||||||
|
/* Print */
|
||||||
|
item = new wxMenuItem( filesMenu, ID_GEN_PRINT, _( "P&rint" ),
|
||||||
|
_( "Print pcb board" ) );
|
||||||
|
item->SetBitmap( print_button );
|
||||||
|
filesMenu->Append( item );
|
||||||
|
|
||||||
|
/* Print SVG */
|
||||||
|
item = new wxMenuItem( filesMenu, ID_GEN_PLOT_SVG, _( "Print S&VG" ),
|
||||||
|
_( "Plot board in Scalable Vector Graphics format" ) );
|
||||||
|
item->SetBitmap( print_button );
|
||||||
|
filesMenu->Append( item );
|
||||||
|
|
||||||
|
/* Plot */
|
||||||
|
item = new wxMenuItem( filesMenu, ID_GEN_PLOT, _( "&Plot" ),
|
||||||
|
_( "Plot board in HPGL, PostScript or Gerber RS-274X format)" ) );
|
||||||
|
item->SetBitmap( plot_xpm );
|
||||||
|
filesMenu->Append( item );
|
||||||
|
|
||||||
|
/* Archive Footprints */
|
||||||
|
filesMenu->AppendSeparator();
|
||||||
|
wxMenu* submenuarchive = new wxMenu();
|
||||||
|
item = new wxMenuItem( submenuarchive, ID_MENU_ARCHIVE_NEW_MODULES,
|
||||||
|
_( "Add New Footprints" ),
|
||||||
|
_( "Archive new footprints only in a library (keep other footprints in this lib)" ) );
|
||||||
|
item->SetBitmap( library_update_xpm );
|
||||||
|
submenuarchive->Append( item );
|
||||||
|
item = new wxMenuItem( submenuarchive, ID_MENU_ARCHIVE_ALL_MODULES,
|
||||||
|
_( "Create Footprint Archive" ),
|
||||||
|
_( "Archive all footprints in a library(old lib will be deleted)" ) );
|
||||||
|
item->SetBitmap( library_xpm );
|
||||||
|
submenuarchive->Append( item );
|
||||||
|
ADD_MENUITEM_WITH_HELP_AND_SUBMENU( filesMenu, submenuarchive,
|
||||||
|
ID_MENU_ARCHIVE_MODULES,
|
||||||
|
_( "Archive Footprints" ),
|
||||||
|
_( "Archive or add footprints in a library file" ),
|
||||||
|
library_xpm );
|
||||||
|
|
||||||
|
/* Exit */
|
||||||
|
filesMenu->AppendSeparator();
|
||||||
|
item = new wxMenuItem( filesMenu, ID_EXIT, _( "&Quit" ),
|
||||||
|
_( "Quit PCBNew" ) );
|
||||||
|
item->SetBitmap( exit_xpm );
|
||||||
|
filesMenu->Append( item );
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Edit menu
|
||||||
|
*/
|
||||||
|
wxMenu* editMenu = new wxMenu;
|
||||||
|
|
||||||
|
/* Undo */
|
||||||
|
/* TODO add Undo hotkey */
|
||||||
|
item = new wxMenuItem( editMenu, ID_UNDO_BUTT, _( "Undo"),
|
||||||
|
_( "Undo last edition" ), wxITEM_NORMAL );
|
||||||
|
item->SetBitmap( undo_xpm );
|
||||||
|
editMenu->Append( item );
|
||||||
|
|
||||||
|
/* Redo */
|
||||||
|
/* TODO add Redo hotkey */
|
||||||
|
item = new wxMenuItem( editMenu, ID_REDO_BUTT, _( "Redo" ),
|
||||||
|
_( "Redo the last undo command" ), wxITEM_NORMAL );
|
||||||
|
item->SetBitmap( redo_xpm );
|
||||||
|
editMenu->Append( item );
|
||||||
|
|
||||||
|
/* Separator */
|
||||||
|
editMenu->AppendSeparator();
|
||||||
|
|
||||||
|
/* Find */
|
||||||
|
text = AddHotkeyName( _( "&Find..." ), s_Pcbnew_Editor_Hokeys_Descr, HK_FIND_ITEM);
|
||||||
|
item = new wxMenuItem( editMenu, ID_FIND_ITEMS, text,
|
||||||
|
_("Find components and text in current loaded board") );
|
||||||
|
editMenu->Append( item );
|
||||||
|
|
||||||
|
/* Separator */
|
||||||
|
editMenu->AppendSeparator();
|
||||||
|
|
||||||
|
/* Global Deletions */
|
||||||
|
item = new wxMenuItem( editMenu, ID_PCB_GLOBAL_DELETE,
|
||||||
|
_( "Global &Deletions" ),
|
||||||
|
_( "Delete tracks, modules, texts... on board" ) );
|
||||||
|
item->SetBitmap( general_deletions_xpm );
|
||||||
|
editMenu->Append( item );
|
||||||
|
|
||||||
|
/* Tracks */
|
||||||
|
item = new wxMenuItem( editMenu, ID_MENU_PCB_CLEAN,
|
||||||
|
_( "&Tracks" ),
|
||||||
|
_( "Clean stubs, vias, delete break points, or connect dangling tracks to pads and vias" ) );
|
||||||
|
item->SetBitmap( delete_body_xpm );
|
||||||
|
editMenu->Append( item );
|
||||||
|
|
||||||
|
/* Swap Layers */
|
||||||
|
item = new wxMenuItem( editMenu, ID_MENU_PCB_SWAP_LAYERS,
|
||||||
|
_( "&Swap Layers" ),
|
||||||
|
_( "Swap tracks on copper layers or drawings on others layers" ) );
|
||||||
|
item->SetBitmap( swap_layer_xpm );
|
||||||
|
editMenu->Append( item );
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* View menu
|
||||||
|
*/
|
||||||
|
wxMenu* viewMenu = new wxMenu;
|
||||||
|
|
||||||
|
/* Zoom in */
|
||||||
|
text = AddHotkeyName( _( "Zoom in" ), s_Pcbnew_Editor_Hokeys_Descr, HK_ZOOM_IN);
|
||||||
|
item = new wxMenuItem( viewMenu, ID_ZOOM_IN, text, _( "Zoom in" ),
|
||||||
|
wxITEM_NORMAL );
|
||||||
|
item->SetBitmap( zoom_in_xpm );
|
||||||
|
viewMenu->Append( item );
|
||||||
|
|
||||||
|
/* Zoom out */
|
||||||
|
text = AddHotkeyName( _( "Zoom out" ), s_Pcbnew_Editor_Hokeys_Descr,
|
||||||
|
HK_ZOOM_OUT );
|
||||||
|
item = new wxMenuItem( viewMenu, ID_ZOOM_OUT, text, _( "Zoom out" ),
|
||||||
|
wxITEM_NORMAL );
|
||||||
|
item->SetBitmap( zoom_out_xpm );
|
||||||
|
viewMenu->Append( item );
|
||||||
|
|
||||||
|
/* Zoom auto */
|
||||||
|
text = AddHotkeyName( _( "Zoom auto" ), s_Pcbnew_Editor_Hokeys_Descr,
|
||||||
|
HK_ZOOM_AUTO );
|
||||||
|
item = new wxMenuItem( viewMenu, ID_ZOOM_PAGE, text, _( "Zoom auto" ),
|
||||||
|
wxITEM_NORMAL );
|
||||||
|
item->SetBitmap( zoom_auto_xpm );
|
||||||
|
viewMenu->Append( item );
|
||||||
|
|
||||||
|
viewMenu->AppendSeparator();
|
||||||
|
|
||||||
|
/* Redraw view */
|
||||||
|
text = AddHotkeyName( _( "Redraw view" ), s_Pcbnew_Editor_Hokeys_Descr,
|
||||||
|
HK_ZOOM_REDRAW );
|
||||||
|
item = new wxMenuItem( viewMenu, ID_ZOOM_REDRAW, text, _( "Zoom auto" ),
|
||||||
|
wxITEM_NORMAL );
|
||||||
|
item->SetBitmap( zoom_redraw_xpm );
|
||||||
|
viewMenu->Append( item );
|
||||||
|
|
||||||
|
/* Separator */
|
||||||
|
viewMenu->AppendSeparator();
|
||||||
|
|
||||||
|
/* List of Nets */
|
||||||
|
item = new wxMenuItem( viewMenu, ID_MENU_LIST_NETS, _( "&List Nets" ),
|
||||||
|
_( "View a list of nets with names and id's" ) );
|
||||||
|
item->SetBitmap( tools_xpm );
|
||||||
|
viewMenu->Append( item );
|
||||||
|
|
||||||
|
|
||||||
|
/* 3D Display */
|
||||||
|
item = new wxMenuItem( viewMenu, ID_MENU_PCB_SHOW_3D_FRAME,
|
||||||
|
_( "3D Display" ), _( "Show board in the 3D viewer" ) );
|
||||||
|
item->SetBitmap( show_3d_xpm );
|
||||||
|
viewMenu->Append( item );
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Preferences and configuration
|
||||||
|
*/
|
||||||
|
wxMenu* configmenu = new wxMenu;
|
||||||
|
|
||||||
|
/* Library */
|
||||||
|
item = new wxMenuItem( configmenu, ID_CONFIG_REQ, _( "&Library" ),
|
||||||
|
_( "Setting libraries, directories and others..." ) );
|
||||||
|
item->SetBitmap( library_xpm );
|
||||||
|
configmenu->Append( item );
|
||||||
|
|
||||||
|
/* Colors and Visibility */
|
||||||
|
item = new wxMenuItem( configmenu, ID_COLORS_SETUP,
|
||||||
|
_( "&Colors and Visibility" ),
|
||||||
|
_( "Select colors and visibility of layers and some items" ) );
|
||||||
|
item->SetBitmap( palette_xpm );
|
||||||
|
configmenu->Append( item );
|
||||||
|
|
||||||
|
/* General */
|
||||||
|
item = new wxMenuItem( configmenu, ID_OPTIONS_SETUP, _( "&General" ),
|
||||||
|
_( "Select general options for PCBnew" ) );
|
||||||
|
item->SetBitmap( preference_xpm );
|
||||||
|
configmenu->Append( item );
|
||||||
|
|
||||||
|
/* Display */
|
||||||
|
item = new wxMenuItem( configmenu, ID_PCB_DISPLAY_OPTIONS_SETUP,
|
||||||
|
_( "&Display" ),
|
||||||
|
_( "Select how items (pads, tracks texts ... ) are displayed" ) );
|
||||||
|
item->SetBitmap( display_options_xpm );
|
||||||
|
configmenu->Append( item );
|
||||||
|
|
||||||
|
/* Dimensions submenu */
|
||||||
|
wxMenu* dimensionsMenu = new wxMenu;
|
||||||
|
|
||||||
|
/* Grid */
|
||||||
|
item = new wxMenuItem( dimensionsMenu, ID_PCB_USER_GRID_SETUP, _( "Grid" ),
|
||||||
|
_( "Adjust user grid dimensions" ) );
|
||||||
|
item->SetBitmap( grid_xpm );
|
||||||
|
dimensionsMenu->Append( item );
|
||||||
|
|
||||||
|
/* Text and Drawings */
|
||||||
|
item = new wxMenuItem( dimensionsMenu, ID_PCB_DRAWINGS_WIDTHS_SETUP,
|
||||||
|
_( "Texts and Drawings" ),
|
||||||
|
_( "Adjust dimensions for texts and drawings" ) );
|
||||||
|
item->SetBitmap( options_text_xpm );
|
||||||
|
dimensionsMenu->Append( item );
|
||||||
|
|
||||||
|
/* Pads */
|
||||||
|
item = new wxMenuItem( dimensionsMenu, ID_PCB_PAD_SETUP, _( "Pads" ),
|
||||||
|
_( "Adjust pads shape, dimensions, layers" ) );
|
||||||
|
item->SetBitmap( pad_xpm );
|
||||||
|
dimensionsMenu->Append( item );
|
||||||
|
|
||||||
|
/* Pads Mask Clearance */
|
||||||
|
item = new wxMenuItem( dimensionsMenu, ID_PCB_MASK_CLEARANCE,
|
||||||
|
_( "Pads Mask Clearance" ),
|
||||||
|
_( "Adjust the global clearance between pads and the solder resist mask" ) );
|
||||||
|
item->SetBitmap( pad_xpm );
|
||||||
|
dimensionsMenu->Append( item );
|
||||||
|
|
||||||
|
|
||||||
|
/* Save */
|
||||||
|
dimensionsMenu->AppendSeparator();
|
||||||
|
item = new wxMenuItem( dimensionsMenu, ID_CONFIG_SAVE, _( "&Save" ),
|
||||||
|
_( "Save dimension preferences" ) );
|
||||||
|
item->SetBitmap( save_xpm );
|
||||||
|
dimensionsMenu->Append( item );
|
||||||
|
configmenu->AppendSubMenu( dimensionsMenu, _( "Di&mensions" ),
|
||||||
|
_( "Global dimensions preferences" ));
|
||||||
|
|
||||||
|
/* Language submenu */
|
||||||
|
wxGetApp().AddMenuLanguageList( configmenu );
|
||||||
|
|
||||||
|
/* Hotkey submenu */
|
||||||
|
AddHotkeyConfigMenu( configmenu );
|
||||||
|
|
||||||
|
/* Separator */
|
||||||
|
configmenu->AppendSeparator();
|
||||||
|
|
||||||
|
/* Save Preferences */
|
||||||
|
item = new wxMenuItem( configmenu, ID_CONFIG_SAVE, _( "&Save Preferences" ),
|
||||||
|
_( "Save application preferences" ) );
|
||||||
|
item->SetBitmap( save_setup_xpm );
|
||||||
|
configmenu->Append( item );
|
||||||
|
|
||||||
|
/* Read Preferences */
|
||||||
|
item = new wxMenuItem( configmenu, ID_CONFIG_READ, _( "&Read Preferences" ),
|
||||||
|
_( "Read application preferences" ) );
|
||||||
|
item->SetBitmap( read_setup_xpm );
|
||||||
|
configmenu->Append( item );
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Design Rules menu
|
||||||
|
*/
|
||||||
|
wxMenu* designRulesMenu = new wxMenu;
|
||||||
|
|
||||||
|
/* Design Rules */
|
||||||
|
item = new wxMenuItem( designRulesMenu, ID_MENU_PCB_SHOW_DESIGN_RULES_DIALOG,
|
||||||
|
_( "Design Rules" ),
|
||||||
|
_( "Open the design rules dialog editor" ) );
|
||||||
|
item->SetBitmap( hammer_xpm );
|
||||||
|
designRulesMenu->Append( item );
|
||||||
|
|
||||||
|
/* Layers Setup */
|
||||||
|
item = new wxMenuItem( configmenu, ID_PCB_LAYERS_SETUP, _( "&Layers Setup" ),
|
||||||
|
_( "Enable and set properties of layers" ) );
|
||||||
|
item->SetBitmap( copper_layers_setup_xpm );
|
||||||
|
designRulesMenu->Append( item );
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Help menu
|
||||||
|
*/
|
||||||
|
wxMenu* helpMenu = new wxMenu;
|
||||||
|
item = new wxMenuItem( helpMenu, ID_GENERAL_HELP, _( "&Contents" ),
|
||||||
|
_( "Open the PCBnew manual" ) );
|
||||||
|
item->SetBitmap( help_xpm );
|
||||||
|
helpMenu->Append( item );
|
||||||
|
|
||||||
|
item = new wxMenuItem( helpMenu, ID_KICAD_ABOUT, _( "&About" ),
|
||||||
|
_( "About PCBnew printed circuit board designer" ) );
|
||||||
|
item->SetBitmap( info_xpm );
|
||||||
|
helpMenu->Append( item );
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Append all menus to the menuBar
|
||||||
|
*/
|
||||||
|
menuBar->Append( filesMenu, _( "&File" ) );
|
||||||
|
menuBar->Append( editMenu, _( "&Edit") );
|
||||||
|
menuBar->Append( viewMenu, _( "&View" ) );
|
||||||
|
menuBar->Append( configmenu, _( "&Preferences" ) );
|
||||||
|
menuBar->Append( designRulesMenu, _( "&Design Rules" ) );
|
||||||
|
menuBar->Append( helpMenu, _( "&Help" ) );
|
||||||
|
|
||||||
|
/* Associate the menu bar with the frame */
|
||||||
|
SetMenuBar( menuBar );
|
||||||
|
}
|
||||||
|
|
@ -1,342 +0,0 @@
|
|||||||
/*****************************************/
|
|
||||||
/* menubarpcb.cpp - PCB editor menu bar. */
|
|
||||||
/*****************************************/
|
|
||||||
#include "fctsys.h"
|
|
||||||
#include "appl_wxstruct.h"
|
|
||||||
#include "common.h"
|
|
||||||
#include "pcbnew.h"
|
|
||||||
#include "wxPcbStruct.h"
|
|
||||||
#include "bitmaps.h"
|
|
||||||
#include "protos.h"
|
|
||||||
#include "hotkeys.h"
|
|
||||||
#include "pcbnew_id.h"
|
|
||||||
|
|
||||||
|
|
||||||
void WinEDA_PcbFrame::ReCreateMenuBar()
|
|
||||||
{
|
|
||||||
wxMenuItem* item;
|
|
||||||
wxMenuBar* menuBar = GetMenuBar();
|
|
||||||
|
|
||||||
/* Destroy the existing menu bar so it can be rebuilt. This allows
|
|
||||||
* language changes of the menu text on the fly. */
|
|
||||||
if( menuBar )
|
|
||||||
SetMenuBar( NULL );
|
|
||||||
|
|
||||||
menuBar = new wxMenuBar();
|
|
||||||
wxMenu* filesMenu = new wxMenu;
|
|
||||||
|
|
||||||
// New board
|
|
||||||
item = new wxMenuItem( filesMenu, ID_NEW_BOARD, _( "&New Board" ),
|
|
||||||
_( "Clear old board and initialize a new one" ) );
|
|
||||||
item->SetBitmap( new_xpm );
|
|
||||||
filesMenu->Append( item );
|
|
||||||
|
|
||||||
// Load board
|
|
||||||
item = new wxMenuItem( filesMenu, ID_LOAD_FILE, _( "&Load Board" ),
|
|
||||||
_( "Delete old board and load new board" ) );
|
|
||||||
item->SetBitmap( open_xpm );
|
|
||||||
filesMenu->Append( item );
|
|
||||||
|
|
||||||
// Append board
|
|
||||||
item = new wxMenuItem( filesMenu, ID_APPEND_FILE, _( "Append Board" ),
|
|
||||||
_( "Add board to old board" ) );
|
|
||||||
item->SetBitmap( import_xpm );
|
|
||||||
filesMenu->Append( item );
|
|
||||||
|
|
||||||
|
|
||||||
item = new wxMenuItem( filesMenu, ID_MENU_RECOVER_BOARD, _( "&Rescue" ),
|
|
||||||
_( "Clear old board and get last rescue file" ) );
|
|
||||||
item->SetBitmap( hammer_xpm );
|
|
||||||
filesMenu->Append( item );
|
|
||||||
|
|
||||||
item = new wxMenuItem( filesMenu, ID_MENU_READ_LAST_SAVED_VERSION_BOARD,
|
|
||||||
_( "&Previous Version" ),
|
|
||||||
_( "Clear old board and get old version of board" ) );
|
|
||||||
item->SetBitmap( jigsaw_xpm );
|
|
||||||
filesMenu->Append( item );
|
|
||||||
|
|
||||||
// Add save menu
|
|
||||||
filesMenu->AppendSeparator();
|
|
||||||
item = new wxMenuItem( filesMenu, ID_SAVE_BOARD,
|
|
||||||
_( "&Save Board\tCtrl-S" ),
|
|
||||||
_( "Save current board" ) );
|
|
||||||
item->SetBitmap( save_xpm );
|
|
||||||
filesMenu->Append( item );
|
|
||||||
|
|
||||||
item = new wxMenuItem( filesMenu, ID_SAVE_BOARD_AS,
|
|
||||||
_( "Save Board as..." ),
|
|
||||||
_( "Save current board as.." ) );
|
|
||||||
item->SetBitmap( save_as_xpm );
|
|
||||||
filesMenu->Append( item );
|
|
||||||
|
|
||||||
// Add print menu
|
|
||||||
filesMenu->AppendSeparator();
|
|
||||||
item = new wxMenuItem( filesMenu, ID_GEN_PRINT, _( "P&rint" ),
|
|
||||||
_( "Print pcb board" ) );
|
|
||||||
item->SetBitmap( print_button );
|
|
||||||
filesMenu->Append( item );
|
|
||||||
|
|
||||||
item = new wxMenuItem( filesMenu, ID_GEN_PLOT_SVG, _( "Print S&VG" ),
|
|
||||||
_( "Plot pcb board in SVG format" ) );
|
|
||||||
item->SetBitmap( print_button );
|
|
||||||
filesMenu->Append( item );
|
|
||||||
|
|
||||||
// Add plot menu
|
|
||||||
item = new wxMenuItem( filesMenu, ID_GEN_PLOT, _( "&Plot" ),
|
|
||||||
_( "Plot (HPGL, PostScript, or Gerber format)" ) );
|
|
||||||
item->SetBitmap( plot_xpm );
|
|
||||||
filesMenu->Append( item );
|
|
||||||
|
|
||||||
// Add Export menu
|
|
||||||
filesMenu->AppendSeparator();
|
|
||||||
wxMenu* submenuexport = new wxMenu();
|
|
||||||
|
|
||||||
item = new wxMenuItem( submenuexport, ID_GEN_EXPORT_SPECCTRA,
|
|
||||||
_( "&Specctra DSN" ),
|
|
||||||
_( "Export the current board to a \"Specctra DSN\" file" ) );
|
|
||||||
item->SetBitmap( export_xpm );
|
|
||||||
submenuexport->Append( item );
|
|
||||||
|
|
||||||
item = new wxMenuItem( submenuexport, ID_GEN_EXPORT_FILE_GENCADFORMAT,
|
|
||||||
_( "&GenCAD" ), _( "Export GenCAD Format" ) );
|
|
||||||
item->SetBitmap( export_xpm );
|
|
||||||
submenuexport->Append( item );
|
|
||||||
|
|
||||||
item = new wxMenuItem( submenuexport, ID_GEN_EXPORT_FILE_MODULE_REPORT,
|
|
||||||
_( "&Module Report" ),
|
|
||||||
_( "Create a board report (footprint report)" ) );
|
|
||||||
item->SetBitmap( tools_xpm );
|
|
||||||
submenuexport->Append( item );
|
|
||||||
ADD_MENUITEM_WITH_HELP_AND_SUBMENU( filesMenu, submenuexport,
|
|
||||||
ID_GEN_EXPORT_FILE, _( "&Export" ),
|
|
||||||
_( "Export board" ), export_xpm );
|
|
||||||
|
|
||||||
|
|
||||||
//-----<Add import menu>-----------------------------------------------
|
|
||||||
// no separator, keep it next to Import
|
|
||||||
wxMenu* submenuImport = new wxMenu();
|
|
||||||
|
|
||||||
item = new wxMenuItem( submenuImport, ID_GEN_IMPORT_SPECCTRA_SESSION,
|
|
||||||
_( "&Specctra Session" ),
|
|
||||||
_( "Import a routed \"Specctra Session\" (*.ses) file" ) );
|
|
||||||
item->SetBitmap( import_xpm ); // @todo need better bitmap
|
|
||||||
submenuImport->Append( item );
|
|
||||||
|
|
||||||
/* would be implemented in WinEDA_PcbFrame::ImportSpecctraDesign() in
|
|
||||||
* specctra_import.cpp
|
|
||||||
* item = new wxMenuItem(submenuImport, ID_GEN_IMPORT_SPECCTRA_DESIGN,
|
|
||||||
* _("&Specctra Design"), _("Import a \"Specctra Design\" (*.dsn) file") );
|
|
||||||
* item->SetBitmap(export_xpm); // @todo need better bitmap
|
|
||||||
* submenuImport->Append(item);
|
|
||||||
*/
|
|
||||||
|
|
||||||
ADD_MENUITEM_WITH_HELP_AND_SUBMENU( filesMenu, submenuImport,
|
|
||||||
ID_GEN_IMPORT_FILE, _( "Import" ),
|
|
||||||
_( "Import files" ), import_xpm );
|
|
||||||
|
|
||||||
//-----</Add import menu>----------------------------------------------
|
|
||||||
|
|
||||||
// Add archive footprints menu
|
|
||||||
filesMenu->AppendSeparator();
|
|
||||||
wxMenu* submenuarchive = new wxMenu();
|
|
||||||
item = new wxMenuItem( submenuarchive, ID_MENU_ARCHIVE_NEW_MODULES,
|
|
||||||
_( "Add New Footprints" ),
|
|
||||||
_( "Archive new footprints only in a library (keep other footprints in this lib)" ) );
|
|
||||||
item->SetBitmap( library_update_xpm );
|
|
||||||
submenuarchive->Append( item );
|
|
||||||
item = new wxMenuItem( submenuarchive, ID_MENU_ARCHIVE_ALL_MODULES,
|
|
||||||
_( "Create Footprint Archive" ),
|
|
||||||
_( "Archive all footprints in a library(old lib will be deleted)" ) );
|
|
||||||
item->SetBitmap( library_xpm );
|
|
||||||
submenuarchive->Append( item );
|
|
||||||
ADD_MENUITEM_WITH_HELP_AND_SUBMENU( filesMenu, submenuarchive,
|
|
||||||
ID_MENU_ARCHIVE_MODULES,
|
|
||||||
_( "Archive Footprints" ),
|
|
||||||
_( "Archive or add footprints in a library file" ),
|
|
||||||
library_xpm );
|
|
||||||
|
|
||||||
// Add exit menu
|
|
||||||
filesMenu->AppendSeparator();
|
|
||||||
item = new wxMenuItem( filesMenu, ID_EXIT, _( "E&xit" ),
|
|
||||||
_( "Quit PCBnew" ) );
|
|
||||||
item->SetBitmap( exit_xpm );
|
|
||||||
filesMenu->Append( item );
|
|
||||||
|
|
||||||
wxGetApp().m_fileHistory.AddFilesToMenu( filesMenu );
|
|
||||||
|
|
||||||
///////////////////////////////////
|
|
||||||
// Preferences and configuration //
|
|
||||||
///////////////////////////////////
|
|
||||||
wxMenu* configmenu = new wxMenu;
|
|
||||||
item = new wxMenuItem( configmenu, ID_CONFIG_REQ, _( "&Library" ),
|
|
||||||
_( "Setting libraries, directories and others..." ) );
|
|
||||||
item->SetBitmap( library_xpm );
|
|
||||||
configmenu->Append( item );
|
|
||||||
|
|
||||||
item = new wxMenuItem( configmenu, ID_COLORS_SETUP,
|
|
||||||
_( "&Colors and Visibility" ),
|
|
||||||
_( "Select colors and visibility of layers and some items" ) );
|
|
||||||
item->SetBitmap( palette_xpm );
|
|
||||||
configmenu->Append( item );
|
|
||||||
|
|
||||||
item = new wxMenuItem( configmenu, ID_OPTIONS_SETUP, _( "&General" ),
|
|
||||||
_( "Select general options for PCBnew" ) );
|
|
||||||
item->SetBitmap( preference_xpm );
|
|
||||||
configmenu->Append( item );
|
|
||||||
|
|
||||||
item = new wxMenuItem( configmenu, ID_PCB_DISPLAY_OPTIONS_SETUP,
|
|
||||||
_( "&Display" ),
|
|
||||||
_( "Select how items (pads, tracks texts ... ) are displayed" ) );
|
|
||||||
item->SetBitmap( display_options_xpm );
|
|
||||||
configmenu->Append( item );
|
|
||||||
|
|
||||||
wxGetApp().AddMenuLanguageList( configmenu );
|
|
||||||
|
|
||||||
AddHotkeyConfigMenu( configmenu );
|
|
||||||
|
|
||||||
configmenu->AppendSeparator();
|
|
||||||
item = new wxMenuItem( configmenu, ID_CONFIG_SAVE, _( "&Save Preferences" ),
|
|
||||||
_( "Save application preferences" ) );
|
|
||||||
item->SetBitmap( save_setup_xpm );
|
|
||||||
configmenu->Append( item );
|
|
||||||
|
|
||||||
item = new wxMenuItem( configmenu, ID_CONFIG_READ, _( "&Read Preferences" ),
|
|
||||||
_( "Read application preferences" ) );
|
|
||||||
item->SetBitmap( read_setup_xpm );
|
|
||||||
configmenu->Append( item );
|
|
||||||
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////
|
|
||||||
// Add access to the Design Rules Dialog and layers setup //
|
|
||||||
////////////////////////////////////////////////////////////
|
|
||||||
wxMenu* designRulesMenu = new wxMenu;
|
|
||||||
item = new wxMenuItem( designRulesMenu, ID_MENU_PCB_SHOW_DESIGN_RULES_DIALOG,
|
|
||||||
_( "Design Rules" ),
|
|
||||||
_( "Open the design rules dialog editor" ) );
|
|
||||||
item->SetBitmap( hammer_xpm );
|
|
||||||
designRulesMenu->Append( item );
|
|
||||||
|
|
||||||
item = new wxMenuItem( configmenu, ID_PCB_LAYERS_SETUP, _( "&Layers Setup" ),
|
|
||||||
_( "Enable and set properties of layers" ) );
|
|
||||||
item->SetBitmap( copper_layers_setup_xpm );
|
|
||||||
designRulesMenu->Append( item );
|
|
||||||
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////
|
|
||||||
// dimensions of some items (excluding tracks and vias //
|
|
||||||
/////////////////////////////////////////////////////////
|
|
||||||
wxMenu* sizes_menu = new wxMenu;
|
|
||||||
|
|
||||||
item = new wxMenuItem( sizes_menu, ID_PCB_MASK_CLEARANCE,
|
|
||||||
_( "Pads Mask Clearance" ),
|
|
||||||
_( "Adjust the global clearance between pads and the solder resist mask" ) );
|
|
||||||
item->SetBitmap( pad_xpm );
|
|
||||||
sizes_menu->Append( item );
|
|
||||||
|
|
||||||
item = new wxMenuItem( sizes_menu, ID_PCB_USER_GRID_SETUP, _( "Grid" ),
|
|
||||||
_( "Adjust User Grid" ) );
|
|
||||||
item->SetBitmap( grid_xpm );
|
|
||||||
sizes_menu->Append( item );
|
|
||||||
|
|
||||||
item = new wxMenuItem( sizes_menu, ID_PCB_DRAWINGS_WIDTHS_SETUP,
|
|
||||||
_( "Texts and Drawings" ),
|
|
||||||
_( "Adjust width for texts and drawings" ) );
|
|
||||||
item->SetBitmap( options_text_xpm );
|
|
||||||
sizes_menu->Append( item );
|
|
||||||
|
|
||||||
item = new wxMenuItem( sizes_menu, ID_PCB_PAD_SETUP, _( "Pads" ),
|
|
||||||
_( "Adjust size,shape,layers... for pads" ) );
|
|
||||||
item->SetBitmap( pad_xpm );
|
|
||||||
sizes_menu->Append( item );
|
|
||||||
|
|
||||||
sizes_menu->AppendSeparator();
|
|
||||||
item = new wxMenuItem( sizes_menu, ID_CONFIG_SAVE, _( "&Save Setup" ),
|
|
||||||
_( "Save options in current directory" ) );
|
|
||||||
item->SetBitmap( save_xpm );
|
|
||||||
sizes_menu->Append( item );
|
|
||||||
|
|
||||||
wxMenu* postprocess_menu = new wxMenu;
|
|
||||||
item = new wxMenuItem( postprocess_menu, ID_PCB_GEN_POS_MODULES_FILE,
|
|
||||||
_( "Generate &Modules Position" ),
|
|
||||||
_( "Generate modules position file" ) );
|
|
||||||
item->SetBitmap( post_compo_xpm );
|
|
||||||
postprocess_menu->Append( item );
|
|
||||||
|
|
||||||
item = new wxMenuItem( postprocess_menu, ID_PCB_GEN_DRILL_FILE,
|
|
||||||
_( "Create &Drill File" ),
|
|
||||||
_( "Generate excellon2 drill file" ) );
|
|
||||||
item->SetBitmap( post_drill_xpm );
|
|
||||||
postprocess_menu->Append( item );
|
|
||||||
|
|
||||||
item = new wxMenuItem( postprocess_menu, ID_PCB_GEN_CMP_FILE,
|
|
||||||
_( "Create &Component File" ),
|
|
||||||
_( "Recreate .cmp file for CvPcb" ) );
|
|
||||||
item->SetBitmap( save_cmpstuff_xpm );
|
|
||||||
postprocess_menu->Append( item );
|
|
||||||
|
|
||||||
item = new wxMenuItem( postprocess_menu, ID_PCB_GEN_BOM_FILE_FROM_BOARD,
|
|
||||||
_( "Create &BOM File" ),
|
|
||||||
_( "Recreate .csv file for CvPcb" ) );
|
|
||||||
item->SetBitmap( tools_xpm );
|
|
||||||
postprocess_menu->Append( item );
|
|
||||||
|
|
||||||
wxMenu* miscellaneous_menu = new wxMenu;
|
|
||||||
item = new wxMenuItem( miscellaneous_menu, ID_PCB_GLOBAL_DELETE,
|
|
||||||
_( "Global &Deletions" ),
|
|
||||||
_( "Delete tracks, modules, texts... on board" ) );
|
|
||||||
item->SetBitmap( general_deletions_xpm );
|
|
||||||
miscellaneous_menu->Append( item );
|
|
||||||
|
|
||||||
item =
|
|
||||||
new wxMenuItem( miscellaneous_menu, ID_MENU_LIST_NETS, _( "&List Nets" ),
|
|
||||||
_( "List nets (names and id)" ) );
|
|
||||||
item->SetBitmap( tools_xpm );
|
|
||||||
miscellaneous_menu->Append( item );
|
|
||||||
|
|
||||||
item = new wxMenuItem( miscellaneous_menu, ID_MENU_PCB_CLEAN,
|
|
||||||
_( "&Track Operations" ),
|
|
||||||
_( "Clean stubs, vias, delete break points, or connect dangling tracks to pads and vias" ) );
|
|
||||||
item->SetBitmap( delete_body_xpm );
|
|
||||||
miscellaneous_menu->Append( item );
|
|
||||||
|
|
||||||
item = new wxMenuItem( miscellaneous_menu, ID_MENU_PCB_SWAP_LAYERS,
|
|
||||||
_( "&Swap Layers" ),
|
|
||||||
_( "Swap tracks on copper layers or drawings on others layers" ) );
|
|
||||||
item->SetBitmap( swap_layer_xpm );
|
|
||||||
miscellaneous_menu->Append( item );
|
|
||||||
|
|
||||||
////////////////
|
|
||||||
// Menu Help: //
|
|
||||||
////////////////
|
|
||||||
wxMenu* helpMenu = new wxMenu;
|
|
||||||
item = new wxMenuItem( helpMenu, ID_GENERAL_HELP, _( "&Contents" ),
|
|
||||||
_( "Open the PCBnew manual" ) );
|
|
||||||
item->SetBitmap( help_xpm );
|
|
||||||
helpMenu->Append( item );
|
|
||||||
|
|
||||||
item = new wxMenuItem( helpMenu, ID_KICAD_ABOUT, _( "&About PCBnew" ),
|
|
||||||
_( "About PCBnew printed circuit board designer" ) );
|
|
||||||
item->SetBitmap( info_xpm );
|
|
||||||
helpMenu->Append( item );
|
|
||||||
|
|
||||||
//////////////////////
|
|
||||||
// Menu Display 3D: //
|
|
||||||
//////////////////////
|
|
||||||
wxMenu* Display3DMenu = new wxMenu;
|
|
||||||
item = new wxMenuItem( Display3DMenu, ID_MENU_PCB_SHOW_3D_FRAME,
|
|
||||||
_( "3D Display" ), _( "Show board in 3D viewer" ) );
|
|
||||||
item->SetBitmap( show_3d_xpm );
|
|
||||||
Display3DMenu->Append( item );
|
|
||||||
|
|
||||||
menuBar->Append( filesMenu, _( "&File" ) );
|
|
||||||
menuBar->Append( configmenu, _( "&Preferences" ) );
|
|
||||||
menuBar->Append( designRulesMenu, _( "&Design Rules" ) );
|
|
||||||
menuBar->Append( sizes_menu, _( "&Dimensions" ) );
|
|
||||||
menuBar->Append( miscellaneous_menu, _( "&Miscellaneous" ) );
|
|
||||||
menuBar->Append( postprocess_menu, _( "P&ostprocess" ) );
|
|
||||||
menuBar->Append( Display3DMenu, _( "&3D Display" ) );
|
|
||||||
menuBar->Append( helpMenu, _( "&Help" ) );
|
|
||||||
|
|
||||||
// Associate the menu bar with the frame
|
|
||||||
SetMenuBar( menuBar );
|
|
||||||
}
|
|
Loading…
x
Reference in New Issue
Block a user