Commit graph

5155 commits

Author SHA1 Message Date
Simon Hausmann
85259b21b6 Provide an example of global exporting in the language reference 2021-08-27 13:36:48 +02:00
Simon Hausmann
28dd54ebad Add docs for the Rust API of accessing globals 2021-08-27 13:36:48 +02:00
Simon Hausmann
7a8c798d70 Fix rust doc build 2021-08-27 13:36:48 +02:00
Olivier Goffart
0fad27e23e Add set_global_callback in the C++ interpreter API 2021-08-27 13:36:48 +02:00
Olivier Goffart
a294ab4200 Interpreter: add set_global_callback 2021-08-27 13:36:48 +02:00
Simon Hausmann
cf7d33fb5d Add support for accessing exported globals from Rust 2021-08-27 13:36:48 +02:00
Simon Hausmann
9868b693e2 Only publish exported globals in C++ and Rust 2021-08-27 13:36:48 +02:00
Olivier Goffart
81688906f7 C++ Interpreter: add API to get/set global value 2021-08-27 13:36:48 +02:00
Simon Hausmann
c5d2ac2dd3 Rust codegen: Generate structures with public acccessors for global structs
It's not possible to create these from Rust code (intentional) and the
accessor to reach the instances are not implemented yet.
2021-08-27 13:36:48 +02:00
Olivier Goffart
a1803ec3a0 Interpreter: return a proper error from set_property instead of panic 2021-08-27 13:36:48 +02:00
Simon Hausmann
5e833e5d23 Add support for accessing globals from C++ 2021-08-27 13:36:48 +02:00
Olivier Goffart
5f8cea5926 WIP interpreter API to access globals 2021-08-27 13:36:48 +02:00
Simon Hausmann
90765a97ce Further clean up item graphics cache handling
The RenderCache (slab and generation) is always in a refcell, so we can
just pass that through. This also eliminates the ItemGraphicsCache
wrapper in the GL backend.

This will allow more fine grained borrowing in the future.
2021-08-26 13:46:37 +02:00
Simon Hausmann
ea07d21560 Internal cleanup
Remove unnecessary wrapper function for the item graphics cache in the GL backend.
2021-08-26 13:31:15 +02:00
Olivier Goffart
4ebc49f57d Missing license header in new file 2021-08-25 17:07:47 +02:00
Olivier Goffart
ab21dc6462 Move the semantic token code to its own module 2021-08-25 13:30:28 +02:00
Olivier Goffart
11398c19eb First implementation of semantic token in the LSP 2021-08-25 13:26:50 +02:00
Olivier Goffart
6450f8b8d7 Fix the text_default_color test on my machine
It was using the native style for me, which does not default to black
2021-08-24 14:03:50 +02:00
Olivier Goffart
5f1cf00fe7 Add test that make sure that reading from a model after writing to it works 2021-08-24 12:59:40 +02:00
Olivier Goffart
b07d52cd23 Support aliases to callbacks in globals 2021-08-24 12:36:16 +02:00
Olivier Goffart
d5f4a796ad Fix interpreter panics when calling callback that weren't set 2021-08-24 11:37:47 +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
Olivier Goffart
59e1361388 Fix compilation with C++20
Fixes #428
2021-08-20 18:49:15 +02:00
Olivier Goffart
b42c187ed1 Refactor the way the two-ways biding are represented internaly
Don't put them in a fake expression.
This simplifies a bit the expression handling, and will make
possible to fix analysis that needs a vew into the aliases
2021-08-20 18:26:36 +02:00
Olivier Goffart
293130e2e3 Also use touch-action: none; in the online editor 2021-08-20 16:28:51 +02:00
Simon Hausmann
2458ac5d02 Fix panic when calling focus() on a repeated element
When trying to reference an instance of a repeated item, for use with
ItemRc or VRef<Item>, the item_index (or id) of the ElementRc is not
directly what we want.

Adjust any element references to the repeater to to the inner instance
after creating them. Also make sure that the enclosing component is
respected in the C++ and Rust generators.

Fixes #422
2021-08-20 15:39:54 +02:00
Olivier Goffart
013eee351c Wasm demos: add touch-action: none to all canvas
So that the Slider, Flickabke and such works on android/chrome
2021-08-20 09:33:49 +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
071c1ea92f Update version number in README 2021-08-19 10:46:25 +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
Olivier Goffart
5efa5bbf1d Added a commented out debug comment which I often use
It allows dumping the lowered object tree
2021-08-19 09:57:13 +02:00
Simon Hausmann
234dfd85b6 Minor cleanup in the plotter example
Use a horizontal box instead of a horizontal layout
2021-08-19 09:46:18 +02:00
Simon Hausmann
d5a969f804 fluent style: make combobox selection slightly more intuitive
Highlight (and select) items when hovering into the background, not just over the text.

This is done by making sure the touch area covers the entire item. The same change
is applied to the ugly style, which however isn't directly affected as it has not padding.
2021-08-19 09:40:46 +02:00
Olivier Goffart
76ca2eed6b Fix intra-doc links
It should be ``[`...`]``, not `` `[...]` ``
2021-08-19 09:17:30 +02:00
Simon Hausmann
a87fdcb499 Minor cleanup in fluent and ugly style
Use a property alias for the groupbox title
2021-08-19 09:12:18 +02:00
Simon Hausmann
1131e92852 Correct changelog entry about struct fields 2021-08-19 08:58:58 +02:00
Simon Hausmann
2e958b87b1 A few more changelog edits
Reodering sentences and adding a full stop at the end.
2021-08-19 08:52:15 +02:00
Simon Hausmann
09278884fb Small changelog polish 2021-08-19 08:43:11 +02:00
Simon Hausmann
ace30e6c8f Sync README status part with blog 2021-08-19 08:39:17 +02:00
Olivier Goffart
b60fdb95ce Update CHANGELOG for the release 2021-08-19 08:37:24 +02:00
Simon Hausmann
fa3f21ae61 Fix alignment of pitch title and the slider in the plotter example 2021-08-18 17:58:39 +02:00
Simon Hausmann
91930aad55 Improve spacing between plotter title and the image
Use a VerticalBox
2021-08-18 17:57:12 +02:00
Olivier Goffart
c31ff31460 Update sixtyfps-cpp/README 2021-08-18 15:02:08 +02:00
Simon Hausmann
bcb200c547 Add an example for invoke_from_event_loop in C++
This way we can link from it from the blog and it looks maybe as good as in Rust :)
2021-08-18 10:12:34 +02:00
Tobias Hunger
31a3240733 Janitor: Fix clippy::into_iter_on_ref 2021-08-18 00:24:51 +02:00
Tobias Hunger
09e272abb6 Janitor: Fix clippy::useless_conversion 2021-08-18 00:24:51 +02:00
Tobias Hunger
60575e7878 Janitor: Fix clippy::iter_skip_next 2021-08-18 00:24:51 +02:00
Tobias Hunger
91c78f61e9 Janitor: Fix clippy::needless_lifetimes 2021-08-18 00:24:51 +02:00