mirror of
https://github.com/slint-ui/slint.git
synced 2025-10-01 06:11:16 +00:00
Janitor: Fix warnings about markdown files
These might change the layout of the rendered markdown files. This will also fix some typos along the way:-)
This commit is contained in:
parent
13d7f5e7bd
commit
e01bd87df8
35 changed files with 216 additions and 243 deletions
|
@ -1,6 +1,6 @@
|
|||
# SixtyFPS-cpp
|
||||
|
||||
**A C++ UI toolkit**
|
||||
## A C++ UI toolkit
|
||||
|
||||
[SixtyFPS](https://sixtyfps.io/) is a UI toolkit that supports different programming languages.
|
||||
SixtyFPS.cpp is the C++ API to interact with a SixtyFPS UI from C++.
|
||||
|
@ -26,10 +26,10 @@ The recommended and most flexible way to use the C++ API is to build SixtyFPS fr
|
|||
|
||||
First you need to install the prerequisites:
|
||||
|
||||
* Install Rust by following the [Rust Getting Started Guide](https://www.rust-lang.org/learn/get-started). Once this is done,
|
||||
you should have the ```rustc``` compiler and the ```cargo``` build system installed in your path.
|
||||
* **cmake** (3.16 or newer)
|
||||
* A C++ compiler that supports C++17 (e.g., **MSVC 2019** on Windows)
|
||||
* Install Rust by following the [Rust Getting Started Guide](https://www.rust-lang.org/learn/get-started). Once this is done,
|
||||
you should have the ```rustc``` compiler and the ```cargo``` build system installed in your path.
|
||||
* **cmake** (3.16 or newer)
|
||||
* A C++ compiler that supports C++17 (e.g., **MSVC 2019** on Windows)
|
||||
|
||||
You can include SixtyFPS in your CMake project using CMake's `FetchContent` feature. Insert the following snippet into your
|
||||
`CMakeLists.txt` to make CMake download the latest release, compile it and make the CMake integration available:
|
||||
|
@ -65,16 +65,17 @@ rustup target add <target-name>
|
|||
Then you're ready to invoke CMake and you need to add `-DRust_CARGO_TARGET=<target name>` to the CMake command line.
|
||||
This ensures that the SixtyFPS library is built for the correct architecture.
|
||||
|
||||
|
||||
For example if you are building against an embedded Linux Yocto SDK targeting an ARM64 board, the following commands
|
||||
show how to compile:
|
||||
|
||||
Install the Rust targe toolchain once:
|
||||
|
||||
```sh
|
||||
rustup target add aarch64-unknown-linux-gnu
|
||||
```
|
||||
|
||||
Set up the environment and build:
|
||||
|
||||
```sh
|
||||
. /path/to/yocto/sdk/environment-setup-cortexa53-crypto-poky-linux
|
||||
cd sixtyfps
|
||||
|
|
|
@ -8,18 +8,18 @@ file. This header file will contain a `class` with the same name as the componen
|
|||
|
||||
This class will have the following public member functions:
|
||||
|
||||
- A default constructor and a destructor.
|
||||
- A `show` function, which will show the component on the screen. Note that in order to render
|
||||
and react to user input, it's still necessary to spin the event loop, by calling `sixtyfps::run_event_loop()`
|
||||
or using the convenience `fun` function in this class.
|
||||
- A `hide` function, which de-registers the component from the windowing system.
|
||||
- A `run` convenience function, which will show the component and starts the event loop.
|
||||
- for each properties:
|
||||
* A getter `get_<property_name>` returning the property type.
|
||||
* A setter `set_<property_name>` taking the new value of the property by const reference
|
||||
- for each callbacks:
|
||||
* `invoke_<callback_name>` function which takes the callback argument as parameter and call the callback.
|
||||
* `on_<callback_name>` functin wich takes a functor as an argument and sets the callback handler
|
||||
* A default constructor and a destructor.
|
||||
* A `show` function, which will show the component on the screen. Note that in order to render
|
||||
and react to user input, it's still necessary to spin the event loop, by calling `sixtyfps::run_event_loop()`
|
||||
or using the convenience `fun` function in this class.
|
||||
* A `hide` function, which de-registers the component from the windowing system.
|
||||
* A `run` convenience function, which will show the component and starts the event loop.
|
||||
* for each properties:
|
||||
* A getter `get_<property_name>` returning the property type.
|
||||
* A setter `set_<property_name>` taking the new value of the property by const reference
|
||||
* for each callbacks:
|
||||
* `invoke_<callback_name>` function which takes the callback argument as parameter and call the callback.
|
||||
* `on_<callback_name>` function which takes a functor as an argument and sets the callback handler
|
||||
for this callback. the functor must accept the type parameter of the callback
|
||||
|
||||
## Example
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue