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
1b7d25efab
Provide a convenient way to get to the "website" via the docs
...
These markdown files are also included in other locations (Rust or C++), so
a way to get back to a future website is helpful.
2020-08-26 14:46:06 +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
72f0d09e61
Link to the online C++ docs
2020-08-26 11:28:26 +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
91621aa87a
Hide sixtyfps::cbindgen_private from the C++ docs
2020-08-25 16:43:43 +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
3f64defaac
Include the C++ API README in the C++ reference docs
2020-08-24 17:40:12 +02:00
Simon Hausmann
e9685c5851
Improve C++ documentation shell
...
Doxygen's markdown support can't quite deal with the Github flavor,
the language reference looks terrible.
So instead, this change switches to using Sphinx,
with two extensions that call Doxygen for us and allow including markdown.
The result is a read-the-docs themed sphinx site that includes search even
in the language reference.
2020-08-24 17:07:04 +02:00
Olivier Goffart
cbeb982684
Use the FieldOffset struct from the upstream create
2020-08-24 11:20:38 +02:00
Simon Hausmann
2b7649d2d4
Fix typo
2020-08-21 19:15:41 +02:00
Simon Hausmann
2bde730de9
Don't bother trying to generate LaTeX
2020-08-21 16:54:23 +02:00
Simon Hausmann
6ea46aa7e4
Include the language reference in the C++ docs
...
It's still a bit buggy but better than nothing
2020-08-21 16:46:23 +02:00
Simon Hausmann
f610957de0
Include README.md in the C++ Docs
2020-08-21 16:36:58 +02:00
Simon Hausmann
baf0e151a5
Include more header files in the doxygen pass
2020-08-21 16:26:21 +02:00
Simon Hausmann
462d73ccdc
Switch to Doxygen
...
clang-doc is nice and good, but there are features missing such as the ability to manually create a reference (link)...
2020-08-21 16:22:59 +02:00
Simon Hausmann
e397c83d1f
Fix parameters to clang-doc to generate HTML
...
... for now that's more readable.
2020-08-20 16:29:19 +02:00
Simon Hausmann
0e7c39dce4
Added cmake boilerplate for running clang-doc
...
It's an experiment :-)
2020-08-20 16:24:51 +02:00
Simon Hausmann
f05a8c3d32
Link back to the central README from the C++ README
2020-08-18 15:08:44 +02:00
Simon Hausmann
6f04bbbebf
Minor edit to the C++ README
2020-08-18 14:57:06 +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
Olivier Goffart
fb5a82b6c7
Fix acessing repeater variable in a nested repeater, and fix array as property
2020-08-13 15:38:28 +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
b21aa4f9e7
Rename PropertyListenerScope to PropertyTracker
2020-08-12 11:31:33 +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
f4cce26d51
Test the mouse click
2020-08-10 12:54:29 +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
Simon Hausmann
37f874a26b
Rename test_ellapse_time to mock_elapsed_time
2020-08-03 17:52:42 +02:00
Olivier Goffart
5f38f03a1b
Test setting signal handler and a few fix to make it work
...
We were not parsing CodeBlock node from the signal handler correctly,
we wer eonly taking the first expression instead of the whole codeblock
In JS, emitting signal before the show() did not update the GLOBAL_CONTEXT
needed to emit signals defined in JS
2020-08-03 15:01:10 +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
1d7effd030
Add missing files
2020-07-23 11:56:43 +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
96e5738785
Add a DPI variable in the interpreter and in the C++ backend
2020-07-15 17:13:23 +02:00
Olivier Goffart
e00491811b
Get rid of the context in properties/signal
2020-07-13 18:49:06 +02:00
Simon Hausmann
535da41ae0
More naming cleanups
...
PathData::PathElements has one redundant "Path" in the name, so eliminate
for Events and Elements.
2020-07-10 13:06:28 +02:00