MCPcopy Create free account
hub / github.com/audacity/audacity / HandleEscapeKey

Method HandleEscapeKey

src/toolbars/ToolManager.cpp:1459–1486  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1457
1458
1459void ToolManager::HandleEscapeKey()
1460{
1461 if (mDragBar) {
1462 if(mPrevDock) {
1463 // Sheriff John Stone,
1464 // Why don't you leave me alone?
1465 // Well, I feel so break up
1466 // I want to go home.
1467 mPrevDock->RestoreConfiguration(mPrevConfiguration);
1468 mPrevDock->Dock( mDragBar, true, mPrevSlot );
1469 Updated();
1470
1471 // Done with the floater
1472 mDragWindow->ClearBar();
1473 mDragWindow->Destroy();
1474 mDragWindow = nullptr;
1475 mDragBar->Refresh(false);
1476 }
1477 else {
1478 // Floater remains, and returns to where it begain
1479 auto parent = mDragBar->GetParent();
1480 parent->SetPosition(mPrevPosition);
1481 mDragBar->SetDocked(NULL, false);
1482 }
1483
1484 DoneDragging();
1485 }
1486}
1487
1488void ToolManager::DoneDragging()
1489{

Callers

nothing calls this directly

Calls 8

RestoreConfigurationMethod · 0.80
DockMethod · 0.80
ClearBarMethod · 0.80
SetPositionMethod · 0.80
DestroyMethod · 0.45
RefreshMethod · 0.45
GetParentMethod · 0.45
SetDockedMethod · 0.45

Tested by

no test coverage detected