UIState

semagrams.ui.UIState
case class UIState(sprites: Var[Vector[(Entity, Sprite, ACSet)]], focus: () => Unit, globalSize: Signal[Complex])

State for managing a collection of UI elements

Attributes

focus

A function which focuses the global state (doesn't currently work exactly as intended I think).

globalSize

A Signal whose value is the size of the overall window. Used for positioning

sprites

A collection of UI sprites, i.e. dialogues, text boxes, buttons, etc.

Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any

Members list

Concise view

Value members

Concrete methods

def addEntity(e: Entity, s: Sprite, p: ACSet): IO[Unit]

Add a new entity with a sprite and ACSet, or update a pre-existing entity if it exists

Add a new entity with a sprite and ACSet, or update a pre-existing entity if it exists

Attributes

def addHtmlEntity(e: Entity, build: () => HtmlElement): IO[Unit]

Add a new entity that wraps an HtmlElement using GenericHTMLSprite

Add a new entity that wraps an HtmlElement using GenericHTMLSprite

Attributes

def addKillableHtmlEntity(e: Entity, build: Observer[Unit] => HtmlElement): IO[Unit]

Add a new entity where the builder function takes in a callback that allows it to delete itself.

Add a new entity where the builder function takes in a callback that allows it to delete itself.

Attributes

def addKillableHtmlEntity(build: Observer[Unit] => HtmlElement): IO[Unit]

Same as addKillableHtmlEntity, but with a fresh AnonEntity

Same as addKillableHtmlEntity, but with a fresh AnonEntity

Attributes

def dialogue[A](build: Observer[A] => HtmlElement): IO[A]

Same as addKillableHtmlEntity, but the callback allows you to actually return something. Creates the entity, waits asynchronously for the callback to be called, and then kills the entity and returns what was passed to the callback.

Same as addKillableHtmlEntity, but the callback allows you to actually return something. Creates the entity, waits asynchronously for the callback to be called, and then kills the entity and returns what was passed to the callback.

Attributes

def remEntity(e: Entity): Unit

Removes the entity e

Removes the entity e

Attributes

Inherited methods

def productElementNames: Iterator[String]

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

Attributes

Inherited from:
Product

Concrete fields

The viewport that should be added to the main window.

The viewport that should be added to the main window.

Maybe instead, UIState should implement Viewport?

Attributes