30 #include <wx/popupwin.h> 31 #include <wx/cmdline.h> 72 using namespace KIGFX;
78 m_board->GetConnectivity()->Build( m_board.get() );
79 m_galPanel->DisplayBoard( m_board.get() );
80 m_galPanel->UpdateColors();
82 #ifdef USE_TOOL_MANAGER 84 m_toolManager->SetEnvironment( m_board.get(), m_galPanel->GetView(),
85 m_galPanel->GetViewControls(), nullptr );
99 brd = pi->Load( wxString( filename.c_str() ),
NULL,
NULL );
106 printf(
"%s\n", (
const char*) msg.mb_str() );
127 m_galPanel = std::make_shared<PCB_DRAW_PANEL_GAL>( aParent, -1, wxPoint( 0,
128 0 ), wxDefaultSize, m_displayOptions, aGalType );
129 m_galPanel->UpdateColors();
131 m_galPanel->SetEvtHandlerEnabled(
true );
132 m_galPanel->SetFocus();
133 m_galPanel->Show(
true );
135 m_galPanel->StartDrawing();
137 auto gal = m_galPanel->GetGAL();
139 gal->SetGridVisibility(
true );
140 gal->SetGridSize(
VECTOR2D( 100000.0, 100000.0 ) );
141 gal->SetGridOrigin(
VECTOR2D( 0.0, 0.0 ) );
146 m_galPanel->GetViewControls()->ShowCursor(
true );
148 #ifdef USE_TOOL_MANAGER 149 m_toolManager = std::make_unique<TOOL_MANAGER>( );
150 m_toolManager->SetEnvironment( m_board.get(), m_galPanel->GetView(),
151 m_galPanel->GetViewControls(), nullptr );
153 m_pcbActions = std::make_unique<TEST_ACTIONS>( );
154 m_toolDispatcher = std::make_unique<TOOL_DISPATCHER>( m_toolManager.get(), m_pcbActions.get() );
159 m_toolManager->InitTools();
160 m_galPanel->SetEventDispatcher( m_toolDispatcher.get() );
161 m_toolManager->InvokeTool(
"test.DefaultTool" );
179 auto cs =
Pgm().GetSettingsManager().GetColorSettings();
A PLUGIN derivation for saving and loading Pcbnew s-expression formatted files.
virtual OPT< TOOL_EVENT > TranslateLegacyId(int aId) override
Translate legacy tool ids to the corresponding TOOL_ACTION name.
The Cairo implementation of the graphics abstraction layer.
void createView(wxWindow *aParent, PCB_DRAW_PANEL_GAL::GAL_TYPE aGalType=PCB_DRAW_PANEL_GAL::GAL_TYPE_OPENGL)
KIWAY Kiway & Pgm(), KFCTL_STANDALONE
The global Program "get" accessor.
virtual const wxString Problem() const
what was the problem?
virtual BOARD * LoadAndDisplayBoard(const std::string &filename)
WX_VIEW_CONTROLS class definition.
Releases a PLUGIN in the context of a potential thrown exception through its destructor.
virtual ~PCB_TEST_FRAME_BASE()
VECTOR2< double > VECTOR2D
void Format(OUTPUTFORMATTER *out, int aNestLevel, int aCtl, const CPTREE &aTree)
Output a PTREE into s-expression format via an OUTPUTFORMATTER derivative.
Board layer functions and definitions.
Information pertinent to a Pcbnew printed circuit board.
virtual void SetBoard(std::shared_ptr< BOARD > b)
Gather all the actions that are shared by tools.
Hold an error message and may be used when throwing exceptions containing meaningful error messages.