![]() |
KiCad PCB EDA Suite
|
#include <selection.h>
Public Types | |
using | ITER = std::deque< EDA_ITEM * >::iterator |
using | CITER = std::deque< EDA_ITEM * >::const_iterator |
Public Member Functions | |
SELECTION () | |
SELECTION (const SELECTION &aOther) | |
SELECTION & | operator= (const SELECTION &aOther) |
ITER | begin () |
ITER | end () |
CITER | begin () const |
CITER | end () const |
void | SetIsHover (bool aIsHover) |
bool | IsHover () const |
virtual void | Add (EDA_ITEM *aItem) |
virtual void | Remove (EDA_ITEM *aItem) |
virtual void | Clear () override |
Remove all the stored items from the group. More... | |
virtual unsigned int | GetSize () const override |
Return the number of stored items. More... | |
virtual KIGFX::VIEW_ITEM * | GetItem (unsigned int aIdx) const override |
bool | Contains (EDA_ITEM *aItem) const |
bool | Empty () const |
Checks if there is anything selected. More... | |
int | Size () const |
Returns the number of selected parts. More... | |
const std::deque< EDA_ITEM * > | GetItems () const |
virtual VECTOR2I | GetCenter () const |
Returns the center point of the selection area bounding box. More... | |
virtual const BOX2I | ViewBBox () const override |
Return the bounding box for all stored items covering all its layers. More... | |
VECTOR2I | GetPosition () const |
Returns the top left point of the selection area bounding box. More... | |
virtual EDA_RECT | GetBoundingBox () const |
virtual EDA_ITEM * | GetTopLeftItem (bool onlyModules=false) const |
EDA_ITEM * | operator[] (const size_t aIdx) const |
EDA_ITEM * | Front () const |
std::deque< EDA_ITEM * > & | Items () |
template<class T > | |
T * | FirstOfKind () const |
bool | HasType (KICAD_T aType) const |
Checks if there is at least one item of requested kind. More... | |
size_t | CountType (KICAD_T aType) const |
virtual const std::vector< KIGFX::VIEW_ITEM * > | updateDrawList () const override |
bool | HasReferencePoint () const |
VECTOR2I | GetReferencePoint () const |
void | SetReferencePoint (const VECTOR2I &aP) |
void | ClearReferencePoint () |
bool | AreAllItemsIdentical () const |
Checks if all items in the selection are the same KICAD_T type. More... | |
bool | OnlyContains (std::vector< KICAD_T > aList) const |
Checks if all items in the selection have a type in aList. More... | |
virtual void | Add (VIEW_ITEM *aItem) |
Add an item to the group. More... | |
virtual void | Remove (VIEW_ITEM *aItem) |
Remove an item from the group. More... | |
virtual void | ViewDraw (int aLayer, VIEW *aView) const override |
Draw all the stored items in the group on the given layer. More... | |
virtual void | ViewGetLayers (int aLayers[], int &aCount) const override |
Return all the layers used by the stored items. More... | |
virtual void | SetLayer (int aLayer) |
Set layer used to draw the group. More... | |
void | FreeItems () |
Free all the items that were added to the group. More... | |
virtual double | ViewGetLOD (int aLayer, VIEW *aView) const |
Return the level of detail (LOD) of the item. More... | |
VIEW_ITEM_DATA * | viewPrivData () const |
void | ClearViewPrivData () |
bool | Set (PROPERTY_BASE *aProperty, wxAny &aValue) |
template<typename T > | |
bool | Set (PROPERTY_BASE *aProperty, T aValue) |
template<typename T > | |
bool | Set (const wxString &aProperty, T aValue) |
wxAny | Get (PROPERTY_BASE *aProperty) |
template<typename T > | |
T | Get (PROPERTY_BASE *aProperty) |
template<typename T > | |
boost::optional< T > | Get (const wxString &aProperty) |
Protected Attributes | |
OPT< VECTOR2I > | m_referencePoint |
std::deque< EDA_ITEM * > | m_items |
bool | m_isHover |
int | m_layer |
std::vector< VIEW_ITEM * > | m_groupItems |
Definition at line 38 of file selection.h.
using SELECTION::CITER = std::deque<EDA_ITEM*>::const_iterator |
Definition at line 62 of file selection.h.
using SELECTION::ITER = std::deque<EDA_ITEM*>::iterator |
Definition at line 61 of file selection.h.
|
inline |
|
inline |
Definition at line 47 of file selection.h.
|
virtualinherited |
Add an item to the group.
Definition at line 57 of file view_group.cpp.
References KIGFX::VIEW_GROUP::m_groupItems.
Referenced by PNS_PCBNEW_DEBUG_DECORATOR::AddLine(), GERBVIEW_SELECTION_TOOL::disambiguationMenu(), PNS_KICAD_IFACE::DisplayItem(), PNS_KICAD_IFACE::DisplayRatline(), PCB_TOOL_BASE::doInteractiveItemPlacement(), PCB_SELECTION_TOOL::EnterGroup(), and BOARD_EDITOR_CONTROL::PlaceTarget().
|
virtual |
Definition at line 32 of file selection.cpp.
References m_items.
Referenced by EE_GRID_HELPER::BestSnapAnchor(), PCB_TOOL_BASE::doInteractiveItemPlacement(), DRAWING_TOOL::DrawDimension(), DRAWING_TOOL::drawSegment(), SCH_EDIT_FRAME::FixupJunctions(), PL_SELECTION_TOOL::highlight(), EE_SELECTION_TOOL::highlight(), PCB_SELECTION_TOOL::highlight(), ARRAY_CREATOR::Invoke(), DRAWING_TOOL::PlaceImportedGraphics(), SCH_EDIT_TOOL::RepeatDrawItem(), and GERBVIEW_SELECTION_TOOL::select().
bool SELECTION::AreAllItemsIdentical | ( | ) | const |
Checks if all items in the selection are the same KICAD_T type.
Definition at line 160 of file selection.cpp.
Referenced by SCH_EDIT_TOOL::Properties().
|
inline |
Definition at line 64 of file selection.h.
References m_items.
Referenced by BOARD_INSPECTION_TOOL::calculateSelectionRatsnest(), and EDIT_TOOL::FilletTracks().
|
inline |
|
inlineoverridevirtual |
Remove all the stored items from the group.
Reimplemented from KIGFX::VIEW_GROUP.
Definition at line 83 of file selection.h.
References m_items.
Referenced by GERBVIEW_SELECTION_TOOL::clearSelection(), PL_DRAW_PANEL_GAL::DisplayDrawingSheet(), PCB_TOOL_BASE::doInteractiveItemPlacement(), DRAWING_TOOL::DrawDimension(), DRAWING_TOOL::drawSegment(), EE_SELECTION_TOOL::EE_SELECTION_TOOL(), EE_SELECTION_TOOL::Main(), PCB_SELECTION_TOOL::Main(), DRAWING_TOOL::PlaceImportedGraphics(), PL_SELECTION_TOOL::RebuildSelection(), PCB_SELECTION_TOOL::RebuildSelection(), EE_SELECTION_TOOL::RebuildSelection(), GERBVIEW_SELECTION_TOOL::Reset(), and EE_SELECTION_TOOL::Reset().
|
inline |
Definition at line 197 of file selection.h.
References m_referencePoint, and NULLOPT.
Referenced by PL_SELECTION_TOOL::ClearSelection(), PCB_SELECTION_TOOL::ClearSelection(), EE_SELECTION_TOOL::ClearSelection(), EDIT_TOOL::doMoveSelection(), EDIT_TOOL::Flip(), EE_SELECTION_TOOL::RequestSelection(), PCB_SELECTION_TOOL::RequestSelection(), EDIT_TOOL::Rotate(), PL_SELECTION_TOOL::selectMultiple(), EE_SELECTION_TOOL::selectMultiple(), PCB_SELECTION_TOOL::selectMultiple(), PL_SELECTION_TOOL::SelectPoint(), EE_SELECTION_TOOL::selectPoint(), and PCB_SELECTION_TOOL::selectPoint().
|
inlineinherited |
Definition at line 143 of file view_item.h.
References KIGFX::VIEW_ITEM::m_viewPrivData.
Referenced by KIGFX::VIEW::OnDestroy().
bool SELECTION::Contains | ( | EDA_ITEM * | aItem | ) | const |
Definition at line 62 of file selection.cpp.
References m_items.
Referenced by EDIT_TOOL::FilletTracks(), and PCB_SELECTION_TOOL::select().
size_t SELECTION::CountType | ( | KICAD_T | aType | ) | const |
Definition at line 135 of file selection.cpp.
References m_items.
Referenced by EDIT_TOOL::Remove().
|
inline |
Checks if there is anything selected.
Definition at line 98 of file selection.h.
References m_items.
Referenced by SCH_EDIT_TOOL::AutoplaceFields(), SCH_EDIT_TOOL::ChangeSymbols(), PL_SELECTION_TOOL::ClearSelection(), PCB_SELECTION_TOOL::ClearSelection(), GERBVIEW_SELECTION_TOOL::clearSelection(), EE_SELECTION_TOOL::ClearSelection(), SCH_EDIT_TOOL::ConvertDeMorgan(), EDIT_TOOL::copyToClipboard(), EDIT_TOOL::CreateArray(), ZONE_CREATE_HELPER::createNewZone(), DIALOG_BOARD_REANNOTATE::DIALOG_BOARD_REANNOTATE(), DIALOG_TRACK_VIA_PROPERTIES::DIALOG_TRACK_VIA_PROPERTIES(), BOARD_INSPECTION_TOOL::doHideNet(), EDIT_TOOL::doMoveSelection(), EDIT_TOOL::Drag(), EDIT_TOOL::Duplicate(), BOARD_EDITOR_CONTROL::EditFpInFpEditor(), SELECTION_CONDITIONS::Empty(), GLOBAL_EDIT_TOOL::ExchangeFootprints(), EDIT_TOOL::Flip(), DRAWING_TOOL::getSourceZoneForAction(), GROUP_TOOL::Group(), ROUTER_TOOL::InlineDrag(), BOARD_INSPECTION_TOOL::LocalRatsnestTool(), PL_EDIT_TOOL::Main(), SYMBOL_EDITOR_MOVE_TOOL::Main(), PL_SELECTION_TOOL::Main(), SCH_MOVE_TOOL::Main(), GERBVIEW_SELECTION_TOOL::Main(), EE_SELECTION_TOOL::Main(), PCB_SELECTION_TOOL::Main(), EDIT_TOOL::Mirror(), BOARD_EDITOR_CONTROL::modifyLockSelected(), EDIT_TOOL::MoveExact(), SELECTION_CONDITIONS::NotEmpty(), PCB_SELECTION_CONDITIONS::OnlyConnectedItems(), PCB_SELECTION_CONDITIONS::onlyGraphicShapeTypesFunc(), SELECTION_CONDITIONS::onlyTypeFunc(), SELECTION_CONDITIONS::onlyTypesFunc(), PL_EDIT_TOOL::Paste(), SYMBOL_EDITOR_EDIT_TOOL::Paste(), SCH_EDITOR_CONTROL::Paste(), GROUP_TOOL::PickNewMember(), POSITION_RELATIVE_TOOL::PositionRelative(), SYMBOL_EDITOR_EDIT_TOOL::Properties(), SCH_EDIT_TOOL::Properties(), BOARD_REANNOTATE_TOOL::ReannotateDuplicates(), BOARD_REANNOTATE_TOOL::ReannotateDuplicatesInSelection(), GROUP_TOOL::RemoveFromGroup(), PL_SELECTION_TOOL::RequestSelection(), EE_SELECTION_TOOL::RequestSelection(), PCB_SELECTION_TOOL::RequestSelection(), EDIT_TOOL::Rotate(), PCB_SELECTION_CONDITIONS::sameLayerFunc(), PCB_SELECTION_CONDITIONS::sameNetFunc(), CLIPBOARD_IO::SaveSelection(), EE_SELECTION_TOOL::SelectConnection(), GERBVIEW_SELECTION_TOOL::selectCursor(), PCB_SELECTION_TOOL::selectCursor(), POSITION_RELATIVE_TOOL::SelectPositionRelativeItem(), EE_INSPECTION_TOOL::ShowDatasheet(), GROUP_TOOL::Ungroup(), GERBVIEW_SELECTION_TOOL::unselect(), EDIT_TOOL::updateModificationPoint(), and BOARD_INSPECTION_TOOL::UpdateSelectionRatsnest().
|
inline |
Definition at line 65 of file selection.h.
References m_items.
Referenced by BOARD_INSPECTION_TOOL::calculateSelectionRatsnest(), and EDIT_TOOL::FilletTracks().
|
inline |
|
inline |
Definition at line 156 of file selection.h.
References m_items.
Referenced by BOARD_EDITOR_CONTROL::EditFpInFpEditor(), and GLOBAL_EDIT_TOOL::ExchangeFootprints().
|
inherited |
Free all the items that were added to the group.
Definition at line 196 of file view_group.cpp.
References KIGFX::VIEW_GROUP::Clear(), KIGFX::VIEW_GROUP::GetItem(), and KIGFX::VIEW_GROUP::GetSize().
Referenced by PNS_PCBNEW_DEBUG_DECORATOR::Clear(), PNS_KICAD_IFACE::EraseView(), PNS_KICAD_IFACE::SetView(), and PNS_KICAD_IFACE::~PNS_KICAD_IFACE().
|
inline |
Definition at line 145 of file selection.h.
References m_items.
Referenced by PCB_POINT_EDITOR::addCornerCondition(), SCH_EDIT_TOOL::AutoplaceFields(), ROUTER_TOOL::CanInlineDrag(), SCH_EDIT_TOOL::ChangeSymbols(), SCH_EDIT_TOOL::CleanupSheetPins(), PL_SELECTION_TOOL::ClearSelection(), PCB_SELECTION_TOOL::ClearSelection(), EE_SELECTION_TOOL::ClearSelection(), SCH_EDIT_TOOL::ConvertDeMorgan(), DRC_TOOL::CrossProbe(), BOARD_INSPECTION_TOOL::CrossProbePcbToSch(), SCH_EDITOR_CONTROL::doCrossProbeSchToPcb(), PL_EDIT_TOOL::DoDelete(), EDIT_TOOL::doMoveSelection(), EDIT_TOOL::Drag(), EDIT_TOOL::DragArcTrack(), SYMBOL_EDITOR_EDIT_TOOL::Duplicate(), SCH_EDIT_TOOL::EditField(), SCH_EDIT_TOOL::EditPageNumber(), SCH_EDITOR_CONTROL::FindNext(), EDIT_TOOL::Flip(), GERBVIEW_SELECTION::GetCenter(), SCH_EDITOR_CONTROL::HasMatch(), SELECTION_CONDITIONS::Idle(), SELECTION_CONDITIONS::IdleSelection(), ROUTER_TOOL::InlineBreakTrack(), ROUTER_TOOL::InlineDrag(), SCH_LINE_WIRE_BUS_TOOL::IsDrawingBus(), SCH_LINE_WIRE_BUS_TOOL::IsDrawingLine(), SCH_LINE_WIRE_BUS_TOOL::IsDrawingLineWireOrBus(), SCH_LINE_WIRE_BUS_TOOL::IsDrawingWire(), EE_POINT_EDITOR::Main(), PL_POINT_EDITOR::Main(), SYMBOL_EDITOR_MOVE_TOOL::Main(), SCH_MOVE_TOOL::Main(), EE_SELECTION_TOOL::Main(), SYMBOL_EDITOR_EDIT_TOOL::Mirror(), SCH_EDIT_TOOL::Mirror(), EDIT_TOOL::Mirror(), EDIT_TOOL::MoveExact(), PCB_POINT_EDITOR::OnSelectionChange(), GROUP_TOOL::PickNewMember(), DRAWING_TOOL::PlaceImportedGraphics(), SYMBOL_EDITOR_EDIT_TOOL::Properties(), SCH_EDIT_TOOL::Properties(), EDIT_TOOL::Properties(), SYMBOL_EDITOR_PIN_TOOL::PushPinProperties(), SCH_EDITOR_CONTROL::ReplaceAndFindNext(), SYMBOL_EDITOR_EDIT_TOOL::Rotate(), EDIT_TOOL::Rotate(), CLIPBOARD_IO::SaveSelection(), EE_SELECTION_TOOL::SelectConnection(), POSITION_RELATIVE_TOOL::SelectPositionRelativeItem(), PCB_SELECTION_TOOL::selectSameSheet(), EE_INSPECTION_TOOL::ShowDatasheet(), SCH_DRAWING_TOOLS::SingleClickPlace(), DIALOG_GLOBAL_EDIT_TEXT_AND_GRAPHICS::TransferDataToWindow(), DIALOG_GLOBAL_EDIT_TRACKS_AND_VIAS::TransferDataToWindow(), SCH_DRAWING_TOOLS::TwoClickPlace(), BUS_UNFOLD_MENU::update(), PCB_CONTROL::UpdateMessagePanel(), PL_EDIT_TOOL::updateModificationPoint(), EDIT_TOOL::updateModificationPoint(), and GERBVIEW_SELECTION::ViewBBox().
|
inlineinherited |
Definition at line 86 of file inspectable.h.
References PROPERTY_BASE::getter(), PROPERTY_MANAGER::Instance(), PROPERTY_BASE::OwnerHash(), TYPE_HASH, and PROPERTY_MANAGER::TypeCast().
Referenced by BOOST_AUTO_TEST_CASE(), CLASS_D_DESC::CLASS_D_DESC(), PCB_EXPR_VAR_REF::GetValue(), and PAD_DESC::PAD_DESC().
|
inlineinherited |
Definition at line 95 of file inspectable.h.
References PROPERTY_BASE::get(), PROPERTY_MANAGER::Instance(), PROPERTY_BASE::OwnerHash(), TYPE_HASH, and PROPERTY_MANAGER::TypeCast().
|
inlineinherited |
Definition at line 104 of file inspectable.h.
References PROPERTY_BASE::get(), PROPERTY_MANAGER::GetProperty(), PROPERTY_MANAGER::Instance(), PROPERTY_BASE::OwnerHash(), TYPE_HASH, and PROPERTY_MANAGER::TypeCast().
|
virtual |
Reimplemented in EE_SELECTION.
Definition at line 112 of file selection.cpp.
References m_items, and EDA_RECT::Merge().
Referenced by GetPosition(), GetReferencePoint(), EDIT_TOOL::MoveExact(), and PCB_SELECTION_TOOL::zoomFitSelection().
|
virtual |
Returns the center point of the selection area bounding box.
Reimplemented in GERBVIEW_SELECTION.
Definition at line 71 of file selection.cpp.
References EOT, EDA_RECT::GetCenter(), m_items, EDA_RECT::Merge(), SCH_GLOBAL_LABEL_T, SCH_HIER_LABEL_T, SCH_LABEL_T, and SCH_TEXT_T.
Referenced by EDIT_TOOL::Flip(), ARRAY_CREATOR::Invoke(), SYMBOL_EDITOR_EDIT_TOOL::Mirror(), SCH_EDIT_TOOL::Mirror(), EDIT_TOOL::MoveExact(), SYMBOL_EDITOR_EDIT_TOOL::Rotate(), SCH_EDIT_TOOL::Rotate(), and EDIT_TOOL::updateModificationPoint().
|
overridevirtual |
Reimplemented from KIGFX::VIEW_GROUP.
Definition at line 53 of file selection.cpp.
References m_items.
Referenced by SCH_LINE_WIRE_BUS_TOOL::AddJunctionsIfNeeded(), SCH_EDIT_TOOL::AutoplaceFields(), SCH_EDIT_TOOL::ChangeTextType(), SYMBOL_EDITOR_EDIT_TOOL::Duplicate(), EDIT_TOOL::Flip(), SCH_SEXPR_PLUGIN::Format(), SCH_LEGACY_PLUGIN::Format(), BOARD_INSPECTION_TOOL::InspectClearance(), BOARD_INSPECTION_TOOL::InspectConstraints(), PCB_SELECTION_TOOL::Main(), SYMBOL_EDITOR_EDIT_TOOL::Mirror(), SCH_EDIT_TOOL::Mirror(), EE_SELECTION_TOOL::RequestSelection(), SYMBOL_EDITOR_EDIT_TOOL::Rotate(), SCH_EDIT_TOOL::Rotate(), and SCH_LINE_WIRE_BUS_TOOL::TrimOverLappingWires().
|
inline |
Definition at line 109 of file selection.h.
References m_items.
Referenced by PL_EDIT_TOOL::Copy(), ZONE_CREATE_HELPER::createNewZone(), SYMBOL_EDITOR_EDIT_TOOL::DoDelete(), SCH_EDIT_TOOL::DoDelete(), PCB_SELECTION_TOOL::expandConnection(), PCB_SELECTION_TOOL::filterSelection(), and PCB_SELECTION_TOOL::selectNet().
|
inline |
Returns the top left point of the selection area bounding box.
Definition at line 125 of file selection.h.
References GetBoundingBox().
|
inline |
Definition at line 184 of file selection.h.
References EDA_RECT::Centre(), GetBoundingBox(), and m_referencePoint.
Referenced by EDIT_TOOL::doMoveSelection(), EDIT_TOOL::Flip(), EDIT_TOOL::Mirror(), SCH_EDIT_TOOL::Rotate(), EDIT_TOOL::Rotate(), and CLIPBOARD_IO::SaveSelection().
|
inlineoverridevirtual |
Return the number of stored items.
Reimplemented from KIGFX::VIEW_GROUP.
Definition at line 88 of file selection.h.
References m_items.
Referenced by SCH_LINE_WIRE_BUS_TOOL::AddJunctionsIfNeeded(), SCH_EDIT_TOOL::AutoplaceFields(), SCH_EDIT_TOOL::ChangeTextType(), PL_SELECTION_TOOL::ClearSelection(), PCB_SELECTION_TOOL::ClearSelection(), EE_SELECTION_TOOL::ClearSelection(), PL_EDIT_TOOL::Copy(), SYMBOL_EDITOR_EDIT_TOOL::Copy(), DRC_TOOL::CrossProbe(), SCH_EDITOR_CONTROL::doCrossProbeSchToPcb(), SYMBOL_EDITOR_EDIT_TOOL::Duplicate(), SCH_EDIT_TOOL::EditPageNumber(), GROUP_TOOL::EnterGroup(), PCB_SELECTION_TOOL::EnterGroup(), PCB_SELECTION_TOOL::FindItem(), EDIT_TOOL::Flip(), SCH_SEXPR_PLUGIN::Format(), SCH_LEGACY_PLUGIN::Format(), SYMBOL_EDITOR_MOVE_TOOL::Main(), PCB_SELECTION_TOOL::Main(), SYMBOL_EDITOR_EDIT_TOOL::Mirror(), SCH_EDIT_TOOL::Mirror(), EE_SELECTION_TOOL::RequestSelection(), SYMBOL_EDITOR_EDIT_TOOL::Rotate(), SCH_EDIT_TOOL::Rotate(), EE_SELECTION_TOOL::SelectConnection(), PCB_SELECTION_TOOL::selectMultiple(), PCB_SELECTION_TOOL::selectPoint(), DIALOG_GLOBAL_EDIT_TEXT_AND_GRAPHICS::TransferDataToWindow(), SCH_LINE_WIRE_BUS_TOOL::TrimOverLappingWires(), SCH_DRAWING_TOOLS::TwoClickPlace(), and PCB_CONTROL::UpdateMessagePanel().
|
inlinevirtual |
Reimplemented in EE_SELECTION, PL_SELECTION, and PCB_SELECTION.
Definition at line 132 of file selection.h.
|
inline |
Definition at line 179 of file selection.h.
References m_referencePoint, and NULLOPT.
Referenced by EDIT_TOOL::doMoveSelection(), EDIT_TOOL::Flip(), SCH_EDIT_TOOL::Rotate(), EDIT_TOOL::Rotate(), CLIPBOARD_IO::SaveSelection(), PL_EDIT_TOOL::updateModificationPoint(), and EDIT_TOOL::updateModificationPoint().
bool SELECTION::HasType | ( | KICAD_T | aType | ) | const |
Checks if there is at least one item of requested kind.
aType | is the type to check for. |
Definition at line 123 of file selection.cpp.
References m_items.
Referenced by EDIT_TOOL::Remove().
|
inline |
Definition at line 74 of file selection.h.
References m_isHover.
Referenced by SCH_MOVE_TOOL::AlignElements(), SCH_EDIT_TOOL::AutoplaceFields(), SCH_EDIT_TOOL::ChangeTextType(), EDIT_TOOL::ChangeTrackWidth(), SCH_EDIT_TOOL::CleanupSheetPins(), SCH_EDIT_TOOL::ConvertDeMorgan(), EDIT_TOOL::doMoveSelection(), EDIT_TOOL::Duplicate(), SCH_EDIT_TOOL::EditField(), BOARD_EDITOR_CONTROL::EditFpInFpEditor(), EDIT_TOOL::Flip(), PL_EDIT_TOOL::Main(), SYMBOL_EDITOR_MOVE_TOOL::Main(), SCH_MOVE_TOOL::Main(), SYMBOL_EDITOR_EDIT_TOOL::Mirror(), EDIT_TOOL::Mirror(), EDIT_TOOL::MoveExact(), SYMBOL_EDITOR_EDIT_TOOL::Properties(), SCH_EDIT_TOOL::Properties(), EDIT_TOOL::Properties(), POSITION_RELATIVE_TOOL::RelativeItemSelectionMove(), EDIT_TOOL::Remove(), SYMBOL_EDITOR_EDIT_TOOL::Rotate(), SCH_EDIT_TOOL::Rotate(), and EDIT_TOOL::Rotate().
|
inline |
Definition at line 150 of file selection.h.
References m_items.
Referenced by EE_SELECTION::GetMultiUnitSymbols(), EE_SELECTION::GetSymbols(), and SCH_EDIT_TOOL::Properties().
bool SELECTION::OnlyContains | ( | std::vector< KICAD_T > | aList | ) | const |
Checks if all items in the selection have a type in aList.
Definition at line 170 of file selection.cpp.
Referenced by EE_GRID_HELPER::BestDragOrigin().
Definition at line 54 of file selection.h.
|
inline |
|
virtualinherited |
Remove an item from the group.
Definition at line 63 of file view_group.cpp.
References alg::delete_matching(), and KIGFX::VIEW_GROUP::m_groupItems.
Referenced by GERBVIEW_SELECTION_TOOL::disambiguationMenu(), and BOARD_EDITOR_CONTROL::PlaceTarget().
|
virtual |
Definition at line 44 of file selection.cpp.
References m_items.
Referenced by DRAWING_TOOL::DrawDimension(), PL_SELECTION_TOOL::unhighlight(), EE_SELECTION_TOOL::unhighlight(), PCB_SELECTION_TOOL::unhighlight(), and GERBVIEW_SELECTION_TOOL::unselect().
|
inlineinherited |
Definition at line 42 of file inspectable.h.
References PROPERTY_MANAGER::Instance(), PROPERTY_BASE::OwnerHash(), PROPERTY_BASE::setter(), TYPE_HASH, and PROPERTY_MANAGER::TypeCast().
|
inlineinherited |
Definition at line 55 of file inspectable.h.
References PROPERTY_MANAGER::Instance(), PROPERTY_BASE::OwnerHash(), PROPERTY_BASE::set(), TYPE_HASH, and PROPERTY_MANAGER::TypeCast().
|
inlineinherited |
Definition at line 68 of file inspectable.h.
References PROPERTY_MANAGER::GetProperty(), PROPERTY_MANAGER::Instance(), PROPERTY_BASE::OwnerHash(), PROPERTY_BASE::set(), TYPE_HASH, and PROPERTY_MANAGER::TypeCast().
|
inline |
Definition at line 69 of file selection.h.
References m_isHover.
Referenced by EE_SELECTION_TOOL::AddItemsToSel(), EE_SELECTION_TOOL::AddItemToSel(), PL_SELECTION_TOOL::ClearSelection(), PCB_SELECTION_TOOL::ClearSelection(), EE_SELECTION_TOOL::ClearSelection(), PL_SELECTION_TOOL::Main(), GERBVIEW_SELECTION_TOOL::Main(), EE_SELECTION_TOOL::Main(), PCB_SELECTION_TOOL::Main(), EE_SELECTION_TOOL::RemoveItemFromSel(), EE_SELECTION_TOOL::RemoveItemsFromSel(), PL_SELECTION_TOOL::RequestSelection(), EE_SELECTION_TOOL::RequestSelection(), PCB_SELECTION_TOOL::RequestSelection(), EE_SELECTION_TOOL::selectMultiple(), and PCB_SELECTION_TOOL::selectMultiple().
|
inlinevirtualinherited |
Set layer used to draw the group.
Definition at line 98 of file view_group.h.
References KIGFX::VIEW_GROUP::m_layer.
Referenced by GERBVIEW_SELECTION_TOOL::disambiguationMenu(), PCB_SELECTION_TOOL::doSelectionMenu(), PNS_KICAD_IFACE::SetView(), and PNS_PCBNEW_DEBUG_DECORATOR::SetView().
|
inline |
Definition at line 192 of file selection.h.
References m_referencePoint.
Referenced by EDIT_TOOL::copyToClipboard(), EDIT_TOOL::doMoveSelection(), SYMBOL_EDITOR_EDIT_TOOL::Duplicate(), EDIT_TOOL::Flip(), EDIT_TOOL::GetAndPlace(), PCB_EDIT_FRAME::OnNetlistChanged(), PL_EDIT_TOOL::Paste(), SYMBOL_EDITOR_EDIT_TOOL::Paste(), SCH_EDITOR_CONTROL::Paste(), PCB_CONTROL::placeBoardItems(), BOARD_EDITOR_CONTROL::PlaceFootprint(), DRAWING_TOOL::PlaceText(), EDIT_TOOL::Rotate(), PL_EDIT_TOOL::updateModificationPoint(), EDIT_TOOL::updateModificationPoint(), and EE_SELECTION_TOOL::updateReferencePoint().
|
inline |
Returns the number of selected parts.
Definition at line 104 of file selection.h.
References m_items.
Referenced by PCB_POINT_EDITOR::addCornerCondition(), EE_GRID_HELPER::BestDragOrigin(), ROUTER_TOOL::CanInlineDrag(), PAD_TOOL::copyPadSettings(), SELECTION_CONDITIONS::countFunc(), BOARD_INSPECTION_TOOL::CrossProbePcbToSch(), ALIGN_DISTRIBUTE_TOOL::DistributeHorizontally(), ALIGN_DISTRIBUTE_TOOL::DistributeVertically(), PL_EDIT_TOOL::DoDelete(), EDIT_TOOL::Drag(), EDIT_TOOL::DragArcTrack(), EDIT_TOOL::Duplicate(), SCH_EDIT_TOOL::EditField(), PAD_TOOL::EditPad(), PCB_SELECTION_TOOL::expandConnection(), EDIT_TOOL::FilletTracks(), GERBVIEW_SELECTION::GetCenter(), DRAWING_TOOL::getSourceZoneForAction(), ROUTER_TOOL::InlineBreakTrack(), ROUTER_TOOL::InlineDrag(), BOARD_INSPECTION_TOOL::InspectClearance(), BOARD_INSPECTION_TOOL::InspectConstraints(), ARRAY_CREATOR::Invoke(), SELECTION_CONDITIONS::lessThanFunc(), EE_POINT_EDITOR::Main(), PL_POINT_EDITOR::Main(), SELECTION_CONDITIONS::moreThanFunc(), EDIT_TOOL::MoveExact(), PCB_POINT_EDITOR::OnSelectionChange(), PCB_CONTROL::placeBoardItems(), SYMBOL_EDITOR_EDIT_TOOL::Properties(), SCH_EDIT_TOOL::Properties(), EDIT_TOOL::Properties(), PAD_TOOL::pushPadSettings(), CLIPBOARD_IO::SaveSelection(), PCB_SELECTION_TOOL::selectNet(), PCB_SELECTION_TOOL::selectSameSheet(), PCB_SELECTION_TOOL::selectSheetContents(), PL_EDIT_TOOL::updateModificationPoint(), EDIT_TOOL::updateModificationPoint(), EE_SELECTION_TOOL::updateReferencePoint(), GERBVIEW_SELECTION::ViewBBox(), BOARD_EDITOR_CONTROL::ZoneDuplicate(), and BOARD_EDITOR_CONTROL::ZoneMerge().
|
overridevirtual |
Reimplemented from KIGFX::VIEW_GROUP.
Reimplemented in PCB_SELECTION.
Definition at line 149 of file selection.cpp.
References m_items.
|
inlineoverridevirtual |
Return the bounding box for all stored items covering all its layers.
Reimplemented from KIGFX::VIEW_GROUP.
Reimplemented in GERBVIEW_SELECTION.
Definition at line 117 of file selection.h.
References r.
|
overridevirtualinherited |
Draw all the stored items in the group on the given layer.
aLayer | is the layer which should be drawn. |
aView | is the VIEW that should be used for drawing. |
Reimplemented from KIGFX::VIEW_ITEM.
Definition at line 107 of file view_group.cpp.
References KIGFX::GAL::AdvanceDepth(), KIGFX::PAINTER::Draw(), KIGFX::VIEW::GetGAL(), KIGFX::VIEW::GetPainter(), KIGFX::VIEW::IsLayerVisible(), IsZoneLayer(), LAYER_PAD_BK, LAYER_PAD_FR, LAYER_PAD_HOLEWALLS, LAYER_PAD_PLATEDHOLES, LAYER_PADS_TH, LAYER_SELECT_OVERLAY, LAYER_ZONE_START, KIGFX::VIEW_GROUP::m_layer, KIGFX::GAL::PopDepth(), KIGFX::GAL::PushDepth(), KIGFX::VIEW::SortLayers(), KIGFX::VIEW_GROUP::updateDrawList(), and KIGFX::VIEW::VIEW_MAX_LAYERS.
|
overridevirtualinherited |
Return all the layers used by the stored items.
aLayers[] | is the output layer index array. |
aCount | is the number of layer indices in aLayers[]. |
Implements KIGFX::VIEW_ITEM.
Definition at line 188 of file view_group.cpp.
References KIGFX::VIEW_GROUP::m_layer.
|
inlinevirtualinherited |
Return the level of detail (LOD) of the item.
A level of detail is the minimal VIEW scale that is sufficient for an item to be shown on a given layer.
aLayer | is the current drawing layer. |
aView | is a pointer to the VIEW device we are drawing on. |
Reimplemented in FP_ZONE, PAD, FOOTPRINT, PCB_VIA, GERBER_DRAW_ITEM, FP_TEXT, PCB_TRACK, ZONE, PCB_GROUP, and FP_SHAPE.
Definition at line 132 of file view_item.h.
Referenced by PNS_KICAD_IFACE::IsItemVisible(), KIGFX::VIEW::DRAW_ITEM_VISITOR::operator()(), EE_GRID_HELPER::queryVisible(), PCB_GRID_HELPER::queryVisible(), and PCB_SELECTION_TOOL::Selectable().
|
inlineinherited |
Definition at line 138 of file view_item.h.
References KIGFX::VIEW_ITEM::m_viewPrivData.
Referenced by KIGFX::VIEW::Add(), KIGFX::VIEW::DRAW_ITEM_VISITOR::deferredDraw(), KIGFX::VIEW::draw(), KIGFX::VIEW::Hide(), KIGFX::VIEW::invalidateItem(), KIGFX::VIEW::IsVisible(), KIGFX::VIEW::OnDestroy(), KIGFX::QUERY_VISITOR< CONTAINER >::operator()(), KIGFX::VIEW::UPDATE_COLOR_VISITOR::operator()(), KIGFX::VIEW::UPDATE_DEPTH_VISITOR::operator()(), KIGFX::VIEW::DRAW_ITEM_VISITOR::operator()(), KIGFX::VIEW::RECACHE_ITEM_VISITOR::operator()(), KIGFX::VIEW::CLEAR_LAYER_CACHE_VISITOR::operator()(), KIGFX::VIEW::Remove(), KIGFX::VIEW::SetVisible(), KIGFX::VIEW::Update(), KIGFX::VIEW::updateItemColor(), KIGFX::VIEW::updateItemGeometry(), and KIGFX::VIEW::updateLayers().
|
protectedinherited |
Definition at line 113 of file view_group.h.
Referenced by KIGFX::VIEW_GROUP::Add(), KIGFX::VIEW_GROUP::Clear(), KIGFX::VIEW_GROUP::GetItem(), KIGFX::VIEW_GROUP::GetSize(), KIGFX::VIEW_GROUP::Remove(), KIGFX::VIEW_GROUP::updateDrawList(), and KIGFX::VIEW_GROUP::ViewBBox().
|
protected |
Definition at line 218 of file selection.h.
Referenced by IsHover(), operator=(), SELECTION(), and SetIsHover().
|
protected |
Definition at line 217 of file selection.h.
Referenced by Add(), EE_SELECTION::AllItemsHaveLineStroke(), AreAllItemsIdentical(), begin(), Clear(), Contains(), CountType(), Empty(), end(), FirstOfKind(), Front(), EE_SELECTION::GetBoundingBox(), GetBoundingBox(), GERBVIEW_SELECTION::GetCenter(), GetCenter(), GetItem(), GetItems(), GetSize(), PL_SELECTION::GetTopLeftItem(), EE_SELECTION::GetTopLeftItem(), HasType(), Items(), OnlyContains(), operator=(), operator[](), Remove(), SELECTION(), Size(), updateDrawList(), and GERBVIEW_SELECTION::ViewBBox().
|
protectedinherited |
Definition at line 112 of file view_group.h.
Referenced by KIGFX::VIEW_GROUP::SetLayer(), KIGFX::VIEW_GROUP::ViewDraw(), and KIGFX::VIEW_GROUP::ViewGetLayers().
Definition at line 216 of file selection.h.
Referenced by ClearReferencePoint(), GetReferencePoint(), HasReferencePoint(), and SetReferencePoint().