Loading include/wxPcbStruct.h +7 −0 Original line number Diff line number Diff line Loading @@ -89,6 +89,7 @@ protected: #ifdef KICAD_SCRIPTING_WXPYTHON // Panel used to let user talk with internal scripting wxWindow* m_pythonPanel; bool m_pythonPanelHidden; #endif PCB_LAYER_WIDGET* m_Layers; Loading Loading @@ -1397,6 +1398,12 @@ public: // Autoplacement: void AutoPlace( wxCommandEvent& event ); /** * Function ScriptingConsoleEnableDisable * enables or disabled the scripting console */ void ScriptingConsoleEnableDisable( wxCommandEvent& event ); void OnSelectAutoPlaceMode( wxCommandEvent& aEvent ); /** Loading pcbnew/menubar_pcbframe.cpp +8 −0 Original line number Diff line number Diff line Loading @@ -554,6 +554,14 @@ void PCB_EDIT_FRAME::ReCreateMenuBar() _( "Fast access to the Web Based FreeROUTE advanced router" ), KiBitmap( web_support_xpm ) ); #ifdef KICAD_SCRIPTING_WXPYTHON /* Scripting */ AddMenuItem( toolsMenu, ID_TOOLBARH_PCB_SCRIPTING_CONSOLE, _( "&Scripting Console" ), _( "Show/Hide the Scripting console" ), KiBitmap( book_xpm ) ); #endif /* Design Rules menu */ wxMenu* designRulesMenu = new wxMenu; Loading pcbnew/pcbframe.cpp +24 −2 Original line number Diff line number Diff line Loading @@ -174,7 +174,9 @@ BEGIN_EVENT_TABLE( PCB_EDIT_FRAME, PCB_BASE_FRAME ) EVT_TOOL( ID_TOOLBARH_PCB_MODE_MODULE, PCB_EDIT_FRAME::OnSelectAutoPlaceMode ) EVT_TOOL( ID_TOOLBARH_PCB_MODE_TRACKS, PCB_EDIT_FRAME::OnSelectAutoPlaceMode ) EVT_TOOL( ID_TOOLBARH_PCB_FREEROUTE_ACCESS, PCB_EDIT_FRAME::Access_to_External_Tool ) #ifdef KICAD_SCRIPTING_WXPYTHON EVT_TOOL( ID_TOOLBARH_PCB_SCRIPTING_CONSOLE, PCB_EDIT_FRAME::ScriptingConsoleEnableDisable ) #endif // Option toolbar EVT_TOOL( ID_TB_OPTIONS_DRC_OFF, PCB_EDIT_FRAME::OnSelectOptionToolbar ) Loading Loading @@ -410,11 +412,13 @@ PCB_EDIT_FRAME::PCB_EDIT_FRAME( wxWindow* parent, const wxString& title, pythonAuiInfo.Caption( wxT( "Python Scripting" ) ); pythonAuiInfo.MinSize( wxSize( 200, 100 ) ); pythonAuiInfo.BestSize( wxSize( GetClientSize().x/2, 200 ) ); pythonAuiInfo.Hide(); m_pythonPanel = CreatePythonShellWindow( this ); m_auimgr.AddPane( m_pythonPanel, pythonAuiInfo.Name( wxT( "PythonPanel" ) ).Bottom().Layer(9) ); m_pythonPanelHidden = true; #endif Loading Loading @@ -786,6 +790,24 @@ void PCB_EDIT_FRAME::UpdateTitle() SetTitle( title ); } #ifdef KICAD_SCRIPTING_WXPYTHON void PCB_EDIT_FRAME::ScriptingConsoleEnableDisable( wxCommandEvent& aEvent ) { if ( m_pythonPanelHidden ) { m_auimgr.GetPane( m_pythonPanel ).Show(); m_pythonPanelHidden = false; } else { m_auimgr.GetPane( m_pythonPanel ).Hide(); m_pythonPanelHidden = true; } m_auimgr.Update(); } #endif void PCB_EDIT_FRAME::OnSelectAutoPlaceMode( wxCommandEvent& aEvent ) { Loading pcbnew/pcbnew_id.h +1 −0 Original line number Diff line number Diff line Loading @@ -235,6 +235,7 @@ enum pcbnew_ids ID_TOOLBARH_PCB_MODE_MODULE, ID_TOOLBARH_PCB_MODE_TRACKS, ID_TOOLBARH_PCB_FREEROUTE_ACCESS, ID_TOOLBARH_PCB_SCRIPTING_CONSOLE, ID_AUX_TOOLBAR_PCB_SELECT_LAYER_PAIR, Loading pcbnew/scripting/TODO.txt +9 −3 Original line number Diff line number Diff line * finish wizard implementation * cleanup * better build script helpers * think about documentation, how to do it * toolbar button and menu for scripting console * Action plugins: right click hooks, toolbar hooks, menu hooks, * IO plugins * better footprint wizard (preview in footprint wizard list) Loading
include/wxPcbStruct.h +7 −0 Original line number Diff line number Diff line Loading @@ -89,6 +89,7 @@ protected: #ifdef KICAD_SCRIPTING_WXPYTHON // Panel used to let user talk with internal scripting wxWindow* m_pythonPanel; bool m_pythonPanelHidden; #endif PCB_LAYER_WIDGET* m_Layers; Loading Loading @@ -1397,6 +1398,12 @@ public: // Autoplacement: void AutoPlace( wxCommandEvent& event ); /** * Function ScriptingConsoleEnableDisable * enables or disabled the scripting console */ void ScriptingConsoleEnableDisable( wxCommandEvent& event ); void OnSelectAutoPlaceMode( wxCommandEvent& aEvent ); /** Loading
pcbnew/menubar_pcbframe.cpp +8 −0 Original line number Diff line number Diff line Loading @@ -554,6 +554,14 @@ void PCB_EDIT_FRAME::ReCreateMenuBar() _( "Fast access to the Web Based FreeROUTE advanced router" ), KiBitmap( web_support_xpm ) ); #ifdef KICAD_SCRIPTING_WXPYTHON /* Scripting */ AddMenuItem( toolsMenu, ID_TOOLBARH_PCB_SCRIPTING_CONSOLE, _( "&Scripting Console" ), _( "Show/Hide the Scripting console" ), KiBitmap( book_xpm ) ); #endif /* Design Rules menu */ wxMenu* designRulesMenu = new wxMenu; Loading
pcbnew/pcbframe.cpp +24 −2 Original line number Diff line number Diff line Loading @@ -174,7 +174,9 @@ BEGIN_EVENT_TABLE( PCB_EDIT_FRAME, PCB_BASE_FRAME ) EVT_TOOL( ID_TOOLBARH_PCB_MODE_MODULE, PCB_EDIT_FRAME::OnSelectAutoPlaceMode ) EVT_TOOL( ID_TOOLBARH_PCB_MODE_TRACKS, PCB_EDIT_FRAME::OnSelectAutoPlaceMode ) EVT_TOOL( ID_TOOLBARH_PCB_FREEROUTE_ACCESS, PCB_EDIT_FRAME::Access_to_External_Tool ) #ifdef KICAD_SCRIPTING_WXPYTHON EVT_TOOL( ID_TOOLBARH_PCB_SCRIPTING_CONSOLE, PCB_EDIT_FRAME::ScriptingConsoleEnableDisable ) #endif // Option toolbar EVT_TOOL( ID_TB_OPTIONS_DRC_OFF, PCB_EDIT_FRAME::OnSelectOptionToolbar ) Loading Loading @@ -410,11 +412,13 @@ PCB_EDIT_FRAME::PCB_EDIT_FRAME( wxWindow* parent, const wxString& title, pythonAuiInfo.Caption( wxT( "Python Scripting" ) ); pythonAuiInfo.MinSize( wxSize( 200, 100 ) ); pythonAuiInfo.BestSize( wxSize( GetClientSize().x/2, 200 ) ); pythonAuiInfo.Hide(); m_pythonPanel = CreatePythonShellWindow( this ); m_auimgr.AddPane( m_pythonPanel, pythonAuiInfo.Name( wxT( "PythonPanel" ) ).Bottom().Layer(9) ); m_pythonPanelHidden = true; #endif Loading Loading @@ -786,6 +790,24 @@ void PCB_EDIT_FRAME::UpdateTitle() SetTitle( title ); } #ifdef KICAD_SCRIPTING_WXPYTHON void PCB_EDIT_FRAME::ScriptingConsoleEnableDisable( wxCommandEvent& aEvent ) { if ( m_pythonPanelHidden ) { m_auimgr.GetPane( m_pythonPanel ).Show(); m_pythonPanelHidden = false; } else { m_auimgr.GetPane( m_pythonPanel ).Hide(); m_pythonPanelHidden = true; } m_auimgr.Update(); } #endif void PCB_EDIT_FRAME::OnSelectAutoPlaceMode( wxCommandEvent& aEvent ) { Loading
pcbnew/pcbnew_id.h +1 −0 Original line number Diff line number Diff line Loading @@ -235,6 +235,7 @@ enum pcbnew_ids ID_TOOLBARH_PCB_MODE_MODULE, ID_TOOLBARH_PCB_MODE_TRACKS, ID_TOOLBARH_PCB_FREEROUTE_ACCESS, ID_TOOLBARH_PCB_SCRIPTING_CONSOLE, ID_AUX_TOOLBAR_PCB_SELECT_LAYER_PAIR, Loading
pcbnew/scripting/TODO.txt +9 −3 Original line number Diff line number Diff line * finish wizard implementation * cleanup * better build script helpers * think about documentation, how to do it * toolbar button and menu for scripting console * Action plugins: right click hooks, toolbar hooks, menu hooks, * IO plugins * better footprint wizard (preview in footprint wizard list)