Olivier Goffart
dec29e6d98
Allow to export structs
2020-11-17 12:22:10 +01:00
Olivier Goffart
7967a074fb
Fix accessing struct declared in a different file
2020-11-17 12:02:21 +01:00
Simon Hausmann
54ee7b3556
Cpp: Give each generated component a ComponentWindow
...
That's a counted reference to the window in the run-time and avoids the need to do the parent->parent->window dance.
2020-11-16 16:59:57 +01:00
Olivier Goffart
dd4435fe5d
Add round/ceil/floor
2020-11-16 12:52:01 +01:00
Olivier Goffart
b45a14bd7a
modulo
2020-11-13 16:07:18 +01:00
Olivier Goffart
1eb57ae4a3
Add minmax tests
2020-11-13 15:55:42 +01:00
Olivier Goffart
d499e86640
Implement cubic-bezier
2020-11-13 13:36:32 +01:00
Simon Hausmann
64b92df87e
Initialize the component in the Window at component creation time
...
This will allow getting rid of the component as parameter to run()
2020-11-11 19:03:04 +01:00
Simon Hausmann
5d744c86c2
Begin passing the VRC<ComponentVTable, Dyn> into the run-time library
...
First by changing the signature of run() and by adding a self_weak
to the C++ struct.
2020-11-11 18:31:51 +01:00
Simon Hausmann
c85aa9a758
Use dashed properties for text alignment
2020-11-11 09:35:09 +01:00
Olivier Goffart
d6a440aa4a
Change C++ API to use the ComponentHandle
2020-11-10 19:28:34 +01:00
Olivier Goffart
95c4bac794
Add a dealloc and drop_in_place function to the ComponentVTable
2020-11-06 17:13:01 +01:00
Simon Hausmann
9df18a3747
Apply default layout spacing and padding from the style
...
Extract the StyleMetrics from the style and pass it to the layout
lowering pass for application.
The tests were adjusted to explicitly specify the padding/spacing to
override the ugly style default.
2020-11-04 15:20:43 +01:00
Olivier Goffart
ec2f500f69
Use a combobox in the booker example
...
Also enable the button depending on the order of the string
2020-11-03 18:38:35 +01:00
Olivier Goffart
183f300a85
Implement the temperature converter in the .60 code
...
A edited signal was required on the line edit
2020-11-03 18:23:37 +01:00
Olivier Goffart
8a95b806c7
Strawman implementation of a combo box
2020-11-03 17:55:49 +01:00
Olivier Goffart
11e55dd8d2
String -> Float conversions
2020-11-03 15:19:58 +01:00
Olivier Goffart
46976d8d74
Add test for layout alignment
2020-11-03 12:37:25 +01:00
Olivier Goffart
9bf686db29
Use layout alignment in the example
2020-11-03 12:25:55 +01:00
Olivier Goffart
661982e747
Fix bindings on animation duration
2020-11-02 21:15:22 +01:00
Olivier Goffart
74e9799e44
Fix rust tests when the directory starts with a number
2020-11-02 21:06:19 +01:00
Olivier Goffart
7ad045c921
Create skeleton for the 7gui examples
...
Currently it is in the test folder so the test suite will compile them to make sure
it works.
But the plan is to move the 7gui folder in the example folder, with some logic.
2020-11-02 19:55:14 +01:00
Olivier Goffart
a82c23fc41
Add ability for the native style to export native Globals
2020-11-02 16:13:04 +01:00
Olivier Goffart
1eb7203ec8
Also do the comperty comparison in C++
2020-10-31 14:36:38 +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
ab14978fa8
Support for
in box layout in the C++ backtend
2020-10-31 09:10:16 +01:00
Olivier Goffart
d339ead5dd
support for
within box layouts
...
Only rust implementation for now
2020-10-30 19:12:48 +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
5face45c51
Rename Component::compute_layout to apply_layout
...
And pass the expected rectangle.
This is currently not used yet but will be needed when we can have
repeated elements within a box layout
2020-10-29 19:08:52 +01:00
Olivier Goffart
6d440eb7e3
Fix using global in imported files
...
This required doing the type resolving for the export with all
component in the export
2020-10-29 11:01:04 +01:00
Olivier Goffart
5f5e5b7420
Access global properties from rust
...
C++ and interpreter implementation is still missing so the new stest is failling
2020-10-29 11:01:04 +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
0a8c098779
Remove the component contextual keyword
...
It is not used
2020-10-27 16:09:05 +01:00
Olivier Goffart
4a702243d1
Fix C++ layouts
2020-10-27 08:16:02 +01:00
Olivier Goffart
f7dede5405
Fix layout tests as the default stretch for Rectangle changed from 0 to 1
2020-10-27 08:16:02 +01:00
Olivier Goffart
a4671502ab
Allow to speccify a fixed width/height in the layout by setting the height or width
2020-10-26 19:09:01 +01:00
Olivier Goffart
47be71e16d
Introduce layout stretching
2020-10-26 16:40:35 +01:00
Olivier Goffart
7ff0b4b73f
Vertical layout
2020-10-26 14:19:12 +01:00
Olivier Goffart
c659c4369a
Refactor the Layout generation code
2020-10-26 10:07:31 +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
ac6d4007ab
Node: Add setHandler features on signals
2020-10-21 12:22:22 +02:00
Olivier Goffart
c50b9d73d3
Document the generated C++ code
2020-10-21 11:29:25 +02:00
Olivier Goffart
eb73f987e0
Update cargo-metadata dependency
2020-10-21 08:58:48 +02:00
Simon Hausmann
f6d8f78e3f
Hide the private API of the NodeJS integration
...
Hide it behind a `private_api` property in the module export.
2020-10-20 16:52:28 +02:00
Simon Hausmann
7905285562
Change the Model API for the NodeJS Integration to use CamelCase
2020-10-20 16:40:49 +02:00
Simon Hausmann
c188851b45
Fix nodejs tests on Windows
...
npm is in fact `npm.cmd` and Rust's std::process::Command doesn't look
for executables with .cmd extension. This is a common issue but also a deliberate choice
it appears (due to emulating CreateProcess).
2020-10-20 16:30:16 +02:00
Simon Hausmann
279ce560f9
Convert NodeJS API to use & export TypeScript
...
This will make the types available to API consumers and makes the
documentation clearer.
2020-10-20 15:57:50 +02:00
Olivier Goffart
4fb87f401e
Some fixes for the initializations of two way bindings within sub components
...
There are still more issues
2020-10-20 14:33:06 +02:00
Olivier Goffart
73ccdec73e
Fix overwriting value from a component to the other
2020-10-19 20:32:16 +02:00