MacUi.Window (mac_ui v0.1.0)

Copy Markdown View Source

Summary

Functions

Returns a specification to start this module under a supervisor.

Clears all drawing queues for the next frame

Queues text to be drawn

Loads an XML UI file from disk and renders it

Parses an XML string, calculates layouts, and renders to the screen

Sets an attribute on an element by ID (controller-driven state push-back)

Sets multiple attributes on an element by ID

Subscribe the calling process to receive UI events

Updates the text content of a specific element in the AST by its ID/UUID

Functions

child_spec(init_arg)

Returns a specification to start this module under a supervisor.

See Supervisor.

clear()

Clears all drawing queues for the next frame

draw_line(x1, y1, x2, y2, r \\ 255, g \\ 255, b \\ 255)

Queues a line to be drawn

draw_pixel(x, y, r \\ 255, g \\ 255, b \\ 255)

Queues a pixel to be drawn

draw_text(text, x, y)

Queues text to be drawn

load_file(path)

Loads an XML UI file from disk and renders it

render_xml(xml_string)

Parses an XML string, calculates layouts, and renders to the screen

set_attr(id, key, value)

Sets an attribute on an element by ID (controller-driven state push-back)

set_attrs(id, attrs)

Sets multiple attributes on an element by ID

start_link(opts \\ [])

subscribe()

Subscribe the calling process to receive UI events

update_element_text(id, new_text)

Updates the text content of a specific element in the AST by its ID/UUID

xmlAttribute(args \\ [])

(macro)

xmlAttribute(record, args)

(macro)

xmlElement(args \\ [])

(macro)

xmlElement(record, args)

(macro)

xmlText(args \\ [])

(macro)

xmlText(record, args)

(macro)