Olivier Goffart
07bf0974d7
C++: Expose conversion betwen Value
and Image
...
Closes #350
2021-07-26 14:12:32 +02:00
Olivier Goffart
0a46b367e2
C++: fix creating a gradient from a const reference to a color
2021-07-22 14:38:58 +02:00
Simon Hausmann
eaddbe664e
internal cleanup: Rename ComponentWindow to WindowRc
...
That's all it is nowadays, it's a wrapper around Rc<Window>. It's not an
alias because we need to also "wrap" it to C++ via cbindgen, but that's
about it.
2021-07-21 20:33:02 +02:00
Tobias Hunger
39984b27db
Janitor: Fix spelling in comments
2021-07-03 15:49:43 +02:00
Olivier Goffart
13bd828b96
Update license date
2021-07-02 15:55:54 +02:00
Simon Hausmann
adeb192f6e
C++ API: Make LinearGradientBrush and GradientStop private API
2021-07-02 15:34:16 +02:00
Simon Hausmann
f8abd57c3b
C++ docs: For the model bits, link to the for-in and ListView docs
...
Using an rst epiloge we can define global references that are even formatted
(using rst substitutions)
2021-07-02 12:32:28 +02:00
Simon Hausmann
69bbef529c
C++ docs: Link to the section of the generated code from the namespace intro
2021-07-02 09:56:52 +02:00
Simon Hausmann
4705415642
C++ docs: First draft of a sixtyfps namespace intro
2021-07-02 09:46:48 +02:00
Olivier Goffart
9b99b558ae
Spellcheck
2021-07-01 13:54:26 +02:00
Olivier Goffart
fe81590b07
Silence a bunch of MSVC warnings
2021-07-01 13:47:22 +02:00
Olivier Goffart
0d9daa1964
C++: silence a few conversion warnings with MSVC
2021-07-01 13:04:25 +02:00
Simon Hausmann
5d58d34e84
Document run_event_loop() and quit_event_loop()
...
The C++ versions were there before, but undocumented. The Rust version
for quit() was missing.
2021-06-29 16:12:00 +02:00
Simon Hausmann
3ab287223c
Silence exhale error
...
Doxygen would still generate xml for private_api::ArrayModel and would
try to resolve a reference to iself, which is not possible because we've
excluded the namespace:
```
stderr: (!) Critical error while generating the file for [/home/vagrant/sixtyfps/target/cppdocs/api/classsixtyfps_1_1Model.rst].Traceback (most recent call last):
File "/home/vagrant/.local/share/virtualenvs/docs-4wjFCyEr/lib/python3.8/site-packages/exhale/graph.py", line 2591, in generateSingleNodeRST
gen_file.write("{0}\n".format(node.baseOrDerivedListString(
File "/home/vagrant/.local/share/virtualenvs/docs-4wjFCyEr/lib/python3.8/site-packages/exhale/graph.py", line 393, in baseOrDerivedListString
link=nodeByRefid[refid].link_name
KeyError: 'classsixtyfps_1_1private__api_1_1ArrayModel'
```
Making the entire class as \private works around it.
Oddly, this isn't needed for IntModel, perhaps because it's not a template?
2021-06-28 14:18:45 +02:00
Olivier Goffart
640d178d9d
Fix compilation of the C++ interpreter
2021-06-28 12:16:59 +02:00
Olivier Goffart
ae114cf79d
C++: don't re-export private symbol in the public API
...
Use the cbindgen_private namespace dirrectly from the generated code
2021-06-28 12:03:49 +02:00
Olivier Goffart
16ba23ae47
Move StateInfo to the private namespace
2021-06-28 11:23:44 +02:00
Olivier Goffart
daff9e8e65
Move Callback and internal Models to the private_api namespace
2021-06-28 11:23:44 +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
Simon Hausmann
8a8ff6d2e9
Work around doxygen complaining about lack of override function
2021-06-26 09:42:56 +02:00
Simon Hausmann
25820b57d4
C++: fix remaining doxygen warnings in image.h and string.h
2021-06-25 21:07:01 +02:00
Simon Hausmann
7e3e6faa31
C++: Fix remaining warnings in callbacks.h
2021-06-25 20:59:23 +02:00
Simon Hausmann
8e729fee95
C++: Fix remaining doxygen warnings in sixyfps_interpreter.h
2021-06-25 20:41:53 +02:00
Simon Hausmann
919cc3065f
C++: Fix remaining doxygen warnings in sixtyfps.h
2021-06-25 20:33:03 +02:00
Simon Hausmann
929dd8dbf4
Fix various doxygen warnings
...
and hide some internal members from doxygen
2021-06-25 20:26:33 +02:00
Simon Hausmann
e042e5d5d7
C++: Fix doxygen warnings in sixtyfps_color.h
...
* Add missing docs
* Hide internal member from Doxygen
2021-06-25 20:19:44 +02:00
Simon Hausmann
57bbfd531a
C++: Add some docs for Brush and LinearGradientBrush
2021-06-25 20:14:53 +02:00
Simon Hausmann
2879102a29
C++: Document brighter and darker for Color
2021-06-24 17:10:43 +02:00
Simon Hausmann
f7c7d2e67a
C++: Add documentation for SharedVector
2021-06-24 17:04:58 +02:00
Simon Hausmann
d9857a3308
docs: add missing \a commands for arguments
2021-06-24 16:43:36 +02:00
Simon Hausmann
eef43bdf48
Fix typo
2021-06-24 11:10:55 +02:00
Simon Hausmann
59425b3f02
C++: Docs for sixtyfps::interpreter::Diagnostic and DiagnosticLevel
2021-06-22 08:34:33 +02:00
Simon Hausmann
2e4abc61e0
C++: Hide internal macros from documentation
...
That's SIXTYFPS_GET_ITEM_VTABLE, SIXTYFPS_DLL_IMPORT and
SIXTYFPS_QT_INTEGRATION
2021-06-22 08:27:08 +02:00
Simon Hausmann
fe59fb3ec3
C++: Hide sixtyfps::PathData from the public API
2021-06-21 15:50:58 +02:00
Simon Hausmann
51bc21c9a5
C++: Hide AbstractRepeaterView, Repeater and ModelPeer
...
These are not public API.
2021-06-21 15:50:58 +02:00
Simon Hausmann
f377b5db6c
C++: Document sixtyfps::interpreter::Value::Type
2021-06-21 15:50:58 +02:00
Simon Hausmann
f7ff3ba0db
C++: Document PropertyDescriptor
2021-06-21 15:50:58 +02:00
Simon Hausmann
07dd3ec82f
C++: Hide global comparison operators for private Slice API
2021-06-21 15:50:58 +02:00
Simon Hausmann
7f8f1b3105
Hide Property<T> and PropertyTracker<T> from the public C++ API
...
Move those two classes into the private_api namespace, which is excluded
from the API reference documentation.
For generate code the explicit qualification of Property<T> is changed,
for the cbindgen generated item types the private_api namespace is
pulled into the cbindgen_private namespace.
2021-06-21 15:50:58 +02:00
Simon Hausmann
85474f7670
Add support for sixtyfps::Image::size() in C++
...
Also added a unit test for the C++ implementation.
2021-06-20 11:18:28 +02:00
Simon Hausmann
3587d49445
Hide sixtyfps::Repeater::RepeaterInner from the C++ docs
2021-06-18 17:15:39 +02:00
Olivier Goffart
a0bea36e43
Fix preferred size of the Window with a layout
...
A few problem:
- the horizontal and vertical property were swapped
- The implementation of the "preferred_xxx" property was not materialized properly
because the `bindings` were borrowed in the materialize_fake_properties pass
- Since the Window has a stretch factor of 0., the preferred size of the inner layout
was not taken into account when merging the LayoutInfo. I believe taking the
maximum preferred size is the right solution when merging them.
2021-06-18 13:51:25 +02:00
Simon Hausmann
0a3ec534ae
Hide CallbackHelper and CallbackSignatureHelper from the API docs
...
There's no hide-from-docs tag for doxygen, so move these into the
private_api namespace.
2021-06-18 13:49:05 +02:00
Olivier Goffart
cfc04bb4ab
C++: adapt to the layout horizontal/vertical split
2021-06-16 15:14:07 +02:00
Olivier Goffart
7b63bb7d65
Allow to simulate key event with the interpreter (C++)
2021-06-11 11:26:21 +02:00
Simon Hausmann
c0511a54ea
Rename ComponentDefintion::callback_names() to just callbacks()
...
That's consistent with properties().
2021-06-07 12:08:35 +02:00
Simon Hausmann
855808f9b5
Add API to the Rust and C++ interpreter library to return the names of all publicly declared callbacks
2021-06-07 11:43:04 +02:00
Simon Hausmann
fb19588c8c
Add missing C++ sixtyfps::ComponentDefinition::name()
...
It was already present in Rust
2021-06-07 11:30:22 +02:00
Olivier Goffart
142a8dc185
Rename ImageReference to ImageInner and make Immage.0 private
2021-05-28 17:05:16 +02:00
Olivier Goffart
8e44ac2351
Image type: some more docs
2021-05-28 17:05:16 +02:00