Atlas Engine
API Referencegraphite

graphite

UI elements, layouts, fonts, styles, and themes.

declare module "graphite"

UI elements, layouts, fonts, styles, and themes.

Classes

  • Image — Textured UI element with size, tint, and styling.
  • TextField — Editable text input with focus, cursor, placeholder, and change callbacks.
  • Button — Clickable text button with hover, enabled state, and click callback support.
  • Checkbox — Toggleable checkbox with a label and change callback support.
  • Column — Vertical layout of UI children with spacing, padding, alignment, and an anchor.
  • Row — Horizontal layout of UI children with spacing, padding, alignment, and an anchor.
  • Stack — Overlapping layout of UI children with horizontal and vertical alignment.
  • UIStyleVariant — Optional style overrides for one state; setter methods support chaining.
  • UIStyle — Collection of visual overrides for normal and interactive states.
  • Theme — Shared default styles for UI element types, with access to the current theme.
  • Font — Resource-backed font with atlas texture and size controls.
  • Text — UI text rendered with a font, color, screen position, and optional style.

Types

  • TextFieldChangeEvent — Text field state supplied to a change callback.
  • ButtonClickEvent — Button label supplied to a click callback.
  • CheckboxToggleEvent — Checkbox label and checked state supplied to a toggle callback.
  • UIStyleStateSnapshot — Current interaction flags used when resolving a UI style.
  • UIResolvedStyle — Concrete visual properties produced by style resolution.
  • Character — Glyph dimensions, bearing, advance, and texture atlas UV bounds.
  • FontAtlas — Map from character strings to glyph metrics and atlas coordinates.

Namespaces

  • TextField — Callback types associated with TextField.
  • Button — Callback types associated with Button.
  • Checkbox — Callback types associated with Checkbox.

Enums

On this page