Windows and UI

Build a program's windows from objects: frames, text, buttons, menus and lists, where every change eases into place instead of snapping.

A Window is one real window on the desktop, and the UIObjects under it are drawn inside it. Your code sets where things go, and every visible change eases there by itself, by the object's Transition. Menus, shortcuts, drag and drop, the Windows file pickers and an off-screen RenderTarget for pictures complete the set.

Up and coming

shot check knows these classes today; programs run them once the native runtime lands.

ScreenItemAnything laid out on a screen: a Window, a UIObject or a RenderTarget.WindowOpen a real desktop window from code: give it a title and a menu bar, ask before it closes, and have it come back where you left it.UIObjectThe base of everything drawn in a window: place it, hide it, layer it, clip it, fade a whole panel, or give it a tooltip and a right-click menu.FrameA plain box with a background, rounded corners, an outline and a soft shadow, for cards, panels, pills and popups.TextLabelText with coloured spans and pictures inline, sized to about two thirds of its box, that wraps, cuts off neatly and can be selected and copied.ImageLabelShow a picture: a file, bytes in memory, a tile of a sprite sheet, an animated strip or a built-in glyph.ButtonThe one clickable. It answers hover and press by itself, holds a selected state, and fires Activated on a click, Enter or Space.TextBoxAn editable text field with everything a desktop field needs: caret, selection, clipboard, undo, Japanese input and a submit key.ScrollingFrameA view onto content bigger than its box that scrolls smoothly, with thin overlay scroll bars and a mode that sticks to the end.LogViewStream thousands of lines of output into one fast view: append, rewrite a line in place, fold a long block and find text.MenuRight-click menus, dropdowns and a window's menu bar, built from items and asked with one call that waits for the pick.MenuItemOne entry of a Menu, with its text, an icon, a check mark and the keys of its Shortcut.MenuSeparatorA separator between the items of a Menu.ShortcutBind a key chord such as Ctrl+Enter, Ctrl+Shift+F or F5 to an action, scoped to where the keyboard is.DragDetectorDrag things 1:1 with the pointer and throw them, report drags for splitters and sliders, or drag and drop between targets.DropTargetMake a UIObject take drops: dragged objects with a matching tag, or files from File Explorer.DialogA modal window your code opens over another and waits on for an answer.ProgressBarA bar that eases to its value, with marks at the thresholds that matter, colours that change as it fills, and a label on top.CanvasDraw your own graphs and sparklines: lines, rectangles, circles and text in a box, swapped in with a crossfade.StackLine children up in a row or a column with a gap, and they slide into place when one is added, removed or reordered.RenderTargetLay out frames, text and pictures as you would in a window, then save them as a PNG or use them as a texture, with no window shown.