| 1 |
/// <reference types="backbone" /> |
| 2 |
import { WidgetView } from '@jupyter-widgets/base'; |
| 3 |
import { CoreDescriptionModel } from './widget_core'; |
| 4 |
import { DescriptionStyleModel, DescriptionView } from './widget_description'; |
| 5 |
export declare class SelectionModel extends CoreDescriptionModel { |
| 6 |
defaults(): Backbone.ObjectHash; |
| 7 |
} |
| 8 |
export declare class SelectionView extends DescriptionView { |
| 9 |
/** |
| 10 |
* Called when view is rendered. |
| 11 |
*/ |
| 12 |
render(): void; |
| 13 |
/** |
| 14 |
* Update the contents of this view |
| 15 |
* |
| 16 |
* Called when the model is changed. The model may have been |
| 17 |
* changed by another view or by a state update from the back-end. |
| 18 |
*/ |
| 19 |
update(): void; |
| 20 |
updateTabindex(): void; |
| 21 |
updateTooltip(): void; |
| 22 |
listbox: HTMLSelectElement; |
| 23 |
} |
| 24 |
export declare class DropdownModel extends SelectionModel { |
| 25 |
defaults(): Backbone.ObjectHash; |
| 26 |
} |
| 27 |
export declare class DropdownView extends SelectionView { |
| 28 |
/** |
| 29 |
* Called when view is rendered. |
| 30 |
*/ |
| 31 |
render(): void; |
| 32 |
/** |
| 33 |
* Update the contents of this view |
| 34 |
*/ |
| 35 |
update(options?: { |
| 36 |
updated_view?: DropdownView; |
| 37 |
}): void; |
| 38 |
_updateOptions(): void; |
| 39 |
events(): { |
| 40 |
[e: string]: string; |
| 41 |
}; |
| 42 |
/** |
| 43 |
* Handle when a new value is selected. |
| 44 |
*/ |
| 45 |
_handle_change(): void; |
| 46 |
/** |
| 47 |
* Handle message sent to the front end. |
| 48 |
*/ |
| 49 |
handle_message(content: any): void; |
| 50 |
} |
| 51 |
export declare class SelectModel extends SelectionModel { |
| 52 |
defaults(): Backbone.ObjectHash; |
| 53 |
} |
| 54 |
export declare class SelectView extends SelectionView { |
| 55 |
/** |
| 56 |
* Public constructor. |
| 57 |
*/ |
| 58 |
initialize(parameters: WidgetView.IInitializeParameters): void; |
| 59 |
/** |
| 60 |
* Called when view is rendered. |
| 61 |
*/ |
| 62 |
render(): void; |
| 63 |
/** |
| 64 |
* Update the contents of this view |
| 65 |
*/ |
| 66 |
update(options?: { |
| 67 |
updated_view?: WidgetView; |
| 68 |
}): void; |
| 69 |
updateSelection(index?: null | number): void; |
| 70 |
_updateOptions(): void; |
| 71 |
events(): { |
| 72 |
[e: string]: string; |
| 73 |
}; |
| 74 |
/** |
| 75 |
* Handle when a new value is selected. |
| 76 |
*/ |
| 77 |
_handle_change(): void; |
| 78 |
/** |
| 79 |
* Handle message sent to the front end. |
| 80 |
*/ |
| 81 |
handle_message(content: any): void; |
| 82 |
} |
| 83 |
export declare class RadioButtonsModel extends SelectionModel { |
| 84 |
defaults(): Backbone.ObjectHash; |
| 85 |
} |
| 86 |
export declare class RadioButtonsView extends DescriptionView { |
| 87 |
/** |
| 88 |
* Called when view is rendered. |
| 89 |
*/ |
| 90 |
render(): void; |
| 91 |
/** |
| 92 |
* Update the contents of this view |
| 93 |
* |
| 94 |
* Called when the model is changed. The model may have been |
| 95 |
* changed by another view or by a state update from the back-end. |
| 96 |
*/ |
| 97 |
update(options?: any): void; |
| 98 |
/** |
| 99 |
* Adjust Padding to Multiple of Line Height |
| 100 |
* |
| 101 |
* Adjust margins so that the overall height |
| 102 |
* is a multiple of a single line height. |
| 103 |
* |
| 104 |
* This widget needs it because radio options |
| 105 |
* are spaced tighter than individual widgets |
| 106 |
* yet we would like the full widget line up properly |
| 107 |
* when displayed side-by-side with other widgets. |
| 108 |
*/ |
| 109 |
adjustPadding(e: this): void; |
| 110 |
events(): { |
| 111 |
[e: string]: string; |
| 112 |
}; |
| 113 |
/** |
| 114 |
* Handle when a value is clicked. |
| 115 |
* |
| 116 |
* Calling model.set will trigger all of the other views of the |
| 117 |
* model to update. |
| 118 |
*/ |
| 119 |
_handle_click(event: Event): void; |
| 120 |
/** |
| 121 |
* Handle message sent to the front end. |
| 122 |
*/ |
| 123 |
handle_message(content: any): void; |
| 124 |
container: HTMLDivElement; |
| 125 |
} |
| 126 |
export declare class ToggleButtonsStyleModel extends DescriptionStyleModel { |
| 127 |
defaults(): Backbone.ObjectHash; |
| 128 |
static styleProperties: { |
| 129 |
button_width: { |
| 130 |
selector: string; |
| 131 |
attribute: string; |
| 132 |
default: any; |
| 133 |
}; |
| 134 |
font_weight: { |
| 135 |
selector: string; |
| 136 |
attribute: string; |
| 137 |
default: string; |
| 138 |
}; |
| 139 |
description_width: { |
| 140 |
selector: string; |
| 141 |
attribute: string; |
| 142 |
default: any; |
| 143 |
}; |
| 144 |
}; |
| 145 |
} |
| 146 |
export declare class ToggleButtonsModel extends SelectionModel { |
| 147 |
defaults(): Backbone.ObjectHash; |
| 148 |
} |
| 149 |
export declare class ToggleButtonsView extends DescriptionView { |
| 150 |
initialize(options: WidgetView.IInitializeParameters): void; |
| 151 |
/** |
| 152 |
* Called when view is rendered. |
| 153 |
*/ |
| 154 |
render(): void; |
| 155 |
/** |
| 156 |
* Update the contents of this view |
| 157 |
* |
| 158 |
* Called when the model is changed. The model may have been |
| 159 |
* changed by another view or by a state update from the back-end. |
| 160 |
*/ |
| 161 |
update(options?: any): void; |
| 162 |
update_style_traits(button?: HTMLButtonElement): void; |
| 163 |
update_button_style(): void; |
| 164 |
set_button_style(): void; |
| 165 |
events(): { |
| 166 |
[e: string]: string; |
| 167 |
}; |
| 168 |
/** |
| 169 |
* Handle when a value is clicked. |
| 170 |
* |
| 171 |
* Calling model.set will trigger all of the other views of the |
| 172 |
* model to update. |
| 173 |
*/ |
| 174 |
_handle_click(event: Event): void; |
| 175 |
private _css_state; |
| 176 |
buttongroup: HTMLDivElement; |
| 177 |
} |
| 178 |
export declare namespace ToggleButtonsView { |
| 179 |
const classMap: { |
| 180 |
primary: string[]; |
| 181 |
success: string[]; |
| 182 |
info: string[]; |
| 183 |
warning: string[]; |
| 184 |
danger: string[]; |
| 185 |
}; |
| 186 |
} |
| 187 |
export declare class SelectionSliderModel extends SelectionModel { |
| 188 |
defaults(): Backbone.ObjectHash; |
| 189 |
} |
| 190 |
export declare class SelectionSliderView extends DescriptionView { |
| 191 |
/** |
| 192 |
* Called when view is rendered. |
| 193 |
*/ |
| 194 |
render(): void; |
| 195 |
/** |
| 196 |
* Update the contents of this view |
| 197 |
* |
| 198 |
* Called when the model is changed. The model may have been |
| 199 |
* changed by another view or by a state update from the back-end. |
| 200 |
*/ |
| 201 |
update(options?: { |
| 202 |
updated_view?: WidgetView; |
| 203 |
}): void; |
| 204 |
regenSlider(e: any): void; |
| 205 |
createSlider(): void; |
| 206 |
events(): { |
| 207 |
[e: string]: string; |
| 208 |
}; |
| 209 |
updateSelection(): void; |
| 210 |
updateReadout(index: any): void; |
| 211 |
/** |
| 212 |
* Called whilst the slider is dragged, tapped or moved by the arrow keys. |
| 213 |
*/ |
| 214 |
handleSliderUpdateEvent(values: number[], handle: number): void; |
| 215 |
/** |
| 216 |
* Called when the slider handle is released after dragging, |
| 217 |
* or by tapping or moving by the arrow keys. |
| 218 |
*/ |
| 219 |
handleSliderChangeEvent(values: number[], handle: number): void; |
| 220 |
/** |
| 221 |
* Called when the slider value has changed. |
| 222 |
* |
| 223 |
* Calling model.set will trigger all of the other views of the |
| 224 |
* model to update. |
| 225 |
*/ |
| 226 |
handleSliderChanged(values: number[], handle: number): void; |
| 227 |
updateSliderOptions(e: any): void; |
| 228 |
updateSliderValue(model: any, _: any, options: any): void; |
| 229 |
$slider: any; |
| 230 |
slider_container: HTMLDivElement; |
| 231 |
readout: HTMLDivElement; |
| 232 |
} |
| 233 |
export declare class MultipleSelectionModel extends SelectionModel { |
| 234 |
defaults(): Backbone.ObjectHash; |
| 235 |
} |
| 236 |
export declare class SelectMultipleModel extends MultipleSelectionModel { |
| 237 |
defaults(): Backbone.ObjectHash; |
| 238 |
} |
| 239 |
export declare class SelectMultipleView extends SelectView { |
| 240 |
/** |
| 241 |
* Public constructor. |
| 242 |
*/ |
| 243 |
initialize(parameters: WidgetView.IInitializeParameters): void; |
| 244 |
/** |
| 245 |
* Called when view is rendered. |
| 246 |
*/ |
| 247 |
render(): void; |
| 248 |
updateSelection(): void; |
| 249 |
/** |
| 250 |
* Handle when a new value is selected. |
| 251 |
*/ |
| 252 |
_handle_change(): void; |
| 253 |
} |
| 254 |
export declare class SelectionRangeSliderModel extends MultipleSelectionModel { |
| 255 |
defaults(): Backbone.ObjectHash; |
| 256 |
} |
| 257 |
export declare class SelectionRangeSliderView extends SelectionSliderView { |
| 258 |
/** |
| 259 |
* Called when view is rendered. |
| 260 |
*/ |
| 261 |
render(): void; |
| 262 |
updateSelection(index?: number[]): void; |
| 263 |
updateReadout(index: number[]): void; |
| 264 |
/** |
| 265 |
* Called when the slider value is changing. |
| 266 |
*/ |
| 267 |
handleSliderUpdateEvent(values: number[], handle: any): void; |
| 268 |
/** |
| 269 |
* Called when the slider value has changed. |
| 270 |
* |
| 271 |
* Calling model.set will trigger all of the other views of the |
| 272 |
* model to update. |
| 273 |
*/ |
| 274 |
handleSliderChanged(values: number[], handle: number): void; |
| 275 |
updateSliderValue(model: any, _: any, options: any): void; |
| 276 |
$slider: any; |
| 277 |
slider_container: HTMLDivElement; |
| 278 |
readout: HTMLDivElement; |
| 279 |
} |
| 280 |
//# sourceMappingURL=widget_selection.d.ts.map |