KiCad PCB EDA Suite
Loading...
Searching...
No Matches
SELECTION Class Reference

#include <selection.h>

Inheritance diagram for SELECTION:
KIGFX::VIEW_GROUP KIGFX::VIEW_ITEM INSPECTABLE EE_SELECTION GERBVIEW_SELECTION PCB_SELECTION PL_SELECTION

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)
 
SELECTIONoperator= (const SELECTION &aOther)
 
bool operator== (const SELECTION &aOther) const
 
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_ITEMGetItem (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
 
EDA_ITEMGetLastAddedItem () const
 
const std::vector< EDA_ITEM * > GetItemsSortedByTypeAndXY (bool leftBeforeRight=true, bool topBeforeBottom=true) const
 Returns a copy of this selection of items sorted by their X then Y position. More...
 
const std::vector< EDA_ITEM * > GetItemsSortedBySelectionOrder () 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 BOX2I GetBoundingBox () const
 
virtual EDA_ITEMGetTopLeftItem (bool onlyModules=false) const
 
EDA_ITEMoperator[] (const size_t aIdx) const
 
EDA_ITEMFront () const
 
std::deque< EDA_ITEM * > & Items ()
 
const std::deque< EDA_ITEM * > & Items () const
 
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 SetForcedTransparency (double aForcedTransparency)
 
double GetForcedTransparency () const
 
bool Set (PROPERTY_BASE *aProperty, wxAny &aValue, bool aNotify=true)
 
template<typename T >
bool Set (PROPERTY_BASE *aProperty, T aValue, bool aNotify=true)
 
template<typename T >
bool Set (const wxString &aProperty, T aValue, bool aNotify=true)
 
wxAny Get (PROPERTY_BASE *aProperty) const
 
template<typename T >
Get (PROPERTY_BASE *aProperty) const
 
template<typename T >
std::optional< T > Get (const wxString &aProperty) const
 

Protected Attributes

std::optional< VECTOR2Im_referencePoint
 
std::deque< EDA_ITEM * > m_items
 
std::deque< int > m_itemsOrders
 
int m_orderCounter
 
EDA_ITEMm_lastAddedItem
 
bool m_isHover
 
int m_layer
 
std::vector< VIEW_ITEM * > m_groupItems
 

Private Attributes

VIEW_ITEM_DATA * m_viewPrivData
 
double m_forcedTransparency
 Additional transparency for diff'ing items. More...
 

Detailed Description

Definition at line 37 of file selection.h.

Member Typedef Documentation

◆ CITER

using SELECTION::CITER = std::deque<EDA_ITEM*>::const_iterator

Definition at line 71 of file selection.h.

◆ ITER

using SELECTION::ITER = std::deque<EDA_ITEM*>::iterator

Definition at line 70 of file selection.h.

Constructor & Destructor Documentation

◆ SELECTION() [1/2]

SELECTION::SELECTION ( )
inline

Definition at line 40 of file selection.h.

References m_isHover, m_lastAddedItem, and m_orderCounter.

◆ SELECTION() [2/2]

SELECTION::SELECTION ( const SELECTION aOther)
inline

Definition at line 48 of file selection.h.

References m_isHover, m_items, m_itemsOrders, m_lastAddedItem, and m_orderCounter.

Member Function Documentation

◆ Add() [1/2]

◆ Add() [2/2]

◆ AreAllItemsIdentical()

bool SELECTION::AreAllItemsIdentical ( ) const

Checks if all items in the selection are the same KICAD_T type.

Returns
True if all items are the same type, this includes zero or single items

Definition at line 202 of file selection.cpp.

References m_items.

◆ begin() [1/2]

ITER SELECTION::begin ( )
inline

Definition at line 73 of file selection.h.

References m_items.

Referenced by BOARD_INSPECTION_TOOL::calculateSelectionRatsnest(), and GetCurrentSelection().

◆ begin() [2/2]

CITER SELECTION::begin ( ) const
inline

Definition at line 75 of file selection.h.

References m_items.

◆ Clear()

◆ ClearReferencePoint()

◆ Contains()

bool SELECTION::Contains ( EDA_ITEM aItem) const

◆ CountType()

size_t SELECTION::CountType ( KICAD_T  aType) const

◆ Empty()

bool SELECTION::Empty ( ) const
inline

Checks if there is anything selected.

Definition at line 109 of file selection.h.

References m_items.

Referenced by SCH_EDIT_TOOL::AutoplaceFields(), SCH_EDIT_TOOL::ChangeBodyStyle(), SCH_EDIT_TOOL::ChangeSymbols(), GERBVIEW_SELECTION_TOOL::clearSelection(), PL_SELECTION_TOOL::ClearSelection(), PCB_TEST_SELECTION_TOOL::ClearSelection(), EE_SELECTION_TOOL::ClearSelection(), PCB_SELECTION_TOOL::ClearSelection(), EDIT_TOOL::CreateArray(), ZONE_CREATE_HELPER::createNewZone(), CONVERT_TOOL::CreatePolys(), DIALOG_BOARD_REANNOTATE::DIALOG_BOARD_REANNOTATE(), DIALOG_TRACK_VIA_PROPERTIES::DIALOG_TRACK_VIA_PROPERTIES(), EE_INSPECTION_TOOL::DiffSymbol(), EDIT_TABLE_TOOL_BASE< T_TABLE, T_TABLECELL, T_COMMIT >::doAddRowBelow(), EDIT_TABLE_TOOL_BASE< T_TABLE, T_TABLECELL, T_COMMIT >::doDeleteColumns(), EDIT_TABLE_TOOL_BASE< T_TABLE, T_TABLECELL, T_COMMIT >::doDeleteRows(), BOARD_INSPECTION_TOOL::doHideRatsnestNet(), EDIT_TABLE_TOOL_BASE< T_TABLE, T_TABLECELL, T_COMMIT >::doMergeCells(), EDIT_TOOL::doMoveSelection(), SYMBOL_EDITOR_MOVE_TOOL::doMoveSelection(), SCH_MOVE_TOOL::doMoveSelection(), EDIT_TABLE_TOOL_BASE< T_TABLE, T_TABLECELL, T_COMMIT >::doUnmergeCells(), EDIT_TOOL::Duplicate(), BOARD_EDITOR_CONTROL::EditFpInFpEditor(), SELECTION_CONDITIONS::Empty(), GLOBAL_EDIT_TOOL::ExchangeFootprints(), EDIT_TOOL::Flip(), DRAWING_TOOL::getSourceZoneForAction(), GROUP_TOOL::Group(), SELECTION_CONDITIONS::hasTypeFunc(), SELECTION_CONDITIONS::hasTypesFunc(), ROUTER_TOOL::InlineDrag(), EDIT_TOOL::JustifyText(), BOARD_INSPECTION_TOOL::LocalRatsnestTool(), EE_SELECTION_TOOL::Main(), GERBVIEW_SELECTION_TOOL::Main(), PL_EDIT_TOOL::Main(), PL_SELECTION_TOOL::Main(), PCB_SELECTION_TOOL::Main(), EDIT_TOOL::Mirror(), BOARD_EDITOR_CONTROL::modifyLockSelected(), EDIT_TOOL::MoveExact(), SELECTION_CONDITIONS::NotEmpty(), SELECTION_CONDITIONS::onlyTypesFunc(), SYMBOL_EDITOR_EDIT_TOOL::Paste(), PL_EDIT_TOOL::Paste(), GROUP_TOOL::PickNewMember(), POSITION_RELATIVE_TOOL::PositionRelative(), SCH_EDIT_TOOL::Properties(), SYMBOL_EDITOR_EDIT_TOOL::Properties(), BOARD_REANNOTATE_TOOL::ReannotateDuplicates(), BOARD_REANNOTATE_TOOL::ReannotateDuplicatesInSelection(), PROPERTIES_PANEL::rebuildProperties(), GROUP_TOOL::RemoveFromGroup(), SCH_EDIT_TOOL::RepeatDrawItem(), PL_SELECTION_TOOL::RequestSelection(), PCB_SELECTION_TOOL::RequestSelection(), EE_SELECTION_TOOL::RequestSelection(), EDIT_TOOL::Rotate(), PCB_SELECTION_CONDITIONS::sameLayerFunc(), PCB_SELECTION_CONDITIONS::sameNetFunc(), CLIPBOARD_IO::SaveSelection(), EE_SELECTION_TOOL::SelectConnection(), PCB_SELECTION_TOOL::selectCursor(), POSITION_RELATIVE_TOOL::SelectPositionRelativeItem(), SCH_EDIT_TOOL::SetAttribute(), EE_INSPECTION_TOOL::ShowDatasheet(), SCH_EDIT_TOOL::ToggleAttribute(), GROUP_TOOL::Ungroup(), GERBVIEW_SELECTION_TOOL::unselect(), SCH_EDIT_TOOL::UnsetAttribute(), BOARD_INSPECTION_TOOL::UpdateLocalRatsnest(), PCB_CONTROL::UpdateMessagePanel(), and EDIT_TOOL::updateModificationPoint().

◆ end() [1/2]

ITER SELECTION::end ( )
inline

Definition at line 74 of file selection.h.

References m_items.

Referenced by BOARD_INSPECTION_TOOL::calculateSelectionRatsnest(), and GetCurrentSelection().

◆ end() [2/2]

CITER SELECTION::end ( ) const
inline

Definition at line 76 of file selection.h.

References m_items.

◆ FirstOfKind()

template<class T >
T * SELECTION::FirstOfKind ( ) const
inline

◆ FreeItems()

◆ Front()

EDA_ITEM * SELECTION::Front ( ) const
inline

Definition at line 208 of file selection.h.

Referenced by PCB_POINT_EDITOR::addCornerCondition(), PCB_GRID_HELPER::AlignGrid(), SCH_EDIT_TOOL::AutoplaceFields(), ROUTER_TOOL::CanInlineDrag(), SCH_EDIT_TOOL::ChangeBodyStyle(), SCH_EDIT_TOOL::ChangeSymbols(), SCH_EDIT_TOOL::CleanupSheetPins(), PL_SELECTION_TOOL::ClearSelection(), PCB_TEST_SELECTION_TOOL::ClearSelection(), EE_SELECTION_TOOL::ClearSelection(), PCB_SELECTION_TOOL::ClearSelection(), CONVERT_TOOL::CreatePolys(), EE_INSPECTION_TOOL::CrossProbe(), DRC_TOOL::CrossProbe(), EE_INSPECTION_TOOL::DiffSymbol(), PL_EDIT_TOOL::DoDelete(), SYMBOL_EDITOR_MOVE_TOOL::doMoveSelection(), SCH_MOVE_TOOL::doMoveSelection(), EDIT_TOOL::DragArcTrack(), SCH_DRAWING_TOOLS::DrawSheet(), SCH_EDIT_TOOL::EditField(), SCH_EDIT_TOOL::EditPageNumber(), GERBVIEW_SELECTION::GetCenter(), SCH_FIND_REPLACE_TOOL::getCurrentMatch(), EE_GRID_HELPER::GetSelectionGrid(), SELECTION_CONDITIONS::Idle(), SELECTION_CONDITIONS::IdleSelection(), ROUTER_TOOL::InlineBreakTrack(), ROUTER_TOOL::InlineDrag(), SCH_LINE_WIRE_BUS_TOOL::IsDrawingLineWireOrBus(), SCH_EDIT_TOOL::JustifyText(), EE_POINT_EDITOR::Main(), EE_SELECTION_TOOL::Main(), PL_EDIT_TOOL::Main(), PL_POINT_EDITOR::Main(), SCH_EDIT_TOOL::Mirror(), SYMBOL_EDITOR_EDIT_TOOL::Mirror(), PCB_POINT_EDITOR::OnSelectionChange(), SCH_EDIT_TOOL::Properties(), SYMBOL_EDITOR_EDIT_TOOL::Properties(), EDIT_TOOL::Properties(), SYMBOL_EDITOR_PIN_TOOL::PushPinProperties(), PROPERTIES_PANEL::rebuildProperties(), SYMBOL_EDITOR_EDIT_TOOL::Rotate(), EDIT_TOOL::Rotate(), CLIPBOARD_IO::SaveSelection(), POSITION_RELATIVE_TOOL::SelectPositionRelativeItem(), PCB_SELECTION_TOOL::selectSameSheet(), EE_INSPECTION_TOOL::ShowDatasheet(), PCB_EDIT_FRAME::ShowFindDialog(), SCH_EDIT_FRAME::ShowFindReplaceDialog(), BOARD_INSPECTION_TOOL::ShowFootprintLinks(), SCH_DRAWING_TOOLS::SingleClickPlace(), SCH_EDIT_TOOL::Swap(), SCH_DRAWING_TOOLS::SyncSheetsPins(), DIALOG_GLOBAL_EDIT_TEXT_AND_GRAPHICS::TransferDataToWindow(), DIALOG_GLOBAL_EDIT_TEARDROPS::TransferDataToWindow(), DIALOG_GLOBAL_EDIT_TRACKS_AND_VIAS::TransferDataToWindow(), SCH_DRAWING_TOOLS::TwoClickPlace(), PCB_CONTROL::UpdateMessagePanel(), EDIT_TOOL::updateModificationPoint(), PL_EDIT_TOOL::updateModificationPoint(), and GERBVIEW_SELECTION::ViewBBox().

◆ Get() [1/3]

template<typename T >
std::optional< T > INSPECTABLE::Get ( const wxString &  aProperty) const
inlineinherited

◆ Get() [2/3]

◆ Get() [3/3]

template<typename T >
T INSPECTABLE::Get ( PROPERTY_BASE aProperty) const
inlineinherited

◆ GetBoundingBox()

BOX2I SELECTION::GetBoundingBox ( ) const
virtual

◆ GetCenter()

VECTOR2I SELECTION::GetCenter ( ) const
virtual

◆ GetForcedTransparency()

double KIGFX::VIEW_ITEM::GetForcedTransparency ( ) const
inlineinherited

◆ GetItem()

◆ GetItems()

◆ GetItemsSortedBySelectionOrder()

const std::vector< EDA_ITEM * > SELECTION::GetItemsSortedBySelectionOrder ( ) const

◆ GetItemsSortedByTypeAndXY()

const std::vector< EDA_ITEM * > SELECTION::GetItemsSortedByTypeAndXY ( bool  leftBeforeRight = true,
bool  topBeforeBottom = true 
) const
inline

Returns a copy of this selection of items sorted by their X then Y position.

Returns
Vector of sorted items

Definition at line 135 of file selection.h.

References m_items.

Referenced by SCH_MOVE_TOOL::doMoveSelection().

◆ GetLastAddedItem()

EDA_ITEM * SELECTION::GetLastAddedItem ( ) const
inline

Definition at line 125 of file selection.h.

References m_lastAddedItem.

Referenced by BOARD_EDITOR_CONTROL::doCrossProbePcbToSch().

◆ GetPosition()

VECTOR2I SELECTION::GetPosition ( ) const
inline

Returns the top left point of the selection area bounding box.

Definition at line 188 of file selection.h.

◆ GetReferencePoint()

◆ GetSize()

◆ GetTopLeftItem()

virtual EDA_ITEM * SELECTION::GetTopLeftItem ( bool  onlyModules = false) const
inlinevirtual

Reimplemented in PCB_SELECTION, EE_SELECTION, and PL_SELECTION.

Definition at line 195 of file selection.h.

◆ HasReferencePoint()

◆ HasType()

bool SELECTION::HasType ( KICAD_T  aType) const

Checks if there is at least one item of requested kind.

Parameters
aTypeis the type to check for.
Returns
True if there is at least one item of such kind.

Definition at line 144 of file selection.cpp.

References m_items.

Referenced by POSITION_RELATIVE_TOOL::PositionRelative(), and EDIT_TOOL::Remove().

◆ IsHover()

◆ Items() [1/2]

◆ Items() [2/2]

const std::deque< EDA_ITEM * > & SELECTION::Items ( ) const
inline

Definition at line 218 of file selection.h.

◆ OnlyContains()

bool SELECTION::OnlyContains ( std::vector< KICAD_T aList) const

Checks if all items in the selection have a type in aList.

Returns
False if any item in the selection has a type not included in aList

Definition at line 212 of file selection.cpp.

References m_items.

Referenced by EE_SELECTION_TOOL::Main(), and SCH_EDIT_TOOL::Swap().

◆ operator=()

SELECTION & SELECTION::operator= ( const SELECTION aOther)
inline

Definition at line 58 of file selection.h.

References m_isHover, m_items, m_itemsOrders, m_lastAddedItem, and m_orderCounter.

◆ operator==()

bool SELECTION::operator== ( const SELECTION aOther) const

Definition at line 32 of file selection.cpp.

References m_isHover, m_items, m_itemsOrders, m_lastAddedItem, and m_orderCounter.

◆ operator[]()

EDA_ITEM * SELECTION::operator[] ( const size_t  aIdx) const
inline

Definition at line 200 of file selection.h.

◆ Remove() [1/2]

◆ Remove() [2/2]

void VIEW_GROUP::Remove ( VIEW_ITEM aItem)
virtualinherited

Remove an item from the group.

Definition at line 64 of file view_group.cpp.

References alg::delete_matching(), and KIGFX::VIEW_GROUP::m_groupItems.

◆ Set() [1/3]

template<typename T >
bool INSPECTABLE::Set ( const wxString &  aProperty,
aValue,
bool  aNotify = true 
)
inlineinherited

◆ Set() [2/3]

template<typename T >
bool INSPECTABLE::Set ( PROPERTY_BASE aProperty,
aValue,
bool  aNotify = true 
)
inlineinherited

◆ Set() [3/3]

bool INSPECTABLE::Set ( PROPERTY_BASE aProperty,
wxAny &  aValue,
bool  aNotify = true 
)
inlineinherited

◆ SetForcedTransparency()

void KIGFX::VIEW_ITEM::SetForcedTransparency ( double  aForcedTransparency)
inlineinherited

◆ SetIsHover()

◆ SetLayer()

virtual void KIGFX::VIEW_GROUP::SetLayer ( int  aLayer)
inlinevirtualinherited

Set layer used to draw the group.

Definition at line 99 of file view_group.h.

Referenced by SELECTION_TOOL::doSelectionMenu(), PNS_PCBNEW_DEBUG_DECORATOR::SetView(), and PNS_KICAD_IFACE::SetView().

◆ SetReferencePoint()

◆ Size()

int SELECTION::Size ( ) const
inline

Returns the number of selected parts.

Definition at line 115 of file selection.h.

References m_items.

Referenced by PCB_POINT_EDITOR::addCornerCondition(), PAD_TOOL::copyPadSettings(), SELECTION_CONDITIONS::countFunc(), EDIT_TOOL::DeleteItems(), BOARD_INSPECTION_TOOL::DiffFootprint(), ALIGN_DISTRIBUTE_TOOL::DistributeHorizontally(), ALIGN_DISTRIBUTE_TOOL::DistributeVertically(), PL_EDIT_TOOL::DoDelete(), PCB_SELECTION_TOOL::doSyncSelection(), EDIT_TOOL::DragArcTrack(), SCH_DRAWING_TOOLS::DrawSheet(), EDIT_TOOL::Duplicate(), SCH_EDIT_TOOL::EditField(), PAD_TOOL::EditPad(), 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_EDIT_TOOL::Main(), PL_POINT_EDITOR::Main(), SELECTION_CONDITIONS::moreThanFunc(), EDIT_TOOL::MoveExact(), PCB_POINT_EDITOR::OnSelectionChange(), PCB_CONTROL::placeBoardItems(), SCH_EDIT_TOOL::Properties(), SYMBOL_EDITOR_EDIT_TOOL::Properties(), EDIT_TOOL::Properties(), PAD_TOOL::pushPadSettings(), PROPERTIES_PANEL::rebuildProperties(), EDIT_TOOL::Rotate(), ROUTER_TOOL::RouteSelected(), CLIPBOARD_IO::SaveSelection(), PCB_SELECTION_TOOL::selectAllConnectedTracks(), PCB_SELECTION_TOOL::selectNet(), PCB_SELECTION_TOOL::selectSameSheet(), PCB_SELECTION_TOOL::selectSheetContents(), PCB_EDIT_FRAME::ShowFindDialog(), SCH_EDIT_FRAME::ShowFindReplaceDialog(), BOARD_INSPECTION_TOOL::ShowFootprintLinks(), SCH_EDIT_TOOL::Swap(), EDIT_TOOL::Swap(), EE_SELECTION_TOOL::SyncSelection(), EDIT_TOOL::updateModificationPoint(), PL_EDIT_TOOL::updateModificationPoint(), EE_SELECTION_TOOL::updateReferencePoint(), GERBVIEW_SELECTION::ViewBBox(), BOARD_EDITOR_CONTROL::ZoneDuplicate(), and BOARD_EDITOR_CONTROL::ZoneMerge().

◆ updateDrawList()

const std::vector< KIGFX::VIEW_ITEM * > SELECTION::updateDrawList ( ) const
overridevirtual

Reimplemented from KIGFX::VIEW_GROUP.

Reimplemented in EE_SELECTION, and PCB_SELECTION.

Definition at line 191 of file selection.cpp.

References m_items.

◆ ViewBBox()

virtual const BOX2I SELECTION::ViewBBox ( ) const
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 180 of file selection.h.

References BOX2< Vec >::SetMaximum().

◆ ViewDraw()

void VIEW_GROUP::ViewDraw ( int  aLayer,
VIEW aView 
) const
overridevirtualinherited

◆ ViewGetLayers()

void VIEW_GROUP::ViewGetLayers ( int  aLayers[],
int &  aCount 
) const
overridevirtualinherited

Return all the layers used by the stored items.

Parameters
aLayers[]is the output layer index array.
aCountis the number of layer indices in aLayers[].

Implements KIGFX::VIEW_ITEM.

Definition at line 196 of file view_group.cpp.

References KIGFX::VIEW_GROUP::m_layer.

◆ ViewGetLOD()

virtual double KIGFX::VIEW_ITEM::ViewGetLOD ( int  aLayer,
VIEW aView 
) const
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.

Parameters
aLayeris the current drawing layer.
aViewis a pointer to the VIEW device we are drawing on.
Returns
the level of detail. 0 always show the item, because the actual zoom level (or VIEW scale) is always > 0

Reimplemented in SCH_LINE, GERBER_DRAW_ITEM, FOOTPRINT, PAD, PCB_FIELD, PCB_GROUP, PCB_REFERENCE_IMAGE, PCB_SHAPE, PCB_TEXT, PCB_TEXTBOX, PCB_TRACK, PCB_VIA, and ZONE.

Definition at line 141 of file view_item.h.

Referenced by PNS_KICAD_IFACE::IsItemVisible(), KIGFX::VIEW::DRAW_ITEM_VISITOR::operator()(), EE_GRID_HELPER::queryVisible(), and PCB_GRID_HELPER::queryVisible().

◆ viewPrivData()

Member Data Documentation

◆ m_forcedTransparency

double KIGFX::VIEW_ITEM::m_forcedTransparency
privateinherited

Additional transparency for diff'ing items.

Definition at line 166 of file view_item.h.

Referenced by KIGFX::VIEW::DRAW_ITEM_VISITOR::operator()().

◆ m_groupItems

◆ m_isHover

bool SELECTION::m_isHover
protected

Definition at line 275 of file selection.h.

Referenced by IsHover(), operator=(), operator==(), SELECTION(), and SetIsHover().

◆ m_items

◆ m_itemsOrders

std::deque<int> SELECTION::m_itemsOrders
protected

◆ m_lastAddedItem

EDA_ITEM* SELECTION::m_lastAddedItem
protected

Definition at line 274 of file selection.h.

Referenced by Add(), GetLastAddedItem(), operator=(), operator==(), Remove(), and SELECTION().

◆ m_layer

int KIGFX::VIEW_GROUP::m_layer
protectedinherited

Definition at line 113 of file view_group.h.

Referenced by KIGFX::VIEW_GROUP::ViewDraw(), and KIGFX::VIEW_GROUP::ViewGetLayers().

◆ m_orderCounter

int SELECTION::m_orderCounter
protected

Definition at line 273 of file selection.h.

Referenced by Add(), Clear(), operator=(), operator==(), and SELECTION().

◆ m_referencePoint

std::optional<VECTOR2I> SELECTION::m_referencePoint
protected

Definition at line 270 of file selection.h.

Referenced by ClearReferencePoint(), GetReferencePoint(), and SetReferencePoint().

◆ m_viewPrivData

VIEW_ITEM_DATA* KIGFX::VIEW_ITEM::m_viewPrivData
privateinherited

The documentation for this class was generated from the following files: