# `Expresso.Presenter.Commands`
[🔗](https://github.com/rellen/expresso/blob/main/lib/expresso/presenter/commands.ex#L1)

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.

# `append`

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

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

# `assign`

```elixir
@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`

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

Call a built-in function of the browser

# `clear`

```elixir
@spec clear(Expresso.Presenter.Definition.field()) ::
  Expresso.Presenter.Definition.command()
```

Set a field to its first value

# `columns`

```elixir
@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`

```elixir
@spec copy(
  Expresso.Presenter.Definition.field(),
  Expresso.Presenter.Definition.field()
) ::
  Expresso.Presenter.Definition.command()
```

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

# `entry`

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

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

# `go`

```elixir
@spec go(Expresso.Presenter.Definition.field()) ::
  Expresso.Presenter.Definition.command()
```

Go to the step at the index that a field holds

# `go_typed`

```elixir
@spec go_typed() :: Expresso.Presenter.Definition.command()
```

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

# `goto`

```elixir
@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`

```elixir
@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`

```elixir
@spec last_slide() :: :last_slide
```

Return the symbol of the last slide

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

# `move`

```elixir
@spec move(Expresso.Presenter.Definition.field(), integer()) ::
  Expresso.Presenter.Definition.command()
```

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

# `select`

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

Select a slide in the overview

# `select_by`

```elixir
@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`

```elixir
@spec set(Expresso.Presenter.Definition.field(), term()) ::
  Expresso.Presenter.Definition.command()
```

Set a field to a value

# `step`

```elixir
@spec step(integer()) :: Expresso.Presenter.Definition.command()
```

Move forward or back by a number of steps

# `toggle`

```elixir
@spec toggle(Expresso.Presenter.Definition.field()) ::
  Expresso.Presenter.Definition.command()
```

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

---

*Consult [api-reference.md](api-reference.md) for complete listing*
