Having a const generic for that didn't turn to be a good API.
Also made the C++ side more difficult
(Also renamed buffer_stride to pixel_stride)
Closes#2135
For node and cpp, I use relative links to point to the slint language
reference documentation.
For the slint crate documentation I create a link to
https://slint-ui.com/releases/VERSION/... instead: This needs to work from
docs.rs as well as from our own docs area on slint-ui.com! That is
pretty ugly: I can not even define constants for this as the crate docs
need to come before anything else.
This type is poorly implemented and not documented. Let's remove it for now.
It shall remain available in the git history in the event of a resurrection.
* move cpp StandardListViewItem to public namespace
* Fix missing C++ docs for StandardListViewItem
The struct is originally defined in Rust in model.rs and cbindgen creates the
compatible C++ declaration. For doxygen
to see it, it needs to be emitted into slint_generated_public.h.
* Improve the StandardListViewItem docs a little bit
* move cpp StandardListViewItem to public namespace
Co-authored-by: Simon Hausmann <simon.hausmann@slint-ui.com>
Make sure that we return an unsigned for row_count() in C++ and Rust by ensuring an unsigned int model at creation time.
For the interpreter this "worked" by chance as casting a negative floating
number to usize automatically caps at zero, and all values are stored as f64. For safety this patch
applies the same fix though, to be on the safe side.
* Text only StandardTableView with column and rows
* Text editing of cells
* Sort by column ascending and descending
* Variants of the TableView for native, fluent and material
After commit 3e5aa212d5 the Slint DLLs
aren't placed in the `bin/` directory by default anymore. Since the
tutorial builds Slint as an external sub-project, it is entirely
isolated and the CMAKE_*_OUTPUT_DIRECTORY variables do not propagate. On
macOS and Linux, the program still runs due to rpath. On Windows, the
instructions said to put `bin` into `%PATH%`, but that doesn't work
anymore, the dll is now in `_deps/slint-build`.
Instead of adjusting `%PATH%`, this change adjusts the documentation to
recommend the use of a custom command on Windows using
$<TARGET_RUNTIME_DLLS:tgt> to copy the DLL across. This is guarded with
WIN32 due to https://gitlab.kitware.com/cmake/cmake/-/issues/23543 ,
where the proposed solution requires CMake 3.26 (not released yet).
Now that the binaries are placed in their respective
CMAKE_RUNTIME_OUTPUT_DIRECTORY, that's config suffixed, let's use the
ctest signature that accepts a cmake target and thus automatically
figures out the correct location of the executable.
- virtual destructor can be = default
- rules of 3 for AbstractWindowAdapter
- Since WindowAdapter inherit AbstractWindowAdapter, it is already no-copy
Re-use the cells but mark them as dirty, instead of re-creating them every time.
In the included test-case that provides behavior that's
more intuitive.
This requires the following changes:
- Delay configuring SlintConfig.cmake:
Corrosion sets the `IMPORTED` locations late to allow us to set
OUTPUT_DIRECTORY target properties. The configuration of
SlintConfig.cmake must be deferred until after Corrosion set the
locations. Since we are writing to a config file Generator expressions
are not an option.
- Remove BUILD_TYPE mapping from SlintConfig.cmake:
As discussed in https://github.com/slint-ui/slint/pull/1785#issuecomment-1294630845
remove the mapping of the build types since corrosion now always sets
the `IMPORTED_LOCATION` property.
User facing improvements enabled by the update:
- Corrosion will not fail anymore if the user has a Rust toolchain >=1.60
installed, but the default toolchain is < 1.60.
- Corrosion will respect OUTPUT_DIRECTORY properties and move target
artifacts to the expected locations