Post Reply 
MOUSE command CLICK type
01-29-2018, 07:09 AM
Post: #11
RE: MOUSE command CLICK type
Hello,

MOUSE (and ISKEYDOWN) vs WAIT(-1).

These 2 functions seems very similar, but do slightly different things.
WAIT is an EVENT function. Meaning that it returns events which are waitable on. Waitable event are great because, while waiting, the CPU is in low power mode. Events represent "instantaneous" data. This includes "key press" or "click".
Events are placed in an event queue and 'consumed' or removed one at a time.

MOUSE and ISKEYDOWN are much more continuous and return "state" data. current X/Y position for a mouse cursor for example.

Internally, state data is "interpreted" to generate events. However, the "interpreter" will add some meta data to the data to remember what is has decided in the past. Some of that info might be returned by MOUSE (I do not remember exactly), which might lead to confusion.

A mouse 'gesture' comes from interpreting the state data and should be aquired through a WAIT function.

This should help you decide what function to use.

For the specifics (from memory, so I might have some details wrong).

One trick that I have put in place is that "windows" (the calculator graphics is based on graphic windows) can give some hints to the gesture interpreter. Among other things, it can tell: 'I only accept clicks'. In this case, a mouse down imediately generates a click without having to wait for the mouse up. This is usefull as it gives the impression of faster UI. This is used in some windows like the menus. This is why when mousing in the menu area you can never get mouse move or similar events.

Hope this helps.
Cyrille

Although I work for the HP calculator group, the views and opinions I post here are my own. I do not speak for HP.
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
MOUSE command CLICK type - Giancarlo - 01-25-2018, 09:59 PM
RE: MOUSE command CLICK type - Carlos295pz - 01-25-2018, 10:37 PM
RE: MOUSE command CLICK type - Giancarlo - 01-25-2018, 11:40 PM
RE: MOUSE command CLICK type - Carlos295pz - 01-26-2018, 12:30 AM
RE: MOUSE command CLICK type - Giancarlo - 01-26-2018, 06:23 PM
RE: MOUSE command CLICK type - Carlos295pz - 01-26-2018, 07:34 PM
RE: MOUSE command CLICK type - Giancarlo - 01-27-2018, 04:22 PM
RE: MOUSE command CLICK type - Carlos295pz - 01-27-2018, 04:32 PM
RE: MOUSE command CLICK type - Carlos295pz - 01-26-2018, 07:52 PM
RE: MOUSE command CLICK type - Giancarlo - 01-27-2018, 06:35 PM
RE: MOUSE command CLICK type - cyrille de brébisson - 01-29-2018 07:09 AM
RE: MOUSE command CLICK type - Giancarlo - 01-29-2018, 08:16 PM
RE: MOUSE command CLICK type - Giancarlo - 02-24-2018, 10:08 PM
RE: MOUSE command CLICK type - Tyann - 03-04-2018, 11:08 AM
RE: MOUSE command CLICK type - Carlos295pz - 03-04-2018, 11:46 AM
RE: MOUSE command CLICK type - Tyann - 03-04-2018, 05:11 PM
RE: MOUSE command CLICK type - Carlos295pz - 03-04-2018, 07:50 PM
RE: MOUSE command CLICK type - Tyann - 03-06-2018, 05:58 AM
RE: MOUSE command CLICK type - Giancarlo - 03-04-2018, 09:11 PM
RE: MOUSE command CLICK type - Carlos295pz - 03-04-2018, 10:20 PM



User(s) browsing this thread: 3 Guest(s)