mirror of
https://github.com/slint-ui/slint.git
synced 2025-08-04 18:58:36 +00:00
Add link to the examples from the sixtyfps-viewer README
This commit is contained in:
parent
8fec471785
commit
f8c00b19b5
2 changed files with 8 additions and 3 deletions
|
@ -1,6 +1,6 @@
|
|||
# SixtyFPS Bash example
|
||||
|
||||
This shows how to use `sixtyfps-viewer` to display dialog from a bash script.
|
||||
This shows how to use [`sixtyfps-viewer`](../../tools/viewer) to display dialog from a bash script.
|
||||
|
||||
This assume that the `sixtyfps-viewer` tool is in patch. This can be achieved with cargo install.
|
||||
(use the `--path tools/viewer` option to install it from the current repository.)
|
||||
|
|
|
@ -41,14 +41,14 @@ Example: Imagine we have a myfile.60 looking like this:
|
|||
|
||||
```60
|
||||
MyApp := Window {
|
||||
callback open-url(string)
|
||||
callback open-url(string);
|
||||
//...
|
||||
}
|
||||
```
|
||||
|
||||
It is possible to make the `open-url` callback to execute a command by doing
|
||||
|
||||
```
|
||||
```bash
|
||||
sixtyfps-viewer --on open-url 'xdg-open $1' myfile.60
|
||||
```
|
||||
|
||||
|
@ -73,3 +73,8 @@ The program returns with the following error code:
|
|||
- If a Dialog is closed with the "Ok" or "Closed" or "Yes" button, the exit code will be *0*
|
||||
- If a Dialog is closed with the "Cancel" or "No" button, or using the close button in the window
|
||||
title bar, the exit code will be *1*
|
||||
|
||||
## Examples
|
||||
|
||||
`sixtyfps-viewer` can be used to display an GUI from a shell script.
|
||||
We have [a few examples](https://github.com/sixtyfpsui/sixtyfps/tree/master/examples/bash)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue