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 1065 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 1067 of file view.cpp.

1067 :
1068 view( aView ),
1069 gal( aGal ),
1070 layer( aLayer )
1071 {
1072 }

Member Function Documentation

◆ operator()()

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

Definition at line 1074 of file view.cpp.

1075 {
1076 VIEW_ITEM_DATA* viewData = aItem->viewPrivData();
1077
1078 if( !viewData )
1079 return false;
1080
1081 // Remove previously cached group
1082 int group = viewData->getGroup( layer );
1083
1084 if( group >= 0 )
1085 gal->DeleteGroup( group );
1086
1087 viewData->setGroup( layer, -1 );
1088 view->Update( aItem );
1089
1090 return true;
1091 }
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:1591

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 1094 of file view.cpp.

Referenced by operator()().

◆ layer

int KIGFX::VIEW::RECACHE_ITEM_VISITOR::layer

Definition at line 1095 of file view.cpp.

Referenced by operator()().

◆ view

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

Definition at line 1093 of file view.cpp.

Referenced by operator()().


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