import { Widget } from '@lumino/widgets'; import { Message } from '@lumino/messaging'; import { GridStackModel } from './model'; /** * A gridstack widget to host the visible Notebook's Cells. */ export declare class GridStackWidget extends Widget { /** * Construct a `GridStackWidget`. * * @param model - The `GridStackModel`. */ constructor(model: GridStackModel); /** * Update the layout to reclaim any empty space */ compact(): void; /** * Dispose of the resources held by the widget. */ dispose(): void; /** * Handle `after-attach` messages sent to the widget. * * ### Note * Add event listeners for the drag and drop event. */ protected onAfterAttach(msg: Message): void; /** * Handle `before-detach` messages sent to the widget. * * ### Note * Remove event listeners for the drag and drop event. */ protected onBeforeDetach(msg: Message): void; /** * Handle event messages sent to the widget. * * ### Note * Calling the pertinent function depending on the drag and drop stage. */ handleEvent(event: Event): void; /** * Getter to acces the list of `GridstackItemWidget`. */ get gridWidgets(): Widget[]; /** * Launch the `DashboardMetadataEditor`. */ infoEditor(): void; /** * Initialize the `GridstackItemWidget` from Notebook's metadata. */ private _initGridItems; /** * A handler invoked when a grid item has to be removed. * * @param model - The `GridstackModel` that sends the signal. * @param id - The Cell id. */ private _removeCell; /** * A handler invoked when a grid item has to be removed. * * @param model - The `GridstackModel` that sends the signal. * @param id - The Cell id. */ private _lockCell; /** * Update the `GridstackItemWidget` from Notebook's metadata. */ private _updateGridItems; /** * A signal handler invoked when a grid item change. * * @param sender - The `GridStackLayout` that sends the signal. * @param items - The list of `GridStackNode`. */ private _onGridItemChange; /** * Handle the `'lm-dragenter'` event for the widget. */ private _evtDragEnter; /** * Handle the `'lm-dragleave'` event for the widget. */ private _evtDragLeave; /** * Handle the `'lm-dragover'` event for the widget. */ private _evtDragOver; /** * Handle the `'lm-drop'` event for the widget. */ private _evtDrop; /** * Whether the dragged element is droppable or not * * @param event Event object * @returns Whether the element can be dropped and the reason why it can't */ private _isDroppable; private _scrollIfNeeded; /** * Test if the mouse pointer for the event occurs within the widget */ private _isPointerOnWidget; /** * Remove the shadow widget and activate the events on the grid */ private _resetShadowWidget; private _setErrorMessage; private _gridLayout; private _model; private _shadowWidget; private _scrollIntervalId; }