Simulating fake enter_notify_event



I have a problem that I need some advice on. 

Using Gtk 1.2.10, being the vanilla GTK installed with RedHat 8.0

I have a collection of buttons in a kiosk application that are normally
driven via touchscreen / mouse. I want to be able to navigate this using
the keyboard with slick feedback.

When the user gets into this 'mode' where the buttons are visible, i set
the focus to the top button. At this point I want to highlight the
focused button in the same way that placing the mouse over the button
highlights it. The user can then use the up and down keys to move the
focus to different buttons. Once again, when they change the focus, I
need good visual feedback in the same way that moving the mouse over the
button provides highlighting.  

Think something like Quake preferences screen (or any decent game for
that matter) , where you move a selection up and down with the arrow
keys, and the focused item highlights and makes a gnashing sound. 

I have tried emitting an enter_notify_event , but that does not do the
trick. I can make it work using XWarpCursor to actually move the mouse
over the button, but that is just plain wrong.

All advice most appreciated (except - 'port it to GTK 2' - I need this
one to run on GTK 1.x for various reasons)

SteveOC
steveoc gtkpizza org









[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]