KiCad PCB EDA Suite
Loading...
Searching...
No Matches
test.cpp
Go to the documentation of this file.
1#include <pcb_test_frame.h>
2// #include <tools/outline_editor.h>
3#include <tool/tool_manager.h>
4
5class OED_TEST_FRAME : public PCB_TEST_FRAME
6{
7public:
8 OED_TEST_FRAME( wxFrame* frame,
9 const wxString& title,
10 const wxPoint& pos = wxDefaultPosition,
11 const wxSize& size = wxDefaultSize,
12 long style = wxDEFAULT_FRAME_STYLE ) :
13 PCB_TEST_FRAME( frame, title, pos, size, style )
14 {
16 }
17
18 void registerTools();
19
20 virtual ~OED_TEST_FRAME() {}
21};
22
23wxFrame* CreateMainFrame( const std::string& aFileName )
24{
25 auto frame = new OED_TEST_FRAME( nullptr, wxT( "Outline Editor Test" ) );
26
27 if( aFileName != "" )
28 {
29 frame->LoadAndDisplayBoard( aFileName );
30 }
31
32 return frame;
33}
34
36{
37// m_toolManager->RegisterTool( new OUTLINE_EDITOR );
38 m_toolManager->InitTools();
39 m_toolManager->ResetTools( TOOL_BASE::MODEL_RELOAD );
40}
void registerTools()
Definition: test.cpp:35
virtual ~OED_TEST_FRAME()
Definition: test.cpp:20
OED_TEST_FRAME(wxFrame *frame, const wxString &title, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxDEFAULT_FRAME_STYLE)
Definition: test.cpp:8
@ MODEL_RELOAD
Model changes (the sheet for a schematic)
Definition: tool_base.h:80
wxFrame * CreateMainFrame(const std::string &aFileName)
Definition: test.cpp:23