| 2574 | } |
| 2575 | |
| 2576 | void wxShape::Select(bool select, wxDC* dc) |
| 2577 | { |
| 2578 | m_selected = select; |
| 2579 | if (select) |
| 2580 | { |
| 2581 | MakeControlPoints(); |
| 2582 | // Children of divisions are contained objects, |
| 2583 | // so stop here |
| 2584 | if (!IsKindOf(CLASSINFO(wxDivisionShape))) |
| 2585 | { |
| 2586 | wxNode *node = m_children.GetFirst(); |
| 2587 | while (node) |
| 2588 | { |
| 2589 | wxShape *child = (wxShape *)node->GetData(); |
| 2590 | child->MakeMandatoryControlPoints(); |
| 2591 | node = node->GetNext(); |
| 2592 | } |
| 2593 | } |
| 2594 | if (dc) |
| 2595 | GetEventHandler()->OnDrawControlPoints(*dc); |
| 2596 | } |
| 2597 | if (!select) |
| 2598 | { |
| 2599 | DeleteControlPoints(dc); |
| 2600 | if (!IsKindOf(CLASSINFO(wxDivisionShape))) |
| 2601 | { |
| 2602 | wxNode *node = m_children.GetFirst(); |
| 2603 | while (node) |
| 2604 | { |
| 2605 | wxShape *child = (wxShape *)node->GetData(); |
| 2606 | child->DeleteControlPoints(dc); |
| 2607 | node = node->GetNext(); |
| 2608 | } |
| 2609 | } |
| 2610 | } |
| 2611 | } |
| 2612 | |
| 2613 | bool wxShape::Selected() const |
| 2614 | { |
no test coverage detected