[Top][All Lists]

[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: Tue, 20 Oct 2009 22:52:04 +0800



Add dialog support, it allows you to write a template and call it with
different parameters, for example:

dialog_edit {
  panel {
    parameters = "text=edit.text"
    class = frame
    width = 80%
    attach_hcenter = 0
    attach_vcenter = 0

    edit {
      lines = 10

The parameters property control the mapping between parameter and
internal property name. To use it to edit current command:

menu_edit dialog_edit text=command

It also allows you to edit other properties, for example, the demo add
a hotkey t to edit the title:

t = "menu_edit dialog_edit text=title\nmenu_refresh"

The generated menu also uses templates, one for submenu, and one for menuitem:

menu_template {
  panel {
    class = frame

item_template {
  panel {
    parameters = "class=image.class:title=text.text"
    class = select
    image {}
    text {}

The names of the template is passed to menu_create command:

menu_create menu_template item_template.

Smart popup window. The sub menu would pop to the direction with the
most space, which would make sure it won't be truncated by the border.
For example, if the parent menu is at the top of screen, sub menu pops
at the bottom, if it's at the bottom, sub menu pops at the top.

add command menu_next_node, menu_prev_node, menu_next_anchor and
menu_prev_anchor, you can assign these to other keys. The demo adds
the two terminal example. Inside terminal, direction key and TAB are
all used, so you need to assign another hotkey to switch between the
two window. The demo uses f6:

f6 = menu_next_anchor

Set maximum text mode in EFI.


gitgrub home:
my fork page:

reply via email to

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