Olivier Goffart
fae6e0b52d
Document that angles are represented in degrees at run-time
2021-07-26 17:36:02 +02:00
Tobias Hunger
9539a53480
Janitor: Fix clippy::redundant_clone
2021-07-23 13:48:52 +02:00
Tobias Hunger
d543bc3a1d
Janitor: Fix clippy::assign_op_pattern
2021-07-23 13:48:52 +02:00
Tobias Hunger
0405beed83
Janitor: Fix clippy::redundant_static_lifetimes
2021-07-23 13:48:52 +02:00
Olivier Goffart
673c0ce81c
Add a as_any to the Model trait to allow getting a reference to the original model
2021-07-20 15:38:10 +02:00
Tobias Hunger
efc0d63e8b
Janitor: iter().cloned().collect()
on a slice to create a Vec
== to_vec()
...
This is clippy::iter_cloned_collect
2021-07-15 07:55:06 +02:00
Tobias Hunger
dc51d4ccda
Use impl Default
instead of new()
constructors
2021-07-12 13:22:25 +02:00
Olivier Goffart
13bd828b96
Update license date
2021-07-02 15:55:54 +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
4b1db93912
Janitor: Fix typo in function name
...
No behavior change is intended here!
2021-06-28 08:32:00 +02:00
Olivier Goffart
ce34ff87d0
Finish support for callback aliases
...
cc #111
2021-06-07 20:40:36 +02:00
Olivier Goffart
142a8dc185
Rename ImageReference to ImageInner and make Immage.0 private
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
Olivier Goffart
f06bf8d5a7
Fix repeater in box layout
2021-05-11 14:59:57 +02:00
Olivier Goffart
7f7f2245d8
Use the testing backend for node
2021-05-11 11:40:26 +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
Olivier Goffart
7ae850d564
Rename Type::Length -> Type::PhysicalLength
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
Simon Hausmann
794d3ec6ec
Revert "Add a nodejs testing function for apply_layout"
...
This reverts commit beb5d63d1b
.
Oops, the more modern style *is* to use send_mouse_click.
2021-04-08 16:58:37 +02:00
Simon Hausmann
beb5d63d1b
Add a nodejs testing function for apply_layout
...
This will allow making the JS test code more similar to the C++/Rust code,
allowing replacing synthetic mouse clicks.
2021-04-08 16:51:51 +02:00
Olivier Goffart
0fb2b6424e
Update neon version
2021-04-07 13:52:21 +02:00
Simon Hausmann
477729da52
Improve brush property test coverage
...
Test that assigning colors works:
* Test the implicit `Brush(const Color &)` C++ constructor
* Add derive_more::From to allow convenient conversion in Rust
* When assigning to brush properties in JavaScript, try at least to see if it's a color string (could be extended in the future)
2021-04-01 08:27:10 +02:00
Simon Hausmann
342f77139b
Add public Rust interpreter API to introspect the public properties
2021-03-31 08:42:54 +02:00
Simon Hausmann
9a6e9c3a53
Simplify internal interpreter property descriptor API
...
Return an iterator when querying the properties. This requires a
one-time copy of the property declarations out of the compiler data
structure, which is read-only.
2021-03-31 08:42:54 +02:00
Simon Hausmann
4a9cd954b8
Rework the Rust entry point API for the interpreter
...
Switch to the stateful `ComponentCompiler` concept that we discussed for the C++ API.
2021-03-18 18:20:50 +01:00
Olivier Goffart
ad75d41e20
Rename struct priperties to fields
2021-03-16 12:50:33 +01:00
Olivier Goffart
3db3400951
Rename the Object type to Struct in the compiler
2021-03-16 12:38:53 +01:00
Olivier Goffart
48333370a6
Use the new interpreter API in things that depends on it
2021-03-15 17:29:27 +01:00
Simon Hausmann
8372d3f6d8
Rename call_*
to invoke_*
for callbacks
...
Fixes #187
2021-03-15 17:01:05 +01:00
Simon Hausmann
9034bd3d1a
Move the refined eval::Value
API to api::Value
...
This is the new public value representation for the interpreter
2021-03-15 15:12:34 +01:00
Simon Hausmann
c2c3e00cd7
Remove ModelPtr
from the interpreter
...
Instead stick a straight `Rc<dyn ...>` into the `Value` enum
2021-03-15 14:43:01 +01:00
Simon Hausmann
a4c196df60
Use api::Struct
in Value::Struct
, replacing Value::Object
2021-03-15 12:55:39 +01:00
Olivier Goffart
41f52f9ad4
Remove Value::Color
2021-03-15 12:33:47 +01:00
Olivier Goffart
5a416d0fc7
Make the Value non_exhaustive
2021-03-15 12:07:52 +01:00
Simon Hausmann
41f77b2a27
Use SharedVector
for Value::Array
instead of Vec
...
That will make it more efficient to pass data into the interpreter in the future,
especially from C++.
2021-03-15 10:19:35 +01:00
Olivier Goffart
933c1bbf59
Rename Value::Resource
to Value::Image
2021-03-11 10:15:53 +01:00
Olivier Goffart
6f88d78303
Rename Resource
to ImageReference
in the runtime
2021-03-11 10:06:23 +01:00
Olivier Goffart
c840b046ae
Rename the "resource" type to "image"
2021-03-10 17:24:31 +01:00
Simon Hausmann
2fdaa44d51
Load the Noto Sans font from the nodejs printer demo
2021-02-22 11:17:39 +01:00
Olivier Goffart
b75e135459
Support complex product of units
...
Fixes #68
2021-02-04 12:56:14 +01:00
Simon Hausmann
7982325da4
Change Rectangle::background's type to be a brush
...
This also introduces the brush type in the compiler and generators. At the
moment only conversion from Color is implemented.
2021-02-03 12:49:44 +01:00
Olivier Goffart
e4a1f50a9a
Brush support in the interpreter
2021-02-03 09:28:33 +01:00
Olivier Goffart
ad1e18764a
Make angle its own type
2021-02-01 14:49:25 +01:00
Olivier Goffart
fea2478859
Update version number everywhere
2021-01-28 16:34:13 +01:00
Olivier Goffart
5a21f1bd81
Rename emit_ to call_ for callback
...
Signal was renamed to Callback, but one does not emit a callback, one calls it
2021-01-25 15:59:10 +01:00
Simon Hausmann
5f265ffc09
Split up ComponentWindow::run() into show(), hide() and sixtyfps::run_event_loop()
...
This allows creating multiple windows for example, and it will allow for
showing windows in those tests that require a mapped window.
As a bonus, the run() function on generated components is not consuming
anymore.
2021-01-19 09:50:22 +01:00
Olivier Goffart
f397e08abc
Also update neon
2021-01-15 16:04:14 +01:00