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

Method OnLeftClick

Explore/MapLayoutView.cpp:267–292  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

265
266
267void CanvasLayoutEvtHandler::OnLeftClick(double WXUNUSED(x), double WXUNUSED(y),
268 int keys, int WXUNUSED(attachment))
269{
270 wxShape* shape = this->GetShape();
271 wxShapeCanvas* canvas = shape->GetCanvas();
272
273 wxNode* node = canvas->GetDiagram()->GetShapeList()->GetFirst();
274 while (node)
275 {
276 wxShape* shape = (wxShape*) node->GetData();
277 shape->Select(false);
278 shape->SetDraggable(false);
279 node = node->GetNext();
280 }
281
282 wxClientDC dc(canvas);
283
284 if (shape) {
285 shape->Select(!shape->Selected());
286 shape->SetHighlight(shape->Selected());
287 shape->SetDraggable(shape->Selected());
288 int x = shape->GetX();
289 int y = shape->GetY();
290 canvas->Refresh();
291 }
292}
293
294void CanvasLayoutEvtHandler::OnRightClick(double WXUNUSED(x), double WXUNUSED(y),
295 int keys, int WXUNUSED(attachment))

Callers

nothing calls this directly

Calls 8

SetDraggableMethod · 0.80
SelectedMethod · 0.80
GetShapeMethod · 0.45
SelectMethod · 0.45
SetHighlightMethod · 0.45
GetXMethod · 0.45
GetYMethod · 0.45
RefreshMethod · 0.45

Tested by

no test coverage detected