| 265 | |
| 266 | |
| 267 | void 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 | |
| 294 | void CanvasLayoutEvtHandler::OnRightClick(double WXUNUSED(x), double WXUNUSED(y), |
| 295 | int keys, int WXUNUSED(attachment)) |
nothing calls this directly
no test coverage detected