91 views
in Embedded Wizard Studio by

like this background A specific GUI use case - Ask Embedded Wizard (embedded-wizard.de)

At my BasicPanel, the DoubleFingerSlidePanel need be PresentDialog from the BasicPanel, when two finger slide on the BasicPanel. 

At the DoubleFingerSlidePanel have a list which is controlled by SlideTouchHandler(NoOfFingers = 2). 

The whole process is : two finger slide on BasicPanel, DoubleFingerSlidePanel immediately be present, the list continue smooth move

Now, i achieve the  basic function for two finger slide, but i have problem:

like this picture the BasicPanel have some button and component that have it's self Touch Handler, 

case1:On two finger slide on BasicPanel processing when one or two finger touch the button at the start,the BasicPanel button(TouchHandler NoOfFingers = 1) will be trigger. 

             But we don't want the  BasicPanel button trigger On the  two finger slide on BasicPanel processing,how can i to achieve this function?

case2:On two finger slide processing,if one finger touch/slide  the TouchHandler that can slide (like HorizontalSlider,HorizontalValueBar,HorizontalScrollbar,SimpleTouchHandler)

             the DoubleFingerSlidePanel can't been PresentDialog. how can i to PresentDialog the DoubleFingerSlidePanel on this case?

 

More information for presentDialog process:

BasicSoftware send touch finger number to EW, when the number change we will invoke a slot function.

On the slot function we check the finger number, if number = 2, presentDialog the DoubleFingerSlidePanel.

1 Answer

0 votes
by

Hello ke007,

case1:On two finger slide on BasicPanel processing when one or two finger touch the button at the start,the BasicPanel button(TouchHandler NoOfFingers = 1) will be trigger. 

Ensure that the touch handler responsible for the two finger gesture is lying in front of the button. Then, when the user touches the component with two fingers simultaneously, the touch handler will react. When the user touches with one finger, the handler recognises it and relays the interaction to the other touch handler, e.g. to the button. Note: a multi-finger gestures is recognised when the user touches the screen with multiple finger (almost) simultaneously. See also Combine several Touch Handlers together.

case2:On two finger slide processing,if one finger touch/slide  the TouchHandler that can slide (like HorizontalSlider,HorizontalValueBar,HorizontalScrollbar,SimpleTouchHandler)             the DoubleFingerSlidePanel can't been PresentDialog. how can i to PresentDialog the DoubleFingerSlidePanel on this case

I don't understand your question.

BasicSoftware send touch finger number to EW, when the number change we will invoke a slot function. On the slot function we check the finger number, if number = 2, presentDialog the DoubleFingerSlidePanel.

I don't understand what you mean. To feed multi-touch events, there is no needs for separate slot methods. It is even essential to feed the events as described in Implementing the Main Loop. Note the invocation of the methods Core::Root.DriveMultiTouchHitting() and Core::Root.DriveMultiTouchMovement().

I hope it helps you further.

Best regards

Paul Banach

by

I want achieve this function:  two finger slide on BasicPanel, DoubleFingerSlidePanel immediately be present, the list continue smooth move

when 1 finger touch/slide at BasicPanel, the BasicPanel button is work normally.

if 2 finger touch/slide at BasicPanel, we need present the DoubleFingerSlidePanel. At DoubleFingerSlidePanel 2 finger slide use to control a list move.

To achieve this function "if 2 finger touch/slide at BasicPanel, we need present the DoubleFingerSlidePanel"  I get the finger number from Basic software, when finger number is 2, present DoubleFingerSlidePanel immediately.

 

So for case 1:

case1:On two finger slide on BasicPanel processing when one or two finger touch the button at the start,the BasicPanel button(TouchHandler NoOfFingers = 1) will be trigger. 

So we don't need "touch handler responsible for the two finger gesture"

One week ago, i push the touch handler that use to "touch handler responsible for the two finger gesture" .  And lying behind all button of BasicPanel, when 2 finger touch,  RestackTop the touch handler , then present the DoubleFingerSlidePanel . I think this way is not very immediately.  And the case one problem also happen. 

by
At my project, have two page/panel:  BasicPanel and DoubleFingerSlidePanel

BasicPanel  page just use 1 finger to touch/slide component to control function.

DoubleFingerSlidePanel only use 2 finger Slide Touch Handler to move a list.

the special function is:when 2 finger touch/slide on  BasicPanel  page, page need change to DoubleFingerSlidePanel page. At the same time, The button shouldn't trigger when 2 finger touch/slide on BasicPanel  page(if 1 of the 2 finger touch the button).  

How can we achieve this function?
by

the special function is:when 2 finger touch/slide on  BasicPanel  page, page need change to DoubleFingerSlidePanel page. At the same time, The button shouldn't trigger when 2 finger touch/slide on BasicPanel  page(if 1 of the 2 finger touch the button). 

To achieve the page change when 2 finger touch/slide on BasicPanel page, I invoke PresentDialog() when finger number is 2.

The problem is : BasicPanel page button been trigger at the same time(or before) present DoubleFingerSlidePanel page, when 2 finger touch/slide on BasicPanel Page. Our users do not accept this.

by

Hello ke007,

I get the finger number from Basic software, when finger number is 2, present DoubleFingerSlidePanel immediately.

...

BasicSoftware send touch finger number to EW, when the number change we will invoke a slot function

If I understood these statements correctly, your middleware (Basic software) provides the finger numbers to the GUI application by bypassing the Embedded Wizard functionality responsible for the touch event dispatching. If this assumption is correct, it will not work. Please see the documentation referenced in my first answer. It is essential for Embedded Wizard application to track the fingers by itself.

BasicPanel  page just use 1 finger to touch/slide component to control function. DoubleFingerSlidePanel only use 2 finger Slide Touch Handler to move a list.

Let's assume:

A1. The actually visible component is BasicPanel. When the user touches the Push Button existing within this component with one finger, the button should react.

A2. When the user touches with 2 fingers, a new component DoubleFingerSlidePanel should be presenter.

A3. When the user touches with 2 fingers, the Push Button should not react.

To achieve this:

S1: Arrange in BasicPanel a Simple Touch Handler so it fills the entire area of this component. The handler should overlay the Push Button lying in the background. By correctly configuring the property StackingPriority you can even enforce the Touch Handler to always reside on top of the component.

S2: Configure the property NoOfFingers of the Simple Touch Handler with the value 2 so the handler reacts to two finger gestures only. See also Configure the filter condition and Handle multi-touch events (e.g. pinch, zoom and rotate gesture).

S3: In the slot method associated to the Simple Touch Handler implement code to present the DoubleFingerSlidePanel. The slot method will be invoked only when the user taps the screen with 2 fingers. Touching the BasicPanel with one finger will 'fall through' the Simple Touch Handler and e.g. activate the Push Button lying behind it.

S4: In the DoubleFingerSlidePanel configure the Touch Handlers to react to 2 fingers only. (similarly to S2).

You can test the correct detection and handling of single/multi-touch events in Prototyper. See the section Touch screen inputs.

I hope it helps you further.

Best regards

Paul Banach

by

Hello Paul Banach:

Thank you for your answer. 

The way like your answer describe,I have achieve theway at my project a week ago.

Differently I am not use  StackingPriority property. Instead,I push a SampleTouchHandler behind all Touch/slide of BasicPanel, and set SampleTouchHandler property NoOfFingers = 2,EnablelMultiTouch = true.  when BasicSoftware tell me Finger number is 2, invoke RestackTop() change SampleTouchHandler on the top of BasicPanel page.

At the slot fucntion of SampleTouchHandler, we present the DoubleFingerSlidePanel page.

For your idea,i set SampleTouchHandler property StackingPriority = 0x0FFFFFFF and test.

I found the case 1 been resolve:

case1:On two finger slide on BasicPanel processing when one or two finger touch the button at the start,the BasicPanel button(TouchHandler NoOfFingers = 1) will be trigger. 

But the case 2 is not resolve:

case2:On two finger slide processing(on start, at BasicPanel), if one finger touch/slide  the area which can slide (like HorizontalSlider, HorizontalValueBar, SimpleTouchHandler)             sometimes the DoubleFingerSlidePanel can't been Present how can i to PresentDialog the DoubleFingerSlidePanel on this case

 

  

 

by

So i try the new way:

When BasicSoftware tell me finger number is 2, present DoubleFingerSlidePanel page immediatly.

For this way, we can resolve the 2 problem case1/case2, but i find a new problem:

the first time 2 finger slide on BasicPanel,present DoubleFingerSlidePanel page immediatly,but the list one the DoubleFingerSlidePanel page can't move follow finger slide.

until finger leave,and 2 finger slide again on DoubleFingerSlidePanel page,the list can move follow finger slide.

I think maybe the first time 2 finger slide,the touch grab cycle is still keep at BasicPanel page.

How can we Transfer the touch grab cycle from  BasicPanel page to DoubleFingerSlidePanel page at first time 2 finger slide?

like use DeflectCursor()?

by

Hello ke007,

the approach with the finger number being passed from Basic Software to the application is still not clear for. I can't help you here. See my answer above.

When using the regular Embedded Wizard functionality, the application case should be implemented easily with few lines of code. See the attached project demonstrating it: Example project. See inline comments for more details. The importants steps are:

Step 1: The Simple Touch Handler in Basic component has to lie in front of the Push Button.

Step 2: The Simple Touch handler in Basic component has to be configured with the property NoOfFingers=2.

Step 3: Connect a slot method to Simple Touch Handler's OnPress property. In the implementation of the slot method present the DoubleFinger dialog.

Step 4: The Simple Touch Handler in Basic component has to be configured with the property RetargetCondition=Core::RetargetReason[WipeDown, WipeLeft, WipeRight, WipeUp].

Step 5: The Slide Touch Handler in in DoubleFinger component has to be configured with the property NoOfFingers=2.

 

The step 1 and 2 ensure that single taps fall through and reach the Push Button in the background while two-finger gestures are caught by the Simple Touch Handler.

The step 3 takes care of displaying the DoubleFinger dialog when the user taped the component with 2 fingers.

The step 4 relays the actual 2-finger gesture to the DoubleFinger component. The user can continue scrolling the list.

The step 5 ensures that the list can be scrolled with two fingers only. 

 

To perform two finger gestures in Prototyper use the Alt key as described in the documentation referenced in my preceding answer.

I hope it helps you further.

Best regards

Paul Banach

by
Follow your answer:

Step 1: The Simple Touch Handler in Basic component has to lie in front of the Push Button.

Step 2: The Simple Touch handler in Basic component has to be configured with the property NoOfFingers=2.

Step 3: Connect a slot method to Simple Touch Handler's OnPress property. In the implementation of the slot method present the DoubleFinger dialog.

Step 4: The Simple Touch Handler in Basic component has to be configured with the property RetargetCondition=Core::RetargetReason[WipeDown, WipeLeft, WipeRight, WipeUp].

Step 5: The Slide Touch Handler in in DoubleFinger component has to be configured with the property NoOfFingers=2.

 

For my test,the button on BasicPanel which behind the Simple Touch Handler can't be trigger?

how to resolve this problem?
by

For the "finger number being passed from Basic Software to the application" process:

BasicSoftware will invoke a function every 10ms,the function is define on EW Device port like bellow:

if ( aNewValue != pure DoubleSlide )
{
  // Remember the new value in the internal memory of the property.
  pure DoubleSlide = aNewValue;

  if (2 == DoubleSlide) 
  {
    signal slotDoubleSlideTop;
  }

  // Notify all associated property observers.
  notifyobservers ^DoubleSlide;
}

slotDoubleSlideTop  link with a slot function that present DoubleFinger dialog

DoubleSlide  is a property on EW Device port, it can hold value on one power_up processing

by

Hello ke007,

For my test,the button on BasicPanel which behind the Simple Touch Handler can't be trigger?
how to resolve this problem?

Have you testet the example project I have prepared for you in my preceding answer? In this example the button is working. What is the difference between this example and your project?

An idea: in your project check the configuration of the Simple Touch Handler's property EnableMultiTouch. It has to be false. Only NoOfFingers has to be 2 to have a handler reacting to two finger gestures.

Best regards

Paul Banach

Embedded Wizard Website | Privacy Policy | Imprint

...