KiCad PCB EDA Suite
Loading...
Searching...
No Matches
footprint_context.cpp
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
#include <
api/footprint_context.h
>
21
22
#include <
footprint_edit_frame.h
>
23
24
25
class
FOOTPRINT_EDIT_FRAME_CONTEXT
:
public
FOOTPRINT_CONTEXT
26
{
27
public
:
28
explicit
FOOTPRINT_EDIT_FRAME_CONTEXT
(
FOOTPRINT_EDIT_FRAME
* aFrame ) :
29
m_frame
( aFrame )
30
{
31
}
32
33
BOARD
*
GetBoard
()
const override
34
{
35
return
m_frame
->GetBoard();
36
}
37
38
PROJECT
&
Prj
()
const override
39
{
40
return
m_frame
->Prj();
41
}
42
43
TOOL_MANAGER
*
GetToolManager
()
const override
44
{
45
return
m_frame
->GetToolManager();
46
}
47
48
KIWAY
*
GetKiway
()
const override
49
{
50
return
&
m_frame
->Kiway();
51
}
52
53
bool
CanAcceptApiCommands
()
const override
54
{
55
return
m_frame
->CanAcceptApiCommands();
56
}
57
58
LIB_ID
GetLoadedFPID
()
const override
59
{
60
return
m_frame
->GetLoadedFPID();
61
}
62
63
bool
SaveFootprint
(
FOOTPRINT
* aFootprint )
override
64
{
65
return
m_frame
->SaveFootprint( aFootprint );
66
}
67
68
bool
SaveFootprintInLibrary
(
FOOTPRINT
* aFootprint,
const
wxString& aLibraryName )
override
69
{
70
return
m_frame
->SaveFootprintInLibrary( aFootprint, aLibraryName );
71
}
72
73
private
:
74
FOOTPRINT_EDIT_FRAME
*
m_frame
;
75
};
76
77
78
std::shared_ptr<FOOTPRINT_CONTEXT>
CreateFootprintFrameContext
(
FOOTPRINT_EDIT_FRAME
* aFrame )
79
{
80
return
std::make_shared<FOOTPRINT_EDIT_FRAME_CONTEXT>( aFrame );
81
}
BOARD
Information pertinent to a Pcbnew printed circuit board.
Definition
board.h:323
FOOTPRINT_CONTEXT
Definition
footprint_context.h:34
FOOTPRINT_EDIT_FRAME_CONTEXT::CanAcceptApiCommands
bool CanAcceptApiCommands() const override
Definition
footprint_context.cpp:53
FOOTPRINT_EDIT_FRAME_CONTEXT::m_frame
FOOTPRINT_EDIT_FRAME * m_frame
Definition
footprint_context.cpp:74
FOOTPRINT_EDIT_FRAME_CONTEXT::GetBoard
BOARD * GetBoard() const override
Definition
footprint_context.cpp:33
FOOTPRINT_EDIT_FRAME_CONTEXT::FOOTPRINT_EDIT_FRAME_CONTEXT
FOOTPRINT_EDIT_FRAME_CONTEXT(FOOTPRINT_EDIT_FRAME *aFrame)
Definition
footprint_context.cpp:28
FOOTPRINT_EDIT_FRAME_CONTEXT::GetKiway
KIWAY * GetKiway() const override
Definition
footprint_context.cpp:48
FOOTPRINT_EDIT_FRAME_CONTEXT::GetLoadedFPID
LIB_ID GetLoadedFPID() const override
Definition
footprint_context.cpp:58
FOOTPRINT_EDIT_FRAME_CONTEXT::SaveFootprint
bool SaveFootprint(FOOTPRINT *aFootprint) override
Definition
footprint_context.cpp:63
FOOTPRINT_EDIT_FRAME_CONTEXT::Prj
PROJECT & Prj() const override
Definition
footprint_context.cpp:38
FOOTPRINT_EDIT_FRAME_CONTEXT::GetToolManager
TOOL_MANAGER * GetToolManager() const override
Definition
footprint_context.cpp:43
FOOTPRINT_EDIT_FRAME_CONTEXT::SaveFootprintInLibrary
bool SaveFootprintInLibrary(FOOTPRINT *aFootprint, const wxString &aLibraryName) override
Definition
footprint_context.cpp:68
FOOTPRINT_EDIT_FRAME
Definition
footprint_edit_frame.h:46
FOOTPRINT
Definition
footprint.h:290
KIWAY
A minimalistic software bus for communications between various DLLs/DSOs (DSOs) within the same KiCad...
Definition
kiway.h:315
LIB_ID
A logical library item identifier and consists of various portions much like a URI.
Definition
lib_id.h:49
PROJECT
Container for project specific data.
Definition
project.h:66
TOOL_MANAGER
Master controller class:
Definition
tool_manager.h:62
CreateFootprintFrameContext
std::shared_ptr< FOOTPRINT_CONTEXT > CreateFootprintFrameContext(FOOTPRINT_EDIT_FRAME *aFrame)
Definition
footprint_context.cpp:78
footprint_context.h
footprint_edit_frame.h
src
pcbnew
api
footprint_context.cpp
Generated on Sat Jun 6 2026 00:06:35 for KiCad PCB EDA Suite by
1.13.2