| 986 | } |
| 987 | |
| 988 | void wxShape::EraseLinks(wxDC& dc, int attachment, bool recurse) |
| 989 | { |
| 990 | if (!m_visible) |
| 991 | return; |
| 992 | |
| 993 | wxNode *current = m_lines.GetFirst(); |
| 994 | while (current) |
| 995 | { |
| 996 | wxLineShape *line = (wxLineShape *)current->GetData(); |
| 997 | if (attachment == -1 || ((line->GetTo() == this && line->GetAttachmentTo() == attachment) || |
| 998 | (line->GetFrom() == this && line->GetAttachmentFrom() == attachment))) |
| 999 | line->GetEventHandler()->OnErase(dc); |
| 1000 | current = current->GetNext(); |
| 1001 | } |
| 1002 | if (recurse) |
| 1003 | { |
| 1004 | wxNode *node = m_children.GetFirst(); |
| 1005 | while (node) |
| 1006 | { |
| 1007 | wxShape *child = (wxShape *)node->GetData(); |
| 1008 | child->EraseLinks(dc, attachment, recurse); |
| 1009 | node = node->GetNext(); |
| 1010 | } |
| 1011 | } |
| 1012 | } |
| 1013 | |
| 1014 | void wxShape::DrawLinks(wxDC& dc, int attachment, bool recurse) |
| 1015 | { |
no test coverage detected