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

1064 :
1065 view( aView ),
1066 gal( aGal ),
1067 layer( aLayer )
1068 {
1069 }

Member Function Documentation

◆ operator()()

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

Definition at line 1071 of file view.cpp.

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

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

Referenced by operator()().

◆ layer

int KIGFX::VIEW::RECACHE_ITEM_VISITOR::layer

Definition at line 1092 of file view.cpp.

Referenced by operator()().

◆ view

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

Definition at line 1090 of file view.cpp.

Referenced by operator()().


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