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

Method SetSelectionMode

src/toolbars/SelectionBar.cpp:515–535  ·  view source on GitHub ↗

We used to have 8 modes which showed different combinations of the length, start, end, center controls. Mode 7 for example showed all four at the same time.

Source from the content-addressed store, hash-verified

513// length, start, end, center controls.
514// Mode 7 for example showed all four at the same time.
515void SelectionBar::SetSelectionMode(SelectionMode mode)
516{
517 mSelectionMode = mode;
518
519 // Update names and WindowIds for the screen readers
520 auto& modeName = ModeNames[static_cast<size_t>(mode)];
521
522 if (mTimeControls[0]) {
523 mTimeControls[0]->SetName(modeName.first);
524 mTimeControls[0]->SetId(WindowIDs.at(modeName.first));
525 }
526
527 if (mTimeControls[1]) {
528 mTimeControls[1]->SetName(modeName.second);
529 mTimeControls[1]->SetId(WindowIDs.at(modeName.second));
530 }
531
532 UpdateTimeControlsFormat(mTimeControls[0]->GetFormatName());
533
534 ValuesToControls();
535}
536
537void SelectionBar::ValuesToControls()
538{

Callers 3

ProjectsListDialogMethod · 0.80
AudioListDialogMethod · 0.80
PopulateOrExchangeMethod · 0.80

Calls 3

SetIdMethod · 0.80
GetFormatNameMethod · 0.80
SetNameMethod · 0.45

Tested by

no test coverage detected