Olivier Goffart
0cb827a901
Two ways binding with optimized public property in the interpreter
2020-09-25 09:50:03 +02:00
Olivier Goffart
4981c3ca75
Some check for the two way bindings
2020-09-23 14:06:08 +02:00
Simon Hausmann
26ae1bfdb2
Add From<String> and Into<String> for SharedString
2020-09-14 08:49:41 +02:00
Olivier Goffart
8761ca80a3
Add SharedArray::push and adjust a bit the API
2020-09-09 18:47:15 +02:00
Olivier Goffart
42aa91e3eb
Support for signal with arguments in the interpreter
2020-09-09 11:27:58 +02:00
Olivier Goffart
e997dff094
Use a reference as a signal argument.
...
It will be easier to make that work with C++
2020-09-08 12:12:01 +02:00
Olivier Goffart
e10ed650ee
Lookup of signal argument within a signal handler
2020-09-08 12:12:01 +02:00
Olivier Goffart
9fbb40d91b
Start working on a debug statement
2020-09-03 19:10:07 +02:00
Simon Hausmann
3b971a2e2f
Remove Color::From<u32>
...
Instead make it clear on the call site what the encoding is (argb).
2020-09-03 11:17:40 +02:00
Olivier Goffart
58cdaeb8dd
Update license header to mention that commertial option are available
2020-08-26 13:23:42 +02:00
Simon Hausmann
2823f32692
Apply license headers to all non-binary/non-json sources
2020-08-17 17:55:20 +02:00
Simon Hausmann
3a463fa104
Closes: Free GL resources when destroying items in the interpreter #12
2020-08-13 17:56:18 +02:00
Olivier Goffart
fb5a82b6c7
Fix acessing repeater variable in a nested repeater, and fix array as property
2020-08-13 15:38:28 +02:00
Simon Hausmann
62a8b15f09
Move ItemVTable and frieds to corelib::items
...
To avoid ambiguities regarding the use of FieldOffset, the BuiltinItem
proc-macro uses fully-qualified type names now.
2020-08-12 10:10:51 +02:00
Simon Hausmann
c1f91e38ca
Move the window scale factor into GraphicsWindow
2020-08-11 13:42:51 +02:00
Olivier Goffart
e013ea6c50
Refactor the interpreter by trying to use FieldOffset insdead of usize for offsets
...
Give a unique identifier lifetime to instance so that they cannot be mixed safely
2020-08-11 10:22:16 +02:00
Simon Hausmann
fcc819e395
Add support for enums to the compiler
...
This replaces the duplicated text alignment enums
2020-08-07 13:15:43 +02:00
Simon Hausmann
aecf6a8878
Center text in buttons in the demo and gallery
...
This adds horizontal_alignment/vertical_alignment properties, along with
width/height to Text.
This still uses a hard-coded enumeration in the compiler, which is meant
to go away in favor of general enum support.
2020-08-07 10:02:52 +02:00
Simon Hausmann
41671e3efb
Represent the window scale factor conversions in the IR
...
That means less code in the generators and easier to extend in the
future with more built-in functions.
2020-08-04 12:49:37 +02:00
Simon Hausmann
4f0bf0b982
Rename dpi to (window) scale_factor
2020-08-04 09:01:30 +02:00
Simon Hausmann
97a2fb2c7b
Move datastructures::EasingCurve into animations
2020-08-03 13:49:20 +02:00
Simon Hausmann
30d7a0b36d
Move PathData and friends from datastructure to
...
graphics
2020-08-03 13:43:44 +02:00
Simon Hausmann
69beab5957
Rename corelib::abi::primitives to corelib::items
2020-08-03 10:32:03 +02:00
Olivier Goffart
46a011683f
Implement easing curve in the runtime
2020-07-29 15:20:28 +02:00
Olivier Goffart
feec73674f
Start implementing easing curve
2020-07-29 15:19:41 +02:00
Olivier Goffart
f02512f467
Allow to get the span of a binding
2020-07-28 18:02:23 +02:00
Simon Hausmann
6c27451761
Begin separating builtin elements from the underlying types
...
This uses a NativeClass type in the registry to represent the underlying
Rust/C++ types.
2020-07-24 16:11:46 +02:00
Olivier Goffart
f87a3e2c13
Assignment operator
2020-07-24 11:43:23 +02:00
Olivier Goffart
1a1d3dbec0
Store two consecutive read of the same variable in a temporary variable
...
Avoid to create too many dependencies when not required.
Especially the state transformation can create a lots of read to the same property
2020-07-22 17:24:26 +02:00
Olivier Goffart
96e5738785
Add a DPI variable in the interpreter and in the C++ backend
2020-07-15 17:13:23 +02:00
Olivier Goffart
952ddda7c4
Force duration to have an unit
2020-07-14 16:18:12 +02:00
Olivier Goffart
c30aa370f3
Parse units
...
They currently have no real meaning
2020-07-14 11:35:45 +02:00
Olivier Goffart
e00491811b
Get rid of the context in properties/signal
2020-07-13 18:49:06 +02:00
Olivier Goffart
868468b101
Interpreter: Do not use the parent component from the context
2020-07-13 13:13:23 +02:00
Simon Hausmann
535da41ae0
More naming cleanups
...
PathData::PathElements has one redundant "Path" in the name, so eliminate
for Events and Elements.
2020-07-10 13:06:28 +02:00
Simon Hausmann
1f7ae1b318
Rename PathElements to PathData
...
as it can now consists of elements or events.
2020-07-10 13:01:05 +02:00
Simon Hausmann
4b6e549b96
Simplify compiled path data structure
...
Use two arrays, one for events and one for coordinates. That simplifies
the code generator and the generated code, and it also provides for
a more compact memory representation.
2020-07-10 10:20:59 +02:00
Simon Hausmann
4b75ec0ee8
Lay out items on a path
...
This works, but it's still missing support for positioning of the layout
itself.
2020-07-09 15:32:47 +02:00
Simon Hausmann
251ef7fc97
Add support for SVG commands in Path elements
...
Using the commands property we can just paste SVG paths. This makes it
much easier to write examples/demos. A good online path designer is
for example https://codepen.io/anthonydugois/pen/mewdyZ
2020-07-09 13:41:57 +02:00
Simon Hausmann
c17c06c6e7
Making closing of a path optional
...
By default paths are not closed and they can be closed using a Close {}
element.
2020-07-09 09:52:09 +02:00
Simon Hausmann
22d838ffae
Add support for true and false boolean literals
2020-07-07 22:11:41 +02:00
Simon Hausmann
f646809ff4
Added ArcTo element for paths
2020-07-07 16:02:46 +02:00
Simon Hausmann
a83127ace8
Prepare the path element compilation for extensibility
...
Avoid any element specific code in the Rust and C++ generator and
minimize the involvement in the interpreter.
2020-07-07 14:14:17 +02:00
Simon Hausmann
1ab71b8ca3
Prepare the path element setup in the run-time for extensibility
...
Make the anonymous struct for the LineTo variant in the PathElement enum
as separate structure, which can be introspected using rtto::FieldInfo.
2020-07-07 14:14:17 +02:00
Simon Hausmann
a71c67152e
Revert "Prepare for additional path elements"
...
This reverts commit d143addb07
.
We're going to need to support binding expressions in path elements.
2020-07-07 14:14:17 +02:00
Simon Hausmann
d143addb07
Prepare for additional path elements
...
Require that the values to the path element properties are numerical literals.
The conversion happens in the path "compilation" pass, where we can do more
pre-calcuation in the future.
2020-07-02 10:40:31 +02:00
Simon Hausmann
5e61ed4ad2
Implement Path and LineTo in the markup
2020-07-01 15:13:23 +02:00
Simon Hausmann
4e22c2839e
Add the rendering primitives for rendering a path
...
Right now the path is limited to polygons (only LineTo elements) and only the fill color can be specified.
2020-07-01 14:58:09 +02:00
Olivier Goffart
009addf9b4
Logical operations and comparisons and unary operators
2020-06-29 18:40:37 +02:00
Simon Hausmann
f7517f403c
Make the color a valid property type
...
This replaces Property<u32> with Property<Color>
2020-06-26 21:46:37 +02:00