KiCad PCB EDA Suite
Loading...
Searching...
No Matches
drc_interactive_courtyard_clearance.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) 2004-2019 Jean-Pierre Charras, jp.charras at wanadoo.fr
5 * Copyright The KiCad Developers, see AUTHORS.txt for contributors.
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
26#pragma once
27
29
30
32{
33public:
34 DRC_INTERACTIVE_COURTYARD_CLEARANCE( const std::shared_ptr<DRC_ENGINE>& aDRCEngine ) :
37 {
38 m_isRuleDriven = false;
39 SetDRCEngine( aDRCEngine.get() );
40 }
41
43
44 void Init( BOARD* aBoard );
45
46 virtual bool Run() override;
47
48 virtual const wxString GetName() const override
49 {
50 return wxT( "interactive_courtyard_clearance" );
51 }
52
53 void UpdateConflicts( KIGFX::VIEW* aView, bool aHighlightMoved );
54 void ClearConflicts( KIGFX::VIEW* aView );
55
56public:
57 std::vector<FOOTPRINT*> m_FpInMove; // The list of moved footprints
58
59private:
61
62private:
64
65 std::set<BOARD_ITEM*> m_itemsInConflict; // The list of items in conflict
66 std::vector<BOARD_ITEM*> m_lastItemsInConflict; // The list of items last highlighted
67};
Information pertinent to a Pcbnew printed circuit board.
Definition: board.h:317
virtual bool Run() override
Run this provider against the given PCB with configured options (if any).
virtual const wxString GetName() const override
virtual ~DRC_INTERACTIVE_COURTYARD_CLEARANCE()=default
void UpdateConflicts(KIGFX::VIEW *aView, bool aHighlightMoved)
DRC_INTERACTIVE_COURTYARD_CLEARANCE(const std::shared_ptr< DRC_ENGINE > &aDRCEngine)
void SetDRCEngine(DRC_ENGINE *engine)
Hold a (potentially large) number of VIEW_ITEMs and renders them on a graphics device provided by the...
Definition: view.h:66