KiCad PCB EDA Suite
Loading...
Searching...
No Matches
pcb_context.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 The KiCad Developers, see AUTHORS.txt for contributors.
5 * @author Jon Evans <[email protected]>
6 *
7 * This program is free software: you can redistribute it and/or modify it
8 * under the terms of the GNU General Public License as published by the
9 * Free Software Foundation, either version 3 of the License, or (at your
10 * option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful, but
13 * WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License along
18 * with this program. If not, see <http://www.gnu.org/licenses/>.
19 */
20
21#ifndef KICAD_PCB_CONTEXT_H
22#define KICAD_PCB_CONTEXT_H
23
24#include <memory>
25
26#include <wx/string.h>
27
28#include <api/board_context.h>
29
30class PCB_EDIT_FRAME;
31
32
35{
36public:
37 virtual wxString GetCurrentFileName() const = 0;
38
39 virtual bool SaveBoard() = 0;
40
41 virtual bool SavePcbCopy( const wxString& aFileName, bool aCreateProject, bool aHeadless ) = 0;
42};
43
44
45std::shared_ptr<PCB_CONTEXT> CreatePcbFrameContext( PCB_EDIT_FRAME* aFrame );
46
47#endif
Base interface for board-level API contexts; shared by PCB editor and footprint editor.
PCB-editor-specific context; extends BOARD_CONTEXT with save/filename operations.
Definition pcb_context.h:35
virtual bool SaveBoard()=0
virtual wxString GetCurrentFileName() const =0
virtual bool SavePcbCopy(const wxString &aFileName, bool aCreateProject, bool aHeadless)=0
The main frame for Pcbnew.
std::shared_ptr< PCB_CONTEXT > CreatePcbFrameContext(PCB_EDIT_FRAME *aFrame)