From Clomosy Docs
The "Gesture" event refers to the event triggered by a specific movement or action on a component (such as an image or a form). These types of events allow users to interact with a specific component by moving, zooming, rotating, or performing other touch gestures using a touch screen or a mouse.
For example, in a mobile application, to zoom in on an image, the user can spread two fingers on the screen to perform a "pinch" gesture. When such a gesture is detected, the corresponding component's "Gesture" event is triggered.
These types of events are commonly used on touch screen devices and in mobile applications. The handling of these events may vary depending on the programming language or development platform used.
Feature | Use of | Definition |
---|---|---|
tbeOnGesture | Form1.AddNewEvent(GestureImg, tbeOnGesture, 'BtnOnGesture'); //GestureImg:TclImage | It refers to the event triggered by a specific movement or action on a particular component (such as an image or a form). |
clSetTouchIG | Form1.clSetTouchIG(igPan,GestureImg); | It is a function used to handle touch events on Android devices. |
igLongTap | Form1.clSetTouchIG(igLongTap,GestureImg); | It is an event triggered when a user presses and holds on a touch device for an extended period. This event is used to detect that a touch has been sustained on the screen for a specific duration. |
igZoom | Form1.clSetTouchIG(igZoom,GestureImg); | It refers to a feature that allows users to zoom in or out on content, such as an image. |
igRotate | Form1.clSetTouchIG(igRotate,GestureImg); | It refers to the process of rotating the object. |
igPan | Form1.clSetTouchIG(igPan,GestureImg); |
It typically means the action of scrolling content within a program or platform. This action enables the content to move in a specific direction, such as up, down, left, or right. |
clFormGestureEvent_GestureID | Form1.clFormGestureEvent_GestureID | It is a value that specifies the type of gesture (Gesture ID) that occurs on a form. This value contains the identifier of a specific gesture, such as zoom, rotate, etc. |
Example
var myForm:TclForm; GestureLbl:TclLabel; GestureImg:TClImage; void BtnOnGesture; { GestureLbl.Text = 'Gesture Event : ' + IntToStr(MyForm.clFormGestureEvent_GestureID); } { myForm = TClForm.Create(Self); GestureLbl = myForm.AddNewLabel(MyForm, 'GestureLbl','--'); GestureLbl.Align = alMostTop; GestureLbl.Height = 20; GestureImg = myForm.AddNewImage(MyForm, 'GestureImg'); MyForm.setImage(GestureImg,'https://clomosy.com/demos/bg.png'); GestureImg.Align = alBottom; GestureImg.Height = 300; GestureImg.Width = 300; MyForm.clSetTouchIG(igLongTap,GestureImg); MyForm.AddNewEvent(GestureImg, tbeOnGesture, 'BtnOnGesture'); myForm.Run; }