Packages

p

scalm

package scalm

Scalm is a user interface library inspired by Elm.

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. scalm
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. trait App extends Component

    An application is a component with an initialization operation

  2. sealed trait Attr[+M] extends AnyRef

    HTML attribute

  3. case class Attribute(name: String, value: String) extends Attr[Nothing] with Product with Serializable

    Attribute of an HTML tag

  4. sealed trait Cmd[+Msg] extends AnyRef

    A command describes some side-effect to perform.

    A command describes some side-effect to perform.

    The difference with a Task is that a command never produces error values.

  5. trait Component extends AnyRef

    A component is a typical structure that emerges from your code when you start modularizing it.

    A component is a typical structure that emerges from your code when you start modularizing it. You don’t *have to* break down your code into components, but sometimes you do and this class is useful to abstract over them.

    A component defines how to maintain and render a state.

    In the case of a counter, for instance, the state would be just an Int, and the component would to react to an Increment message to increment the current state.

  6. sealed trait Elem[+M] extends AnyRef

    An HTML element can be a tag or a text node

  7. case class Event[E <: org.scalajs.dom.Event, M](name: String, msg: (E) ⇒ M) extends Attr[M] with Product with Serializable

    Event handler

    Event handler

    name

    Event name (e.g. "click")

    msg

    Message to produce when the event is triggered

  8. case class Hook[Model](model: Model, renderer: HookRenderer[Model]) extends Html[Nothing] with Product with Serializable

    Unmanaged HTML tag

    Unmanaged HTML tag

    model

    current state to render

    renderer

    function that renders the given model

  9. trait HookRenderer[Model] extends AnyRef
  10. sealed trait Html[+M] extends Elem[M]

    Base class for HTML tags

  11. case class Prop(name: String, value: String) extends Attr[Nothing] with Product with Serializable

    Property of a DOM node instance

  12. trait Scalm extends SnabbdomSyntax

    Scalm runtime implementation

  13. case class Style extends Product with Serializable
  14. sealed trait Sub[+Msg] extends AnyRef

    A subscription describes a resource that an application is interested in.

    A subscription describes a resource that an application is interested in.

    Examples:

    - a timeout notifies its subscribers when it expires, - a video being played notifies its subscribers with subtitles.

    Msg

    Type of message produced by the resource

  15. case class Tag[+M](name: String, attrs: Seq[Attr[M]], children: Seq[Elem[M]]) extends Html[M] with Product with Serializable

    An HTML tag

  16. sealed trait Task[+Err, +Success] extends AnyRef

    A task describes some side-effect to perform.

    A task describes some side-effect to perform.

    Examples:

    - An XHR

    Err

    Type of error produced the task

    Success

    Type of successful value produced by the task

  17. case class Text(value: String) extends Elem[Nothing] with Product with Serializable

    A text node

Value Members

  1. def pure[Model](model: Model): (Model, Cmd[Nothing])
  2. object Attr
  3. object Cmd
  4. object Elem
  5. object Html
  6. object Scalm
  7. object Style extends Serializable
  8. object Sub
  9. object Task

Inherited from AnyRef

Inherited from Any

Ungrouped