grub-devel
[Top][All Lists]
Advanced

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

Re: [GITGRUB] New menu interface (implementation)


From: Bean
Subject: Re: [GITGRUB] New menu interface (implementation)
Date: Fri, 2 Oct 2009 17:16:56 +0800

Hi,

Update:

Add input handler, now you can walk the widget tree with keys.

New properties:

command
If command is set, the widget is selectable

anchor
This is used to group widgets together, next and previous key can't
escape the current anchor.

For example, if there are two menus, what would happen if you use the
previous key on the first item:

1. wrap to the last item on this menu
2, jump to the next menu

I use the anchor property to distinguish the two situation

If anchor is set for the parent panel, previous key can't escape the
current menu, so it wrap to the last item
If anchor is not set, jump to the next menu

anchor also define a scope for the current node, this is useful when
define onkey handlers:

screen - anchor - node

In screen, we set global key binding, for example, F1, etc
In anchor, we set local key binding, for example, c and e for the menu widget.
We can also define specific key handler for each node.

The demo supports the following keys:

n: jump to next item from the current anchor
p: jump to previous item from the current anchor
N: jump to next item in another anchor
P: jump to previous item in another anchor
ESC: exit from the demo

-- 
Bean

gitgrub home: http://github.com/grub/grub/
my fork page: http://github.com/bean123/grub/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]