grub-devel
[Top][All Lists]
Advanced

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

[GITGRUB] New menu interface


From: Bean
Subject: [GITGRUB] New menu interface
Date: Wed, 2 Sep 2009 16:47:27 +0800

Hi,

I am about to start a new branch on github for the new menu interface.
Here is the first draft of design.

The building block of menu interface is component. There are two basic
component, text and box, available both for text and graphics mode.
text is a single line of text, while box is a rectangle area with
background color, and may also have a background image. Complex
components build on other components. For example, a menu component
consist of window frame and menu body, menu body consist of multiple
text, and the window frame consist of up to nine box (upper left,
upper center, upper right, left, center, right, lower left, lower
center, lower right).

The configure file uses {} syntax to represent a tree structure, it
may look like this:

+ style {
  + window {
    + menu {
      bgcolor = #ffffff
      transparency = 80
    }
  }
  + text {
    + default {
      font = "fixed"
    }
    + header {
      font = "courier"
    }
  }
  + box {
    + screen {
      bgimage = "splash.png"
    }
  }
}

+ screen {
  + text {
    class = "header"
    x = 10
    y = 10
    text = "Welcome"
  }
  + menu {
    x = 30
    y = 30
    width = 100
    height = 100
  }
}

The style tree specify the properties of component class. The first
level is component name, and the second level is class name. screen
tree specify screen layout. This example shows three component,
screen, text and menu. The text component is of class "header", so it
inherits property font="courier". Menu is a composite component, it
use window component to draw the border, which is of class "menu", so
it inherit the properties bgcolor=#ffffff and transparency=80.

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