KiCad PCB EDA Suite
Loading...
Searching...
No Matches
block_drag_validation.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
7 * modify it under the terms of the GNU General Public License
8 * as published by the Free Software Foundation; either version 2
9 * of the License, or (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program. If not, see <https://www.gnu.org/licenses/>.
18 */
19
20#ifndef BLOCK_DRAG_VALIDATION_H
21#define BLOCK_DRAG_VALIDATION_H
22
23#include <utility>
24#include <vector>
25
26class BOARD;
27class BOARD_ITEM;
28class ZONE;
29
40
49{
50public:
52
54 void CaptureBaseline( const std::vector<BOARD_ITEM*>& aCarriedItems );
55
57
58private:
59 bool outlineIsValid() const;
60
62 std::vector<std::pair<ZONE*, bool>> m_zones; // zone and whether it started out valid
65};
66
67#endif // BLOCK_DRAG_VALIDATION_H
BLOCK_DRAG_VALIDATION_RESULT
@ INVALID_OUTLINE
The board outline was closed before the drag and the moved Edge.Cuts broke it.
@ INVALID_ZONE
A zone that came along lost its valid outline.
void CaptureBaseline(const std::vector< BOARD_ITEM * > &aCarriedItems)
Note whether the zones coming along, and the board outline, were valid to start with.
BLOCK_DRAG_VALIDATION_RESULT Validate() const
std::vector< std::pair< ZONE *, bool > > m_zones
A base class for any item which can be embedded within the BOARD container class, and therefore insta...
Definition board_item.h:99
Information pertinent to a Pcbnew printed circuit board.
Definition board.h:411
Handle a list of polygons defining a copper zone.
Definition zone.h:70
#define OK