RAD Studio 2010 Review #5: VCL – Natural Input Overview

RAD GesturesHere we go again… This week we’ll discuss a bit the new things in VCL with a special focus on the RAD Studio 2010′s natural input capabilities. (Gestures and Touch) overview. Mind you that we’re talking about a prerelease beta. Anything can change till release. Also, let us not forget to thank Embarcadero for giving us the permission to talk about this.

With the new engine you can choose different predefined movements of your pointing device (or create new, custom ones) in order to assign them different actions. The ones who use the Opera web browser (but not only) will find this familiar. For the others, let us remind that Windows (and hence Delphi) had a very old gesture already: Drag & Drop. Think at the new engine like something much more powerful. Of course, something which will be very used in pen computing, kiosk applications featuring (multi-)touch screens etc.

Before going in to details, let’s make something clear: Delphi tries to use the touch engine of yet-to-be-released Windows 7. If it cannot (because eg. the application is run on Windows XP), it uses it’s own recognition engine. How it does this? By using a language enhancement ( – subject of another post, of course ;-) ).

But now let’s start to analyze the new Delphi’s gesture engine…

Gestures1Let’s have a look at the ‘Gestures’ category (pictured on the right). (No, don’t pay attention now at the two categories above: Ribbon Controls and Touch) Even if, as we said, we have predefined gestures, we can create new, custom ones. And exactly this is the main job of TGestureManager. It can have more custom gestures per component (somewhat like TActionManager) and it can persist these custom gestures in a file.

Of course for actually managing our gestures we have a Custom Gestures Editor. Here it is:Gestures2
As you can see the Editor features assigning custom names to each gesture, sensitivity control, individual control to any gesture point (add / edit / delete) as well as zooming in and out, playing a simulation of gesture, recording a new one as well as testing the gesture with your pointing device (usually mouse). A very interesting thing is that it tells you if you have similarities with other gestures (including with built-in ones) and in which percentage. Incidentally, the triangle which I drawn is “100% similar” with the sgiTriange built-in gesture (Standard in Delphi terminology). Because is so similar, I deleted it and I recorded a new gesture, called ‘Untitled’ (I’m so lazy sometimes…) and having the shape of the letter Z.

Gestures3Well, let’s see how can we use the gestures. On the right is a part of the new property Touch: TTouchManager; as it appears in the Object Inspector. Of course this new property is almost ‘everywhere’ in the VCL, being declared in TControl. You can see in the Touch.Gestures.Custom my own gesture, in the shape of the letter ‘Z’. In the ‘Standard’ branch there are the built-in gestures (or Standard) as I said. These are the most common ones which are provided by default. Any component “has” them. But in order to appear you must assign a TGestureManager which, in fact, drags with it the Unit in which these Standard Gestures live.
As you can see, a certain control can respond to many gestures (hence the check-boxes next to each item).
You will actually use them by checking them in the Object Inspector and writing your own code for OnGesture event handler. The parameters of the OnGesture event are:

  • Sender: TObject (gee…)
  • const EventInfo: TGestureEventInfo;
  • var Handled: Boolean;

…Of course, the 2nd parameter caries all the info which we want.

Also, you can remark that multi-touch tablets and screens are supported. See the options in the lower part of the image.

Also, there are other components in the ‘Gestures’ category: TGestureListView is a TCustomListView descendant which displays the name of gestures featuring a small thumbnail with the gesture’s shape for easy recognition. Very handy sometimes. TGesturePreview is exactly what it says: a control which can display an animation with the shape of the assigned gesture. As an aside, you have here enough properties to customize the look of this control. And of course, TGestureRecord is a simple panel which can ‘grab’ the gesture drawn on it.

As an aside, in the Touch category there is a TTouchKeyboard component which is an on-screen keyboard component, common in kiosk / surface applications. A nice feature is the Layout property with which you can have also a NumPad keyboard:

Gestures5

Two TTouchKeyboard controls. One with Standard and one with NumPad Layout

In this post we had an overview of the natural input capabilities of the RAD Studio 2010. This wasn’t intended to be an exhaustive introduction, neither a help replacement. It was intended to give you a small idea about what the thing is about. Btw, can you share with us your idea ?

15 thoughts on “RAD Studio 2010 Review #5: VCL – Natural Input Overview

  1. Ah, I forgot: good luck teaching your users to use gestures… most usually don’t remember them and have not the needed mouse skills.

  2. Pingback: Carlos H. Cantu Blog » Blog Archive » Delphi Natural Input

  3. Having to memorize not just the squiggles but what they do in a trillion differnt contexts as more and more apps support them to be the least likely thing for most users to do, so I am not overly excited by them.

    I find gestures to be a seriously bad idea. Cool, granted, but definitely not going to be used by many people.

    As for touch…. well, I’ll let you know when I find a touch screen that is larger than 12″ that doesn’t cost more than two grand. What is Microsoft thinking??? (other than oily fingerprint laden screens are what all the cool kids want for xmas)

    • Touch support can be very useful for those working on kiosk or POS applications. Not something everybody does, but there are a l0t out there anyway, some written in Delphi. I worked on one of them several years ago, and it was not easy to develop everything from scratch. Having library support will make Delphi stronger in those areas.
      Probably we will see more touch devices and more economical ones in the next future, anyway I do not believe it could become the main interface, out fingers are not the optimal pointing device, and touch screen lack the tactile feedback. Anyway, they can be very intuitive – but it will take time to see one on every desktop or laptop.
      About gesture I am skeptical too – they are hard to remember and as long as there is no standard even more. Handwriting recognition could be more useful, maybe.

  4. I make kiosk development in Delphi (15″ monitors 1024×768 standar resolution), the touch keyboard and gestures are totally welcome.

  5. Ah, happy days…. gestures are new and intriguing, but all this talk of a revolution in user input revolving around touch technology is a bit hard to believe.

    I implemented my own touch keyboard control almost 10 years ago as part of a touch screen interface to some laboratory control software. Apart from “multi-touch”, the technology really hasn’t changed that much since then, and really isn’t that much cheaper than it was then (relative to the non-touch equivalents).

    The touch revolution failed to happen 10 years ago, and I don’t really see any reason to think that it’s going to happen now either.

    For mobile devices touch makes perfect sense. For desktops, in the user environments that the vast majority of PC’s find themselves … not so much.

    Media centre PCs, kitchen workstations… other highly specialised domain controller type applications…. maybe. But equally the manufacturer’s of such devices are far more likely to embed a Linux system than to license Windows and shoe-horn a generic PC into a ruggedised/specialised case.

    So whilst I find the technology intellectually interesting I’m not getting that “must have” tingle in my bones.

    Not yet anyway.

    Maybe once we have the cross-platform capabilities being dangled (without much detailed info) so enticingly, and can perhaps contemplate using Delphi to create the applications running on those embedded Linux application controllers……

  6. Definitely useful in commercial applications, as LDS said. And if Embracadero can use it to recapture developer market share, excellent!!!

    But with repetitive strain from keyboard and mouse becoming a common industrial injury, imagine holding your entire arm out all day! A different paradigm is required, such as laying the screen out flat. And then you spend your working day with your head hanging down over your desk?

    Yes, casinos, POS applications, Industrial Control (that’s my speciality) – yes, yes, yes. And let’s get Delphi into that market. But the keyboard/mouse isn’t going away soon.

  7. If you managed to capture the latest James Bond film with the use of touch screen technology to drag and drop pictures and data forms around the screen, in addition to integration with a VOIP phone/communications medium, you should see the applications.

    Now, take a LCD touch screen, enlarge it to 30 plus inches, lay it flat on the desktop or at a slight angle and presto – your new workspace! Eliminate all that paper – integrate with the outside world (fax, e-mail, VOIP) and redesign your apps more along the lines of the facebook / ipod approach. I can already see the possibilities.

  8. Pingback: Личная записная

  9. Gestures…. nice toy feature. I would have much preferred to see utf8 working with the firebird driver. THAT would have been extremly imported to have for me. This will be for sure the last delphi I have bought. The delphi developers clearly don’t meet my feature needs and priorities.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s