KiCad PCB EDA Suite
Loading...
Searching...
No Matches
pcb_test_frame.h
Go to the documentation of this file.
1/*
2 * This program source code file is part of KiCad, a free EDA CAD application.
3 *
4 * Copyright (C) 2013-2017 CERN
5 * @author Tomasz Wlostowski <[email protected]>
6 *
7 * This program is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License
9 * as published by the Free Software Foundation; either version 2
10 * of the License, or (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, you may find one here:
19 * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
20 * or you may search the http://www.gnu.org website for the version 2 license,
21 * or you may write to the Free Software Foundation, Inc.,
22 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
23 */
24
25#ifndef __PCB_TEST_FRAME_H
26#define __PCB_TEST_FRAME_H
27
28#include <wx/wx.h>
29#include <wx/app.h>
30
31#include <memory>
32
33#include <pcb_draw_panel_gal.h>
35
36using std::unique_ptr;
37
39class BOARD;
40
41class TOOL_MANAGER;
42class TOOL_DISPATCHER;
43class ACTIONS;
44
45
46namespace KIGFX {
47 class VIEW;
48};
49
51{
52public:
54 virtual ~PCB_TEST_FRAME_BASE();
55
56 virtual void SetBoard( std::shared_ptr<BOARD> b);
57 virtual BOARD* LoadAndDisplayBoard ( const std::string& filename );
58
59 std::shared_ptr < PCB_DRAW_PANEL_GAL > GetPanel() { return m_galPanel; }
60 std::shared_ptr < BOARD > GetBoard() { return m_board; }
61
62 void LoadSettings();
63
64protected:
65
67 virtual void createUserTools() {};
68
69 std::shared_ptr < PCB_DRAW_PANEL_GAL > m_galPanel;
70 std::shared_ptr < BOARD > m_board;
72 wxString m_mruPath;
73
74#ifdef USE_TOOL_MANAGER
75 unique_ptr < TOOL_MANAGER > m_toolManager;
76 unique_ptr < TOOL_DISPATCHER > m_toolDispatcher;
77 unique_ptr < ACTIONS > m_pcbActions;
78#endif
79};
80
81void SetTopFrame ( wxFrame* aFrame );
82
83#endif
Gather all the actions that are shared by tools.
Definition: actions.h:41
Information pertinent to a Pcbnew printed circuit board.
Definition: board.h:276
@ GAL_TYPE_OPENGL
OpenGL implementation.
std::shared_ptr< BOARD > m_board
std::shared_ptr< PCB_DRAW_PANEL_GAL > GetPanel()
std::shared_ptr< PCB_DRAW_PANEL_GAL > m_galPanel
void createView(wxWindow *aParent, PCB_DRAW_PANEL_GAL::GAL_TYPE aGalType=PCB_DRAW_PANEL_GAL::GAL_TYPE_OPENGL)
std::shared_ptr< BOARD > GetBoard()
virtual void SetBoard(std::shared_ptr< BOARD > b)
virtual void createUserTools()
virtual ~PCB_TEST_FRAME_BASE()
KIGFX::GAL_DISPLAY_OPTIONS m_displayOptions
virtual BOARD * LoadAndDisplayBoard(const std::string &filename)
Master controller class:
Definition: tool_manager.h:57
The Cairo implementation of the graphics abstraction layer.
Definition: color4d.cpp:247
void SetTopFrame(wxFrame *aFrame)