[tab] key navigation?

For help with anything that CEGUI doesn't offer straight out-of-the-box, e.g.:
- Implementation of new features, such as new Core classes, widgets, WindowRenderers, etc. ...
- Modification of any existing features for specific purposes
- Integration of CEGUI in new engines or frameworks and writing of new plugins (Renderer, Parser, ...) or modules

Moderators: CEGUI MVP, CEGUI Team

User avatar
granx
Quite a regular
Quite a regular
Posts: 80
Joined: Fri Apr 29, 2005 21:58

[tab] key navigation?

Postby granx » Sat Aug 20, 2005 21:53

Hi,
Is hitting the tab key supposed to move from one subwindow to the next? If so, what type of Window do I need to see this effect?

Also, will hitting tab move between selected windows and will hitting the space bar or enter key trigger that window? Thanks, -granx

User avatar
CrazyEddie
CEGUI Project Lead
Posts: 6760
Joined: Wed Jan 12, 2005 12:06
Location: England
Contact:

Re: [tab] key navigation?

Postby CrazyEddie » Sat Aug 20, 2005 22:31

There is currently no keyboard navigation interface at all. ChrisKang started some work on this, and there is a patch on the tracker, though at the time I looked at it originally, I had a hard time fathoming it out.

There are ways of 'faking' this, though nothing is really set up for it at the moment - so anything you implement in your app to do this will be a bit hacky (basically it consists of taking key inputs and generating fake mouse inputs from them).

User avatar
granx
Quite a regular
Quite a regular
Posts: 80
Joined: Fri Apr 29, 2005 21:58

Re: [tab] key navigation?

Postby granx » Sat Aug 20, 2005 22:53

Well,
I am still learning about all the different layout types, but I would expect a Window that was created with the intention to hold child Windows, would know how to cycle through them. I guess an example would be a widget holding several checkbox widgets. When a checkbox receives a 'tab' character in the onKeyDown handler, then it should probably inform the parent window to advance its 'selected' child widget. Does this sound possible? Unfortunately, that parent would need to support some "advanceSelectedChild" function, but I think this is acceptable. What say you?
:D -granx

User avatar
CrazyEddie
CEGUI Project Lead
Posts: 6760
Joined: Wed Jan 12, 2005 12:06
Location: England
Contact:

Re: [tab] key navigation?

Postby CrazyEddie » Sun Aug 21, 2005 16:07

In CEGUI any window can act as a container, so this functionality should be in the base Window class.

What is needed is basically two things; first a 'tab stop' field (plus getter/setter/property), and second a fix to maintain static index values for child widgets. Once you have this in place, then you just need to detect the tab key and skip to the next child window that has the 'tab stop' property set (wrapping around to index 0 as needed), and activating that window.

The only thing is, at the moment, almost none of the widgets have rendering to indicate when they're the active widget - so there's no way to see "where you are".

Other key stuff, like space to push a button, would need to be implemented on a per-widget basis.

Rackle
CEGUI Team (Retired)
Posts: 534
Joined: Mon Jan 16, 2006 11:59
Location: Montréal

Postby Rackle » Mon Feb 25, 2008 18:38



Return to “Modifications / Integrations / Customisations”

Who is online

Users browsing this forum: No registered users and 1 guest