slint/docs/tutorial
Tobias Hunger 018c1a6666 Rename ModelHandle to SharedModel
This patch is mostly a rename now, but also contains a few small
cleanups.

SharedModel implements the Model trait itself and gracefully falls back
to an empty model is no Model was provided. This allows for some small
simplifications.

Also make sure to use the same comparision for SharedModels everywhere.
This fixes the last remaining clippy errors we had.
2022-01-30 01:26:35 +01:00
..
cpp Change Model::row_data to return an Option<T> (#873) 2022-01-26 13:55:38 +01:00
rust Rename ModelHandle to SharedModel 2022-01-30 01:26:35 +01:00
theme Mass update copyright messages to be more REUSE compliant 2021-12-22 10:06:12 +01:00
.gitignore Initial conversion of the memory game tutorial to mdbook 2021-06-15 14:38:40 +02:00
README.md Janitor: Fix warnings about markdown files 2021-06-28 08:32:25 +02:00

Tutorials

The source code for the Rust and C++ versions of the Memory Game tutorial are located in the respect rust and cpp sub-directories. They are built using mdbook.

Requirements

Building the tutorial requires mdbook, which you can install with cargo:

cargo install mdbook

Building

To build the tutorial, go into either the rust or cpp sub-directory and run:

mdbook build

The output will be in the book/html subdirectory. To check it out, open it in your web browser.

Code Samples

The code in the tutorial is available in separate steps in .rs and .cpp files.

The .rs files are mapped to different binaries, so you if you change into the rust/src sub-directory, then cargo run will present you with binaries for the different steps.

The .cpp files are built using cpp/src/CMakeLists.txt, which is included from the top-level CMakeLists.txt.