[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: RE: Lua IUP dialog -- I need it to recognize a mouseclick anywhere, or an Enter key
- From: "Antonio Scuri" <scuri@...>
- Date: Wed, 16 Feb 2011 09:10:18 -0200
The K_ANY callback works for all the controls, including the dialog and
The click anywhere is a little more complicated. Usually you set a
callback in a button or in a canvas where the user can click. But in IUP 3.4
(released yesterday) there is a global BUTTON_CB callback that can be used.
All mouse clicks in all elements will be received by the callback. So the
idea is to set the callback, then remove it after the user has interrupted
the presentation, just in case the application will still be running.
To use that callback check the INPUTCALLBACKS global attribute
documentation in IUP 3.4.
> -----Original Message-----
> From: firstname.lastname@example.org [mailto:email@example.com]
> On Behalf Of Steve Litt
> Sent: quarta-feira, 16 de fevereiro de 2011 02:04
> To: Lua mailing list
> Subject: Lua IUP dialog -- I need it to recognize a mouseclick
> anywhere, or an Enter key
> Hi all,
> I've created a program to show a presentation slide, using Lua IUP, for
> certain time -- the time embedded within the file it reads. The title
> is a
> large font label, the bullet points are lines of a list, and there's a
> on the bottom showing the number of seconds last.
> The purpose is so that the slide can disappear to make room for an
> editor and
> an xterm.
> I'm going to probably have a wireless mouse like presenters use, and
> I'd like
> it so that if I click anywhere, the slide goes away as if it had timed
> Also, I'd like that if I hit the Enter key, it terminates.
> Any ideas? I haven't been able to detect any keystrokes on buttons
> within IUP.
> Steve Litt
> Recession Relief Package
> Twitter: http://www.twitter.com/stevelitt