| 2495 | } |
| 2496 | |
| 2497 | void wxShape::DeleteControlPoints(wxDC *dc) |
| 2498 | { |
| 2499 | wxNode *node = m_controlPoints.GetFirst(); |
| 2500 | while (node) |
| 2501 | { |
| 2502 | wxControlPoint *control = (wxControlPoint *)node->GetData(); |
| 2503 | if (dc) |
| 2504 | control->GetEventHandler()->OnErase(*dc); |
| 2505 | m_canvas->RemoveShape(control); |
| 2506 | delete control; |
| 2507 | delete node; |
| 2508 | node = m_controlPoints.GetFirst(); |
| 2509 | } |
| 2510 | // Children of divisions are contained objects, |
| 2511 | // so stop here |
| 2512 | if (!IsKindOf(CLASSINFO(wxDivisionShape))) |
| 2513 | { |
| 2514 | node = m_children.GetFirst(); |
| 2515 | while (node) |
| 2516 | { |
| 2517 | wxShape *child = (wxShape *)node->GetData(); |
| 2518 | child->DeleteControlPoints(dc); |
| 2519 | node = node->GetNext(); |
| 2520 | } |
| 2521 | } |
| 2522 | } |
| 2523 | |
| 2524 | void wxShape::OnDrawControlPoints(wxDC& dc) |
| 2525 | { |
no test coverage detected