GPU-accelerated UI toolkit (Vulkan)
git clone https://git.lucas.co/cce-ui.git
Delegated drag lifecycle events (draggable, drag_begin, drag_update, drag_end) from TreeList to ScrollBox
src/widget/container/treelist.rs | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/src/widget/container/treelist.rs b/src/widget/container/treelist.rs
index 72e4c6c..3289a9d 100644
--- a/src/widget/container/treelist.rs
+++ b/src/widget/container/treelist.rs
@@ -464,6 +464,22 @@ impl Element for TreeList {
changed
}
+ fn draggable(&self) -> bool {
+ self.scroll_box.draggable()
+ }
+
+ fn drag_begin(&mut self, px: f32, py: f32) {
+ self.scroll_box.drag_begin(px, py);
+ }
+
+ fn drag_update(&mut self, px: f32, py: f32) -> bool {
+ self.scroll_box.drag_update(px, py)
+ }
+
+ fn drag_end(&mut self) {
+ self.scroll_box.drag_end();
+ }
+
fn wants_tick(&self) -> bool {
true
}