Commit graph

131 commits

Author SHA1 Message Date
Olivier Goffart
c8fa3354be Change the implementation of SharedArray so that it can destruct its contents 2020-09-04 15:37:38 +02:00
Simon Hausmann
6278a7168a Include the example preview also in the C++ documentation
The template system used by Sphinx makes this rather easy, just the selector for the
HTML element to inject to needs to be extended.
2020-09-04 11:44:08 +02:00
Simon Hausmann
f4958abba5 Simplify C++ docs build directory setup
Symlink the _static directory instead.
2020-09-04 11:30:51 +02:00
Olivier Goffart
9fbb40d91b Start working on a debug statement 2020-09-03 19:10:07 +02:00
Simon Hausmann
dcb923c1df Simplify markdown links to C++/Rust docs
and also offer them conveniently in the primary readme.
2020-09-03 17:35: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
Simon Hausmann
3eef23f93c Add widgets to the C++ docs as well 2020-09-03 12:05:50 +02:00
Simon Hausmann
834fa12206 Add the builtin elements to the C++ docs 2020-09-03 09:36:30 +02:00
Simon Hausmann
82ecae8ba6 Move the .60 <> C++ type mappings into a separate section
So the README.md remains usable also on Github.
2020-09-03 09:30:46 +02:00
Simon Hausmann
dc137fa0a6 Add a .60 <> C++ type mapping table to the C++ docs 2020-09-02 17:06:41 +02:00
Simon Hausmann
fd9aea97eb Fix markdown table rendering in C++ docs
This reverts commit 0bb904e10a and
re-introduces the markdown table support extension. The resulting table
by default is too wide in the "responsive" read-the-docs theme, but with
a CSS tweak it becomes readable.

Markdown tables are much easier to deal with and this way we can also
include references within the tables.
2020-09-02 17:06:41 +02:00
Olivier Goffart
1cf6d81169 Impletment GroupBox with the Qt style 2020-09-02 17:05:28 +02:00
Simon Hausmann
65ff715fbc Make C++ documentation generation an xtask
Tear it out of the CMakeLists.txt and instead run it via

    cargo xtask cppdocs

This allows the build_and_test step in the CI to only run cmake for the
library/header related bits and the docs_and_demos step to only generate
docs and not require a full host build of the library (as cargo xtask
cmake would otherwise do).
2020-09-01 17:03:55 +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
26502e4082 Add a paragraph about the C++ build process 2020-08-31 17:13:47 +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
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