Skip to content

C++: Implement lazy element creation for ListView (Shared with FFI)#11255

Merged
ogoffart merged 3 commits into
masterfrom
olivier/cpp
Apr 8, 2026
Merged

C++: Implement lazy element creation for ListView (Shared with FFI)#11255
ogoffart merged 3 commits into
masterfrom
olivier/cpp

Conversation

@ogoffart
Copy link
Copy Markdown
Member

@ogoffart ogoffart commented Apr 2, 2026

Share ListView virtualization algorithm between Rust and C++ via FFI

The C++ Repeater::ensure_updated_listview previously instantiated all
model items regardless of viewport visibility.
This extracts the element creation and listview layouting into functions
called from both Rust and C++ through a small FFI callback interface

First commit is just code move.

Comment thread api/cpp/include/private/slint_models.h Outdated
Comment thread api/cpp/include/private/slint_models.h Outdated
Share ListView virtualization algorithm between Rust and C++ via FFI

The C++ Repeater::ensure_updated_listview previously instantiated all
model items regardless of viewport visibility.
This extracts the element creation and listview layouting into functions
called from both Rust and C++ through a small FFI callback interface
@ogoffart ogoffart changed the title C++: Implement lazy element creation for ListView C++: Implement lazy element creation for ListView (Shared with FFI) Apr 2, 2026
@ogoffart ogoffart merged commit 08d8e1e into master Apr 8, 2026
46 checks passed
@ogoffart ogoffart deleted the olivier/cpp branch April 8, 2026 09:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants