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

Method Dock

src/toolbars/ToolDock.cpp:438–463  ·  view source on GitHub ↗

Handle ToolDock events

Source from the content-addressed store, hash-verified

436// Handle ToolDock events
437//
438void ToolDock::Dock( ToolBar *bar, bool deflate, ToolBarConfiguration::Position position )
439{
440#ifndef __WXMAC__
441 // Apply the deflate fix only on Mac, else you introduce the opposite bug on others
442 deflate = false;
443#endif
444
445 // Adopt the toolbar into our family
446 bar->Reparent( this );
447 mBars[ bar->GetSection() ] = bar;
448
449 // Reset size
450 bar->SetSize(
451 // Undo the expansion that was applied when un-docking
452 bar->GetSize().x - (deflate ? 2 * ToolBarFloatMargin : 0),
453 // Don't need to adjust y the same way.
454 bar->GetDockedSize().y
455 );
456
457 // Park the NEW bar in the correct berth
458 if (!mConfiguration.Contains(bar) && bar->IsVisible())
459 mConfiguration.Insert( bar, position );
460
461 // Inform toolbar of change
462 bar->SetDocked( this, false );
463}
464
465// Initial docking of bars
466void ToolDock::LoadConfig()

Callers 5

LoadConfigMethod · 0.95
ResetMethod · 0.80
ReadConfigMethod · 0.80
OnMouseMethod · 0.80
HandleEscapeKeyMethod · 0.80

Calls 9

GetSectionMethod · 0.80
ReparentMethod · 0.45
SetSizeMethod · 0.45
GetSizeMethod · 0.45
GetDockedSizeMethod · 0.45
ContainsMethod · 0.45
IsVisibleMethod · 0.45
InsertMethod · 0.45
SetDockedMethod · 0.45

Tested by

no test coverage detected