Expresso.Presenter.Commands (expresso v0.1.0)

Copy Markdown View Source

Makes the commands of the presenter DSL

Expresso.Presenter.Extension imports these functions into a module that uses Expresso.Presenter.Dsl. Each function returns one command of Expresso.Presenter.Definition, so step(1) returns {:step, 1}. The section "The commands" of Expresso.Presenter.Definition tells what each command does.

Expresso.Presenter.Verifier makes sure of each field and each value when the module compiles.

Summary

Functions

Add the key to a field, such as the typed digits

Set a field to a value of the current entry of the list of the steps

Call a built-in function of the browser

Set a field to its first value

Return the symbol of the number of columns of the overview, with a sign

Set a field that holds the index of a step to the value of another such field

Return a value of the current entry of the list of the steps, for assign/2

Go to the step at the index that a field holds

Go to step 1 of the slide that the typed digits give, and remove the digits

Go to the step at an index in the deck, or to step 1 of last_slide/0

Go to step 1 of a slide, or of the selected slide with :selected

Return the symbol of the last slide

Move a field that holds the index of a step by a number of steps

Select a slide in the overview

Move the selection in the overview by a number of slides, or by columns/1

Set a field to a value

Move forward or back by a number of steps

Change a field from true to false, or from false to true

Functions

append(field)

@spec append(:digits) :: Expresso.Presenter.Definition.command()

Add the key to a field, such as the typed digits

assign(field, value)

@spec assign(:selected, {:entry, :slide}) :: Expresso.Presenter.Definition.command()

Set a field to a value of the current entry of the list of the steps

iex> Expresso.Presenter.Commands.assign(:selected, Expresso.Presenter.Commands.entry(:slide))
{:assign, :selected, {:entry, :slide}}

builtin(name)

@spec builtin(:open_speaker | :fullscreen | :reset_timer | :switch_scheme) ::
  Expresso.Presenter.Definition.command()

Call a built-in function of the browser

clear(field)

Set a field to its first value

columns(sign)

@spec columns(1 | -1) :: {:columns, 1 | -1}

Return the symbol of the number of columns of the overview, with a sign

Expresso.Presenter.Program changes it into a number for each deck.

copy(to, from)

Set a field that holds the index of a step to the value of another such field

entry(key)

@spec entry(:slide) :: {:entry, :slide}

Return a value of the current entry of the list of the steps, for assign/2

go(field)

Go to the step at the index that a field holds

go_typed()

Go to step 1 of the slide that the typed digits give, and remove the digits

goto(index)

@spec goto(non_neg_integer() | :last_slide) :: Expresso.Presenter.Definition.command()

Go to the step at an index in the deck, or to step 1 of last_slide/0

goto_slide(slide)

@spec goto_slide(pos_integer() | :selected) :: Expresso.Presenter.Definition.command()

Go to step 1 of a slide, or of the selected slide with :selected

last_slide()

@spec last_slide() :: :last_slide

Return the symbol of the last slide

Expresso.Presenter.Program changes it into a number for each deck.

move(field, count)

Move a field that holds the index of a step by a number of steps

select(slide)

@spec select(pos_integer() | :last_slide) :: Expresso.Presenter.Definition.command()

Select a slide in the overview

select_by(count)

@spec select_by(integer() | {:columns, 1 | -1}) ::
  Expresso.Presenter.Definition.command()

Move the selection in the overview by a number of slides, or by columns/1

set(field, value)

Set a field to a value

step(count)

Move forward or back by a number of steps

toggle(field)

Change a field from true to false, or from false to true