Expand description
The Studio’s resizable layout: the desktop columns — file sidebar, then up to three panels — and the height of the bottom-docked debugger drawer.
Widths are CSS pixels. The sidebar, the left panel and the right panel each hold their width; the center panel is the flexible one and takes whatever the others leave. A resizer moves exactly one boundary, so a drag changes only the two columns beside it — every other column keeps its width to the pixel. Every column has a minimum, and the minimums fit side by side at the narrowest desktop width, so the row never overflows.
The layout the user shapes by dragging is a preference; what the Studio draws is that
preference Columns::fit to the current width. Narrowing the window squeezes the
drawn layout, and widening it again brings the preference back unchanged.
A phone shows one pane at a time (MobileTab, opened on first_pane), and keeps the
caret’s line above its keyboard (caret_in_view).
Structs§
- Columns
- The fixed-width columns. The center is derived: see
Columns::center. - Extent
- A stretch of the page from top to bottom, in CSS pixels.
- Shown
- Which optional columns are on screen. The left and center panels always are.
Enums§
- Mobile
Tab - The pane a phone shows, one at a time: the editor, the output, or the third panel (Console, Context or the picture). Every Run and Execute shows the output.
- Resizer
- A resizer, named by the boundary it moves.
Constants§
- CENTER_
MIN - DESKTOP_
MIN_ WIDTH - The narrowest window that gets the side-by-side layout; below it the Studio stacks.
- DRAWER_
INITIAL - The drawer’s height when it first opens: room for its controls and its tabs.
- DRAWER_
MIN - The drawer can shrink to its control bar and no further.
- GAP
- The hairline between neighbours in the panel row.
- LEFT_
MIN - PANELS_
MIN_ HEIGHT - However tall the drawer grows, the panel row above it keeps at least this much.
- PROOF_
DRAWER_ INITIAL - The proof drawer’s height when it first opens: room for its bar and the three steps.
- PROOF_
MIN - Logic’s proof drawer shrinks to its bar and no further.
- RESIZER
- Width of a resizer bar.
- RIGHT_
MIN - SIDEBAR_
MIN - SPLIT_
MAX - SPLIT_
MIN - On a phone the panels stack; the upper one’s share of the stack, in percent, stays between these bounds so neither panel can be dragged out of sight.
Functions§
- caret_
in_ view - How far the editor scrolls so the caret’s line shows in
view, the part of its pane the reader can see (above an on-screen keyboard): nothing when it shows already, up to its top when it is above, down to its bottom when it is below. A line taller than the view shows from its top. - drawer_
dragged - The drawer’s height after dragging its grip by
dypixels (down is positive), wherestartis its height when the drag began androomis the height the panel row and the drawer share. - drawer_
fit - A drawer height drawn in
roompixels shared with the panel row: never below the control bar, and never so tall the panels lose their minimum. - first_
pane - The pane a phone opens a file of
modeon: the output for a file that runs or previews as it opens, the editor for Math, which waits for Execute. Decided by the mode alone, so the server’s render is the phone’s first frame. - proof_
dragged - The proof drawer’s height after dragging its grip by
dypixels (down is positive), wherestartis its height when the drag began androomis the height the panel row and the drawer share: never below its bar, and never so tall the panels lose their minimum. - split_
percent - The upper panel’s share of a stack
heightpixels tall whose top edge is attop, when the split bar is aty.