MCPcopy Create free account
hub / github.com/dtmilano/AndroidViewClient / toggleTouchPoint

Method toggleTouchPoint

src/com/dtmilano/android/culebron.py:1360–1380  ·  view source on GitHub ↗

Toggles the touch point operation using the units specified in L{coordinatesUnit}. When there are L{View}s (obtained from the back-end) we have to determine if the intention when something is touched on the window if we want to touch the L{View} or the point.

(self)

Source from the content-addressed store, hash-verified

1358 self.toggleLongTouchPoint()
1359
1360 def toggleTouchPoint(self):
1361 '''
1362 Toggles the touch point operation using the units specified in L{coordinatesUnit}.
1363
1364 When there are L{View}s (obtained from the back-end) we have to determine if the
1365 intention when something is touched on the window if we want to touch the L{View}
1366 or the point.
1367
1368 If there's no back-end, we don't allow L{self.isTouchingPoint} to be disabled so we will
1369 never be attempting to touch L{View}s.
1370 '''
1371
1372 if not self.isTouchingPoint:
1373 msg = 'Touching point (units=%s)' % self.coordinatesUnit
1374 self.toast(msg, background=Color.GREEN)
1375 self.statusBar.set(msg)
1376 self.isTouchingPoint = True
1377 else:
1378 self.toast(None)
1379 self.statusBar.clear()
1380 self.isTouchingPoint = self.vc is None
1381
1382 def toggleTouchPointPx(self):
1383 self.coordinatesUnit = Unit.PX

Callers 4

cancelOperationMethod · 0.95
toggleTouchPointDipMethod · 0.95
toggleTouchPointPxMethod · 0.95

Calls 3

toastMethod · 0.95
setMethod · 0.45
clearMethod · 0.45

Tested by

no test coverage detected