| 1 |
/// <reference types="backbone" /> |
| 2 |
import { DOMWidgetView, ViewList, JupyterLuminoWidget, WidgetModel, WidgetView } from '@jupyter-widgets/base'; |
| 3 |
import { BoxModel, BoxView } from './widget_box'; |
| 4 |
import { TabBar } from '@lumino/widgets'; |
| 5 |
import { TabPanel } from './lumino/tabpanel'; |
| 6 |
import { Accordion } from './lumino/accordion'; |
| 7 |
import { Widget } from '@lumino/widgets'; |
| 8 |
import { Message } from '@lumino/messaging'; |
| 9 |
export declare class SelectionContainerModel extends BoxModel { |
| 10 |
defaults(): Backbone.ObjectHash; |
| 11 |
} |
| 12 |
export declare class AccordionModel extends SelectionContainerModel { |
| 13 |
defaults(): Backbone.ObjectHash; |
| 14 |
} |
| 15 |
export declare class JupyterLuminoAccordionWidget extends Accordion { |
| 16 |
constructor(options: JupyterLuminoWidget.IOptions & Accordion.IOptions); |
| 17 |
/** |
| 18 |
* Process the Lumino message. |
| 19 |
* |
| 20 |
* Any custom Lumino widget used inside a Jupyter widget should override |
| 21 |
* the processMessage function like this. |
| 22 |
*/ |
| 23 |
processMessage(msg: Message): void; |
| 24 |
/** |
| 25 |
* Dispose the widget. |
| 26 |
* |
| 27 |
* This causes the view to be destroyed as well with 'remove' |
| 28 |
*/ |
| 29 |
dispose(): void; |
| 30 |
private _view; |
| 31 |
} |
| 32 |
export declare class AccordionView extends DOMWidgetView { |
| 33 |
_createElement(tagName: string): HTMLElement; |
| 34 |
_setElement(el: HTMLElement): void; |
| 35 |
initialize(parameters: WidgetView.IInitializeParameters): void; |
| 36 |
/** |
| 37 |
* Called when view is rendered. |
| 38 |
*/ |
| 39 |
render(): void; |
| 40 |
/** |
| 41 |
* Update children |
| 42 |
*/ |
| 43 |
updateChildren(): void; |
| 44 |
/** |
| 45 |
* Set header titles |
| 46 |
*/ |
| 47 |
update_titles(): void; |
| 48 |
/** |
| 49 |
* Make the rendering and selected index consistent. |
| 50 |
*/ |
| 51 |
update_selected_index(): void; |
| 52 |
/** |
| 53 |
* Called when a child is removed from children list. |
| 54 |
*/ |
| 55 |
remove_child_view(view: DOMWidgetView): void; |
| 56 |
/** |
| 57 |
* Called when a child is added to children list. |
| 58 |
*/ |
| 59 |
add_child_view(model: WidgetModel, index: number): Promise<DOMWidgetView>; |
| 60 |
remove(): void; |
| 61 |
children_views: ViewList<DOMWidgetView> | null; |
| 62 |
luminoWidget: Accordion; |
| 63 |
updatingChildren: boolean; |
| 64 |
} |
| 65 |
export declare class TabModel extends SelectionContainerModel { |
| 66 |
defaults(): Backbone.ObjectHash; |
| 67 |
} |
| 68 |
export declare class JupyterLuminoTabPanelWidget extends TabPanel { |
| 69 |
constructor(options: JupyterLuminoWidget.IOptions & TabPanel.IOptions); |
| 70 |
/** |
| 71 |
* Dispose the widget. |
| 72 |
* |
| 73 |
* This causes the view to be destroyed as well with 'remove' |
| 74 |
*/ |
| 75 |
dispose(): void; |
| 76 |
private _view; |
| 77 |
} |
| 78 |
export declare class TabView extends DOMWidgetView { |
| 79 |
_createElement(tagName: string): HTMLElement; |
| 80 |
_setElement(el: HTMLElement): void; |
| 81 |
/** |
| 82 |
* Public constructor. |
| 83 |
*/ |
| 84 |
initialize(parameters: WidgetView.IInitializeParameters): void; |
| 85 |
/** |
| 86 |
* Called when view is rendered. |
| 87 |
*/ |
| 88 |
render(): void; |
| 89 |
/** |
| 90 |
* Render tab views based on the current model's children. |
| 91 |
*/ |
| 92 |
updateTabs(): void; |
| 93 |
/** |
| 94 |
* Called when a child is added to children list. |
| 95 |
*/ |
| 96 |
addChildView(model: WidgetModel, index: number): Promise<DOMWidgetView>; |
| 97 |
/** |
| 98 |
* Update the contents of this view |
| 99 |
* |
| 100 |
* Called when the model is changed. The model may have been |
| 101 |
* changed by another view or by a state update from the back-end. |
| 102 |
*/ |
| 103 |
update(): void; |
| 104 |
/** |
| 105 |
* Updates the tab page titles. |
| 106 |
*/ |
| 107 |
updateTitles(): void; |
| 108 |
/** |
| 109 |
* Updates the selected index. |
| 110 |
*/ |
| 111 |
updateSelectedIndex(): void; |
| 112 |
remove(): void; |
| 113 |
_onTabChanged(sender: TabBar<Widget>, args: TabBar.ICurrentChangedArgs<Widget>): void; |
| 114 |
/** |
| 115 |
* Handle the `tabMoved` signal from the tab bar. |
| 116 |
*/ |
| 117 |
_onTabMoved(sender: TabBar<Widget>, args: TabBar.ITabMovedArgs<Widget>): void; |
| 118 |
updatingTabs: boolean; |
| 119 |
childrenViews: ViewList<DOMWidgetView> | null; |
| 120 |
luminoWidget: JupyterLuminoTabPanelWidget; |
| 121 |
} |
| 122 |
export declare class StackModel extends SelectionContainerModel { |
| 123 |
defaults(): Backbone.ObjectHash; |
| 124 |
} |
| 125 |
export declare class StackView extends BoxView { |
| 126 |
initialize(parameters: WidgetView.IInitializeParameters): void; |
| 127 |
update_children(): void; |
| 128 |
} |
| 129 |
//# sourceMappingURL=widget_selectioncontainer.d.ts.map |