Expand description
The workbench’s layout, as VS Code arranges it.
Experimental: may change in any release
(docs/stability.md).
- Areas shown or hidden: the commands
workbench.toggle.primarySideBar(Ctrl+B),.panel(Ctrl+J) and.secondarySideBar(Ctrl+Alt+B) fold a shown area to its strip, or show it again, through theworkbench.foldstep. An area with nothing left to show gets back its first closed panel (theworkbench.showstep). The primary side bar is the start side area, the panel the bottom one, the secondary side bar the end side one. The context keyssideBarVisible,panelVisibleandauxiliaryBarVisiblesay which show, as VS Code’s. - Where the side bars lie: the
workbench.side_bar_positionsetting, on the left by default, the secondary one across from it (workbench.layout.sideBarPosition); where the panel lies: theworkbench.panel_alignmentsetting, under the editors by default or across the full width (workbench.layout.panelAlignment). Each change is a write of the setting, one undo step. - The layout menu (
MENU_LAYOUT, “Customize layout”, also a submenu of View): the area toggles, the arrangements (the built-in templates and the saved ones, the current one ticked), “Save the current arrangement as…”, and the options above. - The title bar’s controls (
show): VS Code’s layout controls, at the end of the title bar when an application asks (FramePlugin::layout_controls): the “Customize layout” button opening that menu, then a toggle per area, its icon filled while the area shows and outlined while it is folded or hidden, its tooltip giving its key. Drawn by the kit’sicon-button; the side bars’ icons follow their side, and so does their order: with the primary side bar on the right, the secondary side bar’s toggle comes first. Menus and the palette show the toggle commands’ icons mirrored the same way (command_icon).
Enums§
- Side
BarPosition - Where the primary side bar lies.
Constants§
- BLOCK_
LAYOUT_ CONTROLS - The title bar’s controls, in the
zones::CAPTIONzone (FramePlugin::layout_controls). - CMD_
CUSTOMIZE - Opens the layout menu, under the title bar’s button when it is drawn.
- CMD_
PANEL_ ALIGNMENT - Lines the bottom panel up (
alignment; without it, switches between under the editors and the full width). - CMD_
SIDE_ BAR_ POSITION - Puts the primary side bar on the left or the right (
position; without it, on the other side). - CMD_
TOGGLE_ PANEL - Shows or hides the panel (the bottom area):
Ctrl+J. - CMD_
TOGGLE_ PRIMARY_ SIDE_ BAR - Shows or hides the primary side bar (the start side area):
Ctrl+B. - CMD_
TOGGLE_ SECONDARY_ SIDE_ BAR - Shows or hides the secondary side bar (the end side area):
Ctrl+Alt+B. - MENU_
LAYOUT - The layout menu: “Customize layout”.
- SETTING_
SIDE_ BAR_ POSITION - The setting: where the primary side bar (the start side area) lies,
left(the default) orright; the secondary one lies across from it, and the activity bar beside it. - TOGGLES
- The areas the toggles show or hide, with their command, their key and their context key, in VS Code’s order.
Functions§
- area_
shown - Whether an area shows now: not folded, with a panel to draw (a side
area lying over the centre counts while open).
falsewhile the workbench is busy (asked from inside its own change). - command_
icon - A command’s icon as menus and the palette show it: the side bars’
toggles declare their icons for the default position (the primary
side bar on the left), and mirror them while it is on the right, as
the title bar’s toggles do (
toggle_icon). Any other command’s icon, or a name that is not a side’s, is shown as declared. - open_
menu - Opens the layout menu under a rectangle (the title bar’s button), or under the button where it was last drawn, else at the window’s top end.
- set_
panel_ alignment - Lines the bottom panel up (
workbench.panel_alignment). - set_
side_ bar_ position - Puts the primary side bar on a side (
workbench.side_bar_position). - show
- The title bar’s layout controls (the
BLOCK_LAYOUT_CONTROLSblock): the “Customize layout” button, then the toggles of the left side bar, the panel and the right side bar, from the start, whichever side the primary side bar lies on. Each button’s icon is recorded (thelayout controlssurface of the icons the debug bridge lists), so an agent reads which one shows. An application drawing a bar of its own may call it there. - side_
bar_ position - The primary side bar’s position, as the setting says now.
- toggle_
area - Shows an area or hides it, as its toggle command does: a shown area
folds to its strip (
workbench.fold); a folded one unfolds; one with nothing to draw gets back its first closed panel (workbench.show). - toggle_
command - The command showing or hiding an area (
Nonefor the centre). - toggle_
icon - The icon an area’s toggle shows now: filled while the area shows,
outlined (
-off) while it is folded or hidden; a side bar’s icon follows the side it lies on.