Olivier Goffart
4d4c73925c
Some refactoring to prepare for transitions on properties
2020-11-20 09:39:06 +01:00
Olivier Goffart
f131c2d081
When only importing a component, treat that component as the root component
2020-11-18 10:43:39 +01:00
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
Olivier Goffart
281a744e86
Load the builtin from a fake .60 file
2020-11-04 16:56:35 +01:00
Olivier Goffart
decbe0ade5
Fix panic when exporting invalid types
...
And also still allow to export builtin component
2020-11-02 17:18:42 +01:00
Olivier Goffart
a82c23fc41
Add ability for the native style to export native Globals
2020-11-02 16:13:04 +01:00
Simon Hausmann
cba020182a
Remove unused parameter
2020-10-29 14:03:15 +01:00
Simon Hausmann
e9bb668921
Replace errors with panics in the export processing
...
The errors here are not subject to regular test coverage because their
occurrence indicates a grave internal error. There should not be valid
input syntax that leads to this code path.
2020-10-29 14:00:52 +01:00
Olivier Goffart
1479bc956e
Support for global in the interpreter
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
97166672c0
Semantic checks for the globals
2020-10-28 07:52:23 +01:00
Olivier Goffart
980aceded6
Parser: put the component name in a DeclaredIdentifier node
...
that way we will be able to have the global keyword as another identifier there
2020-10-28 07:18:24 +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
333c96fd79
Change Type::Object to be able to hold a name
...
Internally, structure will be represented with a Type::Object with a name
instead of a Component with a void base type
2020-10-27 16:09:05 +01:00
Olivier Goffart
27a6ff1227
Move Type and related concepts in a different module
...
Leaving only the TypeRegister in the typeregister module
2020-10-23 11:17:14 +02: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
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
Simon Hausmann
cf87ac804b
Add support for relative lengths
...
Typically `some_length_prop: 40%` produces an error, but if there's a
matching property in the parent, then it will be allowed and interpreted
as relative value and creates a dynamically updated binding.
2020-10-16 18:54:04 +02:00
Simon Hausmann
1b4317a93a
Minor cleanup in the layout code in the compiler
...
Free the term "Layout Constraints" for use later for the actual constraints
of layouts.
2020-10-13 18:00:54 +02:00
Olivier Goffart
8f1c5a96c1
Fix ListView being scrollable when it shouldn't
...
Relates to #86
2020-10-13 13:45:18 +02:00
Olivier Goffart
3397103dd2
Fix access aliases within a for
or a if
2020-10-13 13:45:18 +02:00
Olivier Goffart
3bdd71b36f
Start working on the Native ListView
...
Currently only the interpret part
2020-10-08 15:51:33 +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
Simon Hausmann
9ad8968529
Add support for the initial_focus synthetic property
...
Setting it will translate to a set_focus_item call in the constructor.
This implements parts of #55
2020-09-30 15:11:01 +02:00
Simon Hausmann
dbdd9126ac
Small typo fix
2020-09-28 11:43:45 +02:00
Olivier Goffart
8361ef4019
Start code egeneration for the two ways binding
...
This is only meant to include the cases in which the property are optimized.
Does not work yet for the dynamic component
2020-09-24 14:37:16 +02:00
Olivier Goffart
4981c3ca75
Some check for the two way bindings
2020-09-23 14:06:08 +02:00
Olivier Goffart
8561106a15
Fix $children when there are two levels of insertion
2020-09-22 17:39:51 +02:00
Olivier Goffart
d4e1bfe360
Fix using local exported components
...
Components need to be processed in source order.
Not exported last as it was before.
2020-09-17 09:09:38 +02:00
Olivier Goffart
1c8150cb35
One should not be able to instantiate structures
2020-09-16 18:38:08 +02:00
Olivier Goffart
e0ed5252a8
Parse type declaration
...
```
export Foo := {
property <int> xxx;
}
```
2020-09-16 18:26:13 +02:00
Simon Hausmann
ad77896312
Change the way Text's default color is implemented
...
Instead of via an item constructor, implement support for default
bindings in the compiler.
2020-09-16 13:41:18 +02:00
Olivier Goffart
637a0e792c
Some more progress in signal connection with arguments
2020-09-07 18:49:38 +02:00
Olivier Goffart
9f026c820d
Parse declaration of signal with arguments
2020-09-07 17:41:24 +02:00
Olivier Goffart
9d405060e2
Parse object and array type
2020-09-03 07:43:20 +02:00
Olivier Goffart
59dbb610be
Materialize fake properties such as layout width/height
2020-09-01 18:49:49 +02:00
Simon Hausmann
7976a4057f
Improve handling of nested layouts
...
We support directly nested layouts, but we did not support indirect
nesting:
GridLayout {
Rectangle {
l2 := GridLayout { ... }
}
}
This patch fixes that by detecting this scenario and merging the layout
info of the element (Rectangle) and the layout inside (l2). This makes
it much easier to create re-usable components that use layouts
themselves and allows placing them in layouts.
2020-08-28 15:06:14 +02:00
Simon Hausmann
c1aa4b28c6
Add support for children insertion points for components
...
Sometimes re-usable components need to act as containers that allow the
user to place other items inside. The component needs to be able to
control the placement of these user-provided elements. That is what the
new
$children
expression inside elements does.
2020-08-28 15:05:21 +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
5b9c41b76b
Add referenced image resources to the dependencies for the rust build
2020-08-07 13:35:44 +02:00
Olivier Goffart
2518af41b1
Fix for
in a declared component
2020-08-04 18:51:39 +02:00
Olivier Goffart
283387bc44
Add the self and parent implicit id
2020-08-04 15:58:40 +02:00
Olivier Goffart
f02512f467
Allow to get the span of a binding
2020-07-28 18:02:23 +02:00
Olivier Goffart
def42ba3df
Add reserved properties that every item has
...
These properties are materialized if used
2020-07-27 12:18:55 +02:00
Simon Hausmann
7aa7bd8492
Add support for exporting imports
...
This will allow us to break up the styles, so that one can have for example
button.60
checkbox.60
and finally widgets.60:
import { Button } from "button.60";
import { CheckBox } from "checkbox.60";
export { Button, CheckBox };
and then the users have to only import "widgets.60";
2020-07-24 18:33:01 +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