A container for presenting content in the center of the workspace. Panes can contain multiple items, one of which is active at a given time. The view corresponding to the active item is displayed in the interface. In the default configuration, tabs are also displayed for each item.
Each pane may also contain one pending item. When a pending item is added to a pane, it will replace the currently pending item, if any, instead of simply being added. In the default configuration, the text in the tab for pending items is shown in italics.
Invoke the given callback when the pane resizes
The callback will be invoked when pane’s flexScale property changes. Use ::getFlexScale to get the current value.
Argument | Description |
---|---|
|
Function to be called when the pane is resized |
|
Number representing the panes |
Return values |
---|
Returns a Disposable on which ‘.dispose()’ can be called to unsubscribe. |
Invoke the given callback with the current and future values of ::getFlexScale.
Argument | Description |
---|---|
|
Function to be called with the current and future values of the ::getFlexScale property. |
|
Number representing the panes |
Return values |
---|
Returns a Disposable on which |
Invoke the given callback when the pane is activated.
The given callback will be invoked whenever ::activate is called on the pane, even if it is already active at the time.
Argument | Description |
---|---|
|
Function to be called when the pane is activated. |
Return values |
---|
Returns a Disposable on which |
Invoke the given callback before the pane is destroyed.
Argument | Description |
---|---|
|
Function to be called before the pane is destroyed. |
Return values |
---|
Returns a Disposable on which |
Invoke the given callback when the pane is destroyed.
Argument | Description |
---|---|
|
Function to be called when the pane is destroyed. |
Return values |
---|
Returns a Disposable on which |
Invoke the given callback when the value of the ::isActive property changes.
Argument | Description |
---|---|
|
Function to be called when the value of the ::isActive property changes. |
|
Boolean indicating whether the pane is active. |
Return values |
---|
Returns a Disposable on which |
Invoke the given callback with the current and future values of the ::isActive property.
Argument | Description |
---|---|
|
Function to be called with the current and future values of the ::isActive property. |
|
Boolean indicating whether the pane is active. |
Return values |
---|
Returns a Disposable on which |
Invoke the given callback when an item is added to the pane.
Argument | Description |
---|---|
|
Function to be called with when items are added. |
|
Object with the following keys: |
|
The added pane item. |
|
Number indicating where the item is located. |
Return values |
---|
Returns a Disposable on which |
Invoke the given callback when an item is removed from the pane.
Argument | Description |
---|---|
|
Function to be called with when items are removed. |
|
Object with the following keys: |
|
The removed pane item. |
|
Number indicating where the item was located. |
Return values |
---|
Returns a Disposable on which |
Invoke the given callback when an item is moved within the pane.
Argument | Description |
---|---|
|
Function to be called with when items are moved. |
|
Object with the following keys: |
|
The removed pane item. |
|
Number indicating where the item was located. |
|
Number indicating where the item is now located. |
Return values |
---|
Returns a Disposable on which |
Invoke the given callback with all current and future items.
Argument | Description |
---|---|
|
Function to be called with current and future items. |
|
An item that is present in ::getItems at the time of subscription or that is added at some later time. |
Return values |
---|
Returns a Disposable on which |
Invoke the given callback when the value of ::getActiveItem changes.
Argument | Description |
---|---|
|
Function to be called with when the active item changes. |
|
The current active item. |
Return values |
---|
Returns a Disposable on which |
Invoke the given callback when ::activateNextRecentlyUsedItem has been called, either initiating or continuing a forward MRU traversal of pane items.
Argument | Description |
---|---|
|
Function to be called with when the active item changes. |
|
The next MRU item, now being set active |
Return values |
---|
Returns a Disposable on which |
Invoke the given callback when ::activatePreviousRecentlyUsedItem has been called, either initiating or continuing a reverse MRU traversal of pane items.
Argument | Description |
---|---|
|
Function to be called with when the active item changes. |
|
The previous MRU item, now being set active |
Return values |
---|
Returns a Disposable on which |
Invoke the given callback when ::moveActiveItemToTopOfStack has been called, terminating an MRU traversal of pane items and moving the current active item to the top of the stack. Typically bound to a modifier (e.g. CTRL) key up event.
Argument | Description |
---|---|
|
Function to be called with when the MRU traversal is done. |
Return values |
---|
Returns a Disposable on which |
Invoke the given callback with the current and future values of ::getActiveItem.
Argument | Description |
---|---|
|
Function to be called with the current and future active items. |
|
The current active item. |
Return values |
---|
Returns a Disposable on which |
Invoke the given callback before items are destroyed.
Argument | Description |
---|---|
|
Function to be called before items are destroyed. |
|
Object with the following keys: |
|
The item that will be destroyed. |
|
The location of the item. |
Return values |
---|
Returns a Disposable on which |
Get the active pane item in this pane.
Return values |
---|
Returns a pane item. |
Return the item at the given index.
Argument | Description |
---|---|
|
Return values |
---|
Returns an item or |
Makes the next item active.
Makes the previous item active.
Move the active tab to the right.
Move the active tab to the left
Make the given item active, causing it to be displayed by the pane’s view.
Argument | Description |
---|---|
|
The item to activate |
|
optional |
|
optional
Boolean indicating that the item should be added in a pending state if it does not yet exist in the pane. Existing pending items in a pane are replaced with new pending items when they are opened. |
Add the given item to the pane.
Argument | Description |
---|---|
|
The item to add. It can be a model with an associated view or a view. |
|
optional |
|
optional
Number indicating the index at which to add the item. If omitted, the item is added after the current active item. |
|
optional
Boolean indicating that the item should be added in a pending state. Existing pending items in a pane are replaced with new pending items when they are opened. |
Return values |
---|
Returns the added item. |
Add the given items to the pane.
Argument | Description |
---|---|
|
An Array of items to add. Items can be views or models with associated views. Any objects that are already present in the pane’s current items will not be added again. |
|
optional
Number index at which to add the items. If omitted, the item is # added after the current active item. |
Return values |
---|
Returns an Array of added items. |
Move the given item to the given index.
Argument | Description |
---|---|
|
The item to move. |
|
Number indicating the index to which to move the item. |
Destroy the active item and activate the next item.
Return values |
---|
Returns a Promise that resolves when the item is destroyed. |
Destroy the given item.
If the item is active, the next item will be activated. If the item is the
last item, the pane will be destroyed if the core.destroyEmptyPanes
config
setting is true
.
This action can be prevented by onWillDestroyPaneItem callbacks in which case nothing happens.
Argument | Description |
---|---|
|
Item to destroy |
|
optional
Boolean Destroy the item without prompting to save it, even if the item’s |
Return values |
---|
Returns a Promise that resolves with a Boolean indicating whether or not the item was destroyed. |
Destroy all items.
Destroy all items except for the active item.
Save the active item.
Save the given item.
Argument | Description |
---|---|
|
The item to save. |
|
optional
Function which will be called with no argument after the item is successfully saved, or with the error if it failed. The return value will be that of |
Return values |
---|
Returns a Promise that resolves when the save is complete |
Prompt the user for a location and save the active item with the path they select.
Argument | Description |
---|---|
|
The item to save. |
|
optional
Function which will be called with no argument after the item is successfully saved, or with the error if it failed. The return value will be that of |
Save all items.
Return the first item that matches the given URI or undefined if none exists.
Argument | Description |
---|---|
|
String containing a URI. |
Makes this pane the active pane, causing it to gain focus.
Close the pane and destroy all its items.
If this is the last pane, all the items will be destroyed but the pane itself will not be destroyed.