Difference between revisions of "Gestures"

From HSYCO
Jump to navigation Jump to search
 
(10 intermediate revisions by the same user not shown)
Line 1: Line 1:
Each page of type page or menu, can have multiple gestures assigned. This is done through
+
Each page of type '''[[Page#Menu|menu]]''' and '''[[Page#Page|page]]''', can have multiple gestures assigned.
pages (of '''page''' and '''menu''' types) can have multiple custom gestures assigned.
+
 
This is done through the '''gestures''' attribute on the Project Editor, which adds a ''meta'' to the source code.
+
This is done through the '''gestures''' attribute on the [[Project Editor]], which is specified through a ''meta tag'' in the source code.
  
 
There are six different types of gestures available:
 
There are six different types of gestures available:
Line 7: Line 7:
  
 
{| class="wikitable"
 
{| class="wikitable"
 +
!
 
!Name
 
!Name
 
!Description
 
!Description
!
 
 
!Default value
 
!Default value
 
|-
 
|-
 +
|[[File:Gesture icon swipeup.png|40px]]
 
|swipeup
 
|swipeup
 
|swipe towards the top of the screen
 
|swipe towards the top of the screen
|[[File:Gesture icon swipeup.png|40px]]
 
 
|off
 
|off
 
|-
 
|-
 +
|[[File:Gesture icon swipedown.png|40px]]
 
|swipedown
 
|swipedown
 
|swipe towards the bottom of the screen
 
|swipe towards the bottom of the screen
|[[File:Gesture icon swipedown.png|40px]]
 
 
|page:menu
 
|page:menu
 
|-
 
|-
 +
|[[File:Gesture icon swipeleft.png|40px]]
 
|swipeleft
 
|swipeleft
 
|swipe towards the left side of the screen
 
|swipe towards the left side of the screen
|[[File:Gesture icon swipeleft.png|40px]]
 
 
|page:forward
 
|page:forward
 
|-
 
|-
 +
|[[File:Gesture icon swiperight.png|40px]]
 
|swiperight
 
|swiperight
 
|swipe towards the right side of the screen
 
|swipe towards the right side of the screen
|[[File:Gesture icon swiperight.png|40px]]
 
 
|page:back
 
|page:back
 
|-
 
|-
 +
|[[File:Gesture icon pinchin.png|40px]]
 
|pinchin
 
|pinchin
 
|drag two fingers together
 
|drag two fingers together
|[[File:Gesture icon pinchin.png|40px]]
 
 
|off
 
|off
 
|-
 
|-
|pinchin
+
|[[File:Gesture icon pinchout.png|40px]]
 +
|pinchout
 
|drag two fingers apart
 
|drag two fingers apart
 
|off
 
|off
|[[File:Gesture icon pinchout.png|40px]]
+
|}
|-
 
}
 
  
 
Each gesture can have one of the following values:
 
Each gesture can have one of the following values:
Line 54: Line 53:
 
|-
 
|-
 
|user
 
|user
|completing the gesture will produce a user call with name "gesture" and param "<type of gesture>/<page id (without page:)". E.g. param:"swipeleft/menu"
+
|completing the gesture will generate a user call with name "gesture" and param "<type of gesture>/<page id (without page:)>".  
 +
E.g. param:"swipeleft/menu"
 
|-
 
|-
|page:<page id>
+
|style="width: 100px"|page:<page id>
 
|navigate to the specified page id
 
|navigate to the specified page id
 
|-
 
|-
Line 68: Line 68:
  
 
=== Syntax ===
 
=== Syntax ===
(menu) defines the beginning of the page. Orientation is specified as (menu#landscape) or (menu#portrait) when the project is orientation-enabled.
+
Gesture meta tags follow a page declaration (menu) or (page).
(endofmenu) defines the end of the page.
+
 
  (menu[#<orientation>])
+
Gestures are specified with a semicolon-separated list of name=value pair.
...
+
 
(endofmenu)
+
  (#gestures <gesture type>=<value>; <gesture type>=<value> ... )
 +
 
 
E.g.
 
E.g.
(menu)
 
...
 
(endofmenu)
 
 
 
  (menu#portrait)
 
  (menu#portrait)
 +
(#gestures swipedown=off; swipeup=page:cameras; pinchin=user)
 
  ...
 
  ...
(endofmenu)
 
 
(menu#portrait)
 
(#gestures swipeup=off; pinchin=user; swipeleft=page:back; pinchout=page:u)
 

Latest revision as of 18:08, 16 November 2018

Each page of type menu and page, can have multiple gestures assigned.

This is done through the gestures attribute on the Project Editor, which is specified through a meta tag in the source code.

There are six different types of gestures available:


Name Description Default value
Gesture icon swipeup.png swipeup swipe towards the top of the screen off
Gesture icon swipedown.png swipedown swipe towards the bottom of the screen page:menu
Gesture icon swipeleft.png swipeleft swipe towards the left side of the screen page:forward
Gesture icon swiperight.png swiperight swipe towards the right side of the screen page:back
Gesture icon pinchin.png pinchin drag two fingers together off
Gesture icon pinchout.png pinchout drag two fingers apart off

Each gesture can have one of the following values:

Name Description
off no gesture assigned
user completing the gesture will generate a user call with name "gesture" and param "<type of gesture>/<page id (without page:)>".

E.g. param:"swipeleft/menu"

page:<page id> navigate to the specified page id
page:back navigate to previous page in history
page:forward navigate to next page in history


Syntax

Gesture meta tags follow a page declaration (menu) or (page).

Gestures are specified with a semicolon-separated list of name=value pair.

(#gestures <gesture type>=<value>; <gesture type>=<value> ... )

E.g.

(menu#portrait)
(#gestures swipedown=off; swipeup=page:cameras; pinchin=user)
...