KiCad PCB EDA Suite
SELECTION Class Reference

#include <selection.h>

Inheritance diagram for SELECTION:
KIGFX::VIEW_GROUP KIGFX::VIEW_ITEM

Public Types

using ITER = std::set< EDA_ITEM * >::iterator
 
using CITER = std::set< EDA_ITEM * >::const_iterator
 

Public Member Functions

 SELECTION ()
 
 SELECTION (const SELECTION &aOther)
 
const SELECTIONoperator= (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
 Function Clear() Removes all the stored items from the group. More...
 
virtual unsigned int GetSize () const override
 Function GetSize() Returns the number of stored items. More...
 
virtual KIGFX::VIEW_ITEMGetItem (unsigned int idx) 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::set< EDA_ITEM * > GetItems () const
 
VECTOR2I GetCenter () const
 Returns the center point of the selection area bounding box. More...
 
const BOX2I ViewBBox () const override
 Function ViewBBox() Returns 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...
 
EDA_RECT GetBoundingBox () const
 
EDA_ITEMGetTopLeftItem (bool onlyModules=false) const
 
EDA_ITEMGetTopLeftModule () const
 
EDA_ITEMoperator[] (const int index) const
 
EDA_ITEMFront () const
 
std::set< EDA_ITEM * > & Items ()
 
template<class T >
T * FirstOfKind () const
 
virtual const VIEW_GROUP::ITEMS updateDrawList () const override
 
virtual void Add (VIEW_ITEM *aItem)
 Function Add() Adds an item to the group. More...
 
virtual void Remove (VIEW_ITEM *aItem)
 Function Remove() Removes an item from the group. More...
 
virtual void ViewDraw (int aLayer, VIEW *aView) const override
 Function ViewDraw() Draws all the stored items in the group on the given layer. More...
 
virtual void ViewGetLayers (int aLayers[], int &aCount) const override
 Function ViewGetLayers() Returns all the layers used by the stored items. More...
 
virtual void SetLayer (int aLayer)
 Function SetLayer() Sets layer used to draw the group. More...
 
void FreeItems ()
 Function FreeItems() Frees all the items that were added to the group. More...
 
virtual unsigned int ViewGetLOD (int aLayer, VIEW *aView) const
 Function ViewGetLOD() Returns the level of detail of the item. More...
 
VIEW_ITEM_DATA * viewPrivData () const
 

Protected Types

typedef std::vector< VIEW_ITEM * > ITEMS
 

Protected Attributes

int m_layer
 Layer on which the group is drawn. More...
 
ITEMS m_groupItems
 Container for storing VIEW_ITEMs. More...
 

Private Attributes

std::set< EDA_ITEM * > m_items
 Set of selected items. More...
 
bool m_isHover
 

Detailed Description

Definition at line 35 of file selection.h.

Member Typedef Documentation

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

Definition at line 54 of file selection.h.

typedef std::vector<VIEW_ITEM*> KIGFX::VIEW_GROUP::ITEMS
protectedinherited

Definition at line 45 of file view_group.h.

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

Definition at line 53 of file selection.h.

Constructor & Destructor Documentation

SELECTION::SELECTION ( )
inline

Definition at line 38 of file selection.h.

38 {};
SELECTION::SELECTION ( const SELECTION aOther)
inline

Definition at line 40 of file selection.h.

References m_isHover, and m_items.

41  {
42  m_items = aOther.m_items;
43  m_isHover = aOther.m_isHover;
44  }
bool m_isHover
Definition: selection.h:177
std::set< EDA_ITEM * > m_items
Set of selected items.
Definition: selection.h:175

Member Function Documentation

void VIEW_GROUP::Add ( VIEW_ITEM aItem)
virtualinherited

Function Add() Adds an item to the group.

Parameters
aItemis the item to be added.

Definition at line 55 of file view_group.cpp.

References KIGFX::VIEW_GROUP::m_groupItems.

Referenced by PNS_PCBNEW_DEBUG_DECORATOR::AddLine(), PNS_KICAD_IFACE::DisplayItem(), PCB_TOOL::doInteractiveItemPlacement(), MODULE_EDITOR_TOOLS::PasteItems(), PCB_EDITOR_CONTROL::PlaceModule(), and PCB_EDITOR_CONTROL::PlaceTarget().

56 {
57  m_groupItems.push_back( aItem );
58 }
ITEMS m_groupItems
Container for storing VIEW_ITEMs.
Definition: view_group.h:135
virtual void SELECTION::Add ( EDA_ITEM aItem)
inlinevirtual

Definition at line 71 of file selection.h.

References m_items.

Referenced by PCB_TOOL::doInteractiveItemPlacement(), DRAWING_TOOL::drawArc(), DRAWING_TOOL::DrawDimension(), DRAWING_TOOL::drawSegment(), DRAWING_TOOL::PlaceDXF(), DRAWING_TOOL::PlaceText(), and SELECTION_TOOL::select().

72  {
73  m_items.insert( aItem );
74  }
std::set< EDA_ITEM * > m_items
Set of selected items.
Definition: selection.h:175
ITER SELECTION::begin ( )
inline

Definition at line 56 of file selection.h.

References m_items.

56 { return m_items.begin(); }
std::set< EDA_ITEM * > m_items
Set of selected items.
Definition: selection.h:175
CITER SELECTION::begin ( ) const
inline

Definition at line 58 of file selection.h.

References m_items.

58 { return m_items.cbegin(); }
std::set< EDA_ITEM * > m_items
Set of selected items.
Definition: selection.h:175
virtual void SELECTION::Clear ( )
inlineoverridevirtual

Function Clear() Removes all the stored items from the group.

Reimplemented from KIGFX::VIEW_GROUP.

Definition at line 81 of file selection.h.

References m_items.

Referenced by PCB_TOOL::doInteractiveItemPlacement(), DRAWING_TOOL::drawArc(), DRAWING_TOOL::DrawDimension(), DRAWING_TOOL::drawSegment(), DRAWING_TOOL::PlaceDXF(), DRAWING_TOOL::PlaceText(), and SELECTION_TOOL::Reset().

82  {
83  m_items.clear();
84  }
std::set< EDA_ITEM * > m_items
Set of selected items.
Definition: selection.h:175
bool SELECTION::Contains ( EDA_ITEM aItem) const
inline

Definition at line 100 of file selection.h.

References m_items.

Referenced by SELECTION_TOOL::select().

101  {
102  return m_items.find( aItem ) != m_items.end();
103  }
std::set< EDA_ITEM * > m_items
Set of selected items.
Definition: selection.h:175
ITER SELECTION::end ( )
inline

Definition at line 57 of file selection.h.

References m_items.

57 { return m_items.end(); }
std::set< EDA_ITEM * > m_items
Set of selected items.
Definition: selection.h:175
CITER SELECTION::end ( ) const
inline

Definition at line 59 of file selection.h.

References m_items.

59 { return m_items.cend(); }
std::set< EDA_ITEM * > m_items
Set of selected items.
Definition: selection.h:175
template<class T >
T* SELECTION::FirstOfKind ( ) const
inline

Definition at line 158 of file selection.h.

References m_items.

159  {
160  auto refType = T( nullptr ).Type();
161 
162  for( auto item : m_items )
163  {
164  if( item->Type() == refType )
165  return static_cast<T*> ( item );
166  }
167 
168  return nullptr;
169  }
T
enum T contains all this lexer's tokens.
std::set< EDA_ITEM * > m_items
Set of selected items.
Definition: selection.h:175
void VIEW_GROUP::FreeItems ( )
inherited

Function FreeItems() Frees all the items that were added to the group.

Definition at line 141 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(), DRAWING_TOOL::PlaceDXF(), PNS_KICAD_IFACE::SetView(), and PNS_KICAD_IFACE::~PNS_KICAD_IFACE().

142 {
143  for( unsigned int i = 0 ; i < GetSize(); i++ )
144  delete GetItem( i );
145 
146  Clear();
147 }
virtual VIEW_ITEM * GetItem(unsigned int aIdx) const
Definition: view_group.cpp:86
virtual void Clear()
Function Clear() Removes all the stored items from the group.
Definition: view_group.cpp:74
virtual unsigned int GetSize() const
Function GetSize() Returns the number of stored items.
Definition: view_group.cpp:80
EDA_RECT SELECTION::GetBoundingBox ( ) const

Definition at line 1949 of file selection_tool.cpp.

References Front(), EDA_ITEM::GetBoundingBox(), m_items, and EDA_RECT::Merge().

Referenced by ALIGN_DISTRIBUTE_TOOL::AlignBottom(), ALIGN_DISTRIBUTE_TOOL::AlignLeft(), ALIGN_DISTRIBUTE_TOOL::AlignRight(), ALIGN_DISTRIBUTE_TOOL::AlignTop(), GetCenter(), and GetPosition().

1950 {
1951  EDA_RECT bbox;
1952 
1953  bbox = Front()->GetBoundingBox();
1954  auto i = m_items.begin();
1955  ++i;
1956 
1957  for( ; i != m_items.end(); ++i )
1958  {
1959  bbox.Merge( (*i)->GetBoundingBox() );
1960  }
1961 
1962  return bbox;
1963 }
virtual const EDA_RECT GetBoundingBox() const
Function GetBoundingBox returns the orthogonal, bounding box of this object for display purposes...
void Merge(const EDA_RECT &aRect)
Function Merge modifies the position and size of the rectangle in order to contain aRect...
EDA_ITEM * Front() const
Definition: selection.h:144
std::set< EDA_ITEM * > m_items
Set of selected items.
Definition: selection.h:175
Class EDA_RECT handles the component boundary box.
VECTOR2I SELECTION::GetCenter ( ) const

Returns the center point of the selection area bounding box.

Definition at line 1943 of file selection_tool.cpp.

References EDA_RECT::Centre(), and GetBoundingBox().

Referenced by GAL_ARRAY_CREATOR::getRotationCentre(), and POSITION_RELATIVE_TOOL::RelativeItemSelectionMove().

1944 {
1945  return static_cast<VECTOR2I>( GetBoundingBox().Centre() );
1946 }
EDA_RECT GetBoundingBox() const
wxPoint Centre() const
virtual KIGFX::VIEW_ITEM* SELECTION::GetItem ( unsigned int  idx) const
inlineoverridevirtual

Reimplemented from KIGFX::VIEW_GROUP.

Definition at line 91 of file selection.h.

References m_items.

92  {
93  auto iter = m_items.begin();
94 
95  std::advance( iter, idx );
96 
97  return *iter;
98  }
std::set< EDA_ITEM * > m_items
Set of selected items.
Definition: selection.h:175
const std::set<EDA_ITEM*> SELECTION::GetItems ( ) const
inline

Definition at line 117 of file selection.h.

References m_items.

Referenced by SELECTION_TOOL::filterSelection(), SELECTION_TOOL::selectConnection(), SELECTION_TOOL::selectCopper(), and SELECTION_TOOL::selectNet().

118  {
119  return m_items;
120  }
std::set< EDA_ITEM * > m_items
Set of selected items.
Definition: selection.h:175
VECTOR2I SELECTION::GetPosition ( ) const

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

Definition at line 1937 of file selection_tool.cpp.

References GetBoundingBox(), and EDA_RECT::GetPosition().

1938 {
1939  return static_cast<VECTOR2I>( GetBoundingBox().GetPosition() );
1940 }
EDA_RECT GetBoundingBox() const
const wxPoint & GetPosition() const
virtual unsigned int SELECTION::GetSize ( ) const
inlineoverridevirtual

Function GetSize() Returns the number of stored items.

Returns
Number of stored items.

Reimplemented from KIGFX::VIEW_GROUP.

Definition at line 86 of file selection.h.

References m_items.

Referenced by SELECTION_TOOL::RequestSelection().

87  {
88  return m_items.size();
89  }
std::set< EDA_ITEM * > m_items
Set of selected items.
Definition: selection.h:175
EDA_ITEM * SELECTION::GetTopLeftItem ( bool  onlyModules = false) const

Definition at line 1966 of file selection_tool.cpp.

References BOARD_ITEM::GetPosition(), m_items, PCB_MODULE_T, EDA_ITEM::Type(), wxPoint::x, and wxPoint::y.

Referenced by GetTopLeftModule().

1967 {
1968  BOARD_ITEM* topLeftItem = nullptr;
1969  BOARD_ITEM* currentItem;
1970 
1971  wxPoint pnt;
1972 
1973  // find the leftmost (smallest x coord) and highest (smallest y with the smallest x) item in the selection
1974  for( auto item : m_items )
1975  {
1976  currentItem = static_cast<BOARD_ITEM*>( item );
1977  pnt = currentItem->GetPosition();
1978 
1979  if( ( currentItem->Type() != PCB_MODULE_T ) && onlyModules )
1980  {
1981  continue;
1982  }
1983  else
1984  {
1985  if( topLeftItem == nullptr )
1986  {
1987  topLeftItem = currentItem;
1988  }
1989  else if( ( pnt.x < topLeftItem->GetPosition().x ) ||
1990  ( ( topLeftItem->GetPosition().x == pnt.x ) &&
1991  ( pnt.y < topLeftItem->GetPosition().y ) ) )
1992  {
1993  topLeftItem = currentItem;
1994  }
1995  }
1996  }
1997 
1998  return static_cast<EDA_ITEM*>( topLeftItem );
1999 }
KICAD_T Type() const
Function Type()
Definition: base_struct.h:198
Class BOARD_ITEM is a base class for any item which can be embedded within the BOARD container class...
virtual const wxPoint & GetPosition() const =0
class MODULE, a footprint
Definition: typeinfo.h:101
std::set< EDA_ITEM * > m_items
Set of selected items.
Definition: selection.h:175
Class EDA_ITEM is a base class for most all the KiCad significant classes, used in schematics and boa...
Definition: base_struct.h:151
EDA_ITEM * SELECTION::GetTopLeftModule ( ) const

Definition at line 2002 of file selection_tool.cpp.

References GetTopLeftItem().

2003 {
2004  return GetTopLeftItem( true );
2005 }
EDA_ITEM * GetTopLeftItem(bool onlyModules=false) const
bool SELECTION::IsHover ( ) const
inline

Definition at line 66 of file selection.h.

References m_isHover.

Referenced by EDIT_TOOL::Main().

67  {
68  return m_isHover;
69  }
bool m_isHover
Definition: selection.h:177
std::set<EDA_ITEM*>& SELECTION::Items ( )
inline

Definition at line 152 of file selection.h.

References m_items.

153  {
154  return m_items;
155  }
std::set< EDA_ITEM * > m_items
Set of selected items.
Definition: selection.h:175
const SELECTION& SELECTION::operator= ( const SELECTION aOther)
inline

Definition at line 46 of file selection.h.

References m_isHover, and m_items.

47  {
48  m_items = aOther.m_items;
49  m_isHover = aOther.m_isHover;
50  return *this;
51  }
bool m_isHover
Definition: selection.h:177
std::set< EDA_ITEM * > m_items
Set of selected items.
Definition: selection.h:175
EDA_ITEM* SELECTION::operator[] ( const int  index) const
inline

Definition at line 134 of file selection.h.

References m_items.

135  {
136  if( index < 0 || (unsigned int) index >= m_items.size() )
137  return nullptr;
138 
139  auto iter = m_items.begin();
140  std::advance( iter, index );
141  return *iter;
142  }
std::set< EDA_ITEM * > m_items
Set of selected items.
Definition: selection.h:175
void VIEW_GROUP::Remove ( VIEW_ITEM aItem)
virtualinherited

Function Remove() Removes an item from the group.

Parameters
aItemis the item to be removed.

Definition at line 61 of file view_group.cpp.

References KIGFX::VIEW_GROUP::m_groupItems.

Referenced by PCB_TOOL::doInteractiveItemPlacement(), PCB_EDITOR_CONTROL::PlaceModule(), and PCB_EDITOR_CONTROL::PlaceTarget().

62 {
63  for( auto iter = m_groupItems.begin(); iter != m_groupItems.end(); ++iter )
64  {
65  if( aItem == *iter )
66  {
67  m_groupItems.erase( iter );
68  break;
69  }
70  }
71 }
ITEMS m_groupItems
Container for storing VIEW_ITEMs.
Definition: view_group.h:135
virtual void SELECTION::Remove ( EDA_ITEM aItem)
inlinevirtual

Definition at line 76 of file selection.h.

References m_items.

Referenced by PCB_TOOL::doInteractiveItemPlacement(), DRAWING_TOOL::drawArc(), DRAWING_TOOL::DrawDimension(), DRAWING_TOOL::drawSegment(), DRAWING_TOOL::PlaceText(), and SELECTION_TOOL::unselect().

77  {
78  m_items.erase( aItem );
79  }
std::set< EDA_ITEM * > m_items
Set of selected items.
Definition: selection.h:175
void SELECTION::SetIsHover ( bool  aIsHover)
inline

Definition at line 61 of file selection.h.

References m_isHover.

Referenced by SELECTION_TOOL::RequestSelection().

62  {
63  m_isHover = aIsHover;
64  }
bool m_isHover
Definition: selection.h:177
virtual void KIGFX::VIEW_GROUP::SetLayer ( int  aLayer)
inlinevirtualinherited

Function SetLayer() Sets layer used to draw the group.

Parameters
aLayeris the layer used for drawing.

Definition at line 115 of file view_group.h.

References KIGFX::VIEW_GROUP::m_layer.

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

116  {
117  m_layer = aLayer;
118  }
int m_layer
Layer on which the group is drawn.
Definition: view_group.h:131
const KIGFX::VIEW_GROUP::ITEMS SELECTION::updateDrawList ( ) const
overridevirtual

Reimplemented from KIGFX::VIEW_GROUP.

Definition at line 2032 of file selection_tool.cpp.

References m_items, PCB_MODULE_T, and MODULE::RunOnChildren().

2033 {
2034  std::vector<VIEW_ITEM*> items;
2035 
2036  for( auto item : m_items )
2037  {
2038  items.push_back( item );
2039 
2040  if( item->Type() == PCB_MODULE_T )
2041  {
2042  MODULE* module = static_cast<MODULE*>( item );
2043  module->RunOnChildren( [&] ( BOARD_ITEM* bitem ) { items.push_back( bitem ); } );
2044  }
2045  }
2046 
2047  return items;
2048 }
void RunOnChildren(std::function< void(BOARD_ITEM *)> aFunction)
Function RunOnChildren.
Class BOARD_ITEM is a base class for any item which can be embedded within the BOARD container class...
class MODULE, a footprint
Definition: typeinfo.h:101
std::set< EDA_ITEM * > m_items
Set of selected items.
Definition: selection.h:175
const BOX2I SELECTION::ViewBBox ( ) const
overridevirtual

Function ViewBBox() Returns the bounding box for all stored items covering all its layers.

Returns
The current bounding box

Reimplemented from KIGFX::VIEW_GROUP.

Definition at line 2008 of file selection_tool.cpp.

References Front(), EDA_ITEM::GetBoundingBox(), EDA_RECT::GetOrigin(), EDA_RECT::GetSize(), m_items, EDA_RECT::Merge(), and Size().

Referenced by SELECTION_TOOL::zoomFitSelection().

2009 {
2010  EDA_RECT eda_bbox;
2011 
2012  if( Size() == 1 )
2013  {
2014  eda_bbox = Front()->GetBoundingBox();
2015  }
2016  else if( Size() > 1 )
2017  {
2018  eda_bbox = Front()->GetBoundingBox();
2019  auto i = m_items.begin();
2020  ++i;
2021 
2022  for( ; i != m_items.end(); ++i )
2023  {
2024  eda_bbox.Merge( (*i)->GetBoundingBox() );
2025  }
2026  }
2027 
2028  return BOX2I( eda_bbox.GetOrigin(), eda_bbox.GetSize() );
2029 }
virtual const EDA_RECT GetBoundingBox() const
Function GetBoundingBox returns the orthogonal, bounding box of this object for display purposes...
BOX2< VECTOR2I > BOX2I
Definition: box2.h:468
void Merge(const EDA_RECT &aRect)
Function Merge modifies the position and size of the rectangle in order to contain aRect...
EDA_ITEM * Front() const
Definition: selection.h:144
const wxPoint & GetOrigin() const
std::set< EDA_ITEM * > m_items
Set of selected items.
Definition: selection.h:175
Class EDA_RECT handles the component boundary box.
int Size() const
Returns the number of selected parts.
Definition: selection.h:112
const wxSize & GetSize() const
void VIEW_GROUP::ViewDraw ( int  aLayer,
VIEW aView 
) const
overridevirtualinherited

Function ViewDraw() Draws all the stored items in the group on the given layer.

Parameters
aLayeris the layer which should be drawn.
aViewis the VIEW that should be used for drawing.

Reimplemented from KIGFX::VIEW_ITEM.

Definition at line 101 of file view_group.cpp.

References KIGFX::PAINTER::Draw(), KIGFX::VIEW::GetGAL(), KIGFX::VIEW::GetPainter(), KIGFX::VIEW::IsLayerVisible(), KIGFX::VIEW::SortLayers(), KIGFX::VIEW_GROUP::updateDrawList(), and KIGFX::VIEW::VIEW_MAX_LAYERS.

102 {
103  auto gal = aView->GetGAL();
104  PAINTER* painter = aView->GetPainter();
105 
106  const auto drawList = updateDrawList();
107 
108  // Draw all items immediately (without caching)
109  for( auto item : drawList )
110  {
111  gal->PushDepth();
112 
113  int layers[VIEW::VIEW_MAX_LAYERS], layers_count;
114  item->ViewGetLayers( layers, layers_count );
115  aView->SortLayers( layers, layers_count );
116 
117  for( int i = 0; i < layers_count; i++ )
118  {
119  if( aView->IsLayerVisible( layers[i] ) )
120  {
121  gal->AdvanceDepth();
122 
123  if( !painter->Draw( item, layers[i] ) )
124  item->ViewDraw( layers[i], aView ); // Alternative drawing method
125  }
126  }
127 
128  gal->PopDepth();
129  }
130 }
bool IsLayerVisible(int aLayer) const
Function IsLayerVisible() Returns information about visibility of a particular layer.
Definition: view.h:404
virtual const ITEMS updateDrawList() const
Definition: view_group.cpp:150
void SortLayers(int aLayers[], int &aCount) const
Function SortLayers() Changes the order of given layer ids, so after sorting the order corresponds to...
Definition: view.cpp:603
Class PAINTER contains all the knowledge about how to draw graphical object onto any particular outpu...
Definition: painter.h:278
GAL * GetGAL() const
Function GetGAL() Returns the GAL this view is using to draw graphical primitives.
Definition: view.h:177
static const int VIEW_MAX_LAYERS
maximum number of layers that may be shown
Definition: view.h:641
PAINTER * GetPainter() const
Function GetPainter() Returns the painter object used by the view for drawing VIEW_ITEMS.
Definition: view.h:196
virtual bool Draw(const VIEW_ITEM *aItem, int aLayer)=0
Function Draw Takes an instance of VIEW_ITEM and passes it to a function that know how to draw the it...
void VIEW_GROUP::ViewGetLayers ( int  aLayers[],
int &  aCount 
) const
overridevirtualinherited

Function ViewGetLayers() Returns 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 133 of file view_group.cpp.

References KIGFX::VIEW_GROUP::m_layer.

134 {
135  // Everything is displayed on a single layer
136  aLayers[0] = m_layer;
137  aCount = 1;
138 }
int m_layer
Layer on which the group is drawn.
Definition: view_group.h:131
virtual unsigned int KIGFX::VIEW_ITEM::ViewGetLOD ( int  aLayer,
VIEW aView 
) const
inlinevirtualinherited

Function ViewGetLOD() Returns the level of detail 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.

Reimplemented in MODULE, D_PAD, VIA, TRACK, and TEXTE_MODULE.

Definition at line 133 of file view_item.h.

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

134  {
135  // By default always show the item
136  return 0;
137  }

Member Data Documentation

ITEMS KIGFX::VIEW_GROUP::m_groupItems
protectedinherited
bool SELECTION::m_isHover
private

Definition at line 177 of file selection.h.

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

std::set<EDA_ITEM*> SELECTION::m_items
private
int KIGFX::VIEW_GROUP::m_layer
protectedinherited

Layer on which the group is drawn.

Definition at line 131 of file view_group.h.

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


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