Commit graph

79 commits

Author SHA1 Message Date
Olivier Goffart
88f9d0aed5 Slint docs style cleanups
- refresh copyright
 - link to slint-ui.com
 - add footer icons
2023-03-23 12:23:31 +01:00
Simon Hausmann
4af7ea8ab7 Switch to the Furo theme for the Slint Language and C++ documentation 2023-03-23 09:34:16 +01:00
Tobias Hunger
1f877887cd docs: Remove builtin_ prefix from files in builtins dir 2023-02-24 12:04:22 +01:00
Simon Hausmann
ecb7819e9b doc: Fix links from C++ docs to the Slint Language Documentation
Fix paths and use HTML anchors, as the markdown links won't turn into
links as the files don't exist yet in that location.
2023-02-23 15:21:04 +01:00
Simon Hausmann
7e843a30d8 doc: Move the recipes into the Slint Language Documentation 2023-02-23 14:20:10 +01:00
Tobias Hunger
39d215bee0 docs: Rename "Slint language Reference" to "Slint Language Documentation" 2023-02-22 21:13:47 +01:00
Tobias Hunger
78892cdf1f docs: Fix broken links in our docs. 2023-02-22 17:08:30 +01:00
Tobias Hunger
96f75bdd0c
docs: Rework the rust part of the documentation (#2240)
Co-authored-by: Simon Hausmann <hausmann@gmail.com>
2023-02-20 21:06:05 +01:00
Tobias Hunger
1a31c9a50b
docs: Polish the C++ docs (#2229) 2023-02-15 15:47:45 +01:00
Tobias Hunger
d93445bd0b docs: Remove inline langref documentation and link the mdbook
For node and cpp, I use relative links to point to the slint language
reference documentation.

For the slint crate documentation I create a link to
https://slint-ui.com/releases/VERSION/... instead: This needs to work from
docs.rs as well as from our own docs area on slint-ui.com! That is
pretty ugly: I can not even define constants for this as the crate docs
need to come before anything else.
2023-02-07 12:10:07 +01:00
ogoffart
e7f48512ee Bump version number to 1.0.0 2023-02-03 11:07:15 +01:00
Simon Hausmann
7e02fa8b6a Update the syntax used in the different documentation entries and README 2023-01-25 09:54:50 +01:00
Simon Hausmann
25a71afa53 doc: fix missing types mapping table in C++ 2023-01-11 15:40:51 +01:00
Simon Hausmann
3c65c6177d Fix C++ memory game tutorial not starting out of the box on Windows
After commit 3e5aa212d5 the Slint DLLs
aren't placed in the `bin/` directory by default anymore. Since the
tutorial builds Slint as an external sub-project, it is entirely
isolated and the CMAKE_*_OUTPUT_DIRECTORY variables do not propagate. On
macOS and Linux, the program still runs due to rpath. On Windows, the
instructions said to put `bin` into `%PATH%`, but that doesn't work
anymore, the dll is now in `_deps/slint-build`.

Instead of adjusting `%PATH%`, this change adjusts the documentation to
recommend the use of a custom command on Windows using
$<TARGET_RUNTIME_DLLS:tgt> to copy the DLL across. This is guarded with
WIN32 due to https://gitlab.kitware.com/cmake/cmake/-/issues/23543 ,
where the proposed solution requires CMake 3.26 (not released yet).
2023-01-09 13:30:13 +01:00
ogoffart
ce07d078ce Bump version number to 0.3.4 2022-12-16 09:36:15 +00:00
ogoffart
fb02b4118b Bump version number to 0.3.3 2022-11-28 13:11:11 +00:00
Simon Hausmann
d8a1f2cf01 Introduce a rem unit in the type system
This allows specifying font sizes relative to the Window's
default-font-size, similar to CSS rem.
2022-11-24 11:33:38 +01:00
Olivier Goffart
f1c96a391c C++ docs: mention we need to set the PATH 2022-11-10 07:45:08 +01:00
Simon Hausmann
a1f9e39054 doc: prospective fix for rendering of example snippet in C++ generated code docs
The sample component in the docs has nothing to see, disable preview.
2022-11-02 09:54:03 +01:00
Simon Hausmann
34b39a2a60 Remove slint::testing from the C++ API Docs
We already avoid parsing `slint_testing.h`. But we have a variant of
`send_keyboard_string_sequence` in `slint_interpreter.h` because the
function takes a ComponentInstance. Exclude all symbols from that
namespace from the docs to continue the intent.
2022-11-01 15:34:35 +01:00
ogoffart
2171773a3e Bump version number to 0.3.2 2022-10-28 09:30:14 +00:00
Simon Hausmann
5e4abec477 Add a backends section to the CMake docs
That's derived from the backends section of the Slint API crate (Cargo.toml)
2022-09-22 12:56:18 +02:00
ogoffart
261614b914 Bump version number to 0.3.1 2022-09-15 14:39:51 +02:00
Simon Hausmann
8556ad0864 Refer to the release/0.3 branch instead of release/0.2 for the CMake docs 2022-09-14 15:45:16 +02:00
Simon Hausmann
012dc34975 Remove the Rust and C++ migration guides from the documentation 2022-09-09 16:53:49 +02:00
Olivier Goffart
8850959a2c Rename the backend feature flags 2022-09-07 17:11:57 +02:00
ogoffart
05a49da906 Bump version number to 0.3.0 2022-09-06 13:00:22 +02:00
Simon Hausmann
a7121a6177 Remove erroneous mention of SLINT_FEATURE_EVENTLOOP_WINIT_ALL
We used to have SLINT_FEATURE_BACKEND_GL_ALL, but when we introduced the
renderer and event loop distinction in the features, we removed the "all" suffix from
the event loop that includes x11 and wayland support.
2022-09-01 11:25:49 +02:00
Simon Hausmann
3619989fcc Rename backend feature flags to accomodate more renderers
Split backend-gl-* into eventloop-winit-* and renderer-femtovg.

The old feature names are still available.

For consistency eventloop-qt and renderer-qt are aliases for backend-qt.
2022-07-26 17:43:51 +02:00
Simon Hausmann
fe3d4b7177 Bump MSRV to 1.60 2022-07-26 09:20:52 +02:00
Olivier Goffart
0c7ad1aa41 Unpin the markdown dep
Because https://github.com/ryanfox/sphinx-markdown-tables/issues/36 was
fixed, and now the workaround is actually causing an error
2022-07-25 12:03:43 +02:00
Olivier Goffart
dd5adebcdc C++ docs: pin the markdown version to fix build error in CI:
```
Extension error (sphinx_markdown_tables):
    Handler <function process_tables at 0x7fcce7e1dc10> for event 'source-read' threw an exception (exception: __init__() missing 1 required positional argument: 'config')
```
2022-07-18 15:51:14 +02:00
Olivier Goffart
ec483e500e Pin all pythin depeds in order to attempt to fix the C++ docs 2022-07-18 15:24:58 +02:00
Simon Hausmann
0b118577da
Pin markdown tables extension
There was an api change, so pin to the previous version for now.

Prospective fix for nightly build failure.

We should probably pin all dependencies (at least semver style) - it’s a miracle this hasn’t broken earlier :)
2022-07-16 09:30:37 +02:00
ogoffart
6b15d2e479 Bump version number to 0.2.6 2022-07-06 09:58:14 +00:00
Olivier Goffart
9fa59d38cd Generate the enum documentation based of the common/enums.rs
So that makes it harder to forget to update the docs

Note that the new builtin_enums.md does not contain a `### Values`
section header anymore. Also some enum where documented with the full
enum value (such as `TextHorizontalAlignment.left`) while now this
is omitted

The CI should fail if one forget to run `cargo xtask enumdocs` after
adding an enum or changing the docs
2022-05-13 13:15:51 +02:00
ogoffart
3709ded44d Bump version number to 0.2.5 2022-05-09 16:16:00 +00:00
ogoffart
c160ec2aef Bump version number to 0.2.4 2022-05-09 13:49:25 +00:00
ogoffart
6395cdfc09 Bump version number to 0.2.3 2022-05-04 12:32:58 +00:00
Olivier Goffart
452bc2a696 Update MSRV to rust 1.59 in the CI and documentation
This is only required for dependencies of slint-build and xtask.
So this is not enforced yet and will still work with 1.56 with
for C++ or when not using slint-build.
2022-04-14 19:18:05 +02:00
Simon Hausmann
4c88b2b19b Start a page with examples and recipes
This is the beginning of a page to collect common things users need to
do, in a format that they can copy & paste into their application code.

There's a lot more that could be done though.
2022-04-04 10:01:26 +02:00
Simon Hausmann
ed5b76e7fc Improve syntax highlighting in the language reference
Highlight all Slint code and don't do the preview on snippets where it
doesn't make sense.

Some snippets, such as the bare statement or expression snippets, are
now highlighted, but they are continued to be excluded from the doctest.
2022-04-04 09:58:09 +02:00
Simon Hausmann
9582168d94 Fix broken links to C++ types in C++ Type mapping documentation
The links to slint::Color (and other types) was coded to their direct
.html file name, so for example classslint_1_1_color.html.
Unfortunately in the CI the class name became classslint_1_1color.html
and therefore the links on our website were broken.

Now my-st parser has a way of resolving links in markdown to references,
basically {cpp:class}`slint::Color`. Unfortunately that link resolution
is not working when used inside markdown tables.

Therefore this patch converts the entire table to restructured text,
where we can use native references to hopefully always generate the
correct links, regardless of the doxygen/breathe/exhale version.
2022-03-31 21:48:27 +02:00
Simon Hausmann
b34f733716 Point C++ users to the new release/0.2 branch
That way version upgrades to new patch release become easier.
2022-03-10 11:08:58 +01:00
ogoffart
7b50791db4 Bump version number to 0.2.2 2022-03-10 08:48:33 +00:00
Olivier Goffart
3b2b1c92a4 Update version number in docs and readmes
```
sed --follow-symlinks -i 's/^\(slint.*\) = ".*"/\1 = "0.2.1"/' **/*.rs **/*.md
sed --follow-symlinks -i 's/GIT_TAG v.*$/GIT_TAG v0.2.1/' **/*.md
```
2022-03-10 08:46:16 +01:00
ogoffart
ecd0fb7ecd Bump version number to 0.2.1 2022-02-10 16:25:28 +01:00
Olivier Goffart
e429968a15 Update version number in the docs 2022-02-09 17:08:19 +01:00
Olivier Goffart
567b54501a Upate the links to the templates repository
Also update a few more links and reference to slint in the readme
I know this means that we will have invalid links and instructions until the release,
but the instructions are already broken anyway
2022-02-09 15:49:18 +01:00
Olivier Goffart
3d209287c2 Docs: add a note that only exported global from the main file are exposed 2022-02-09 14:49:20 +01:00