| 291 | } |
| 292 | |
| 293 | void Snapshots::OnClicked(float x, float y, bool right) |
| 294 | { |
| 295 | IDrawableModule::OnClicked(x, y, right); |
| 296 | |
| 297 | if (right) |
| 298 | return; |
| 299 | |
| 300 | if (mGrid->TestClick(x, y, right, true)) |
| 301 | { |
| 302 | float gridX, gridY; |
| 303 | mGrid->GetPosition(gridX, gridY, true); |
| 304 | GridCell cell = mGrid->GetGridCellAt(x - gridX, y - gridY); |
| 305 | |
| 306 | int idx = cell.mCol + cell.mRow * mGrid->GetCols(); |
| 307 | |
| 308 | if (GetKeyModifiers() == kModifier_Shift || mStoreMode) |
| 309 | { |
| 310 | StoreSnapshot(idx, true); |
| 311 | } |
| 312 | else if (GetKeyModifiers() == kModifier_Alt || mDeleteMode) |
| 313 | { |
| 314 | DeleteSnapshot(idx); |
| 315 | } |
| 316 | else if (GetKeyModifiers() == kModifier_Command) |
| 317 | { |
| 318 | mSnapshotRenameIndex = idx; |
| 319 | if (idx >= 0 && idx < (int)mSnapshotCollection.size()) |
| 320 | { |
| 321 | mSnapshotLabel = mSnapshotCollection[idx].mLabel; |
| 322 | mSnapshotLabelEntry->UpdateDisplayString(); |
| 323 | } |
| 324 | mSnapshotLabelEntry->MakeActiveTextEntry(!K(setCaretToEnd)); |
| 325 | mSnapshotLabelEntry->SelectAll(); |
| 326 | } |
| 327 | else |
| 328 | { |
| 329 | SetSnapshot(idx, NextBufferTime(false)); |
| 330 | } |
| 331 | |
| 332 | UpdateGridValues(); |
| 333 | } |
| 334 | } |
| 335 | |
| 336 | bool Snapshots::MouseMoved(float x, float y) |
| 337 | { |
nothing calls this directly
no test coverage detected