Olivier Goffart
13bd828b96
Update license date
2021-07-02 15:55:54 +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
87460c4ac8
Janitor: Fix typo in struct field name
...
No behavior change is intended here!
2021-06-28 08:32:00 +02:00
Olivier Goffart
7b2653db23
MouseWheel support for the Flickable
...
cc #222
2021-05-12 13:28:39 +02:00
Olivier Goffart
35cce45cbc
Add a fii feature so that we don't compile in the ffi code if not required
2021-03-16 18:09:57 +01:00
Simon Hausmann
f087cc18bc
Remove extern "C" functions from wasm module
...
We don't need these functions and their export. They account for ~20kb in
the optimized .wasm - plus JS glue code.
2021-02-26 17:04:49 +01:00
Olivier Goffart
f1300a7f2d
Fix propagation of mouse event.
...
Process the event in the post visit if the children did not intercept the event
2021-02-08 14:08:14 +01:00
Olivier Goffart
c2982d9ab3
Add ability to get the parent item from the vtable
...
(still untested)
2021-01-26 10:36:37 +01:00
Olivier Goffart
1fda2e1c99
Remove unused item_parent_offset
2021-01-26 10:36:37 +01:00
Simon Hausmann
89e0b57627
Rework and simplify the focus handling
...
Instead of determining the focus item through item tree traversal and
pointer comparison and storing the intermediate indices in the
components in the tree, remember the focus item by a pair of
VWeak<ComponentVTable, Dyn> and item_index: usize.
This speeds up determining the focus item as well as delivering events,
which can now be done directly after retrieving an ItemRef with
get_item_ref.
This also fixes the duplicate line edit focus in the 7gui cells
test case.
2020-11-20 15:33:15 +01:00
Simon Hausmann
7ddf3a9b31
Minor cleanup to item visitor API
...
While visit_items/visit_internal allows an isize index (because of -1 to indicate the root),
the callback should always take a valid item index, thus usize.
2020-11-20 13:37:45 +01:00
Simon Hausmann
78fae068dd
Use ComponentRc during item tree traversal
...
This is in preparation for allowing the run-time / items to clone VRc's
of the component.
ComponentVTable functions like visit_children_item contine to take a
ComponentRefPin as "self" parameter type, as a VRc would not be
supported by rust right now. That means the implementation then uses
self_weak to obtain a strong self-reference.
2020-11-19 17:04:01 +01:00
Simon Hausmann
88b94a26ea
Add support for clip rectangles in the GL rendering backend
2020-09-29 11:42:02 +02:00
Simon Hausmann
edf7418370
Add support for visiting the item tree with a post_visit callback
...
The callback will be invoked *after* visiting the item's children.
2020-09-29 09:37:45 +02:00
Olivier Goffart
5451e0a6fe
Fix offset of mouse event when mouse is grabbed
...
The bug could be seen when dragging a native slider whose x position is not 0
2020-09-02 11:59:48 +02:00
Olivier Goffart
58cdaeb8dd
Update license header to mention that commertial option are available
2020-08-26 13:23:42 +02:00
Olivier Goffart
cbeb982684
Use the FieldOffset struct from the upstream create
2020-08-24 11:20:38 +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
d3a474af26
Move corelib::Component and friends back into their dedicated component module
2020-08-12 11:39:07 +02:00
Simon Hausmann
0df86d7eeb
Move corelib::abi::datastructures::Component to corelib
2020-08-12 10:53:03 +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
Olivier Goffart
b5c9bf5d10
Settings page for the printer demo
...
Fix the text maximum size so it can be put in a layout
2020-08-11 12:08:44 +02:00
Olivier Goffart
d43b5fb6f9
Fix offset of the mouse event when the mouse is grabbed
2020-08-11 11:49:02 +02:00
Olivier Goffart
681f304768
Add a few Debug impl
2020-08-10 17:25:15 +02:00
Olivier Goffart
36243ccdf7
Traverse item front to back for input events
2020-08-10 10:45:02 +02:00
Olivier Goffart
0a56912d0f
Mouse grab in rust
2020-08-07 16:06:49 +02:00
Olivier Goffart
5aa7ee86fe
Use a newtype for VisitChildrenResult instead of just isize
...
Makes the code easier to unserstand
2020-08-07 16:06:49 +02:00
Olivier Goffart
55ec533c40
WIP input events
...
Compile and passes tests. But the mouse event are currently not working
2020-08-07 16:06:49 +02:00
Simon Hausmann
829990f9b1
WIP
...
Co-authored-by: Olivier Goffart <ogoffart@woboq.com>
2020-08-07 16:06:49 +02:00
Simon Hausmann
0252d2ac34
Move slice out of abi
2020-08-03 17:41:16 +02:00
Simon Hausmann
785bdb62ed
Fix linking on Linux
2020-08-03 15:35:19 +02:00
Simon Hausmann
a662d36dc3
Move ItemTreeNode from datastructures into item_tree
2020-08-03 14:38:08 +02:00
Simon Hausmann
45b02e9a3e
Move the item visitor bits from datastructures into item_tree
2020-08-03 14:10:32 +02:00
Olivier Goffart
e00491811b
Get rid of the context in properties/signal
2020-07-13 18:49:06 +02:00
Olivier Goffart
1b748792ad
Visit the item as Pin
...
A preparation to have Property::get to take Pin<Self>
2020-06-25 18:50:20 +02:00
Olivier Goffart
caca0d0ba4
Put the component in a Pin<>
...
Removed the drop and create from the ComponentVTable:
since we are not using VBox<ComponentVTable>, this simplifies a bit
the code of the interpreter and everything else.
But there is still a lot of changes everywhere to support that the Component
is pinned.
This is just for the component. Which would be required if later we want
to access the properties as Pin<Property<_>>. But we have not yet ability
to do projections
2020-06-24 14:13:27 +02:00
Olivier Goffart
f8b7989c0b
Access the properties in the parent component of a repeated element
...
This required some refactoring of the EvaluationContext structure to include the parent context
2020-06-22 14:38:38 +02:00
Olivier Goffart
8f0520f2be
Repeater in the viewer
2020-06-17 15:43:57 +02:00
Olivier Goffart
096fd7bbb4
Repeater in C++
2020-06-17 14:39:33 +02:00
Olivier Goffart
d7fe69ff74
Lookup the index from a repeater expression
2020-06-16 17:23:38 +02:00
Olivier Goffart
6122f91fba
Begin with the generation of rhe repeater (rust only for now)
2020-06-16 13:47:02 +02:00
Olivier Goffart
7c5ce4fea5
Add missing file
2020-06-12 21:04:27 +02:00