Construct a new application shell.
Private
_mainPrivate
Readonly
activationProtected
Readonly
applicationThe dock panel in the bottom shell area. In contrast to the main panel, the bottom panel can be collapsed and expanded.
Protected
Readonly
bottomThe current state of the bottom panel.
Protected
Readonly
contextProtected
Readonly
coreProtected
Readonly
dockProtected
dockPrivate
Optional
dragHandler for the left side panel. The primary application views go here, such as the file explorer and the git view.
The dock panel in the main shell area. This is where editors usually go to.
Readonly
onProtected
Readonly
onReadonly
onProtected
Readonly
onReadonly
onProtected
Readonly
onReadonly
onProtected
Readonly
onReadonly
onProtected
Readonly
onProtected
Readonly
openerProtected
optionsGeneral options for the application shell.
Handler for the right side panel. The secondary application views go here, such as the outline view.
Protected
Readonly
saveableProtected
Readonly
secondaryProtected
Readonly
sideProtected
splitProtected
Readonly
statusPrivate
Readonly
toProtected
Readonly
toThe fixed-size panel shown on top. This one usually holds the main menu.
Private
Readonly
trackerProtected
Readonly
windowThe active widget in the application shell. The active widget is the one that has focus (either the widget itself or any of its contents).
Note: Focus is taken by a widget through the onActivateRequest
method. It is up to the
widget implementation which DOM element will get the focus. The default implementation
does not take any focus; in that case the widget is never returned by this property.
The tab bars contained in all shell areas.
The tab bars contained in the bottom shell area. If there is no widget in the bottom area, the returned array is empty.
Return the tab bar that has the currently active widget, or undefined.
The current widget in the application shell. The current widget is the last widget that
was active and not yet closed. See the remarks to activeWidget
on what active means.
The tab bars contained in the main shell area. If there is no widget in the main area, the returned array is empty.
A promise that is resolved when all currently pending updates are done.
Returns a snapshot of all tracked widgets to allow async modifications.
Activate a widget in the application shell. This makes the widget visible and usually also assigns focus to it.
Note: Focus is taken by a widget through the onActivateRequest
method. It is up to the
widget implementation which DOM element will get the focus. The default implementation
does not take any focus.
the activated widget if it was found
Add a widget to the application shell. The given widget must have a unique id
property,
which will be used as the DOM id.
Widgets are removed from the shell by calling their close
or dispose
methods.
Widgets added to the top area are not tracked regarding the current and active states.
Optional
options: Readonly<core.WidgetOptions>Private
assertPrivate
checkFocus is taken by a widget through the onActivateRequest
method. It is up to the
widget implementation which DOM element will get the focus. The default implementation
of Widget does not take any focus. This method can help finding such problems by logging
a warning in case a widget was explicitly activated, but did not trigger a change of the
activeWidget
property.
the widgets to be closed
Optional
options: core.CloseOptionsan array of all the widgets that were actually closed.
Close all tabs or a selection of tabs in a specific part of the application shell.
Either the name of a shell area or a TabBar
that is contained in such an area.
Optional
filter: ((title, index) => boolean)If undefined, all tabs are closed; otherwise only those tabs that match the filter are closed.
Optional
options: core.CloseOptionsthe widget that was closed, if any, undefined
otherwise.
If your use case requires closing multiple widgets, use ApplicationShell#closeMany instead. That method handles closing saveable widgets more reliably.
Protected
collapseCollapse the named side panel area. This makes sure that the panel is hidden, increasing the space that is available for other shell areas.
Protected
createCreate the dock panel in the bottom shell area.
Protected
createProtected
createProtected
createCreate the dock panel in the main shell area.
Protected
createProtected
createPrivate
dispatchProtected
doProtected
doProtected
expandExpand the named side panel area. This makes sure that the panel is visible, even if there
are no widgets in it. If the panel is already visible, nothing happens. If the panel is currently
collapsed (see collapsePanel
) and it contains widgets, the widgets are revealed that were
visible before it was collapsed.
Protected
findFind the shell panel this top-level widget is part of
Find the widget that contains the given HTML element. The returned widget may be one that is managed by the application shell, or one that is embedded in another widget and not directly managed by the shell, or a tab bar.
Private
findProtected
fireProtected
fireProtected
getProtected
getReturns the last active widget in the given shell area.
Protected
getOptional
options: Readonly<core.WidgetOptions>Create an object that describes the current shell layout. This object may contain references to widgets; these need to be transformed before the layout can be serialized.
Return the tab bar in the given shell area, or the tab bar that has the given widget, or undefined.
Protected
getCollects all widget titles for the given tab bar or area and optionally filters them.
The tab bar or area to retrieve the widget titles for
Optional
filter: ((title, index) => boolean)The filter to apply to the result
The filtered array of widget titles or an empty array
The widgets contained in the given shell area.
Protected
initProtected
initProtected
initProtected
initializeCheck whether the named side panel area is expanded (returns true
) or collapsed (returns false
).
Private
onProtected
onProtected
onPrivate
onProtected
onProtected
onProtected
onProtected
onProtected
refreshProtected
registerTrack all widgets that are referenced by the given layout data.
Adjusts the size of the given area in the application shell.
the desired size of the panel in pixels.
the area to resize.
Save the current widget if it is dirty.
Optional
options: SaveOptionsSave all dirty widgets.
Optional
options: SaveOptionsOptional
filter: ((title, index) => boolean)Protected
setApply a shell layout that has been previously created with getLayoutData
.
Protected
setPrivate
setZIndexProtected
toProtected
trackStatic
Protected
getStatic
set
The application shell manages the top-level widgets of the application. Use this class to add, remove, or activate a widget.