KiCad PCB EDA Suite
Loading...
Searching...
No Matches
footprint_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 *
6 * This program is free software: you can redistribute it and/or modify it
7 * under the terms of the GNU General Public License as published by the
8 * Free Software Foundation, either version 3 of the License, or (at your
9 * option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful, but
12 * WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License along
17 * with this program. If not, see <http://www.gnu.org/licenses/>.
18 */
19
20#ifndef KICAD_FOOTPRINT_CONTEXT_H
21#define KICAD_FOOTPRINT_CONTEXT_H
22
23#include <memory>
24#include <wx/string.h>
25
26#include <api/board_context.h>
27
28class FOOTPRINT;
30class LIB_ID;
31
32
34{
35public:
36 virtual LIB_ID GetLoadedFPID() const = 0;
37
38 virtual bool SaveFootprint( FOOTPRINT* aFootprint ) = 0;
39
40 virtual bool SaveFootprintInLibrary( FOOTPRINT* aFootprint, const wxString& aLibraryName ) = 0;
41};
42
43
44std::shared_ptr<FOOTPRINT_CONTEXT> CreateFootprintFrameContext( FOOTPRINT_EDIT_FRAME* aFrame );
45
46#endif
Base interface for board-level API contexts; shared by PCB editor and footprint editor.
virtual LIB_ID GetLoadedFPID() const =0
virtual bool SaveFootprintInLibrary(FOOTPRINT *aFootprint, const wxString &aLibraryName)=0
virtual bool SaveFootprint(FOOTPRINT *aFootprint)=0
A logical library item identifier and consists of various portions much like a URI.
Definition lib_id.h:49
std::shared_ptr< FOOTPRINT_CONTEXT > CreateFootprintFrameContext(FOOTPRINT_EDIT_FRAME *aFrame)