Olivier Goffart
2e60afec39
Run cargo fmt
2020-11-23 12:08:23 +01:00
Olivier Goffart
596b740b62
Rename ARGBColor to RgbaColor
2020-11-23 11:47:47 +01:00
Olivier Goffart
20b4d8826b
Make the extra documentation page a bit more visible
2020-11-23 10:55:05 +01:00
Olivier Goffart
32f23f4c3e
Add semi colon on the docs.
...
The run statement returns `()` so it is easier to copy/paste it if it has the semicolon
2020-11-23 10:31:34 +01:00
Simon Hausmann
89e0b57627
Rework and simplify the focus handling
...
Instead of determining the focus item through item tree traversal and
pointer comparison and storing the intermediate indices in the
components in the tree, remember the focus item by a pair of
VWeak<ComponentVTable, Dyn> and item_index: usize.
This speeds up determining the focus item as well as delivering events,
which can now be done directly after retrieving an ItemRef with
get_item_ref.
This also fixes the duplicate line edit focus in the 7gui cells
test case.
2020-11-20 15:33:15 +01:00
Olivier Goffart
cfa9413861
More work on the state binding for transition:
...
When there is a transition, turn the state property into a property of StateInfo
Not yet implemented for C++
2020-11-19 12:43:28 +01:00
Olivier Goffart
8b76114083
Recompile if a dependencies changes
2020-11-18 13:23:59 +01:00
Olivier Goffart
0672f4b3cd
Expose Timer API to rust API
...
And use it in the puzzle demo to implement the auto play mode
2020-11-16 12:17:02 +01:00
Simon Hausmann
a2dadf8fe8
Remove the component parameter from GenericWindow::process_key_input
2020-11-11 19:16:26 +01:00
Olivier Goffart
503567d84c
Update the documentation after the changes to ComponentHandle
2020-11-09 15:08:08 +01:00
Olivier Goffart
a1f1fcb3a6
Use VRc<ComponentVTable> in the rust generated code
2020-11-09 14:58:37 +01:00
Olivier Goffart
2ece3817cc
Make ModelHandle a struct
...
Last commit broke for structures containing models, because models are not PartialEq.
So we need to implement PartialEq for ModelHandle. Which means a struct needs to
be created
2020-10-31 13:32:19 +01:00
Olivier Goffart
359f42c5f7
Prepare the compiler to be async
...
This will allow the online editor to load imports from URL asynchroniously later
Since currently the compiler is only working on a single thread, and that we
never await on a future that could block, it is allowed to use the spin_on executor
2020-10-30 15:00:04 +01:00
Olivier Goffart
263df7dc63
Remove the www from all sixtyfps.io URL
2020-10-29 11:06:06 +01:00
Olivier Goffart
d3801e26d3
Change the syntax of structures to require the struct keyword
2020-10-27 16:09:05 +01:00
Olivier Goffart
aeade826fe
New runtime implementation for the box layout
...
Currently only horizontal layout is supported
2020-10-26 14:19:12 +01:00
Olivier Goffart
76b7f1aef6
Allow dashes in identifier
...
Currenly, dashes are normalized to '_'.
Dashes are not allowed at the begining of an identifier.
If an identifier with a dash is not found, we also look for identifier
without a dash and if that exist, we hint the user to use spaces.
Issue #52
2020-10-22 18:32:25 +02:00
Olivier Goffart
20cfb65e53
Bump version
2020-10-22 08:41:45 +02:00
Olivier Goffart
c50b9d73d3
Document the generated C++ code
2020-10-21 11:29:25 +02:00
Olivier Goffart
45e8c94535
Some more documentation for the rust backend
2020-10-21 10:35:42 +02:00
Simon Hausmann
0c8fcb5f7a
Some edits to the type mappings section of the node docs
...
Also use a consistent section title throughout.
2020-10-21 09:44:21 +02:00
Simon Hausmann
4f4d2b10e9
Add missing license tag
2020-10-20 18:18:24 +02:00
Simon Hausmann
e0e7aa1a91
Small typo fix
...
Missing letter :)
2020-10-20 18:11:01 +02:00
Simon Hausmann
8f73259cf6
Minor edit
...
Avoid "easy" as that may be perceived as patronizing.
2020-10-20 18:10:23 +02:00
Olivier Goffart
0c253efb0d
Some changes in the rust documentation and its README
2020-10-20 18:02:28 +02:00
Olivier Goffart
65ec7e9b7d
Fix panic on parse error
...
Properly report the errors instead.
The later passes panic if the AST is not well formed
2020-10-19 19:43:13 +02:00
Simon Hausmann
603abeabed
Fix up links to markdown files from within other markdown files in the Rust docs
...
Our language reference .md file contains a refernce to
builtin_elements.md. Since rustdoc doesn't further process the embedded
markdown file, the .md link remains as-is and is broken. But we can fix
it up using a small snippet of JavaScript.
Fixes #87
2020-10-14 10:27:50 +02:00
Simon Hausmann
dd55f5205d
Replace wildcard version with the released one for now
2020-10-13 15:10:24 +02:00
Olivier Goffart
8f206aa664
Fix typo in README
2020-10-13 14:10:01 +02:00
Olivier Goffart
c4deac88c5
Add links to crates.io
2020-10-13 11:51:00 +02:00
Olivier Goffart
a650f29abe
Rename sixtyfps-rs-macro to sixtyfps-macros
2020-10-13 11:10:26 +02:00
Olivier Goffart
ba80d6f515
Do not inject the sixtyfps-docs-integration.html for docs.rs just yet
2020-10-13 10:40:43 +02:00
Olivier Goffart
6075860c9e
Documentation about how to generate the doc
2020-10-13 09:54:35 +02:00
Simon Hausmann
9c23d9b571
Alternate fix for image loading in docs preview
...
Revert commit 9f488bba3b
for now and
instead resort to an absolute url to the image. This way we
don't have to use the wrong base url.
2020-10-13 09:44:25 +02:00
Simon Hausmann
9f488bba3b
Try to get the image loading work in the embedded doc preview
...
By specifying the CORS-friendly github raw url as base url for the interpreter,
we can load images using relative paths.
According to the inspector the image is loaded successfully,
so what seems to be left to fix is an event loop related issue.
2020-10-13 09:31:42 +02:00
Olivier Goffart
dbdc8483e2
Disable the check for the SIXTYFPS_STYLE env variable on wasm
2020-10-13 09:30:18 +02:00
Olivier Goffart
1138c9dbed
Normalize the spelling of SixtyFPS
2020-10-13 07:48:55 +02:00
Simon Hausmann
a37d42fa0e
Add an init function to the Item vtable
...
This will be called by the run-time and will allow items to set up
bindings that rely on internals that should not be exposed to the
compiler/runtime.
2020-10-12 16:49:44 +02:00
Olivier Goffart
7eff181e6f
sixtyfps_build: add a compile_with_config function
2020-10-12 12:35:03 +02:00
Olivier Goffart
84f0fb7b07
Display a warning when no style is selected
2020-10-12 11:50:39 +02:00
Olivier Goffart
9a909142a8
Disable wayland dependency by default
2020-10-10 16:10:22 +02:00
Simon Hausmann
67f387e628
Prepare for relative resource loading from the web
...
Pass the base url as path to the interpreter
2020-10-08 20:42:46 +02:00
Olivier Goffart
4169254169
StandardListView in rust
2020-10-08 16:22:16 +02:00
Simon Hausmann
a472ca7c28
Automatically embed resources when cross-compiling
...
Don't assume that the file system is the same
2020-10-06 23:00:17 +02:00
Olivier Goffart
1b506a1b03
Move ther model code from the rust API to the corelib
...
We will need it in the dynamic component
2020-10-02 18:11:35 +02:00
Olivier Goffart
c7e5b39973
Layout the items in the ListView
2020-10-02 18:07:39 +02:00
Olivier Goffart
f10c2bfd7c
More ListView WIP
2020-10-02 18:07:39 +02:00
Olivier Goffart
dec06be70c
WIP ListView
2020-10-02 18:07:39 +02:00
Olivier Goffart
4cf61b5617
Make the "remove done items" button work in the Todo rust example
2020-09-30 17:57:19 +02:00
Olivier Goffart
2050f08f1e
Ability to make change to the model property
2020-09-30 15:04:32 +02:00