2 #include "canvas/selectables.hpp"
3 #include "canvas/object_ref.hpp"
4 #include "router/pns_router.h"
5 #include "util/uuid.hpp"
21 class ViaPadstackProvider;
24 template <
typename T>
class Coord;
28 class PNS_HORIZON_PARENT_ITEM {
30 PNS_HORIZON_PARENT_ITEM()
51 bool operator==(
const PNS_HORIZON_PARENT_ITEM &other)
const
53 return track == other.track && via == other.via &&
package == other.package && pad == other.pad
54 && hole == other.hole && keepout == other.keepout;
76 void SyncWorld(
PNS::NODE *aWorld)
override;
77 void EraseView()
override;
79 void DisplayItem(
const PNS::ITEM *aItem,
int aColor = 0,
int aClearance = 0,
bool aEdit =
false)
override;
81 void RemoveItem(
PNS::ITEM *aItem)
override;
82 void Commit()
override;
84 bool IsAnyLayerVisible(
const LAYER_RANGE &aLayer)
override;
85 bool IsItemVisible(
const PNS::ITEM *aItem)
override;
87 void UpdateNet(
int aNetCode)
override;
94 static int layer_to_router(
int l);
95 static int layer_from_router(
int l);
99 const PNS_HORIZON_PARENT_ITEM *get_parent(
const horizon::Track *track);
100 const PNS_HORIZON_PARENT_ITEM *get_parent(
const horizon::Via *via);
106 int64_t get_override_routing_offset()
const
108 return override_routing_offset;
111 void set_override_routing_offset(
int64_t o)
113 override_routing_offset = o;
117 const PNS_HORIZON_PARENT_ITEM *get_or_create_parent(
const PNS_HORIZON_PARENT_ITEM &it);
119 class PNS_HORIZON_RULE_RESOLVER *m_ruleResolver =
nullptr;
120 class PNS_HORIZON_DEBUG_DECORATOR *m_debugDecorator =
nullptr;
121 std::set<horizon::ObjectRef> m_preview_items;
132 std::unique_ptr<PNS::SEGMENT> syncTrack(
const horizon::Track *track);
133 std::unique_ptr<PNS::VIA> syncVia(
const horizon::Via *via);
136 std::map<horizon::UUID, int> net_code_map;
137 std::vector<horizon::Net *> net_code_map_r;
139 int64_t override_routing_offset = -1;
141 std::list<PNS_HORIZON_PARENT_ITEM> parents;