KiCad PCB EDA Suite
KIGFX::VIEW::RECACHE_ITEM_VISITOR Struct Reference

Public Member Functions

 RECACHE_ITEM_VISITOR (VIEW *aView, GAL *aGal, int aLayer)
 
bool operator() (VIEW_ITEM *aItem)
 

Public Attributes

VIEWview
 
GALgal
 
int layer
 

Detailed Description

Definition at line 1073 of file view.cpp.

Constructor & Destructor Documentation

◆ RECACHE_ITEM_VISITOR()

KIGFX::VIEW::RECACHE_ITEM_VISITOR::RECACHE_ITEM_VISITOR ( VIEW aView,
GAL aGal,
int  aLayer 
)
inline

Definition at line 1075 of file view.cpp.

1075  :
1076  view( aView ),
1077  gal( aGal ),
1078  layer( aLayer )
1079  {
1080  }

Member Function Documentation

◆ operator()()

bool KIGFX::VIEW::RECACHE_ITEM_VISITOR::operator() ( VIEW_ITEM aItem)
inline

Definition at line 1082 of file view.cpp.

1083  {
1084  VIEW_ITEM_DATA* viewData = aItem->viewPrivData();
1085 
1086  if( !viewData )
1087  return false;
1088 
1089  // Remove previously cached group
1090  int group = viewData->getGroup( layer );
1091 
1092  if( group >= 0 )
1093  gal->DeleteGroup( group );
1094 
1095  viewData->setGroup( layer, -1 );
1096  view->Update( aItem );
1097 
1098  return true;
1099  }
virtual void DeleteGroup(int aGroupNumber)
Delete the group from the memory.
virtual void Update(const VIEW_ITEM *aItem, int aUpdateFlags) const
For dynamic VIEWs, inform the associated VIEW that the graphical representation of this item has chan...
Definition: view.cpp:1518

References KIGFX::GAL::DeleteGroup(), gal, KIGFX::VIEW_ITEM_DATA::getGroup(), group, layer, KIGFX::VIEW_ITEM_DATA::setGroup(), KIGFX::VIEW::Update(), view, and KIGFX::VIEW_ITEM::viewPrivData().

Member Data Documentation

◆ gal

GAL* KIGFX::VIEW::RECACHE_ITEM_VISITOR::gal

Definition at line 1102 of file view.cpp.

Referenced by operator()().

◆ layer

int KIGFX::VIEW::RECACHE_ITEM_VISITOR::layer

Definition at line 1103 of file view.cpp.

Referenced by operator()().

◆ view

VIEW* KIGFX::VIEW::RECACHE_ITEM_VISITOR::view

Definition at line 1101 of file view.cpp.

Referenced by operator()().


The documentation for this struct was generated from the following file: