You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

40 lines
970 B

  1. #include <pcb_test_frame.h>
  2. // #include <tools/outline_editor.h>
  3. #include <tool/tool_manager.h>
  4. class OED_TEST_FRAME : public PCB_TEST_FRAME
  5. {
  6. public:
  7. OED_TEST_FRAME( wxFrame* frame,
  8. const wxString& title,
  9. const wxPoint& pos = wxDefaultPosition,
  10. const wxSize& size = wxDefaultSize,
  11. long style = wxDEFAULT_FRAME_STYLE ) :
  12. PCB_TEST_FRAME( frame, title, pos, size, style )
  13. {
  14. registerTools();
  15. }
  16. void registerTools();
  17. virtual ~OED_TEST_FRAME() {}
  18. };
  19. wxFrame* CreateMainFrame( const std::string& aFileName )
  20. {
  21. auto frame = new OED_TEST_FRAME( nullptr, wxT( "Outline Editor Test" ) );
  22. if( aFileName != "" )
  23. {
  24. frame->LoadAndDisplayBoard( aFileName );
  25. }
  26. return frame;
  27. }
  28. void OED_TEST_FRAME::registerTools()
  29. {
  30. // m_toolManager->RegisterTool( new OUTLINE_EDITOR );
  31. m_toolManager->InitTools();
  32. m_toolManager->ResetTools( TOOL_BASE::MODEL_RELOAD );
  33. }