30 lines
467 B
C++
30 lines
467 B
C++
|
/**
|
||
|
* @file dialog_scripting.cpp
|
||
|
*/
|
||
|
|
||
|
|
||
|
#include <fctsys.h>
|
||
|
#include <pcbnew.h>
|
||
|
#include <wxPcbStruct.h>
|
||
|
#include <pcbcommon.h>
|
||
|
#include <dialog_scripting.h>
|
||
|
#include <Python.h>
|
||
|
|
||
|
|
||
|
DIALOG_SCRIPTING::DIALOG_SCRIPTING( wxWindow* parent )
|
||
|
: DIALOG_SCRIPTING_BASE( parent )
|
||
|
{
|
||
|
SetFocus();
|
||
|
|
||
|
}
|
||
|
|
||
|
|
||
|
|
||
|
void DIALOG_SCRIPTING::OnRunButtonClick( wxCommandEvent& event )
|
||
|
{
|
||
|
wxCharBuffer buffer = m_txScript->GetValue().ToUTF8();
|
||
|
PyRun_SimpleString(buffer.data());
|
||
|
}
|
||
|
|
||
|
|