Simon Hausmann
8b854c32c3
Add Text::font_family and font_pixel_size properties
...
We can fine-tune the API, this works for now to change :-)
2020-05-21 21:04:07 +02:00
Olivier Goffart
4575011293
More work on signal: the C++ part is working
2020-05-20 19:28:58 +02:00
Olivier Goffart
83d206ea39
runtime: Add a Signal class
...
Not very functional yet
2020-05-20 16:13:04 +02:00
Olivier Goffart
4f22e2c341
Add a bool property type
2020-05-20 13:36:47 +02:00
Olivier Goffart
94c58dc1c4
Add an mouse handler for the TouchArea
2020-05-20 12:03:36 +02:00
Olivier Goffart
bf64e40476
Format
2020-05-20 09:34:14 +02:00
Olivier Goffart
6b3765857a
Add a TouchArea builtin item (currently does nothing)
2020-05-20 09:32:01 +02:00
Olivier Goffart
f4bfc3a5b4
Use the property system for our components
2020-05-19 15:15:23 +02:00
Olivier Goffart
8ec6fd5237
Change the representation of the Property to be more FFI friendly
2020-05-19 15:09:45 +02:00
Olivier Goffart
cdeb3a4312
Import of a basic property system
2020-05-19 12:47:52 +02:00
Simon Hausmann
23d3964a0d
Add boilerplate for text items
...
Forward the text and color properties to the rendering backend, where
right now we just rendering all the glyphs into a dedicated texture.
Next steps are a glyph atlas texture, blending the specified color with
the alpha of the glyphs, configurable size and family, shaping with
Harfbuzz and may more things.
2020-05-18 19:04:12 +02:00
Olivier Goffart
b78f708786
Add SharedString::push_str
2020-05-18 18:45:33 +02:00
Olivier Goffart
ed842b3ae6
String: add comparison and simple test
2020-05-18 18:03:47 +02:00
Olivier Goffart
25bf149e13
Add a shared string that can be used in properties
2020-05-18 17:09:40 +02:00
Simon Hausmann
e6be2c91b8
Fix translation of children of images
...
Propagate the x/y of images also to the children.
2020-05-18 16:01:53 +02:00
Olivier Goffart
5a9cbaae66
vtable add support for field offset in the vtable
2020-05-18 11:06:44 +02:00
Olivier Goffart
751a3fbe59
Work on const field offset crate to give type safe offsets
2020-05-18 11:06:44 +02:00
Olivier Goffart
aff3d7e14b
vtable: add safe way to construct references
2020-05-18 11:06:44 +02:00
Olivier Goffart
b745c616f7
Add a trait to get the vtable for a type
2020-05-18 11:06:44 +02:00
Olivier Goffart
4ca45ca4da
vtable crate: Some refactoring and simplifications
2020-05-18 11:06:44 +02:00
Olivier Goffart
0a973f65d5
vtable: Some more safety fix
2020-05-18 11:06:44 +02:00
Olivier Goffart
f74cfe73cd
Use the vtable crate for the ItemVTable
2020-05-18 11:06:44 +02:00
Olivier Goffart
544cb1a198
Fix C++ compilation using the vtable crate
2020-05-18 11:06:42 +02:00
Olivier Goffart
4988fcb543
More fix to use vtable for component. All rust code compiles
2020-05-18 11:06:31 +02:00
Olivier Goffart
686f4c9591
More work on the vtable macro to adapt the Component
...
This does not work yet
2020-05-18 11:04:54 +02:00
Olivier Goffart
4b19818f6c
WIP: port Component to vtable
2020-05-18 11:04:54 +02:00
Simon Hausmann
5986d5f2b8
More visitor cleanups
...
Provide a non-mutable visitor as well, as the actual rendering loop doesn't need
to change the items fortunately.
2020-05-12 16:33:50 +02:00
Simon Hausmann
f22b18584e
Remove the cells in CachedRenderingData
...
Since we have a mutable accessor to this structure, we can skip the cells and make the code easier to read.
2020-05-12 16:26:58 +02:00
Simon Hausmann
93de9cf90c
Change visit_items to take a mutable ref
...
This is safer, Olivier says :-)
2020-05-12 16:17:39 +02:00
Simon Hausmann
573a2bb0a9
Minor cleanup
...
Rename dirty_bit to cache_ok -- that makes the code slightly more readable.
2020-05-12 16:05:26 +02:00
Simon Hausmann
c5bcba2c3c
Added basic rendering of cache primitives to the Items
2020-05-12 16:00:41 +02:00
Simon Hausmann
1791469390
Allow the item visitor to mutate items
2020-05-12 15:45:14 +02:00
Olivier Goffart
638c445cf9
Support for rendering sub-elements with proper offset
2020-05-12 15:38:50 +02:00
Simon Hausmann
743ad34099
Renaming RenderNode to CachedRenderingData
...
The name node suggests some kind of connected (tree) data structure, which
isn't quite what it is. It really is meant just
to be a way of storing cached rendering data for this item.
2020-05-12 13:55:57 +02:00
Olivier Goffart
7c2f40da90
Generator for the rust API
2020-05-12 11:43:29 +02:00
Olivier Goffart
bd039be10c
Introduce the datastructure to allow models and repeater
2020-05-11 10:10:25 +02:00
Olivier Goffart
cc170d1d76
More comments
2020-05-11 09:00:21 +02:00
Olivier Goffart
0398a221d2
Add a visitor to visit the items of a component
2020-05-07 12:11:01 +02:00
Olivier Goffart
e01de2e0ff
Add a item visitor
2020-05-07 11:44:17 +02:00
Olivier Goffart
2f16517291
Put the CompoentType inside the class in the generated code
...
and start working on safe wrapper
2020-05-07 10:36:23 +02:00
Olivier Goffart
bdaf14ae23
Parse numbers
2020-05-07 09:06:58 +02:00
Olivier Goffart
a0d9369336
Add a crate to compute the field offsets as const fn
2020-05-06 20:58:10 +02:00
Olivier Goffart
b128a848e2
Parse quoted string
2020-05-06 18:24:30 +02:00
Olivier Goffart
05624c68ee
Add some properties in the Rectangle
2020-05-06 17:53:42 +02:00
Olivier Goffart
74b3c9147e
Fix build
2020-05-06 11:56:08 +02:00
Olivier Goffart
9ad39d835e
move the abi in its own module
2020-05-06 10:27:09 +02:00