KiCad PCB EDA Suite
pns_component_dragger.h
Go to the documentation of this file.
1 /*
2  * KiRouter - a push-and-(sometimes-)shove PCB router
3  *
4  * Copyright (C) 2013-2020 CERN
5  * Author: Tomasz Wlostowski <tomasz.wlostowski@cern.ch>
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 __PNS_COMPONENT_DRAGGER_H
22 #define __PNS_COMPONENT_DRAGGER_H
23 
24 #include <math/vector2d.h>
25 
26 #include "pns_drag_algo.h"
27 #include "pns_itemset.h"
28 #include "pns_line.h"
29 #include "pns_node.h"
30 #include "pns_via.h"
31 
32 namespace PNS
33 {
34 class ROUTER;
35 class OPTIMIZER;
36 
43 {
44 public:
45  COMPONENT_DRAGGER( ROUTER* aRouter );
47 
48 
55  bool Start( const VECTOR2I& aP, ITEM_SET& aPrimitives ) override;
56 
63  bool Drag( const VECTOR2I& aP ) override;
64 
72  bool FixRoute() override;
73 
80  NODE* CurrentNode() const override;
81 
87  const ITEM_SET Traces() override;
88 
89 private:
91  {
95  };
96 
97  std::set<SOLID*> m_solids;
98  std::vector<DRAGGED_CONNECTION> m_conns;
99 
105 };
106 
107 }; // namespace PNS
108 
109 #endif
COMPONENT_DRAGGER(ROUTER *aRouter)
NODE.
Definition: pns_node.h:145
NODE * CurrentNode() const override
Function CurrentNode()
DRAG_ALGO.
Definition: pns_drag_algo.h:42
bool Start(const VECTOR2I &aP, ITEM_SET &aPrimitives) override
Function Start()
std::set< SOLID * > m_solids
bool Drag(const VECTOR2I &aP) override
Function Drag()
std::vector< DRAGGED_CONNECTION > m_conns
const ITEM_SET Traces() override
Function Traces()
Push and Shove diff pair dimensions (gap) settings dialog.
bool FixRoute() override
Function FixRoute()