@theia/core
Version:
Theia is a cloud & desktop IDE framework implemented in TypeScript.
23 lines • 1.11 kB
TypeScript
import { TabBar, Widget } from '@lumino/widgets';
import { Disposable, DisposableCollection } from '../../common';
/**
* Detects when a widget is moved between the tab-bars of its enclosing {@link DockPanel} and
* notifies a callback with the previous and current tab-bar. Call {@link check} from the host
* widget's `onAfterAttach`.
*/
export declare class TabBarTracker implements Disposable {
protected readonly widget: Widget;
protected readonly onTabBarChange: (oldTabBar?: TabBar<Widget>, newTabBar?: TabBar<Widget>) => void;
protected currentTabBar: TabBar<Widget> | undefined;
protected isDisposed: boolean;
protected readonly toDisposeOnTabBarChange: DisposableCollection;
constructor(widget: Widget, onTabBarChange: (oldTabBar?: TabBar<Widget>, newTabBar?: TabBar<Widget>) => void);
check(): void;
/**
* Forgets the current tab-bar so that the next {@link check} reports it again as
* `(undefined, currentTabBar)`. Listeners on the enclosing panel stay connected.
*/
reset(): void;
dispose(): void;
}
//# sourceMappingURL=tab-bar-tracker.d.ts.map