2012-03-01 07:21:53 +00:00
|
|
|
/**
|
|
|
|
* @file dialog_scripting.cpp
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
2012-04-09 06:53:24 +00:00
|
|
|
#include <Python.h>
|
2012-03-01 07:21:53 +00:00
|
|
|
#include <fctsys.h>
|
|
|
|
#include <pcbnew.h>
|
|
|
|
#include <wxPcbStruct.h>
|
|
|
|
#include <pcbcommon.h>
|
|
|
|
#include <dialog_scripting.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());
|
|
|
|
}
|
|
|
|
|
|
|
|
|