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

Method Populate

src/toolbars/SelectionBar.cpp:284–315  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

282}
283
284void SelectionBar::Populate()
285{
286 SetBackgroundColour( theTheme.Colour( clrMedium ) );
287
288 mTimeControls[0] = mTimeControls[1] = {};
289
290 // Outer sizer has space top and left.
291 // Inner sizers have space on right only.
292 // This choice makes for a nice border and internal spacing and places clear responsibility
293 // on each sizer as to what spacings it creates.
294 wxFlexGridSizer *mainSizer = safenew wxFlexGridSizer(2, 1, 1);
295 Add(mainSizer, 0, wxALIGN_CENTER_VERTICAL | wxLEFT, 5);
296
297 AddTitle(XO("Selection"), mainSizer);
298 AddTime(0, mainSizer);
299 AddSelectionSetupButton(mainSizer);
300 AddTime(1, mainSizer);
301
302 mSetupButton->MoveBeforeInTabOrder(mTimeControls[0]);
303
304 // Update the selection mode before the layout
305 SetSelectionMode(mSelectionMode);
306 mainSizer->Layout();
307 RegenerateTooltips();
308 Layout();
309
310 CallAfter([this]{
311 auto &formats = ProjectNumericFormats::Get(mProject);
312 SetSelectionFormat(formats.GetSelectionFormat());
313 });
314
315}
316
317void SelectionBar::UpdatePrefs()
318{

Callers

nothing calls this directly

Calls 5

AddFunction · 0.85
CallAfterFunction · 0.85
GetFunction · 0.85
LayoutMethod · 0.45
GetSelectionFormatMethod · 0.45

Tested by

no test coverage detected