Olivier Goffart
9fbb40d91b
Start working on a debug statement
2020-09-03 19:10:07 +02:00
Simon Hausmann
fab3d9355d
Remove ItemVisitorRefMut and ComponentRef from the public C++ API
...
It's only for internal use and just typedefs to private types anyway.
2020-09-03 15:44:36 +02:00
Olivier Goffart
1cf6d81169
Impletment GroupBox with the Qt style
2020-09-02 17:05:28 +02:00
Olivier Goffart
9782d85fdb
Native style works with C++
2020-09-01 12:25:11 +02:00
Olivier Goffart
6d41b1981d
Move the Qt style to a new backend: the Qt backend
...
Currently the Qt backend still redirect everything to the GL backend,
but the goal is to use QPainter and QWindow
This also adds a "default" backend, whose goal is to select the proper
backend at compile time
2020-08-31 17:26:04 +02:00
Simon Hausmann
5dbd0b213c
Add support for grid layout padding
2020-08-28 15:06:14 +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
Olivier Goffart
58cdaeb8dd
Update license header to mention that commertial option are available
2020-08-26 13:23:42 +02:00
Simon Hausmann
9785919f6e
Hide a few APIs from the C++ documentation
...
Since Doxygen can't seem to just exclude them via command, they are moved
into a private_api namespace and then excluded via Doxygen config:
* *VTable
* make_dyn_node, ItemTreeNode, etc.
* VersionCheck
2020-08-25 17:45:12 +02:00
Simon Hausmann
88089970e9
Re-ran clang-format on sixtyfps.h
...
Before further edits, this makes the subsequent diffs easier to read:-)
2020-08-25 16:24:58 +02:00
Simon Hausmann
9dd6101494
Avoid using cbindgen_private in generated C++ code
...
Instead, pull in the types manually.
2020-08-25 15:36:29 +02:00
Simon Hausmann
14fe897086
Move all cbindgen generated code into
...
sixtyfps::cbindgen_private
Having private in the name makes it clear that this is ... private,
and cbindgen helps remember that it's generated.
2020-08-25 15:29:48 +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
55888afb1c
Implement releasing of graphics resources in C++ via the component destructor
2020-08-13 16:35:04 +02:00
Simon Hausmann
d650cadc02
Release graphics resources of items when deleting components in C++
2020-08-13 13:31:52 +02:00
Simon Hausmann
aafb96cb93
Get rid of abi::datastructures::WindowProperties
...
Instead, pass a reference to the root item when mapping the window,
at which point we can downcast to the new Window item. If we have one,
then we'll read its width/height (for initial values) and install
bindings to keep them up-to-date.
2020-08-12 09:44:42 +02:00
Simon Hausmann
c1f91e38ca
Move the window scale factor into GraphicsWindow
2020-08-11 13:42:51 +02:00
Olivier Goffart
36243ccdf7
Traverse item front to back for input events
2020-08-10 10:45:02 +02:00
Olivier Goffart
cc5d5cc92b
C++: Fix input event within repeater
2020-08-10 08:55:42 +02:00
Olivier Goffart
5de801d023
C++: grabbed mouse input
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
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
Olivier Goffart
da11b33e9b
Version check
...
Compilation error when the compiler and the runtime are not on the same version
2020-08-03 18:44:36 +02:00
Olivier Goffart
a4efac920a
C++: make all properties and sub elements private
2020-08-03 15:01:10 +02:00
Simon Hausmann
cb7aca54d4
Implement support for nested layouts in the C++ generator
2020-07-30 19:41:38 +02:00
Olivier Goffart
9760cf4969
Begin to implement a Flickable
...
The implementation is still very rough and will need to be improved
2020-07-30 14:36:21 +02:00
Olivier Goffart
46a011683f
Implement easing curve in the runtime
2020-07-29 15:20:28 +02:00
Olivier Goffart
b57f3775c9
Refactor GridLayout
2020-07-28 10:31:05 +02:00
Simon Hausmann
389c2ab3cd
Fix build of C++ tests
2020-07-24 11:08:40 +02:00
Olivier Goffart
1dec276002
Continue adapting the window size
...
Implement the Rust and C++ part
2020-07-15 17:52:14 +02:00
Simon Hausmann
ddc4fb6e1f
WIP: window size
...
Just playing around with propagating the width/height of the window.
2020-07-15 17:52:14 +02:00
Olivier Goffart
e00491811b
Get rid of the context in properties/signal
2020-07-13 18:49:06 +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
Olivier Goffart
90532e80d2
C++: Support of dynamic model and if expression
2020-07-03 17:37:07 +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
967a2b94eb
C++: put a pointer to the parent in the component
2020-06-29 10:35:18 +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
4e3473d40c
clang_format
2020-06-19 14:30:50 +02:00
Olivier Goffart
022cd64625
Support for array model in C++
2020-06-19 14:29:54 +02:00
Olivier Goffart
6238d0d14f
Prepare for the ability to access the model
...
Add an expression type for the access of the model variable from a repeater
2020-06-19 13:46:55 +02:00
Olivier Goffart
864e74601d
Add a Model type for
...
I guess in the future we want to make model a type that knows its inside
2020-06-19 13:13:19 +02:00
Simon Hausmann
8f613685ba
Expose a ComponentWindow in C++
...
This paves a way for a more modular API.
2020-06-17 19:15:18 +02:00
Olivier Goffart
096fd7bbb4
Repeater in C++
2020-06-17 14:39:33 +02:00
Olivier Goffart
30b201d946
Reduce the use of unsafe in corelib and in the rust backend
2020-06-12 19:03:15 +02:00
Olivier Goffart
e7644eba94
Fix C++ compilation with the new item visitor
2020-06-12 17:09:51 +02:00
Olivier Goffart
9c23326c60
Layout for the C++ as well
2020-06-10 19:41:24 +02:00
Olivier Goffart
5f01ec30ee
Fix the viewer using generated rtti from a macro
...
One thing that needed to change is that we needed the vtable to be unique
2020-05-30 15:08:51 +02:00
Olivier Goffart
f6d1151832
Use the EvaluationContext in the signal handler
2020-05-28 14:26:35 +02:00
Olivier Goffart
4575011293
More work on signal: the C++ part is working
2020-05-20 19:28:58 +02:00