grub-devel
[Top][All Lists]
Advanced

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

Re: [GITGRUB] New menu interface (second draft)


From: Bean
Subject: Re: [GITGRUB] New menu interface (second draft)
Date: Tue, 8 Sep 2009 22:37:22 +0800

Hi,

After more consideration, perhaps we should use the following
component structure:

frame - window border
panel - layout manager with scroll bar support
window - frame + panel
label - text
image - image
button - button
list - list box
edit - multi-line edit box
term - terminal emulator  (extends edit component)
menu - menu list (extends list box)

We should be able to construct more powerful component using the above
simple ones, I'm considering adding a dialog tree:

+ dialog
{
  + edit
  {
    + window
    {
      class = "edit"
      + edit
      {
      }
    }
  }
 + message
  {
    + window
     {
       class = "message"
       + label
       {
         text = $1
       }
     }
  }
}

Then we can use something like this to show a popup message dialog:

popup message "Hello World"

And for components with input focus, we can add hotkey node to add actions:

+ screen
{
  + menu
  {
    + hotkey
    {
      key = "F1"
      command = "popup message Hello"
    }
   + hotkey
    {
      key = "F9"
      command = "reboot"
    }
   + hotkey
    {
      key = "F10"
      command = "halt"
    }
  }
}

-- 
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]