You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Registers a call back function that will be called just before panel is shown. The handler should return true
53
-
if the panel can be shown, else return false and the panel will not be shown.
55
+
Registers a call back function that will be called just before panel is shown. The handler should return trueif the panel can be shown, else return false and the panel will not be shown.
54
56
55
57
**Kind**: instance method of [<code>Panel</code>](#Panel)
56
58
**Returns**: <code>boolean</code> - true if visible, false if not
@@ -65,6 +67,24 @@ if the panel can be shown, else return false and the panel will not be shown.
65
67
Returns true if th panel can be shown, else false.
66
68
67
69
**Kind**: instance method of [<code>Panel</code>](#Panel)
Registers an async handler that is called before the panel is closed via user interaction (e.g. clicking thetab close button). The handler should return `true` to allow the close, or `false` to prevent it.
74
+
75
+
**Kind**: instance method of [<code>Panel</code>](#Panel)
76
+
77
+
| Param | Type | Description |
78
+
| --- | --- | --- |
79
+
| handler | <code>function</code> \| <code>null</code> | An async function returning a boolean, or null to clear the handler. |
Requests the panel to hide, invoking the registered onCloseRequested handler first (if any).If the handler returns false, the panel stays open. If it returns true or no handler isregistered, `hide()` is called.
85
+
86
+
**Kind**: instance method of [<code>Panel</code>](#Panel)
87
+
**Returns**: <code>Promise.<boolean></code> - Resolves to true if the panel was hidden, false if prevented.
68
88
<aname="Panel+show"></a>
69
89
70
90
### panel.show()
@@ -77,6 +97,13 @@ Shows the panel
77
97
Hides the panel
78
98
79
99
**Kind**: instance method of [<code>Panel</code>](#Panel)
100
+
<aname="Panel+focus"></a>
101
+
102
+
### panel.focus() ⇒ <code>boolean</code>
103
+
Attempts to focus the panel. Override this in panels that support focus(e.g. terminal). The default implementation returns false.
104
+
105
+
**Kind**: instance method of [<code>Panel</code>](#Panel)
106
+
**Returns**: <code>boolean</code> - true if the panel accepted focus, false otherwise
80
107
<aname="Panel+setVisible"></a>
81
108
82
109
### panel.setVisible(visible)
@@ -102,8 +129,7 @@ Updates the display title shown in the tab bar for this panel.
102
129
<aname="Panel+destroy"></a>
103
130
104
131
### panel.destroy()
105
-
Destroys the panel, removing it from the tab bar, internal maps, and the DOM.
106
-
After calling this, the Panel instance should not be reused.
132
+
Destroys the panel, removing it from the tab bar, internal maps, and the DOM.After calling this, the Panel instance should not be reused.
107
133
108
134
**Kind**: instance method of [<code>Panel</code>](#Panel)
109
135
<aname="Panel+getPanelType"></a>
@@ -171,6 +197,18 @@ The editor holder element, passed from WorkspaceManager
Pixel threshold for detecting near-maximize state during resize.
197
-
If the editor holder height is within this many pixels of zero, the
198
-
panel is treated as maximized. Keeps the maximize icon responsive
199
-
during drag without being overly sensitive.
234
+
Pixel threshold for detecting near-maximize state during resize.If the editor holder height is within this many pixels of zero, thepanel is treated as maximized. Keeps the maximize icon responsiveduring drag without being overly sensitive.
200
235
201
236
**Kind**: global constant
202
237
<aname="MIN_PANEL_HEIGHT"></a>
203
238
204
239
## MIN\_PANEL\_HEIGHT : <code>number</code>
205
-
Minimum panel height (matches Resizer minSize) used as a floor
206
-
when computing a sensible restore height.
240
+
Minimum panel height (matches Resizer minSize) used as a floorwhen computing a sensible restore height.
241
+
242
+
**Kind**: global constant
243
+
<aname="PREF_BOTTOM_PANEL_MAXIMIZED"></a>
244
+
245
+
## PREF\_BOTTOM\_PANEL\_MAXIMIZED
246
+
Preference key for persisting the maximize state across reloads.
| defaultPanelId | <code>string</code> | The ID of the default/quick-access panel. |
224
264
225
265
<aname="exitMaximizeOnResize"></a>
226
266
227
267
## exitMaximizeOnResize()
228
-
Exit maximize state without resizing (for external callers like drag-resize).
229
-
Clears internal maximize state and resets the button icon.
268
+
Exit maximize state without resizing (for external callers like drag-resize).Clears internal maximize state and resets the button icon.
230
269
231
270
**Kind**: global function
232
271
<aname="enterMaximizeOnResize"></a>
233
272
234
273
## enterMaximizeOnResize()
235
-
Enter maximize state during a drag-resize that reaches the maximum
236
-
height. No pre-maximize height is stored because the user arrived
237
-
here via continuous dragging; a sensible default will be computed if
238
-
they later click the Restore button.
274
+
Enter maximize state during a drag-resize that reaches the maximumheight. No pre-maximize height is stored because the user arrivedhere via continuous dragging; a sensible default will be computed ifthey later click the Restore button.
239
275
240
276
**Kind**: global function
241
277
<aname="restoreIfMaximized"></a>
242
278
243
279
## restoreIfMaximized()
244
-
Restore the container's CSS height to the pre-maximize value and clear maximize state.
245
-
Must be called BEFORE Resizer.hide() so the Resizer reads the correct height.
246
-
If not maximized, this is a no-op.
247
-
When the saved height is near-max or unknown, a sensible default is used.
280
+
Restore the container's CSS height to the pre-maximize value and clear maximize state.Must be called BEFORE Resizer.hide() so the Resizer reads the correct height.If not maximized, this is a no-op.When the saved height is near-max or unknown, a sensible default is used.
248
281
249
282
**Kind**: global function
250
283
<aname="isMaximized"></a>
@@ -266,3 +299,16 @@ Hides every open bottom panel tab in a single batch
266
299
267
300
**Kind**: global function
268
301
**Returns**: <code>Array.<string></code> - The IDs of panels that were open (useful for restoring later).
Registers a call back function that will be called just before panel is shown. The handler should return true
53
-
if the panel can be shown, else return false and the panel will not be shown.
54
+
Registers a call back function that will be called just before panel is shown. The handler should return trueif the panel can be shown, else return false and the panel will not be shown.
54
55
55
56
**Kind**: instance method of [<code>Panel</code>](#Panel)
56
57
**Returns**: <code>boolean</code> - true if visible, false if not
@@ -65,6 +66,24 @@ if the panel can be shown, else return false and the panel will not be shown.
65
66
Returns true if th panel can be shown, else false.
66
67
67
68
**Kind**: instance method of [<code>Panel</code>](#Panel)
Registers an async handler that is called before the panel is closed via user interaction.The handler should return `true` to allow the close, or `false` to prevent it.
73
+
74
+
**Kind**: instance method of [<code>Panel</code>](#Panel)
75
+
76
+
| Param | Type | Description |
77
+
| --- | --- | --- |
78
+
| handler | <code>function</code> \| <code>null</code> | An async function returning a boolean, or null to clear the handler. |
Requests the panel to hide, invoking the registered onCloseRequested handler first (if any).If the handler returns false, the panel stays open. If it returns true or no handler isregistered, `hide()` is called.
84
+
85
+
**Kind**: instance method of [<code>Panel</code>](#Panel)
86
+
**Returns**: <code>Promise.<boolean></code> - Resolves to true if the panel was hidden, false if prevented.
0 commit comments