Skip to content

Commit

Permalink
Documentation pass
Browse files Browse the repository at this point in the history
  • Loading branch information
mnemnion committed Mar 15, 2024
1 parent 83040f5 commit c74cd71
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
fail-fast: false
matrix:
version:
- '1.0'
- '1.6'
- '1.9'
- 'nightly'
os:
Expand Down
12 changes: 10 additions & 2 deletions docs/src/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ request(menu) = menu # it's how the sausage is made

## Using ToggleMenu

Like any other TerminalMenu, a ToggleMenu is launched with `request`.
Like any other TerminalMenu, a ToggleMenu is launched with [`request`](@extref
`REPL.TerminalMenus.request`).

```@repl tgm1
request(menu)
Expand Down Expand Up @@ -88,7 +89,7 @@ is useful for interactively writing code to put the menu into the desired initia
state.

Note that `charset=:unicode` is one of the [configurations](@extref
`REPL.TerminalMenus.config`) for `TerminalMenus`. Any such keyword arguments are passed
`REPL.TerminalMenus.Config`) for `TerminalMenus`. Any such keyword arguments are passed
through to `TerminalMenus`, except for `ToggleMenu`-specific ones, and `cursor`, which
we override. Custom configurations are always passed to the `ToggleMenuMaker`, not to
the menu itself.
Expand All @@ -110,6 +111,13 @@ overloaded methods of [`request`](@extref `REPL.TerminalMenus.request`) defined
toggle menus. This allows user functions to change the cursor line directly, in a way
which the menu code understands.

In the case where the header of the menu should be custom to each menu, pass that first:

```@example tgm2
otherheader = "A different header, select [a], [b], [c]"
template(otherheader, options, selections)
```

### Settings and Icons

Settings provide the possible states for any menu option. They have to be a
Expand Down
2 changes: 1 addition & 1 deletion src/ToggleMenus.jl
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ with further arguments to create one.
return `true`.
Other keyword arguments are passed through to [`TerminalMenus.Config`](@extref
`REPL.TerminalMenus.config`), and may be used to configure aspects of menu presentation
`REPL.TerminalMenus.Config`), and may be used to configure aspects of menu presentation
and behavior.
The `ToggleMenuMaker` is callable to produce a [`ToggleMenu`](@ref).
Expand Down

0 comments on commit c74cd71

Please sign in to comment.