[NUI] Add InterceptWheelEvent
authorjoogab.yun <joogab.yun@samsung.com>
Tue, 4 Jul 2023 07:06:47 +0000 (16:06 +0900)
committerBowon Ryu <wonrst22@naver.com>
Wed, 5 Jul 2023 07:42:04 +0000 (16:42 +0900)
commitc6837f8be8bdad8992b991eac276dd897a9ef404
treef3411e5142b05817a5f96acba3d3fec24b878185
parentbcd4f31596b92249f9efe0df496ad50546ce1b77
[NUI] Add InterceptWheelEvent

The Wheel event calls the WheelEvent callback by going back from the last child actor to the parent via hitTest.
InterceptWheelEvent checks the wheel event in the parent first.
Returning false from interceptWheelEvent allows child actors to receive WheelEvents.
If it returns true, the actor will receive a WheelEvent.

for example

   View parent = new View();
   View child = new View();
   parent.Add(child);
   child.WheelEvent += childFunctor;
   parent.WheelEvent += parentFunctor;

The callbacks are called in the order childFunctor -> parentFunctor.

If you connect InterceptWheelEvent to parentActor.

   parent.InterceptWheelEvent += interceptFunctor;

When interceptFunctor returns false, it is called in the same order childFunctor -> parentFunctor.
If intereptFunctor returns true, it means that the WheelEvent was intercepted.
So the child actor will not be able to receive wheel events.
Only the parentFunctor is called.

refer :
https://review.tizen.org/gerrit/#/c/platform/core/uifw/dali-core/+/295232/
https://review.tizen.org/gerrit/#/c/platform/core/uifw/dali-csharp-binder/+/295233/
src/Tizen.NUI/src/internal/Interop/Interop.ActorSignal.cs
src/Tizen.NUI/src/public/BaseComponents/ViewEvent.cs
src/Tizen.NUI/src/public/BaseComponents/ViewInternal.cs
src/Tizen.NUI/src/public/Window/WindowEvent.cs
test/Tizen.NUI.Samples/Tizen.NUI.Samples/Samples/ScrollableFocus/ScrollableFocusSample.cs