Construct a new application shell.
Protected
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
dockProtected
initializedHandler 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.
Protected
Readonly
maximizedReadonly
nodeGet the DOM node owned by the widget.
Readonly
onProtected
Readonly
onReadonly
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
statusProtected
Readonly
toThe fixed-size panel shown on top. This one usually holds the main menu.
Protected
unmaximizeProtected
Readonly
untitledProtected
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 shell area name of the currently active tab, 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 dataset for the widget's DOM node.
A signal emitted when the widget is disposed.
Get the method for hiding the widget.
Get the id of the widget's DOM node.
Set the id of the widget's DOM node.
Test whether the widget's node is attached to the DOM.
Test whether the widget has been disposed.
Test whether the widget is explicitly hidden.
Get the parent of the widget.
Set the parent of the widget.
Children are typically added to a widget by using a layout, which means user code will not normally set the parent widget directly.
The widget will be automatically removed from its old parent.
This is a no-op if there is no effective parent change.
A promise that is resolved when all currently pending updates are done.
The title object for the widget.
The title object is used by some container widgets when displaying the widget alongside some title, such as a tab panel or side bar.
Since not all widgets will use the title, it is created on demand.
The owner
property of the title is set to this widget.
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<ApplicationShell.WidgetOptions>Test whether the current widget is dirty.
Test whether there is a dirty widget.
Create an iterator over the widget's children.
A new iterator over the children of the widget.
The widget must have a populated layout in order to have children.
If a layout is not installed, the returned iterator will be empty.
the widgets to be closed
Optional
options: ApplicationShell.CloseOptionsan array of all the widgets that were actually closed.
Optional
options: ApplicationShell.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 bottom panel. All contained widgets are hidden, but not closed.
They can be restored by calling expandBottomPanel
.
Collapse the named side panel area. This makes sure that the panel is hidden, increasing the space that is available for other shell areas.
Test whether a widget is a descendant of this widget.
The descendant widget of interest.
true
if the widget is a descendant, false
otherwise.
Protected
createCreate the dock panel in the bottom shell area.
Protected
createProtected
createAssemble the application shell layout. Override this method in order to change the arrangement of the main area and the side panels.
Protected
createCreate the dock panel in the main shell area.
Protected
createCreate a split layout to assemble the application shell layout.
Optional
stretch: number[]Optional
options: Partial<SplitLayout.IOptions>Protected
createCreate the top panel, which is used to hold the main menu.
Protected
doProtected
doProtected
expandExpand the bottom panel. See expandPanel
regarding the exact behavior.
Expand 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
Optional
event: Eventthe widget whose title has been targeted by a DOM event on a tabbar, or undefined if none can be found.
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.
Protected
fireProtected
fireProtected
focusProtected
getProtected
getCompute the current height of the bottom panel. This implementation assumes that the container
of the bottom panel is a SplitPanel
.
Protected
getDetermine the default size to apply when the bottom panel is expanded for the first time.
Optional
options: Readonly<ApplicationShell.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.
Get an array corresponding to bottom panel widgets' pinned state.
Get an array corresponding to main panel widgets' pinned state.
Protected
getProtected
handleTest whether the widget's DOM node has the given class name.
The class name of interest.
true
if the node has the class, false
otherwise.
Hide the widget and make it hidden to its parent widget.
This causes the isHidden property to be true
.
If the widget is explicitly hidden, this is a no-op.
Protected
initProtected
initProtected
initializeProtected
initCheck whether the named side panel area is expanded (returns true
) or collapsed (returns false
).
Protected
notifyProtected
onA message handler invoked on an 'activate-request'
message.
The default implementation of this handler is a no-op.
Protected
onA message handler invoked on an 'after-attach'
message.
The default implementation of this handler is a no-op.
Protected
onA message handler invoked on an 'after-detach'
message.
The default implementation of this handler is a no-op.
Protected
onA message handler invoked on an 'after-hide'
message.
The default implementation of this handler is a no-op.
Protected
onA message handler invoked on an 'after-show'
message.
The default implementation of this handler is a no-op.
Protected
onA message handler invoked on a 'before-attach'
message.
The default implementation of this handler is a no-op.
Protected
onA message handler invoked on a 'before-detach'
message.
The default implementation of this handler is a no-op.
Protected
onA message handler invoked on a 'before-hide'
message.
The default implementation of this handler is a no-op.
Protected
onA message handler invoked on a 'before-show'
message.
The default implementation of this handler is a no-op.
Protected
onA message handler invoked on a 'child-added'
message.
The default implementation of this handler is a no-op.
Protected
onA message handler invoked on a 'child-removed'
message.
The default implementation of this handler is a no-op.
Protected
onA message handler invoked on a 'close-request'
message.
The default implementation unparents or detaches the widget.
Protected
onProtected
onProtected
onProtected
onProtected
onA message handler invoked on a 'fit-request'
message.
The default implementation of this handler is a no-op.
Protected
onA message handler invoked on a 'resize'
message.
The default implementation of this handler is a no-op.
Protected
onA message handler invoked on an 'update-request'
message.
The default implementation of this handler is a no-op.
Protected
refreshRefresh the toggle button for the bottom panel. This implementation creates a status bar entry
and refers to the command core.toggle.bottom.panel
.
Protected
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.
Reveal a widget in the application shell. This makes the widget visible, but does not activate it.
the revealed widget if it was found
Protected
setModify the height of the bottom panel. This implementation assumes that the container of the
bottom panel is a SplitPanel
.
Apply a shell layout that has been previously created with getLayoutData
.
Protected
setShow the widget and make it visible to its parent widget.
This causes the isHidden property to be false
.
If the widget is not explicitly hidden, this is a no-op.
Test whether the given widget flag is set.
This will not typically be called directly by user code.
Toggle a class name on the widget's DOM node.
The class name to toggle on the node.
Optional
force: booleanWhether to force add the class (true
) or force
remove the class (false
). If not provided, the presence of
the class will be toggled from its current state.
true
if the class is now present, false
otherwise.
The class name must not contain whitespace.
Protected
toan array of Widgets, all of which are tracked by the focus tracker The first member of the array is the widget whose id is passed in, and the other widgets are its tracked parents in ascending order
Protected
trackTrack the given widget so it is considered in the current
and active
state of the shell.
Static
getStatic
set
The application shell manages the top-level widgets of the application. Use this class to add, remove, or activate a widget.