TraceGeneratingView

o1.gui.viewimpl.default.immutable.TraceGeneratingView
trait TraceGeneratingView[Model <: Matchable, TraceData] extends Controls[Model], GeneratesTrace[Model, TraceData]

Attributes

Graph
Supertypes
trait GeneratesTrace[Model, TraceData]
trait Controls[Model]
trait Fast
class Object
trait Matchable
class Any
Show all
Known subtypes
class Traced[TraceData]
class Traced[TraceData]

Members list

Value members

Concrete methods

override def isDone(state: Model): Boolean

Determines if the given state is a “done state” for the view. This implementation delegates to the underlying View that is being traced.

Determines if the given state is a “done state” for the view. This implementation delegates to the underlying View that is being traced.

Parameters

state

a state of the model (possibly a done state)

Attributes

Definition Classes
def makePic(state: Model): Pic

Returns a Pic that graphically represents the current state of the view’s model object. This implementation delegates to the underlying View that is being traced.

Returns a Pic that graphically represents the current state of the view’s model object. This implementation delegates to the underlying View that is being traced.

Parameters

state

a state of the model to be displayed

Attributes

override def onClick(state: Model, position: Pos): Model

Handles a GUI event and adds it to the view’s trace. Delegates the actual event-handling to the corresponding method on the underlying View that is being traced.

Handles a GUI event and adds it to the view’s trace. Delegates the actual event-handling to the corresponding method on the underlying View that is being traced.

Attributes

Definition Classes
override def onClick(state: Model, event: MouseClicked): Model

Handles a GUI event and adds it to the view’s trace. Delegates the actual event-handling to the corresponding method on the underlying View that is being traced.

Handles a GUI event and adds it to the view’s trace. Delegates the actual event-handling to the corresponding method on the underlying View that is being traced.

Attributes

Definition Classes
override def onKeyDown(state: Model, key: Key): Model

Handles a GUI event and adds it to the view’s trace. Delegates the actual event-handling to the corresponding method on the underlying View that is being traced.

Handles a GUI event and adds it to the view’s trace. Delegates the actual event-handling to the corresponding method on the underlying View that is being traced.

Attributes

Definition Classes
override def onKeyDown(state: Model, event: KeyPressed): Model

Handles a GUI event and adds it to the view’s trace. Delegates the actual event-handling to the corresponding method on the underlying View that is being traced.

Handles a GUI event and adds it to the view’s trace. Delegates the actual event-handling to the corresponding method on the underlying View that is being traced.

Attributes

Definition Classes
override def onKeyUp(state: Model, key: Key): Model

Handles a GUI event and adds it to the view’s trace. Delegates the actual event-handling to the corresponding method on the underlying View that is being traced.

Handles a GUI event and adds it to the view’s trace. Delegates the actual event-handling to the corresponding method on the underlying View that is being traced.

Attributes

Definition Classes
override def onKeyUp(state: Model, event: KeyReleased): Model

Handles a GUI event and adds it to the view’s trace. Delegates the actual event-handling to the corresponding method on the underlying View that is being traced.

Handles a GUI event and adds it to the view’s trace. Delegates the actual event-handling to the corresponding method on the underlying View that is being traced.

Attributes

Definition Classes
override def onMouseDown(state: Model, position: Pos): Model

Handles a GUI event and adds it to the view’s trace. Delegates the actual event-handling to the corresponding method on the underlying View that is being traced.

Handles a GUI event and adds it to the view’s trace. Delegates the actual event-handling to the corresponding method on the underlying View that is being traced.

Attributes

Definition Classes
override def onMouseDown(state: Model, event: MousePressed): Model

Handles a GUI event and adds it to the view’s trace. Delegates the actual event-handling to the corresponding method on the underlying View that is being traced.

Handles a GUI event and adds it to the view’s trace. Delegates the actual event-handling to the corresponding method on the underlying View that is being traced.

Attributes

Definition Classes
override def onMouseDrag(state: Model, position: Pos): Model

Handles a GUI event and adds it to the view’s trace. Delegates the actual event-handling to the corresponding method on the underlying View that is being traced.

Handles a GUI event and adds it to the view’s trace. Delegates the actual event-handling to the corresponding method on the underlying View that is being traced.

Attributes

Definition Classes
override def onMouseDrag(state: Model, event: MouseDragged): Model

Handles a GUI event and adds it to the view’s trace. Delegates the actual event-handling to the corresponding method on the underlying View that is being traced.

Handles a GUI event and adds it to the view’s trace. Delegates the actual event-handling to the corresponding method on the underlying View that is being traced.

Attributes

Definition Classes
override def onMouseEnter(state: Model, event: MouseEntered): Model

Handles a GUI event and adds it to the view’s trace. Delegates the actual event-handling to the corresponding method on the underlying View that is being traced.

Handles a GUI event and adds it to the view’s trace. Delegates the actual event-handling to the corresponding method on the underlying View that is being traced.

Attributes

Definition Classes
override def onMouseExit(state: Model, event: MouseExited): Model

Handles a GUI event and adds it to the view’s trace. Delegates the actual event-handling to the corresponding method on the underlying View that is being traced.

Handles a GUI event and adds it to the view’s trace. Delegates the actual event-handling to the corresponding method on the underlying View that is being traced.

Attributes

Definition Classes
override def onMouseMove(state: Model, position: Pos): Model

Handles a GUI event and adds it to the view’s trace. Delegates the actual event-handling to the corresponding method on the underlying View that is being traced.

Handles a GUI event and adds it to the view’s trace. Delegates the actual event-handling to the corresponding method on the underlying View that is being traced.

Attributes

Definition Classes
override def onMouseMove(state: Model, event: MouseMoved): Model

Handles a GUI event and adds it to the view’s trace. Delegates the actual event-handling to the corresponding method on the underlying View that is being traced.

Handles a GUI event and adds it to the view’s trace. Delegates the actual event-handling to the corresponding method on the underlying View that is being traced.

Attributes

Definition Classes
override def onMouseUp(state: Model, position: Pos): Model

Handles a GUI event and adds it to the view’s trace. Delegates the actual event-handling to the corresponding method on the underlying View that is being traced.

Handles a GUI event and adds it to the view’s trace. Delegates the actual event-handling to the corresponding method on the underlying View that is being traced.

Attributes

Definition Classes
override def onMouseUp(state: Model, event: MouseReleased): Model

Handles a GUI event and adds it to the view’s trace. Delegates the actual event-handling to the corresponding method on the underlying View that is being traced.

Handles a GUI event and adds it to the view’s trace. Delegates the actual event-handling to the corresponding method on the underlying View that is being traced.

Attributes

Definition Classes
override def onTick(previousState: Model): Model

Handles a clock tick and adds it to the view’s trace. Delegates the actual event-handling to the corresponding method on the underlying View that is being traced.

Handles a clock tick and adds it to the view’s trace. Delegates the actual event-handling to the corresponding method on the underlying View that is being traced.

Attributes

Definition Classes
override def onTick(previousState: Model, time: Long): Model

Handles a clock tick and adds it to the view’s trace. Delegates the actual event-handling to the corresponding method on the underlying View that is being traced.

Handles a clock tick and adds it to the view’s trace. Delegates the actual event-handling to the corresponding method on the underlying View that is being traced.

Attributes

Definition Classes
override def onType(state: Model, character: Char): Model

Handles a GUI event and adds it to the view’s trace. Delegates the actual event-handling to the corresponding method on the underlying View that is being traced.

Handles a GUI event and adds it to the view’s trace. Delegates the actual event-handling to the corresponding method on the underlying View that is being traced.

Attributes

Definition Classes
override def onType(state: Model, event: KeyTyped): Model

Handles a GUI event and adds it to the view’s trace. Delegates the actual event-handling to the corresponding method on the underlying View that is being traced.

Handles a GUI event and adds it to the view’s trace. Delegates the actual event-handling to the corresponding method on the underlying View that is being traced.

Attributes

Definition Classes
override def onWheel(state: Model, rotation: Int): Model

Handles a GUI event and adds it to the view’s trace. Delegates the actual event-handling to the corresponding method on the underlying View that is being traced.

Handles a GUI event and adds it to the view’s trace. Delegates the actual event-handling to the corresponding method on the underlying View that is being traced.

Attributes

Definition Classes
override def onWheel(state: Model, event: MouseWheelMoved): Model

Handles a GUI event and adds it to the view’s trace. Delegates the actual event-handling to the corresponding method on the underlying View that is being traced.

Handles a GUI event and adds it to the view’s trace. Delegates the actual event-handling to the corresponding method on the underlying View that is being traced.

Attributes

Definition Classes
override def sound(state: Model): Option[Sound]

Determines whether the view should play a sound, given a state of its model. This implementation delegates to the underlying underlying View that is being traced.

Determines whether the view should play a sound, given a state of its model. This implementation delegates to the underlying underlying View that is being traced.

Parameters

state

a state of the model

Attributes

Definition Classes

Inherited methods

final override def isPaused: Boolean

Indicates whether the view is paused. This implementation delegates to the underlying View that is being traced.

Indicates whether the view is paused. This implementation delegates to the underlying View that is being traced.

Attributes

Definition Classes
Inherited from:
GeneratesTrace
final override def onStop(): Unit

Causes an additional effect when the view is stopped (with stop()). This implementation delegates to the underlying View that is being traced. In addition, if the traced view had been started with startAndGet and reaches its tick limit before being done, this method causes the returned future to complete with a failure.

Causes an additional effect when the view is stopped (with stop()). This implementation delegates to the underlying View that is being traced. In addition, if the traced view had been started with startAndGet and reaches its tick limit before being done, this method causes the returned future to complete with a failure.

Attributes

Definition Classes
Inherited from:
GeneratesTrace
final def simulateAndGet(tickLimit: Int): Seq[(TraceData, TraceEvent)]

Simulates this trace-generating view with simulate and returns the resulting trace. This is equivalent to calling first simulate, then trace. See also startAndGet.

Simulates this trace-generating view with simulate and returns the resulting trace. This is equivalent to calling first simulate, then trace. See also startAndGet.

Parameters

tickLimit

the maximum number of ticks to simulate; Int.MaxValue (which is the default) means there is no such limit

Attributes

Inherited from:
GeneratesTrace
final def startAndGet(tickLimit: Long): Future[Seq[(TraceData, TraceEvent)]]

Starts this trace-generating view with start and returns a Future that evaluates to the resulting trace. The Future succeeds when the view is done; if the view isn’t done after a given number of clock ticks, the Future fails with TraceAborted, producing a partial trace. See also simulateAndGet.

Starts this trace-generating view with start and returns a Future that evaluates to the resulting trace. The Future succeeds when the view is done; if the view isn’t done after a given number of clock ticks, the Future fails with TraceAborted, producing a partial trace. See also simulateAndGet.

Parameters

tickLimit

the maximum number of ticks to process before the future completes with a failure; defaults to Long.MaxValue

Attributes

Inherited from:
GeneratesTrace
final override def toString: String

Returns a brief textual description of the view.

Returns a brief textual description of the view.

Attributes

Definition Classes
Inherited from:
GeneratesTrace
final def trace: Seq[(TraceData, TraceEvent)]

Returns a trace of the events processed by this view. The trace comes in a collection of pairs, each of which is composed of a TraceData value that describes at the time of the event and a TraceEvent value that describes the event itself.

Returns a trace of the events processed by this view. The trace comes in a collection of pairs, each of which is composed of a TraceData value that describes at the time of the event and a TraceEvent value that describes the event itself.

Attributes

Inherited from:
GeneratesTrace
final def traced: Traced[Model]

Returns a View that stores a trace of the ticks and GUI events that its event handlers process. This parameterless method stores, at each event, the (immutable) state of the View’s model. This is equivalent to calling tracedWith and passing in identity.

Returns a View that stores a trace of the ticks and GUI events that its event handlers process. This parameterless method stores, at each event, the (immutable) state of the View’s model. This is equivalent to calling tracedWith and passing in identity.

Attributes

Inherited from:
Controls
final def tracedPics: Traced[Pic]

Returns a View that stores a pictorial trace of the ticks and GUI events that the View’s event handlers process. This is equivalent to calling tracedWith and passing in the View’s makePic method.

Returns a View that stores a pictorial trace of the ticks and GUI events that the View’s event handlers process. This is equivalent to calling tracedWith and passing in the View’s makePic method.

Attributes

Inherited from:
Controls

Inherited and Abstract methods

Attributes

Inherited from:
Controls (hidden)
def start(): Unit

Attributes

Inherited from:
Controls (hidden)