MCPcopy Create free account
hub / github.com/GeoDaCenter/geoda / Select

Method Select

ogl/basic.cpp:2576–2611  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2574}
2575
2576void 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
2613bool wxShape::Selected() const
2614{

Callers 2

OnLeftClickMethod · 0.45
OnShowLegendMethod · 0.45

Calls 4

GetEventHandlerFunction · 0.85
DeleteControlPointsMethod · 0.80
OnDrawControlPointsMethod · 0.45

Tested by

no test coverage detected