Commit graph

331 commits

Author SHA1 Message Date
Tobias Hunger
8f7d7afa94 Janitor: Replace Option::map returning () with if let 2021-07-09 17:00:46 +02:00
Tobias Hunger
718126e148 Janitor: Remove useless into() 2021-07-09 17:00:46 +02:00
Tobias Hunger
a0c567d242 Janitor: Remove unnecessary return 2021-07-09 17:00:46 +02:00
Tobias Hunger
86e847fec0 Janitor: Prefer strip_prefix over manual stripping 2021-07-09 17:00:46 +02:00
Tobias Hunger
b82ee6a470 Janitor: Replace a == "" with a.is_empty() 2021-07-09 17:00:46 +02:00
Simon Hausmann
be47f708d9 Cleanup: Move docs/html to docs/resources 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
Simon Hausmann
0236bbcf07 Avoid overriding rustdoc highlighting
Only run highlight.js on .60 code blocks, to not interfere with rustdoc

Relates to #282
2021-07-07 11:36:22 +02:00
Simon Hausmann
8ecddc120a Try to add syntax highlighting for .60 snippets in Rust documentation
Load our highlight.js snippet that we also use for the mdbook tutorial.
Once change we need to apply on top is that the rustdoc CSS theme does
not currently provide hljs classes that change with the currently
selected theme, so instead we're mapping the classes to the CSS classes
that are used for Rust syntax highlighting. Those change with the
current theme.

Relates to #282
2021-07-07 11:13:54 +02:00
Tobias Hunger
ac207428dc Janitor: CSpell fixes
Mark up some special words in documents (like C++ lingo in rust files).
2021-07-06 22:44:09 +02:00
Olivier Goffart
13bd828b96 Update license date 2021-07-02 15:55:54 +02:00
Olivier Goffart
1b9b583e3c Move the published editor and wasm-interpreter to the snapshots directory 2021-07-01 10:12:53 +02:00
Simon Hausmann
b314bc9789 Fix up docs preview integration for dev builds
Use the wasm interpreter from the dev branch for dev docs
2021-06-30 18:49:04 +02:00
Olivier Goffart
423656d900 Update some more version number
Meaning that following the docs or tutorial won't work until the release is complete
2021-06-30 17:21:38 +02:00
Simon Hausmann
5d58d34e84 Document run_event_loop() and quit_event_loop()
The C++ versions were there before, but undocumented. The Rust version
for quit() was missing.
2021-06-29 16:12:00 +02:00
Olivier Goffart
16ba23ae47 Move StateInfo to the private namespace 2021-06-28 11:23:44 +02:00
Olivier Goffart
98cec35080 Increase version numbers 2021-06-28 10:39:43 +02:00
Tobias Hunger
e01bd87df8 Janitor: Fix warnings about markdown files
These might change the layout of the rendered markdown files. This will
also fix some typos along the way:-)
2021-06-28 08:32:25 +02:00
Tobias Hunger
13d7f5e7bd Janitor: Fix typos in comments and user-facing strings
Also adapt tests for error messages containing the fixed strings.

No behavior change is intended!
2021-06-28 08:32:25 +02:00
Tobias Hunger
6b48373a01 Janitor: Fix typo in local variable name
No behavior change is intended here!
2021-06-28 08:32:00 +02:00
Olivier Goffart
dcbbd0cd7d Update dependencies 2021-06-22 11:15:20 +02:00
Simon Hausmann
54c8c7761b Refer to the tutorial from our front-pages that also refer to the reference docs 2021-06-17 16:38:19 +02:00
Simon Hausmann
7ebbf20467 Fix doc build with nightly in CI
The #[doc = include_str!("...")] syntax is now the new external file
syntax in rust nightly - the old syntax was removed.
2021-06-06 20:52:10 +02:00
Olivier Goffart
142a8dc185 Rename ImageReference to ImageInner and make Immage.0 private 2021-05-28 17:05:16 +02:00
Olivier Goffart
8e44ac2351 Image type: some more docs 2021-05-28 17:05:16 +02:00
Olivier Goffart
0b3fecf300 WIP: API to expose image loading from C++ and Rust 2021-05-28 17:05:16 +02:00
Simon Hausmann
7ffc5cf59a Minor doc touch-up 2021-05-26 08:00:47 +02:00
Olivier Goffart
4fbab34ce3 Make sixtyfps::Weak Send so we can send it to threads and back
Also edit the documentation
2021-05-25 15:53:49 +02:00
Simon Hausmann
73f647c2e1 Add the Rust equivalent of sixtyfps::invoke_from_event_loop
The same API exists in C++.
2021-05-25 15:53:49 +02:00
Olivier Goffart
720001a223 Remove the solve_layout from the component vtable
no longer required
2021-05-11 14:59:57 +02:00
Simon Hausmann
ef1a605953 Add support for showing warning diagnostics in the online editor 2021-04-30 15:43:05 +02:00
Simon Hausmann
9dcbf4b5ad Revert "Change docs to point to the 0.0.6 version of the wasm interpreter"
This reverts commit 944c6e44af because
we're past the release and should pointer back to master builds.
2021-04-27 17:43:45 +02:00
Simon Hausmann
944c6e44af Change docs to point to the 0.0.6 version of the wasm interpreter
... in time for the release
2021-04-27 17:07:38 +02:00
Simon Hausmann
de8e398ad2 Bump cargo sixtyfps crate dependency version in Rust docs 2021-04-27 15:48:53 +02:00
Olivier Goffart
3380383787 Bump version number
(Does not include docs and README yet)
2021-04-26 13:16:48 +02:00
Olivier Goffart
91ed04a72c Make length (still the default for all property) be the logical length
And a new `physical_length` is now the physical_length unit

Note: this does not change the runtime part yet
2021-04-21 17:15:19 +02:00
Simon Hausmann
afe3df6381 Remove the public API for registering fonts by path or memory chunk
This is not needed anymore in the light of being able to write `import "blah.ttf"` in .60 markup
2021-04-14 10:01:33 +02:00
Olivier Goffart
cb06394685 Remove some more use of SyntaxNode and SyntaxToken 2021-04-13 17:10:56 +02:00
Simon Hausmann
1e4921de13 Fix LSP server staying alive when closing preview window
* Provide an internal behavior parameter to run_event_loop() that we can use
from the preview to not quit when the last window was closed.
* Fix Drop for the winit event loop GraphicsWindow to drop the backend window correctly
  when unmapping, not when the graphics window dies. Otherwise QuitOnLastWindowClosed doesn't work.
2021-04-06 12:11:55 +02:00
Simon Hausmann
8372d3f6d8 Rename call_* to invoke_* for callbacks
Fixes #187
2021-03-15 17:01:05 +01:00
Simon Hausmann
b27034efa5 Rename sixtyfps::IntoWeak into sixtyfps::ComponentHandle and remove Clone from generated components
`ComponentHandle` offers a richer API of common functions, such as
`show()`/`hide()` as well as the new `clone_strong()` - that should help
to prevent mistakely created strong reference that may cause leaks.

Fixes #188
2021-03-15 16:01:13 +01:00
Olivier Goffart
cae88f0823 Create a Diagnostic quen the main .60 file can't be loaded 2021-03-15 11:44:20 +01:00
Olivier Goffart
730b1ccff2 Refactor diagnostic: Merge BuildDiagnostic and FileDiagnostic 2021-03-12 19:32:50 +01:00
Olivier Goffart
968dfaae87 Put what is the FileDiagnostics into the SourceFile so the SourceFile has the content 2021-03-11 16:23:46 +01:00
Olivier Goffart
6f88d78303 Rename Resource to ImageReference in the runtime 2021-03-11 10:06:23 +01:00
Olivier Goffart
89bbdce88e Polish a bit the Brush API 2021-03-10 16:54:33 +01:00
Olivier Goffart
9e3f316e30 Docs: Fix some broken links 2021-03-09 19:32:52 +01:00
Simon Hausmann
445ddd58d5 API cleanup
Remove the `application` infix from `register_application_font`, to
reduce the changes that it might be interpreted to be a function that
also changes the default font in all text elements.
2021-02-17 14:37:31 +01:00