Commit graph

279 commits

Author SHA1 Message Date
Simon Hausmann
26a63fcf22 Change example docs of global exports to use a re-export
That's the more typical use-case to also deal with name spaces, where
this is done at import time.

The modified test case tries to ensure that this also works.
2021-08-27 13:38:57 +02:00
Simon Hausmann
85259b21b6 Provide an example of global exporting in the language reference 2021-08-27 13:36:48 +02:00
Olivier Goffart
b07d52cd23 Support aliases to callbacks in globals 2021-08-24 12:36:16 +02:00
Simon Hausmann
cdca921469 Apply the default text color from the style for the color of Text and TextInput elements
We apply a default window background from the palette to all `Window`
elements, and likewise we need to apply the default text color to Text
elements to ensure a readable contrast.

This also fixes the default text color when using Qt/native style in
dark mode on macOS.
2021-08-23 15:03:18 +02:00
Marco Grassi
da1879f049 add missing opening html tag 2021-08-19 14:54:53 +02:00
Olivier Goffart
daddce2b5d Revert "Change the version number in docs-preview.html"
This reverts commit 84298fd95a.

The release is done, master branch now points to snapshots again
2021-08-19 10:47:13 +02:00
Olivier Goffart
84298fd95a Change the version number in docs-preview.html 2021-08-19 09:57:13 +02:00
Olivier Goffart
7c3555e280 Update the version number that shows in the documentation
It does not update the version number in the README because
these are either not part of the versionized documentation
or the demantic versioning make it work anyway
2021-08-19 09:57:13 +02:00
Tobias Hunger
c7d27d5ace Janitor: Fix clippy::redundant_clone 2021-08-18 00:24:51 +02:00
Tobias Hunger
aea4ecca99 Apply pre-commit hooks to all files 2021-08-17 22:38:16 +02:00
Olivier Goffart
c296a00286 Preview in documentation: make sure the preview is not duplicated for C++ 2021-08-13 13:27:03 +02:00
Olivier Goffart
f6e2b97aab Prospective fix for the double preview in the C++ docs 2021-08-12 20:37:31 +02:00
Olivier Goffart
ff441d3db6 Improve a bit the preview in the documentation with nightly rustdoc
The example are in a layout so "float:right" doesn't have an effect in that div
Instread, just put the preview inside the example.

This also remove the "Preview:" text
2021-08-12 13:57:36 +02:00
Olivier Goffart
bdeb64c518 Fix documentation preview and hightlighting of .60 code with nightly rustdoc
rustdoc changed the html generated. The code used to be in a `<code>`, now it is
in a `<pre>`
So this should wotk with both stable rust and nightly rust
2021-08-11 18:24:44 +02:00
Olivier Goffart
3b6b4442dd Apply suggestions from code review
Co-authored-by: Simon Hausmann <simon.hausmann@sixtyfps.io>
2021-08-10 22:21:01 +02:00
Olivier Goffart
8b2d1f1d8f Docs: replace underscores by dashes 2021-08-10 22:21:01 +02:00
ogoffart
53f286258c Bump version number to 0.1.1 2021-08-10 08:06:20 +00:00
Olivier Goffart
b6137ecbc4 Error when trying to use internal builtin items 2021-08-09 17:43:22 +02:00
Simon Hausmann
55056aec3b doc: Remove mention of the Clip element, as it has been replaced with a clip: true on a Rectangle a while ago 2021-08-09 13:06:59 +02:00
Tobias Hunger
b347642f28 Fix typos, grammar and formatting issues in the docs 2021-08-08 11:06:58 +02:00
Olivier Goffart
a89d83e58f Apply suggestions from code review
Co-authored-by: Simon Hausmann <simon.hausmann@sixtyfps.io>
2021-08-06 15:58:13 +02:00
Olivier Goffart
d41839abe3 Compiler pass for the TabWidget
it will lower the TabWidget into a TabWidgetImpl and the tabs into TabImpl
2021-08-06 15:58:13 +02:00
Simon Hausmann
045356bf58 Added links from the tutorials to the YouTube recording 2021-08-06 15:54:31 +02:00
Olivier Goffart
603c5df47a Building the doc no longer need nightly rust
Rust 1.54 has the feature that allow us to include markdown files
in the docs
2021-08-03 16:27:31 +02:00
Jocelyn Turcotte
85e2cfa54a Mention forward-focus in the FocusScope example
This makes the example a bit more useful out of the box,
at least to let the user know that this property exists.
2021-08-01 10:42:34 +02:00
Olivier Goffart
90cdb5ab5d Add a changed callback to Slider
Closes #125
2021-07-31 15:14:03 +02:00
Olivier Goffart
b0b3912c27 Add support for the visible property 2021-07-29 15:02:25 +02:00
Olivier Goffart
bd52f4d444 Allow the clip property to be a dynamic property 2021-07-29 15:02:25 +02:00
Simon Hausmann
14c6819791 Add support for icons in the Button widget
The icon in the gallery example was generated via https://emoji.aranja.com
2021-07-27 19:37:06 +02:00
Olivier Goffart
1360f1e26e Added icon property to the Window element 2021-07-20 16:34:19 +02:00
mwaitzman
7ac752c40b updated erroneous link
The link to the blog post previously pointed to the root of the repo's docs folder.
2021-07-20 15:34:38 +02:00
Simon Hausmann
9c65be3538 Mention fontconfig in the Linux build requirements
We might need to centralize that with the Rust and C++ API docs though
2021-07-20 12:42:30 +02:00
Simon Hausmann
609b134a0c Remove CMake from the macOS build requirements
The development branch does not need cmake anymore due to the freetype dependency removal
2021-07-19 08:59:32 +02:00
Simon Hausmann
e0ccdadc2a
Update wasm part of tutorial
Remove the paragraph that talks about adding the resolver line, since that’s already covered earlier, so the line is there.

Amends e3520b1ea6
2021-07-16 18:23:51 +02:00
Olivier Goffart
e3520b1ea6 Also recommand the use of resolver = "2" in the tutorial 2021-07-16 17:40:52 +02:00
Olivier Goffart
00a734764a
Update install_qt.md 2021-07-16 17:21:49 +02:00
Olivier Goffart
d81f07d20b Fix rustdoc warning 2021-07-13 11:51:50 +02:00
Olivier Goffart
cc7242c523 Add a selected callback to ComboBox 2021-07-13 11:42:31 +02:00
Olivier Goffart
6263979357 Add missing documentation for ComboBox 2021-07-13 11:34:47 +02:00
Simon Hausmann
31ac05341a rust docs: Don't use depreacted highlightjs.highlightBlock, use highlightElement instead 2021-07-12 16:05:51 +02:00
Simon Hausmann
3177e60408 Start documenting some of the cbindgen internals 2021-07-12 12:02:28 +02:00
Simon Hausmann
28d656cc8f cSpell: silence checker
frontend -> front-end
corelib -> core library
2021-07-12 11:43:59 +02:00
Simon Hausmann
163625fcd3 C++ docs: finish re-organzing the C++ docs entry
Instead of repeating the table of contents, provide a proper intro
page - based on the Github README - and group the remaining content
into Getting Started, Reference and Integration sections.
2021-07-10 08:13:13 +02:00
Simon Hausmann
be47f708d9 Cleanup: Move docs/html to docs/resources 2021-07-08 07:01:51 +02:00
Simon Hausmann
6d964b9ee7 Switch highlightjs version
Use the latest version that's also hosted on sixtyfps.io
2021-07-08 07:01:51 +02:00
Simon Hausmann
7cc915ed8e Add sub resource integrity hashes for the CDN urls 2021-07-08 07:01:51 +02:00
Simon Hausmann
dd73852124 Make use of highlight.js self-contained
* Instead of relying on an unversioned url off of sixtyfps.io,
  pin the version from upstream's CDN.
* Include cmake highlighting as well since that's not in HLJS' default,
  we use it for the tutorial though and it was in the one hosted on
  sixtyfps.io
* Include the language definition for .60 inline, so that we can make changes
  and adapt to upstream API changes if we select a new version.
2021-07-08 07:01:51 +02:00
Simon Hausmann
ad321c7735 Use one shared html file for the syntax highlighting
Using Olivier's idea to check the meta tag, we can distinguish rustdoc
from "the rest". The html is included in mdbook by directly by
symlinking head.hbs.
2021-07-08 07:01:51 +02:00
Simon Hausmann
8003c06f3a Move all HTML/CSS/JS related to preview and syntax highlighting in the docs into a shared folder
This will also be the place where the .60 language definition for
highlight.js can go.
2021-07-08 07:01:51 +02:00
Simon Hausmann
77898796da Rust docs: Split up the preview from the syntax highlighting
The preview is now in sixtyfps-docs-preview.html and the highlighting in
sixtyfps-docs-highlight.html. This faciliates reusing the preview from
C++ while using a different HTML file later for syntax highlighting.

Relates to #282
Needed for #281
2021-07-07 14:00:04 +02:00