Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1MilV9-0002QG-A5 for mharc-grub-devel@gnu.org; Wed, 02 Sep 2009 04:47:35 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MilV7-0002Pq-KH for grub-devel@gnu.org; Wed, 02 Sep 2009 04:47:33 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MilV2-0002Ow-IA for grub-devel@gnu.org; Wed, 02 Sep 2009 04:47:32 -0400 Received: from [199.232.76.173] (port=41178 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MilV2-0002Ot-Ch for grub-devel@gnu.org; Wed, 02 Sep 2009 04:47:28 -0400 Received: from mail-px0-f202.google.com ([209.85.216.202]:42626) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MilV1-00073Q-Vs for grub-devel@gnu.org; Wed, 02 Sep 2009 04:47:28 -0400 Received: by pxi40 with SMTP id 40so740313pxi.5 for ; Wed, 02 Sep 2009 01:47:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:content-type; bh=VaNG9jAaEUrYeMP9o8SyYYIrmPg4IEi+mDzPlEXihPc=; b=IrI2Uwc3lFMreF/MWwLcN7d+1S4svevyL3AeDAAR48N6ElUZozZb2aK+EsfX1hd7E2 qXrWRyoCJf92Ub3szuprD9R8v+oG4e1mOoO2FZ4H1A3lN4mBcxiD4MPECffoB1QfYQrB jrtQ+UL1ZdtAziEw1tOtCoe/BFKUkwArSHI5U= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=MEdN3ef+/lxtAXP6eYTOQOeNBWYvGzeGDu/7iy/PuFff7pMVybr5quosmIODWXbo0h KW9213XMjivpCDtRSJJIOW9k2GPwGkHTKt2FQeflRqYaKPuoY/sWJw0IsWmrpnt5jU+x BmsDICIFlzTVg0UqEexXLGXLgGYXtkDFyJOLU= MIME-Version: 1.0 Received: by 10.141.4.3 with SMTP id g3mr2291711rvi.150.1251881247285; Wed, 02 Sep 2009 01:47:27 -0700 (PDT) Date: Wed, 2 Sep 2009 16:47:27 +0800 Message-ID: From: Bean To: The development of GRUB 2 Content-Type: text/plain; charset=ISO-8859-1 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) Subject: [GITGRUB] New menu interface X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The development of GRUB 2 List-Id: The development of GRUB 2 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Sep 2009 08:47:33 -0000 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/