KiCad PCB EDA Suite
|
Public Member Functions | |
VIEW_ITEM_DATA () | |
~VIEW_ITEM_DATA () | |
int | GetFlags () const |
Private Member Functions | |
void | getLayers (int *aLayers, int &aCount) const |
Return layer numbers used by the item. | |
int | getGroup (int aLayer) const |
Return number of the group id for the given layer, or -1 in case it was not cached before. | |
void | setGroup (int aLayer, int aGroup) |
Set a group id for the item and the layer combination. | |
void | deleteGroups () |
Remove all of the stored group ids. | |
bool | storesGroups () const |
Return information if the item uses at least one group id (ie. | |
void | reorderGroups (std::unordered_map< int, int > aReorderMap) |
Reorder the stored groups (to facilitate reordering of layers). | |
void | saveLayers (int *aLayers, int aCount) |
Save layers used by the item. | |
int | requiredUpdate () const |
Return current update flag for an item. | |
void | clearUpdateFlags () |
Mark an item as already updated, so it is not going to be redrawn. | |
bool | isRenderable () const |
Return if the item should be drawn or not. | |
Private Attributes | |
VIEW * | m_view |
Current dynamic view the item is assigned to. | |
int | m_flags |
Visibility flags. | |
int | m_requiredUpdate |
Flag required for updating. | |
int | m_drawPriority |
Order to draw this item in a layer, lowest first. | |
int | m_cachedIndex |
Cached index in m_allItems. | |
std::pair< int, int > * | m_groups |
layer_number:group_id pairs for each layer the item occupies. | |
int | m_groupsSize |
std::vector< int > | m_layers |
BOX2I | m_bbox |
Stores layer numbers used by the item. | |
Friends | |
class | VIEW |
|
inline |
Definition at line 64 of file view.cpp.
References deleteGroups().
|
inlineprivate |
Mark an item as already updated, so it is not going to be redrawn.
Definition at line 215 of file view.cpp.
References m_requiredUpdate, and KIGFX::NONE.
Referenced by KIGFX::VIEW::invalidateItem(), and KIGFX::VIEW::Remove().
|
inlineprivate |
Remove all of the stored group ids.
Forces recaching of the item.
Definition at line 145 of file view.cpp.
References m_groups, and m_groupsSize.
Referenced by KIGFX::VIEW::CLEAR_LAYER_CACHE_VISITOR::operator()(), KIGFX::VIEW::Remove(), and ~VIEW_ITEM_DATA().
|
inline |
|
inlineprivate |
Return number of the group id for the given layer, or -1 in case it was not cached before.
aLayer | is the layer number for which group id is queried. |
Definition at line 99 of file view.cpp.
References m_groups, and m_groupsSize.
Referenced by KIGFX::VIEW::draw(), KIGFX::VIEW::UPDATE_COLOR_VISITOR::operator()(), KIGFX::VIEW::UPDATE_DEPTH_VISITOR::operator()(), KIGFX::VIEW::RECACHE_ITEM_VISITOR::operator()(), KIGFX::VIEW::Remove(), KIGFX::VIEW::UpdateAllLayersColor(), KIGFX::VIEW::UpdateAllLayersOrder(), KIGFX::VIEW::updateItemColor(), KIGFX::VIEW::updateItemGeometry(), and KIGFX::VIEW::updateLayers().
|
inlineprivate |
Return layer numbers used by the item.
aLayers[] | output layer index array |
aCount | number of layer indices in aLayers[] |
Definition at line 83 of file view.cpp.
References m_layers.
Referenced by KIGFX::VIEW::Remove(), KIGFX::VIEW::UpdateAllLayersColor(), KIGFX::VIEW::UpdateAllLayersOrder(), and KIGFX::VIEW::updateLayers().
|
inlineprivate |
Return if the item should be drawn or not.
Definition at line 223 of file view.cpp.
References m_flags, and KIGFX::VISIBLE.
Referenced by KIGFX::VIEW::DRAW_ITEM_VISITOR::operator()().
|
inlineprivate |
Reorder the stored groups (to facilitate reordering of layers).
aReorderMap | is the mapping of old to new layer ids |
Definition at line 171 of file view.cpp.
References m_groups, and m_groupsSize.
Referenced by KIGFX::VIEW::ReorderLayerData().
|
inlineprivate |
Return current update flag for an item.
Definition at line 207 of file view.cpp.
References m_requiredUpdate.
|
inlineprivate |
Save layers used by the item.
aLayers | is an array containing layer numbers to be saved. |
aCount | is the size of the array. |
Definition at line 191 of file view.cpp.
References m_layers, and KIGFX::VIEW::VIEW_MAX_LAYERS.
Referenced by KIGFX::VIEW::Add(), KIGFX::VIEW::ReorderLayerData(), and KIGFX::VIEW::updateLayers().
|
inlineprivate |
Set a group id for the item and the layer combination.
aLayer | is the layer number. |
aGroup | is the group id. |
Definition at line 116 of file view.cpp.
References m_groups, and m_groupsSize.
Referenced by KIGFX::VIEW::RECACHE_ITEM_VISITOR::operator()(), KIGFX::VIEW::updateItemGeometry(), and KIGFX::VIEW::updateLayers().
|
inlineprivate |
Return information if the item uses at least one group id (ie.
if it is cached at all).
Definition at line 158 of file view.cpp.
References m_groupsSize.
|
private |
Stores layer numbers used by the item.
Definition at line 240 of file view.cpp.
Referenced by KIGFX::VIEW::Add(), KIGFX::VIEW::Remove(), KIGFX::VIEW::updateBbox(), and KIGFX::VIEW::updateLayers().
|
private |
Cached index in m_allItems.
Definition at line 232 of file view.cpp.
Referenced by KIGFX::VIEW::Add(), and KIGFX::VIEW::Remove().
|
private |
Order to draw this item in a layer, lowest first.
Definition at line 231 of file view.cpp.
Referenced by KIGFX::VIEW::Add().
|
private |
Visibility flags.
Definition at line 229 of file view.cpp.
Referenced by GetFlags(), KIGFX::VIEW::Hide(), KIGFX::VIEW::IsHiddenOnOverlay(), isRenderable(), KIGFX::VIEW::IsVisible(), and KIGFX::VIEW::SetVisible().
|
private |
layer_number:group_id pairs for each layer the item occupies.
Definition at line 234 of file view.cpp.
Referenced by deleteGroups(), getGroup(), reorderGroups(), and setGroup().
|
private |
Definition at line 236 of file view.cpp.
Referenced by deleteGroups(), getGroup(), reorderGroups(), setGroup(), and storesGroups().
|
private |
Definition at line 238 of file view.cpp.
Referenced by getLayers(), and saveLayers().
|
private |
Flag required for updating.
Definition at line 230 of file view.cpp.
Referenced by clearUpdateFlags(), KIGFX::VIEW::ReorderLayerData(), requiredUpdate(), and KIGFX::VIEW::Update().
|
private |
Current dynamic view the item is assigned to.
Definition at line 228 of file view.cpp.
Referenced by KIGFX::VIEW::Add(), KIGFX::VIEW::HasItem(), KIGFX::VIEW::OnDestroy(), and KIGFX::VIEW::Remove().