A element of a list of drawing-elements. More...
| elementList* | nextElement |
| element* | thisElement |
| elementList* | firstOnLayer(int layer) |
| elementList* | nextOnLayer(int layer) |
An elementList node is one step in the linked list of shapes and references inside a cell. thisElement is the element at this node; nextElement is the following node, or NULL at the end of the list. The head of the list is cell->firstElement. Always test both the node and thisElement against NULL before you read geometry or change selection. The obsolete firstOnLayer / nextOnLayer pair walks only one layer; prefer a full walk and a layer test on thisElement. The example below selects every shape of the current cell.
Example:
elementList *el=layout->drawing->currentCell->firstElement;
while (el!=NULL) {
if (el->thisElement!=NULL){
el->thisElement->selectAll();
}
el=el->nextElement;
}
The next node in the list, or NULL after the last element.
Example: (loop over all shapes of the cell)
elementList *el=layout->drawing->currentCell->firstElement;
while (el!=NULL) {
if (el->thisElement!=NULL){
// e.g. el->thisElement->selectAll();
//...
}
el=el->nextElement;
}
The element stored at this node.
Returns: the first node whose shape is on layer, or NULL if none.
Returns: the next node on layer, or NULL if none remain.
Example: (loop over all shapes on layer 5)
elementList *el=layout->drawing->currentCell->firstElement->firstOnLayer(5);
while (el!=NULL) {
// e.g. el->thisElement->selectAll();
//...
el=el->nextOnLayer(5);
}