reactify

package reactify

Members list

Packages

package reactify.bind
package reactify.group

Type members

Classlikes

class Channel[T] extends Reactive[T], Mutable[T]

Channel is a stateless Reactive implementation exposing a public method to fire values.

Channel is a stateless Reactive implementation exposing a public method to fire values.

Type parameters

T

the type of value this Reactive receives

Attributes

Companion
object
Supertypes
trait Mutable[T]
trait Reactive[T]
class Object
trait Matchable
class Any
Known subtypes
class ChannelGroup[T]
class Trigger
object Channel

Attributes

Companion
class
Supertypes
class Object
trait Matchable
class Any
Self type
Channel.type
class Dep[T, R] extends Reactive[T], Stateful[T], Mutable[T]

Dep allows creation of a dependent Var on another Var allowing conversion between the two. This can be useful for different representations of the same value. For example, in a graphical environment left, center, and right are all different representations of the value (horizontal position). Maintaining three distinct values while keeping them in-sync is painful. With Dep you can simply define one Var and two Dep values like:

Dep allows creation of a dependent Var on another Var allowing conversion between the two. This can be useful for different representations of the same value. For example, in a graphical environment left, center, and right are all different representations of the value (horizontal position). Maintaining three distinct values while keeping them in-sync is painful. With Dep you can simply define one Var and two Dep values like:

val left: Var[Double] = Var(0.0) val width: Var[Double] = Var(0.0) val center: Dep[Double, Double] = Dep(left)(_ + (width / 2.0), _ - (width / 2.0)) val right: Dep[Double, Double] = Dep(left)(_ + width, _ - width)

Now, modification to left, center, or right will maintain the appropriate value for each without any additional boilerplate.

Type parameters

R

the type that this Dep receives

T

the type of value this Reactive receives

Attributes

Companion
object
Supertypes
trait Mutable[T]
trait Stateful[T]
trait Reactive[T]
class Object
trait Matchable
class Any
Show all
object Dep

Attributes

Companion
class
Supertypes
class Object
trait Matchable
class Any
Self type
Dep.type
implicit class ListVar[T](v: Var[List[T]])

Syntactic sugar for mutating collections in a Var

Syntactic sugar for mutating collections in a Var

Attributes

Supertypes
class Object
trait Matchable
class Any
trait Mutable[T]

Mutable represents a reactive element that has mutable state

Mutable represents a reactive element that has mutable state

Attributes

Supertypes
class Object
trait Matchable
class Any
Known subtypes
class Channel[T]
class ChannelGroup[T]
class Trigger
class Dep[T, R]
class Var[T]
class VarGroup[T]
Show all
object Priority

Convenience values for Priorities

Convenience values for Priorities

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type
Priority.type
trait Reactive[T]

Reactive is the core trait for Reactify. The basic premise is that a Reactive represents an instance that can attach Reactions and fire T and are received by those Reactions.

Reactive is the core trait for Reactify. The basic premise is that a Reactive represents an instance that can attach Reactions and fire T and are received by those Reactions.

Type parameters

T

the type of value this Reactive receives

Attributes

Companion
object
Supertypes
class Object
trait Matchable
class Any
Known subtypes
class Channel[T]
class ChannelGroup[T]
class Trigger
class Dep[T, R]
trait Stateful[T]
class StatefulGroup[T]
class Val[T]
class ValGroup[T]
class Var[T]
class VarGroup[T]
Show all
object Reactive

Attributes

Companion
trait
Supertypes
class Object
trait Matchable
class Any
Self type
Reactive.type
trait Stateful[T] extends Reactive[T]

Attributes

Supertypes
trait Reactive[T]
class Object
trait Matchable
class Any
Known subtypes
class StatefulGroup[T]
class Dep[T, R]
class Val[T]
class ValGroup[T]
class Var[T]
class VarGroup[T]
Show all
class Trigger extends Channel[Unit]

Trigger is a convenience class wrapping Channel[Unit] specifically for scenarios where the value doesn't matter, just the reactions themselves.

Trigger is a convenience class wrapping Channel[Unit] specifically for scenarios where the value doesn't matter, just the reactions themselves.

Attributes

Companion
object
Supertypes
class Channel[Unit]
trait Mutable[Unit]
trait Reactive[Unit]
class Object
trait Matchable
class Any
Show all
object Trigger

Attributes

Companion
class
Supertypes
class Object
trait Matchable
class Any
Self type
Trigger.type
class Val[T] extends Reactive[T], Stateful[T]

Attributes

Companion
object
Supertypes
trait Stateful[T]
trait Reactive[T]
class Object
trait Matchable
class Any
Known subtypes
class ValGroup[T]
class Var[T]
class VarGroup[T]
object Val

Attributes

Companion
class
Supertypes
class Object
trait Matchable
class Any
Self type
Val.type
class Var[T] extends Val[T], Mutable[T]

Var represents the combination of Val and Channel into a stateful and mutable underlying value.

Var represents the combination of Val and Channel into a stateful and mutable underlying value.

Type parameters

T

the type of value this Reactive receives

Attributes

Companion
object
Supertypes
trait Mutable[T]
class Val[T]
trait Stateful[T]
trait Reactive[T]
class Object
trait Matchable
class Any
Show all
Known subtypes
class VarGroup[T]
object Var

Attributes

Companion
class
Supertypes
class Object
trait Matchable
class Any
Self type
Var.type
implicit class VectorVar[T](v: Var[Vector[T]])

Attributes

Supertypes
class Object
trait Matchable
class Any

Implicits

Implicits

final implicit def ListVar[T](v: Var[List[T]]): ListVar[T]

Syntactic sugar for mutating collections in a Var

Syntactic sugar for mutating collections in a Var

Attributes

final implicit def VectorVar[T](v: Var[Vector[T]]): VectorVar[T]
implicit def stateful2Value[T](v: Stateful[T]): T