Rotouchscreen – BrightSign HD2000 Object Reference Manual User Manual

Page 28

Advertising
background image

roTouchScreen

The touch screen object allows you accept events from touch screen panels or Mice. Currently only the Elo
USB touch screens or a USB Mouse/Trackball are supported. However, we are always working on more
driver support. Contact

[email protected]

if you have specific touch panel requests.


roTouchScreen responds to clicks with a USB mouse the same way it does to touches on a touch screen.
However, you will need to provide a cursor bitmap if you want to enable mouse support. There is one you
can use in the Roku BrightSign demo which can be downloaded from our web site.

To use a touch screen follow these general steps:

1. create an roTouchScreen
2. Use SetPort to tell the roTouchScreen which roMessagePort to send events to
3. Define one or more touch regions. A touch region may be rectangular or circular. When someone

touches the screen anywhere inside the area of a touch region, an event will be sent to your
message port.

4. If touch areas overlap such that a touch hits multiple regions, an event for each region touched will

be sent.

5. Process the events.

roTouchScreen supports rollover regions. Rollovers are based around touch regions. When a rectangular or
circular region is added it defaults to having no rollover. You can enable a rollover using the touch region’s
ID and specifying an on and off image. Whenever the mouse cursor is within that region the on image is
displayed and the rest of the time the off image is displayed. This allows buttons to highlight as the mouse
cursor moves over them.

roTouchScreen has these interfaces

1.

ifTouchScreen

2.

ifSetMessagePort

ifTouchScreen has these member functions:

rotVOID SetResolution(rotINT32 x, rotINT32 y)
rotVOID AddRectangle_region(rotINT32 x, rotINT32 y, rotINT32 w,

rotINT32 h, rotINT32 userid)

rotVOID AddCircleRegion(rotINT32 x, rotINT32 y, rotINT32 radius,

rotINT32 userid)

rotVOID ClearRegion()
rotSTRING GetDeviceName()
rotVOID SetCursorPosition(rotINT32 x, rotINT32 y)
rotVOID SetCursorBitmap(rotSTRING, rotINT32 x, rotINT32 y)
rotVOID EnableCursor(rotBOOL on-off)
rotVOID EnableRollover(rotInt32 region_id, rotString on_image,

rotString off_image, rotBool cache_image)

rotVOID EnableRegion(rotInt32 region_id, rotBool enabled)
rotVOID SetRollOverOrigin(rotInt32 region_id, rotInt32 x, rotInt32
y)
rotBOOL IsMousePresent(rotVOID)


roTouchScreen sends events of type roTouchEvent. roTouchEvent has these interfaces:

1. ifInt (the userid of the touched region)
2. ifPoint (the x,y coordinates of the touch point. Not normally needed). ifPoint has two member

functions:

a. rotINT32 GetX()
b. rotINT32 GetY()

28

Advertising
This manual is related to the following products: