diff --git a/bitmaps_png/CMakeLists.txt b/bitmaps_png/CMakeLists.txt index ad9e54f854..eb22be03e6 100644 --- a/bitmaps_png/CMakeLists.txt +++ b/bitmaps_png/CMakeLists.txt @@ -2,7 +2,7 @@ # This program source code file is part of KICAD, a free EDA CAD application. # # Copyright (C) 2011 SoftPLC Corporation, Dick Hollenbeck -# Copyright (C) 2011 Kicad Developers, see change_log.txt for contributors#. +# Copyright (C) 2011-2016 Kicad Developers, see change_log.txt for contributors#. # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License @@ -345,7 +345,6 @@ set( BMAPS_MID load_module_lib local_ratsnest locked - macros_record mirepcb mirror_h mirror_v diff --git a/bitmaps_png/cpp_26/macros_record.cpp b/bitmaps_png/cpp_26/macros_record.cpp deleted file mode 100644 index e7c85f3f23..0000000000 --- a/bitmaps_png/cpp_26/macros_record.cpp +++ /dev/null @@ -1,74 +0,0 @@ - -/* Do not modify this file, it was automatically generated by the - * PNG2cpp CMake script, using a *.png file as input. - */ - -#include - -static const unsigned char png[] = { - 0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, 0x00, 0x0d, 0x49, 0x48, 0x44, 0x52, - 0x00, 0x00, 0x00, 0x1a, 0x00, 0x00, 0x00, 0x1a, 0x08, 0x06, 0x00, 0x00, 0x00, 0xa9, 0x4a, 0x4c, - 0xce, 0x00, 0x00, 0x03, 0x90, 0x49, 0x44, 0x41, 0x54, 0x48, 0xc7, 0xed, 0x96, 0xcb, 0x8b, 0x1d, - 0x55, 0x10, 0xc6, 0x7f, 0x75, 0xce, 0xe9, 0xfb, 0xe8, 0x79, 0x65, 0x9e, 0x92, 0x31, 0x28, 0x46, - 0x27, 0x51, 0x51, 0x0c, 0xf1, 0x01, 0x21, 0x9a, 0xe8, 0x42, 0x31, 0xf9, 0x07, 0x34, 0x06, 0x22, - 0xba, 0x8a, 0xb8, 0x70, 0xe9, 0xda, 0x95, 0x10, 0xb2, 0x13, 0x71, 0x29, 0xba, 0x70, 0x21, 0x6e, - 0xdc, 0x29, 0xba, 0x31, 0x20, 0xf1, 0x31, 0xa0, 0x62, 0x40, 0x12, 0xc7, 0x99, 0x38, 0x01, 0x13, - 0x47, 0x31, 0xf3, 0xc8, 0xdc, 0xb9, 0x77, 0xba, 0x4f, 0x95, 0x8b, 0xee, 0xfb, 0x9a, 0xeb, 0x52, - 0x66, 0x95, 0xde, 0xf4, 0x57, 0xb7, 0xbb, 0xcf, 0x57, 0x5f, 0x55, 0x9d, 0xef, 0x5c, 0x31, 0x33, - 0x76, 0xe3, 0x72, 0xec, 0xd2, 0xb5, 0x6b, 0x44, 0xa1, 0x37, 0x10, 0x91, 0x39, 0x60, 0xf2, 0x7f, - 0x5a, 0x7b, 0xc5, 0xcc, 0x16, 0x07, 0x88, 0xc6, 0xc6, 0xc6, 0xce, 0x3c, 0x75, 0xfc, 0xd8, 0xbb, - 0x23, 0xa3, 0x23, 0x75, 0x11, 0x41, 0x04, 0x8a, 0xbb, 0x80, 0x19, 0xed, 0x56, 0x9a, 0x19, 0x6a, - 0x86, 0xa9, 0x62, 0x06, 0x66, 0x4a, 0xd4, 0x22, 0x56, 0x33, 0x34, 0x46, 0xd4, 0x8c, 0xf5, 0xb5, - 0xf5, 0xad, 0x10, 0xc2, 0x2b, 0x79, 0x9e, 0x7f, 0xd2, 0x47, 0x34, 0x3d, 0x33, 0xfd, 0xe6, 0xd4, - 0xcc, 0xf4, 0x70, 0x96, 0xe5, 0x48, 0x21, 0xaf, 0xad, 0x13, 0xb5, 0x88, 0xaa, 0x12, 0xa3, 0x12, - 0x63, 0x24, 0x6a, 0x24, 0x46, 0x45, 0x63, 0x2c, 0x63, 0x25, 0xe6, 0x91, 0x5c, 0x15, 0xcb, 0x23, - 0x79, 0x9e, 0x93, 0x54, 0x2a, 0xc3, 0x93, 0x93, 0x93, 0x6f, 0x01, 0xfd, 0x44, 0xa6, 0x96, 0xff, - 0xae, 0x0f, 0x23, 0xe9, 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0xac, 0x5a, 0x49, 0x4a, 0x53, 0xf6, 0xa1, 0xaf, 0x47, 0x22, 0x32, 0xa5, 0xda, - 0x1c, 0x09, 0xce, 0x18, 0xaf, 0x0b, 0xc1, 0x59, 0xe1, 0x10, 0x4e, 0x09, 0x4e, 0x4b, 0x6c, 0x25, - 0xd6, 0xf2, 0x77, 0xeb, 0xc1, 0xda, 0xf7, 0xbe, 0x68, 0x86, 0x47, 0xd1, 0xbc, 0x35, 0x22, 0x22, - 0x53, 0xbd, 0x8a, 0x52, 0x4c, 0x92, 0xa1, 0xaa, 0xa7, 0x5e, 0x91, 0x01, 0x7b, 0x71, 0x3b, 0xe2, - 0x02, 0x4b, 0x77, 0x53, 0xf7, 0x8c, 0x7f, 0x7b, 0x03, 0x3b, 0xe7, 0x80, 0x98, 0x00, 0x69, 0xd7, - 0x70, 0xcd, 0x96, 0xf7, 0x1f, 0x7d, 0xf9, 0xed, 0x2f, 0xf3, 0x07, 0x5f, 0x12, 0xc3, 0x39, 0x29, - 0xa7, 0xd1, 0xb5, 0x17, 0x90, 0x8e, 0x7b, 0x4b, 0xc9, 0x28, 0x7d, 0x27, 0x66, 0xfb, 0x55, 0x29, - 0xcf, 0x2c, 0x31, 0x15, 0x89, 0x2b, 0x4b, 0x97, 0x3e, 0x32, 0xb3, 0xe5, 0xbe, 0x61, 0xb8, 0xfd, - 0xe7, 0xe4, 0x36, 0xd1, 0xbf, 0x70, 0x51, 0x80, 0xee, 0x5f, 0x46, 0xf4, 0x81, 0x00, 0x00, 0x00, - 0x00, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82, -}; - -const BITMAP_OPAQUE macros_record_xpm[1] = {{ png, sizeof( png ), "macros_record_xpm" }}; - -//EOF diff --git a/bitmaps_png/sources/macros_record.svg b/bitmaps_png/sources/macros_record.svg deleted file mode 100644 index cc36d87abe..0000000000 --- a/bitmaps_png/sources/macros_record.svg +++ /dev/null @@ -1,713 +0,0 @@ - - - - - - - - Lapo Calamandrei - - - - cassette - media - tape - backup - dds - - - - - Open Clip Art Library, Source: GNOME Icon Theme, Source: GNOME Icon Theme, Source: GNOME Icon Theme, Source: GNOME Icon Theme - - - - - Lapo Calamandrei - - - - - Lapo Calamandrei - - - - image/svg+xml - - - en - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/common/wildcards_and_files_ext.cpp b/common/wildcards_and_files_ext.cpp index 80326d386d..0e295f0d15 100644 --- a/common/wildcards_and_files_ext.cpp +++ b/common/wildcards_and_files_ext.cpp @@ -82,7 +82,6 @@ const wxString KiCadFootprintLibPathWildcard( _( "KiCad footprint s-expre librar const wxString LegacyFootprintLibPathWildcard( _( "Legacy footprint library file (*.mod)|*.mod" ) ); const wxString EagleFootprintLibPathWildcard( _( "Eagle ver. 6.x XML library files (*.lbr)|*.lbr" ) ); const wxString GedaPcbFootprintLibFileWildcard( _( "Geda PCB footprint library file (*.fp)|*.fp" ) ); -const wxString MacrosFileWildcard( _( "KiCad recorded macros (*.mcr)|*.mcr" ) ); const wxString ComponentFileExtensionWildcard( _( "Component-footprint link file (*.cmp)|*cmp" ) ); const wxString PageLayoutDescrFileWildcard( _( "Page layout descr file (*.kicad_wks)|*kicad_wks" ) ); // generic: diff --git a/include/bitmaps.h b/include/bitmaps.h index a83a254dcf..73ebb065fc 100644 --- a/include/bitmaps.h +++ b/include/bitmaps.h @@ -2,7 +2,7 @@ * This program source code file is part of KiCad, a free EDA CAD application. * * Copyright (C) 2007-2014 Jean-Pierre Charras, jp.charras at wanadoo.fr - * Copyright (C) 1992-2014 KiCad Developers, see CHANGELOG.TXT for contributors. + * Copyright (C) 1992-2016 KiCad Developers, see CHANGELOG.TXT for contributors. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -313,7 +313,6 @@ EXTERN_BITMAP( load_module_board_xpm ) EXTERN_BITMAP( load_module_lib_xpm ) EXTERN_BITMAP( local_ratsnest_xpm ) EXTERN_BITMAP( locked_xpm ) -EXTERN_BITMAP( macros_record_xpm ) EXTERN_BITMAP( mirepcb_xpm ) EXTERN_BITMAP( mirror_h_xpm ) EXTERN_BITMAP( mirror_v_xpm ) diff --git a/include/class_macros_record.h b/include/class_macros_record.h deleted file mode 100644 index 541c7d813b..0000000000 --- a/include/class_macros_record.h +++ /dev/null @@ -1,45 +0,0 @@ -/* - * This program source code file is part of KiCad, a free EDA CAD application. - * - * Copyright (C) 2011-2014 Andrey Fedorushkov - * Copyright (C) 1992-2014 KiCad Developers, see CHANGELOG.TXT for contributors. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, you may find one here: - * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html - * or you may search the http://www.gnu.org website for the version 2 license, - * or you may write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA - */ - -#ifndef _CLASS_MACROS_RECORD_H -#define _CLASS_MACROS_RECORD_H - -#include - -class MACROS_RECORD -{ -public: - int m_HotkeyCode; - int m_Idcommand; - wxPoint m_Position; -}; - -class MACROS_RECORDED -{ -public: - wxPoint m_StartPosition; - std::list m_Record; -}; - -#endif // _CLASS_MACROS_RECORD_H diff --git a/include/id.h b/include/id.h index 069c4751e4..792008f3a9 100644 --- a/include/id.h +++ b/include/id.h @@ -2,8 +2,8 @@ * This program source code file is part of KiCad, a free EDA CAD application. * * Copyright (C) 2009 Jean-Pierre Charras, jp.charras at wanadoo.fr - * Copyright (C) 2009 Wayne Stambaugh - * Copyright (C) 1992-2011 KiCad Developers, see AUTHORS.txt for contributors. + * Copyright (C) 2009-2016 Wayne Stambaugh + * Copyright (C) 1992-2016 KiCad Developers, see AUTHORS.txt for contributors. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -92,10 +92,6 @@ enum main_id ID_PREFERENCES_HOTKEY_END, ID_PREFERENCES_CONFIGURE_PATHS, - ID_PREFRENCES_MACROS, - ID_PREFRENCES_MACROS_SAVE, - ID_PREFRENCES_MACROS_READ, - ID_GEN_PLOT, ID_GEN_PLOT_PS, ID_GEN_PLOT_HPGL, diff --git a/include/wxPcbStruct.h b/include/wxPcbStruct.h index d5b9b37c20..33d95c4f0c 100644 --- a/include/wxPcbStruct.h +++ b/include/wxPcbStruct.h @@ -32,7 +32,6 @@ #include #include -#include #include #include @@ -83,9 +82,6 @@ class PCB_EDIT_FRAME : public PCB_BASE_EDIT_FRAME void updateTraceWidthSelectBox(); void updateViaSizeSelectBox(); - int m_RecordingMacros; - MACROS_RECORDED m_Macros[10]; - /// The auxiliary right vertical tool bar used to access the microwave tools. wxAuiToolBar* m_microWaveToolBar; @@ -288,27 +284,6 @@ public: */ void OnAltWheel( wxCommandEvent& event ); - /** - * Function RecordMacros. - * records sequence of hotkeys and cursor positions to a macro. - * @param aDC = current device context - * @param aNumber The current number macros. - */ - void RecordMacros( wxDC* aDC, int aNumber ); - - /** - * Function CallMacros - * play hotkeys and cursor position from a recorded macro. - * @param aDC = current device context - * @param aPosition The current cursor position in logical (drawing) units. - * @param aNumber The current number macros. - */ - void CallMacros( wxDC* aDC, const wxPoint& aPosition, int aNumber ); - - void SaveMacros(); - - void ReadMacros(); - /** * Function PrintPage , virtual * used to print a page diff --git a/pcbnew/hotkeys.cpp b/pcbnew/hotkeys.cpp index 1311fdd1e6..8c8a750b1e 100644 --- a/pcbnew/hotkeys.cpp +++ b/pcbnew/hotkeys.cpp @@ -2,7 +2,7 @@ * This program source code file is part of KiCad, a free EDA CAD application. * * Copyright (C) 2007-2014 Jean-Pierre Charras, jp.charras at wanadoo.fr - * Copyright (C) 1992-2015 KiCad Developers, see AUTHORS.txt for contributors. + * Copyright (C) 1992-2016 KiCad Developers, see AUTHORS.txt for contributors. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -225,48 +225,6 @@ static EDA_HOTKEY HkTrackDisplayMode( _HKI( "Track Display Mode" ), HK_SWITCH_TRACK_DISPLAY_MODE, 'K' ); static EDA_HOTKEY HkAddModule( _HKI( "Add Footprint" ), HK_ADD_MODULE, 'O' ); -/* Record and play macros */ -static EDA_HOTKEY HkRecordMacros0( _HKI( "Record Macro 0" ), HK_RECORD_MACROS_0, GR_KB_CTRL+'0' ); - -static EDA_HOTKEY HkCallMacros0( _HKI( "Call Macro 0" ), HK_CALL_MACROS_0, '0' ); - -static EDA_HOTKEY HkRecordMacros1( _HKI( "Record Macro 1" ), HK_RECORD_MACROS_1, GR_KB_CTRL+'1' ); - -static EDA_HOTKEY HkCallMacros1( _HKI( "Call Macro 1" ), HK_CALL_MACROS_1, '1' ); - -static EDA_HOTKEY HkRecordMacros2( _HKI( "Record Macro 2" ), HK_RECORD_MACROS_2, GR_KB_CTRL+'2' ); - -static EDA_HOTKEY HkCallMacros2( _HKI( "Call Macro 2" ), HK_CALL_MACROS_2, '2' ); - -static EDA_HOTKEY HkRecordMacros3( _HKI( "Record Macro 3" ), HK_RECORD_MACROS_3, GR_KB_CTRL+'3' ); - -static EDA_HOTKEY HkCallMacros3( _HKI( "Call Macro 3" ), HK_CALL_MACROS_3, '3' ); - -static EDA_HOTKEY HkRecordMacros4( _HKI( "Record Macro 4" ), HK_RECORD_MACROS_4, GR_KB_CTRL+'4' ); - -static EDA_HOTKEY HkCallMacros4( _HKI( "Call Macro 4" ), HK_CALL_MACROS_4, '4' ); - -static EDA_HOTKEY HkRecordMacros5( _HKI( "Record Macro 5" ), HK_RECORD_MACROS_5, GR_KB_CTRL+'5' ); - -static EDA_HOTKEY HkCallMacros5( _HKI( "Call Macro 5" ), HK_CALL_MACROS_5, '5' ); - -static EDA_HOTKEY HkRecordMacros6( _HKI( "Record Macro 6" ), HK_RECORD_MACROS_6, GR_KB_CTRL+'6' ); - -static EDA_HOTKEY HkCallMacros6( _HKI( "Call Macro 6" ), HK_CALL_MACROS_6, '6' ); - -static EDA_HOTKEY HkRecordMacros7( _HKI( "Record Macro 7" ), HK_RECORD_MACROS_7, GR_KB_CTRL+'7' ); - -static EDA_HOTKEY HkCallMacros7( _HKI( "Call Macro 7" ), HK_CALL_MACROS_7, '7' ); - -static EDA_HOTKEY HkRecordMacros8( _HKI( "Record Macro 8" ), HK_RECORD_MACROS_8, GR_KB_CTRL+'8' ); - -static EDA_HOTKEY HkCallMacros8( _HKI( "Call Macro 8" ), HK_CALL_MACROS_8, '8' ); - -static EDA_HOTKEY HkRecordMacros9( _HKI( "Record Macro 9" ), HK_RECORD_MACROS_9, GR_KB_CTRL+'9' ); - -static EDA_HOTKEY HkCallMacros9( _HKI( "Call Macro 9" ), HK_CALL_MACROS_9, '9' ); - - // List of common hotkey descriptors EDA_HOTKEY* common_Hotkey_List[] = { @@ -315,11 +273,6 @@ EDA_HOTKEY* board_edit_Hotkey_List[] = &HkSwitch2NextCopperLayer, &HkSwitch2PreviousCopperLayer,&HkAddModule, &HkSwitchTrackWidthToNext, &HkSwitchTrackWidthToPrevious,&HkSwitchGridToFastGrid1, &HkSwitchGridToFastGrid2, &HkSwitchGridToNext, &HkSwitchGridToPrevious, - &HkRecordMacros0, &HkCallMacros0, &HkRecordMacros1, &HkCallMacros1, - &HkRecordMacros2, &HkCallMacros2, &HkRecordMacros3, &HkCallMacros3, - &HkRecordMacros4, &HkCallMacros4, &HkRecordMacros5, &HkCallMacros5, - &HkRecordMacros6, &HkCallMacros6, &HkRecordMacros7, &HkCallMacros7, - &HkRecordMacros8, &HkCallMacros8, &HkRecordMacros9, &HkCallMacros9, &HkSwitchHighContrastMode, &HkCanvasDefault, &HkCanvasCairo, &HkCanvasOpenGL, &HkZoneFillOrRefill, &HkZoneRemoveFilled, @@ -396,7 +349,7 @@ EDA_HOTKEY* FOOTPRINT_VIEWER_FRAME::GetHotKeyDescription( int aCommand ) const bool FOOTPRINT_VIEWER_FRAME::OnHotKey( wxDC* aDC, int aHotKey, const wxPoint& aPosition, - EDA_ITEM* aItem ) + EDA_ITEM* aItem ) { if( aHotKey == 0 ) return false; diff --git a/pcbnew/hotkeys.h b/pcbnew/hotkeys.h index 5e445720a8..f4f3ff1903 100644 --- a/pcbnew/hotkeys.h +++ b/pcbnew/hotkeys.h @@ -2,7 +2,7 @@ * This program source code file is part of KiCad, a free EDA CAD application. * * Copyright (C) 2007-2014 Jean-Pierre Charras, jp.charras at wanadoo.fr - * Copyright (C) 1992-2015 KiCad Developers, see AUTHORS.txt for contributors. + * Copyright (C) 1992-2016 KiCad Developers, see AUTHORS.txt for contributors. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -93,28 +93,6 @@ enum hotkey_id_commnand { HK_SWITCH_LAYER_TO_INNER14, HK_ADD_MODULE, HK_SLIDE_TRACK, - HK_MACRO_ID_BEGIN, - HK_RECORD_MACROS_0, // keep these id ordered from 0 to 9 - HK_RECORD_MACROS_1, // because this order is used in code - HK_RECORD_MACROS_2, - HK_RECORD_MACROS_3, - HK_RECORD_MACROS_4, - HK_RECORD_MACROS_5, - HK_RECORD_MACROS_6, - HK_RECORD_MACROS_7, - HK_RECORD_MACROS_8, - HK_RECORD_MACROS_9, - HK_CALL_MACROS_0, - HK_CALL_MACROS_1, - HK_CALL_MACROS_2, - HK_CALL_MACROS_3, - HK_CALL_MACROS_4, - HK_CALL_MACROS_5, - HK_CALL_MACROS_6, - HK_CALL_MACROS_7, - HK_CALL_MACROS_8, - HK_CALL_MACROS_9, - HK_MACRO_ID_END, HK_SWITCH_HIGHCONTRAST_MODE, HK_CANVAS_LEGACY, HK_CANVAS_OPENGL, diff --git a/pcbnew/hotkeys_board_editor.cpp b/pcbnew/hotkeys_board_editor.cpp index cacbc2878d..2b61f080e5 100644 --- a/pcbnew/hotkeys_board_editor.cpp +++ b/pcbnew/hotkeys_board_editor.cpp @@ -49,65 +49,6 @@ */ -void PCB_EDIT_FRAME::RecordMacros(wxDC* aDC, int aNumber) -{ - wxASSERT( aNumber >= 0 && aNumber < 10 ); - wxString msg; - - if( m_RecordingMacros < 0 ) - { - m_RecordingMacros = aNumber; - m_Macros[aNumber].m_StartPosition = GetCrossHairPosition( false ); - m_Macros[aNumber].m_Record.clear(); - - msg.Printf( _( "Recording macro %d" ), aNumber ); - SetStatusText( msg ); - } - else - { - m_RecordingMacros = -1; - - msg.Printf( _( "Macro %d recorded" ), aNumber ); - SetStatusText( msg ); - } -} - - -void PCB_EDIT_FRAME::CallMacros( wxDC* aDC, const wxPoint& aPosition, int aNumber ) -{ - wxPoint tPosition; - - wxString msg; - - msg.Printf( _( "Call macro %d" ), aNumber ); - SetStatusText( msg ); - - wxCommandEvent cmd( wxEVT_COMMAND_MENU_SELECTED ); - cmd.SetEventObject( this ); - - tPosition = GetNearestGridPosition( aPosition ); - - m_canvas->CrossHairOff( aDC ); - SetMousePosition( tPosition ); - GeneralControl( aDC, tPosition ); - - for( std::list::iterator i = m_Macros[aNumber].m_Record.begin(); - i != m_Macros[aNumber].m_Record.end(); ++i ) - { - wxPoint tmpPos = GetNearestGridPosition( tPosition + i->m_Position ); - - SetMousePosition( tmpPos ); - - GeneralControl( aDC, tmpPos, i->m_HotkeyCode ); - } - - cmd.SetId( ID_ZOOM_REDRAW ); - GetEventHandler()->ProcessEvent( cmd ); - - m_canvas->CrossHairOn( aDC ); -} - - EDA_HOTKEY* PCB_EDIT_FRAME::GetHotKeyDescription( int aCommand ) const { EDA_HOTKEY* HK_Descr = GetDescriptorFromCommand( aCommand, common_Hotkey_List ); @@ -147,20 +88,6 @@ bool PCB_EDIT_FRAME::OnHotKey( wxDC* aDC, int aHotkeyCode, const wxPoint& aPosit int hk_id = HK_Descr->m_Idcommand; - if( (m_RecordingMacros != -1) && - !( hk_id > HK_MACRO_ID_BEGIN && hk_id < HK_MACRO_ID_END) ) - { - MACROS_RECORD macros_record; - macros_record.m_HotkeyCode = aHotkeyCode; - macros_record.m_Idcommand = HK_Descr->m_Idcommand; - macros_record.m_Position = GetNearestGridPosition( aPosition ) - - m_Macros[m_RecordingMacros].m_StartPosition; - m_Macros[m_RecordingMacros].m_Record.push_back( macros_record ); - wxString msg; - msg.Printf( _( "Add key [%c] in macro %d" ), aHotkeyCode, m_RecordingMacros ); - SetStatusText( msg ); - } - // Create a wxCommandEvent that will be posted in some hot keys functions wxCommandEvent cmd( wxEVT_COMMAND_MENU_SELECTED ); cmd.SetEventObject( this ); @@ -182,32 +109,6 @@ bool PCB_EDIT_FRAME::OnHotKey( wxDC* aDC, int aHotkeyCode, const wxPoint& aPosit OnLeftDClick( aDC, aPosition ); break; - case HK_RECORD_MACROS_0: - case HK_RECORD_MACROS_1: - case HK_RECORD_MACROS_2: - case HK_RECORD_MACROS_3: - case HK_RECORD_MACROS_4: - case HK_RECORD_MACROS_5: - case HK_RECORD_MACROS_6: - case HK_RECORD_MACROS_7: - case HK_RECORD_MACROS_8: - case HK_RECORD_MACROS_9: - RecordMacros( aDC, hk_id - HK_RECORD_MACROS_0 ); - break; - - case HK_CALL_MACROS_0: - case HK_CALL_MACROS_1: - case HK_CALL_MACROS_2: - case HK_CALL_MACROS_3: - case HK_CALL_MACROS_4: - case HK_CALL_MACROS_5: - case HK_CALL_MACROS_6: - case HK_CALL_MACROS_7: - case HK_CALL_MACROS_8: - case HK_CALL_MACROS_9: - CallMacros( aDC, GetCrossHairPosition( false ), hk_id - HK_CALL_MACROS_0 ); - break; - case HK_SWITCH_TRACK_WIDTH_TO_NEXT: if( GetCanvas()->IsMouseCaptured() ) GetCanvas()->CallMouseCapture( aDC, wxDefaultPosition, false ); diff --git a/pcbnew/menubar_pcbframe.cpp b/pcbnew/menubar_pcbframe.cpp index c7c580c6f7..8a31f77554 100644 --- a/pcbnew/menubar_pcbframe.cpp +++ b/pcbnew/menubar_pcbframe.cpp @@ -3,8 +3,8 @@ * * Copyright (C) 2012 Jean-Pierre Charras, jean-pierre.charras@ujf-grenoble.fr * Copyright (C) 2012 SoftPLC Corporation, Dick Hollenbeck - * Copyright (C) 2012-2015 Wayne Stambaugh - * Copyright (C) 1992-2015 KiCad Developers, see AUTHORS.txt for contributors. + * Copyright (C) 2012-2016 Wayne Stambaugh + * Copyright (C) 1992-2016 KiCad Developers, see AUTHORS.txt for contributors. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -576,24 +576,6 @@ void PCB_EDIT_FRAME::ReCreateMenuBar() // Hotkey submenu AddHotkeyConfigMenu( configmenu ); - //--- Macros submenu -------------------------------------------------------- - wxMenu* macrosMenu = new wxMenu; - - AddMenuItem( macrosMenu, ID_PREFRENCES_MACROS_SAVE, - _( "&Save macros" ), - _( "Save macros to file" ), - KiBitmap( save_setup_xpm ) ); - - AddMenuItem( macrosMenu, ID_PREFRENCES_MACROS_READ, - _( "&Read macros" ), - _( "Read macros from file" ), - KiBitmap( read_setup_xpm ) ); - - AddMenuItem( configmenu, macrosMenu, - -1, _( "Ma&cros" ), - _( "Macros save/read operations" ), - KiBitmap( macros_record_xpm ) ); - configmenu->AppendSeparator(); AddMenuItem( configmenu, ID_CONFIG_SAVE, diff --git a/pcbnew/pcbframe.cpp b/pcbnew/pcbframe.cpp index 7b87ad3f51..b854c209ed 100644 --- a/pcbnew/pcbframe.cpp +++ b/pcbnew/pcbframe.cpp @@ -3,8 +3,8 @@ * * Copyright (C) 2013 Jean-Pierre Charras, jp.charras at wanadoo.fr * Copyright (C) 2013 SoftPLC Corporation, Dick Hollenbeck - * Copyright (C) 2013 Wayne Stambaugh - * Copyright (C) 2013-2015 KiCad Developers, see change_log.txt for contributors. + * Copyright (C) 2013-2016 Wayne Stambaugh + * Copyright (C) 2013-2016 KiCad Developers, see change_log.txt for contributors. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -151,8 +151,6 @@ BEGIN_EVENT_TABLE( PCB_EDIT_FRAME, PCB_BASE_FRAME ) EVT_MENU( ID_PCB_PAD_SETUP, PCB_EDIT_FRAME::Process_Config ) EVT_MENU( ID_CONFIG_SAVE, PCB_EDIT_FRAME::Process_Config ) EVT_MENU( ID_CONFIG_READ, PCB_EDIT_FRAME::Process_Config ) - EVT_MENU( ID_PREFRENCES_MACROS_SAVE, PCB_EDIT_FRAME::Process_Config ) - EVT_MENU( ID_PREFRENCES_MACROS_READ, PCB_EDIT_FRAME::Process_Config ) EVT_MENU( ID_PCB_DISPLAY_OPTIONS_SETUP, PCB_EDIT_FRAME::InstallDisplayOptionsDialog ) EVT_MENU( ID_PCB_USER_GRID_SETUP, PCB_EDIT_FRAME::Process_Special_Functions ) @@ -323,14 +321,10 @@ PCB_EDIT_FRAME::PCB_EDIT_FRAME( KIWAY* aKiway, wxWindow* aParent ) : m_show_layer_manager_tools = true; m_hotkeysDescrList = g_Board_Editor_Hokeys_Descr; m_hasAutoSave = true; - m_RecordingMacros = -1; m_microWaveToolBar = NULL; m_rotationAngle = 900; - for ( int i = 0; i < 10; i++ ) - m_Macros[i].m_Record.clear(); - // Create GAL canvas EDA_DRAW_PANEL_GAL* galCanvas = new PCB_DRAW_PANEL_GAL( this, -1, wxPoint( 0, 0 ), m_FrameSize, EDA_DRAW_PANEL_GAL::GAL_TYPE_NONE ); @@ -473,11 +467,6 @@ PCB_EDIT_FRAME::PCB_EDIT_FRAME( KIWAY* aKiway, wxWindow* aParent ) : PCB_EDIT_FRAME::~PCB_EDIT_FRAME() { - m_RecordingMacros = -1; - - for( int i = 0; i < 10; i++ ) - m_Macros[i].m_Record.clear(); - delete m_drc; } diff --git a/pcbnew/pcbnew_config.cpp b/pcbnew/pcbnew_config.cpp index deb126f233..9a1ab0eba7 100644 --- a/pcbnew/pcbnew_config.cpp +++ b/pcbnew/pcbnew_config.cpp @@ -3,8 +3,8 @@ * * Copyright (C) 2015 Jean-Pierre Charras, jp.charras at wanadoo.fr * Copyright (C) 2012 SoftPLC Corporation, Dick Hollenbeck - * Copyright (C) 2012 Wayne Stambaugh - * Copyright (C) 1992-2012 KiCad Developers, see AUTHORS.txt for contributors. + * Copyright (C) 2012-2016 Wayne Stambaugh + * Copyright (C) 1992-2016 KiCad Developers, see AUTHORS.txt for contributors. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -255,15 +255,6 @@ void PCB_EDIT_FRAME::Process_Config( wxCommandEvent& event ) DisplayHotkeyList( this, g_Board_Editor_Hokeys_Descr ); break; - // Macros IDs - case ID_PREFRENCES_MACROS_SAVE: - SaveMacros(); - break; - - case ID_PREFRENCES_MACROS_READ: - ReadMacros(); - break; - default: DisplayError( this, wxT( "PCB_EDIT_FRAME::Process_Config error" ) ); } @@ -432,122 +423,3 @@ PARAM_CFG_ARRAY& PCB_EDIT_FRAME::GetConfigurationSettings() return m_configSettings; } - - -void PCB_EDIT_FRAME::SaveMacros() -{ - wxXmlDocument xml; - wxXmlAttribute *macrosProp, *hkProp, *xProp, *yProp; - wxString str, hkStr, xStr, yStr; - - wxFileName fn = GetBoard()->GetFileName(); - fn.SetExt( MacrosFileExtension ); - - wxFileDialog dlg( this, _( "Save Macros File" ), fn.GetPath(), fn.GetFullName(), - MacrosFileWildcard, wxFD_SAVE | wxFD_CHANGE_DIR ); - - if( dlg.ShowModal() == wxID_CANCEL ) - return; - - XNODE *rootNode = new XNODE( wxXML_ELEMENT_NODE, wxT( "macrosrootnode" ), wxEmptyString ); - xml.SetRoot( rootNode ); - - for( int number = 9; number >= 0; number-- ) - { - str.Printf( wxT( "%d" ), number ); - macrosProp = new wxXmlAttribute( wxT( "number" ), str ); - - XNODE * macrosNode = new XNODE( rootNode, wxXML_ELEMENT_NODE, - wxT( "macros" ), wxEmptyString, - macrosProp ); - - for( std::list::reverse_iterator i = m_Macros[number].m_Record.rbegin(); - i != m_Macros[number].m_Record.rend(); - i++ ) - { - hkStr.Printf( wxT( "%d" ), i->m_HotkeyCode ); - xStr.Printf( wxT( "%d" ), i->m_Position.x ); - yStr.Printf( wxT( "%d" ), i->m_Position.y ); - - yProp = new wxXmlAttribute( wxT( "y" ), yStr ); - xProp = new wxXmlAttribute( wxT( "x" ), xStr, yProp ); - hkProp = new wxXmlAttribute( wxT( "hkcode" ), hkStr, xProp ); - - new XNODE( macrosNode, wxXML_ELEMENT_NODE, wxT( "hotkey" ), - wxEmptyString, hkProp ); - } - } - - xml.SetFileEncoding( wxT( "UTF-8" ) ); - xml.Save( dlg.GetFilename() ); -} - - -void PCB_EDIT_FRAME::ReadMacros() -{ - wxFileName fn; - - fn = GetBoard()->GetFileName(); - fn.SetExt( MacrosFileExtension ); - - wxFileDialog dlg( this, _( "Read Macros File" ), fn.GetPath(), - fn.GetFullName(), MacrosFileWildcard, - wxFD_OPEN | wxFD_FILE_MUST_EXIST | wxFD_CHANGE_DIR ); - - if( dlg.ShowModal() == wxID_CANCEL ) - return; - - if( !wxFileExists( dlg.GetPath() ) ) - { - wxString msg; - msg.Printf( _( "File %s not found" ), GetChars( dlg.GetPath() ) ); - DisplayError( this, msg ); - return; - } - - wxXmlDocument xml; - - xml.SetFileEncoding( wxT( "UTF-8" ) ); - - if( !xml.Load( dlg.GetFilename() ) ) - return; - - XNODE *macrosNode = (XNODE*) xml.GetRoot()->GetChildren(); - - while( macrosNode ) - { - int number = -1; - - if( macrosNode->GetName() == wxT( "macros" ) ) - { - number = wxAtoi( macrosNode->GetAttribute( wxT( "number" ), wxT( "-1" ) ) ); - - if( number >= 0 && number < 10 ) - { - m_Macros[number].m_Record.clear(); - - XNODE *hotkeyNode = macrosNode->GetChildren(); - - while( hotkeyNode ) - { - if( hotkeyNode->GetName() == wxT( "hotkey" ) ) - { - int x = wxAtoi( hotkeyNode->GetAttribute( wxT( "x" ), wxT( "0" ) ) ); - int y = wxAtoi( hotkeyNode->GetAttribute( wxT( "y" ), wxT( "0" ) ) ); - int hk = wxAtoi( hotkeyNode->GetAttribute( wxT( "hkcode" ), wxT( "0" ) ) ); - - MACROS_RECORD macros_record; - macros_record.m_HotkeyCode = hk; - macros_record.m_Position.x = x; - macros_record.m_Position.y = y; - m_Macros[number].m_Record.push_back( macros_record ); - } - - hotkeyNode = hotkeyNode->GetNext(); - } - } - } - - macrosNode = macrosNode->GetNext(); - } -}