Feature: Selection

Add support for selection content in the dom.
This commit is contained in:
Clément Roblot
2024-12-27 15:45:13 +07:00
committed by GitHub
parent 751c8fab26
commit 6fafa2dfed
25 changed files with 1001 additions and 31 deletions

View File

@@ -163,6 +163,7 @@ class VerticalContainer : public ContainerBase {
return false;
}
int old_selected = *selector_;
if (event.mouse().button == Mouse::WheelUp) {
MoveSelector(-1);
}
@@ -171,7 +172,7 @@ class VerticalContainer : public ContainerBase {
}
*selector_ = std::max(0, std::min(int(children_.size()) - 1, *selector_));
return true;
return old_selected != *selector_;
}
Box box_;