web library
Browser-only entrypoint: the imperative RibbonCanvasController and the
Canvas 2D WebCanvasSurface that drive a <canvas> ribbon on the client.
Import this from a *.client.dart entrypoint. It re-exports the VM-pure
barrel too, so a client app needs only this one import.
Classes
- CollapseStateChangedEvent
- The ribbon was collapsed or expanded via chevron / double-click.
- DrawSurface
- A minimal 2D drawing surface the painter targets.
- DropdownMenuActionEvent
- A menu entry inside a dropdown or split-button was chosen.
- IconAsset
-
An icon asset embedded in a
.ribbonbundle (the persistence counterpart of the runtimeIconSource/IconRegistry). Storing assets in the bundle makes it self-contained — a saved.ribboncarries its own SVG/PNG data URLs. - IconRegistry
- Resolves a RibbonItem.iconKey to a concrete icon asset.
- IconSource
- A single icon asset, either SVG or PNG.
- ItemPressedEvent
- A plain / toggle / checkbox / split-button body was activated.
- LaidGroup
- A laid-out group with its bounds and child items.
- LaidItem
- The laid-out position of a single item, including the split-button body / arrow sub-rectangles used for hit-testing.
- LaidTab
- A laid-out tab strip entry.
- MenuOverlay
-
A canvas-rendered popup menu for dropdown / split-button items — the Jaspr
counterpart of Xojo's
DesktopMenuItem.PopUp(desktop) and the JS-injected menu overlay (web), but painted into its own<canvas>so it stays consistent with the ribbon. - RibbonCanvasController
-
Imperative driver that paints a RibbonDefinition into a
<canvas>and translates browser pointer events into RibbonEvents — the Jaspr/web counterpart of Xojo'sXjRibboncanvas control. - RibbonColors
-
The ribbon's colour system, an exact port of Xojo's
ResolveColors. - RibbonDefinition
-
The root of a ribbon definition: the in-memory counterpart of a
.ribbonJSON bundle. Shared verbatim by the canvas renderer, the visual designer, and the LSP server. - RibbonEvent
- Events emitted by the ribbon.
- RibbonGeometry
-
Layout constants — a direct port of the
k*constants indesktop/XjRibbon.xojo_code. All values are in CSS pixels. - RibbonGroup
- A labeled cluster of controls inside a RibbonTab, separated from neighbouring groups by a vertical divider.
- RibbonItem
- A single control inside a RibbonGroup.
- RibbonLayout
- The complete result of a layout pass: enough geometry for both hit-testing and painting.
- RibbonMenuItem
- An entry inside a dropdown or split-button's popup menu.
- RibbonPainter
-
Paints a RibbonLayout onto a DrawSurface, porting the
Draw*methods ofdesktop/XjRibbon.xojo_code. - RibbonPaintState
- Interaction state for a single paint pass. Tracked by the client component and mutated on pointer events; immutable value object otherwise.
- RibbonTab
-
A top-level tab of the ribbon. Counterpart of Xojo's
XjRibbonTab. - RibbonToolbar
-
A Microsoft Office–style ribbon toolbar rendered to an HTML5
<canvas>. - RRect
- An axis-aligned rectangle, in CSS pixels.
- TabChangedEvent
- The active tab changed.
- WebCanvasSurface
-
A DrawSurface backed by a browser
web.CanvasRenderingContext2D.
Enums
- IconAssetKind
-
The two supported icon asset formats (mirrors the runtime
IconKind). - IconKind
- The two supported icon asset formats.
- RibbonItemType
-
The five core item-type constants, mirroring Xojo's
XjRibbonItemkItemType*constants (0–4).
Mixins
- DrawStateMixin
-
A mixin holding the active fill / stroke / font / line state, so both the
recording and web surfaces share the bookkeeping. Apply it with
withand alsoimplements DrawSurface.
Functions
-
registerIconImage(
String key, String src, void onLoaded()) → void - Allows the controller to seed the icon cache. Exposed for the controller.
-
resetIconImages(
) → void