Check-in [46186ab755]

Login
Bounty program for improvements to Tcl and certain Tcl packages.

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Started TIP 570: gesture support for finger scrolling and "pinch to zoom"
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 46186ab75576e9ad16736d0b9daf9bcc70557910de38f86323e291e254421128
User & Date: oehhar 2020-03-18 15:56:41
Context
2020-03-18
15:58
Put target Tk Version in field Tcl-Version check-in: d716397efe user: oehhar tags: trunk
15:56
Started TIP 570: gesture support for finger scrolling and "pinch to zoom" check-in: 46186ab755 user: oehhar tags: trunk
2020-03-16
23:37
Update 552 to match latest cellselection implementation check-in: f08d8e2da6 user: pspjuth tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to index.json.

1

2
3
4
5
6
7
8
...
566
567
568
569
570
571
572
573
574
{"tip": {

	"569":{"url":"./tip/569.md","keywords":"lint","state":"Final","vote-summary":"Accepted 8/0/0","type":"Project","author":["Don Porter <[email protected]>"],"votes-for":"DP, JD, KK, KW, SL, FV, DF, JN","votes-against":"none","created":"6-Mar-2020","title":"# TIP 569: Eliminate Comments That Serve Lint","post-history":"","vote":"Done","tcl-version":"8.7","votes-present":"none","is-jest":false},
	"568":{"url":"./tip/568.md","keywords":"bytearray","created":"4-Mar-2020","post-history":"","state":"Draft","tcl-branch":"dgp-properbytearray","tcl-version":"9.0","vote":"Pending","type":"Project","title":"# TIP 568: Revise ByteArray Routines To Support Proper Value Extraction","author":["Don Porter <[email protected]>"],"is-jest":false},
	"567":{"url":"./tip/567.md","keywords":"Tcl, TclOO, slots","created":"22-Feb-2020","post-history":"","state":"Draft","tcl-branch":"tip-567","tcl-version":"8.7","vote":"In progress","type":"Project","title":"# TIP 567: Add Operation to Support Set-like Slots","author":["Donal K. Fellows <[email protected]>"],"is-jest":false},
	"566":{"url":"./tip/566.md","keywords":"lset","created":"19-Feb-2020","post-history":"","state":"Draft","tcl-branch":"lset-index","tcl-version":"8.7","vote":"Pending","type":"Project","title":"# TIP 566: Index usage in lset","author":["Jan Nijtmans <[email protected]>"],"is-jest":false},
	"565":{"url":"./tip/565.md","keywords":"Tk canvas","created":"10-Feb-2020","post-history":"","state":"Final","tcl-branch":"bug-3552805fff","tcl-version":"8.7","vote":"Done","type":"Project","title":"# TIP 565: .canvas raise/lower ignore non-existent tag","author":["Francois Vogel <[email protected]>"],"is-jest":false},
	"564":{"url":"./tip/564.md","keywords":"Tk Ttk x11 font size","created":"9-Feb-2020","post-history":"","state":"Final","tcl-branch":"bug-dccd82bdc7","tcl-version":"8.7","vote":"Done","type":"Project","title":"# TIP 564: ttk font sizes in points","author":["Francois Vogel <[email protected]>"],"is-jest":false},
	"563":{"url":"./tip/563.md","keywords":"Tk, bindings","state":"Final","vote-summary":"Accepted 9/0/0","type":"Project","tk-branch":"tip-563-scrollbar-scrollwheel","author":["Harald Oehlmann <[email protected]>"],"votes-for":"FV, SL, KK, JD, BG, JN, KW","votes-against":"none","created":"02-Feb-2020","title":"# TIP 563: scrollwheel on horizontal scrollbar scrolls without shift too","vote":"Done","tcl-version":"8.7","votes-present":"none","is-jest":false},
................................................................................
	"5":{"url":"./tip/5.md","created":"17-Oct-2000","post-history":"","state":"Final","vote":"Done","tcl-version":"8.4","type":"Project","title":"# TIP 5: Make TkClassProcs and TkSetClassProcs Public and Extensible","author":["Eric Melski <[email protected]>"],"is-jest":false},
	"4":{"url":"./tip/4.md","created":"26-Oct-2000","post-history":"","state":"Draft","vote":"Pending","type":"Informative","title":"# TIP 4: Tcl Release and Distribution Philosophy","discussions-to":"news:comp.lang.tcl","author":["Brent Welch <[email protected]>","Donal K. Fellows <[email protected]>","Larry W. Virden <[email protected]>","Larry W. Virden <[email protected]>"],"is-jest":false},
	"3":{"url":"./tip/3.md","created":"14-Sep-2000","obsoleted-by":"467","post-history":"","state":"Accepted","vote":"Done","type":"Process","title":"# TIP 3: TIP Format","author":["Andreas Kupries <[email protected]>","Donal K. Fellows <[email protected]>"],"is-jest":false},
	"2":{"url":"./tip/2.md","created":"12-Sep-2000","post-history":"","state":"Draft","vote":"Pending","type":"Process","title":"# TIP 2: TIP Guidelines","author":["Andreas Kupries <[email protected]>","Donal K. Fellows <[email protected]>","Don Porter <[email protected]>","Mo DeJong <[email protected]>","Larry W. Virden <[email protected]>","Kevin Kenny <[email protected]>"],"is-jest":false},
	"1":{"url":"./tip/1.md","created":"14-Sep-2000","obsoleted-by":"386","post-history":"","state":"Withdrawn","vote":"No voting","type":"Informational","title":"# TIP 1: TIP Index","author":["TIP Editor <[email protected]>"],"is-jest":false},
	"0":{"url":"./tip/0.md","created":"11-Dec-2000","post-history":"","state":"Final","vote":"Done","type":"Process","title":"# TIP 0: Tcl Core Team Basic Rules","author":["John Ousterhout <[email protected]>"],"is-jest":false},
	"@min": 0,
	"@max": 569
}, "@timestamp": 1584127319}
>







 







|
|
1
2
3
4
5
6
7
8
9
...
567
568
569
570
571
572
573
574
575
{"tip": {
	"570":{"url":"./tip/570.md","keywords":"Tk, bindings","created":"18-Mar-2020","post-history":"","state":"Draft","tk-version":"8.7","vote":"Done","type":"Project","title":"# TIP 570: gesture support for finger scrolling and \"pinch to zoom\"","author":["Harald Oehlmann <[email protected]>"],"is-jest":false},
	"569":{"url":"./tip/569.md","keywords":"lint","state":"Final","vote-summary":"Accepted 8/0/0","type":"Project","author":["Don Porter <[email protected]>"],"votes-for":"DP, JD, KK, KW, SL, FV, DF, JN","votes-against":"none","created":"6-Mar-2020","title":"# TIP 569: Eliminate Comments That Serve Lint","post-history":"","vote":"Done","tcl-version":"8.7","votes-present":"none","is-jest":false},
	"568":{"url":"./tip/568.md","keywords":"bytearray","created":"4-Mar-2020","post-history":"","state":"Draft","tcl-branch":"dgp-properbytearray","tcl-version":"9.0","vote":"Pending","type":"Project","title":"# TIP 568: Revise ByteArray Routines To Support Proper Value Extraction","author":["Don Porter <[email protected]>"],"is-jest":false},
	"567":{"url":"./tip/567.md","keywords":"Tcl, TclOO, slots","created":"22-Feb-2020","post-history":"","state":"Draft","tcl-branch":"tip-567","tcl-version":"8.7","vote":"In progress","type":"Project","title":"# TIP 567: Add Operation to Support Set-like Slots","author":["Donal K. Fellows <[email protected]>"],"is-jest":false},
	"566":{"url":"./tip/566.md","keywords":"lset","created":"19-Feb-2020","post-history":"","state":"Draft","tcl-branch":"lset-index","tcl-version":"8.7","vote":"Pending","type":"Project","title":"# TIP 566: Index usage in lset","author":["Jan Nijtmans <[email protected]>"],"is-jest":false},
	"565":{"url":"./tip/565.md","keywords":"Tk canvas","created":"10-Feb-2020","post-history":"","state":"Final","tcl-branch":"bug-3552805fff","tcl-version":"8.7","vote":"Done","type":"Project","title":"# TIP 565: .canvas raise/lower ignore non-existent tag","author":["Francois Vogel <[email protected]>"],"is-jest":false},
	"564":{"url":"./tip/564.md","keywords":"Tk Ttk x11 font size","created":"9-Feb-2020","post-history":"","state":"Final","tcl-branch":"bug-dccd82bdc7","tcl-version":"8.7","vote":"Done","type":"Project","title":"# TIP 564: ttk font sizes in points","author":["Francois Vogel <[email protected]>"],"is-jest":false},
	"563":{"url":"./tip/563.md","keywords":"Tk, bindings","state":"Final","vote-summary":"Accepted 9/0/0","type":"Project","tk-branch":"tip-563-scrollbar-scrollwheel","author":["Harald Oehlmann <[email protected]>"],"votes-for":"FV, SL, KK, JD, BG, JN, KW","votes-against":"none","created":"02-Feb-2020","title":"# TIP 563: scrollwheel on horizontal scrollbar scrolls without shift too","vote":"Done","tcl-version":"8.7","votes-present":"none","is-jest":false},
................................................................................
	"5":{"url":"./tip/5.md","created":"17-Oct-2000","post-history":"","state":"Final","vote":"Done","tcl-version":"8.4","type":"Project","title":"# TIP 5: Make TkClassProcs and TkSetClassProcs Public and Extensible","author":["Eric Melski <[email protected]>"],"is-jest":false},
	"4":{"url":"./tip/4.md","created":"26-Oct-2000","post-history":"","state":"Draft","vote":"Pending","type":"Informative","title":"# TIP 4: Tcl Release and Distribution Philosophy","discussions-to":"news:comp.lang.tcl","author":["Brent Welch <[email protected]>","Donal K. Fellows <fello[email protected]>","Larry W. Virden <[email protected]>","Larry W. Virden <[email protected]>"],"is-jest":false},
	"3":{"url":"./tip/3.md","created":"14-Sep-2000","obsoleted-by":"467","post-history":"","state":"Accepted","vote":"Done","type":"Process","title":"# TIP 3: TIP Format","author":["Andreas Kupries <[email protected]>","Donal K. Fellows <[email protected]>"],"is-jest":false},
	"2":{"url":"./tip/2.md","created":"12-Sep-2000","post-history":"","state":"Draft","vote":"Pending","type":"Process","title":"# TIP 2: TIP Guidelines","author":["Andreas Kupries <[email protected]>","Donal K. Fellows <[email protected]>","Don Porter <[email protected]>","Mo DeJong <[email protected]>","Larry W. Virden <[email protected]>","Kevin Kenny <[email protected]>"],"is-jest":false},
	"1":{"url":"./tip/1.md","created":"14-Sep-2000","obsoleted-by":"386","post-history":"","state":"Withdrawn","vote":"No voting","type":"Informational","title":"# TIP 1: TIP Index","author":["TIP Editor <[email protected]>"],"is-jest":false},
	"0":{"url":"./tip/0.md","created":"11-Dec-2000","post-history":"","state":"Final","vote":"Done","type":"Process","title":"# TIP 0: Tcl Core Team Basic Rules","author":["John Ousterhout <[email protected]>"],"is-jest":false},
	"@min": 0,
	"@max": 570
}, "@timestamp": 1584546864}

Changes to index.md.

209
210
211
212
213
214
215







216
217
218
219
220
221
222
<th>Type</th>
<th>Tcl Version</th>
<th>Status</th>
<th>Title</th>
<th>Impl.</th>
</tr></thead><tbody>








<tr class='state-final type-project version-87'>
<td valign='top'><a href='./tip/569.md'>569</a></td>
<td valign='top'>Project</td>
<td valign='top'>8.7</td>
<td valign='top'>Final</td>
<td valign='top' ><a href='./tip/569.md'>Eliminate Comments That Serve Lint</a></td>
<td></td>






>
>
>
>
>
>
>







209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
<th>Type</th>
<th>Tcl Version</th>
<th>Status</th>
<th>Title</th>
<th>Impl.</th>
</tr></thead><tbody>

<tr class='state-draft type-project'>
<td valign='top'><a href='./tip/570.md'>570</a></td>
<td valign='top' colspan=2>Project</td>
<td valign='top'>Draft</td>
<td valign='top' ><a href='./tip/570.md'>gesture support for finger scrolling and &quot;pinch to zoom&quot;</a></td>
<td></td>
</tr>
<tr class='state-final type-project version-87'>
<td valign='top'><a href='./tip/569.md'>569</a></td>
<td valign='top'>Project</td>
<td valign='top'>8.7</td>
<td valign='top'>Final</td>
<td valign='top' ><a href='./tip/569.md'>Eliminate Comments That Serve Lint</a></td>
<td></td>

Added tip/570.md.




























































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
# TIP 570: gesture support for finger scrolling and "pinch to zoom"
	Author:         Harald Oehlmann <[email protected]>
	State:          Draft
	Type:           Project
	Vote:           Done
	Created:        18-Mar-2020
	Post-History:
	Keywords:       Tk, bindings
	Tk-Version:    8.7
-----

# Abstract

Support for the gestures "finger scroll" and "pinch to zoom" are proposed in a platform neutral way.

This tip is not ready specified yet.
Anybody is invited to contribute.

# Specification

## Overview

Many systems (e.g. Windows, Linux Window Manager, Mac-OS, Android) nowdays support gestures in a generic manner.
The gestures may be different and the input media may be different.
Possible input media are a touch-screen or a touchpad.

The aim of this TIP is to make gestures provided by the system available within Tk.

The targeted gestures are:

   *   scrolling, for example by pointing two fingers on the touch-screen and moving it. This is often identical to the pan gesture.
   *   zooming, for example by pinching two fingers on a touch-screen.

There is a direct relation to the displayed image if a touch-screen is used.
The scroll gesture gives a source and target point on the screen.

## Platforms

The following discussion is about possible implementations on different platforms

### Windows

Peter Spjuth has authored a Windows implementation in tk.branch pspjuth-touch: [https://core.tcl-lang.org/tk/timeline?r=pspjuth-touch]

The two gestures are implemented by the following virtual bind tags:

   *   Zoom: "<<PinchToZoom>> %W %d %x %y %X %Y" : W: Window(below the fingers), d: descriptive dict (gesture =zoom, distance=finger distance), x,y: position.
   *   Scroll: "<<Gesture>> %W %d %x %y %X %Y": Window(below the fingers), d: descriptive dict (gesture=pan, distance=finger distance > 0 for two fingers), x,y: position

### AndroWish

Christian Werner has defined the following virtual binding tags.
This information is copied from [http://www.androwish.org/home/wiki?name=sdltk+command].

   *   Zoom: "<<PinchToZoom>> %X %Y %x %y %s" : %X and %Y are substituted with the root window coordinate of the center of the two fingers, %x with the distance between the two fingers, and %y with the angle measured in 64 times degrees CCW starting at 3 o'clock. The finger state is reported in the %s substitution as 0 (zoom motion), 1 (zoom start, i.e. 2nd finger down event), 2 (zoom end by 1st finger up event), 3 (zoom end by 2nd finger up event)
   *   Scroll: "<<FingerDown>>, <<FingerUp>>, <<FingerMotion>>" : Scrolling by two fingers may be implemented by observing those events. Documentation: A touch movement (sliding) event. The fields %x and %y are substituted with the finger position scaled to {0...9999} of the device screen or viewport, %X and %Y with the motion difference scaled to {-9999...+9999}, %t with the pressure scaled to {0...9999}, and %s with the finger identifier {1...10}. These substitutions are performed for all finger related touch events. 

### Linux

### Mac-OS

# Rationale


# Implementation

The following fragments are known:

   *   tk.branch pspjuth-touch: [https://core.tcl-lang.org/tk/timeline?r=pspjuth-touch]
   *   AndroWish

# Discussion


# Copyright

This document has been placed in the public domain.