[Top][All Lists]

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

[GITGRUB] New menu interface (second draft)

From: Bean
Subject: [GITGRUB] New menu interface (second draft)
Date: Mon, 7 Sep 2009 18:10:50 +0800


After considering the discussion of first post, I come up with the
second draft for new menu interface implementation.

First, the basic drawing unit is now region, there are four types:

Single line of text, have alignment attribute.

An image, have scaling and alignment attribute.

A rectangle area filled with background color.

A viewport in the container box. This is used for strolling.

The whole ui are composed of the above regions, components add their
drawing regions to a global tree which handles region updates for

One of the shortcoming of Colin's graphic patch is that the update
process is not optimized. The screen flickers a lot without double
buffer. Double buffer eats up a lot of memory, which is a problem in
platforms like OpenFirmware. And even with double buffer, the
redrawing process takes time and response is quite slow. The new menu
interface split ui into small regions which uses different update
strategy, and redraw only the necessary regions.

Component is the basic unit for interaction. Each component has a flag
that indicate if it can receive input focus. The last component with
input focus will be the current input, you can use a hotkey like
ctrl-tab to switch to other component.

Some of the components:

Text label, it consist of text region.

Image, it consist of image region.

Window frame. This is normally used by other component to draw the
border, it consist of multiple image and/or rect region.

Layout manager. It can have a scrollbar when the actual content is
bigger than the window size. it consist of viewport region.

Multi-line text box. It has a frame and a text box in the center.

Single line edit box. It has a frame and an edit box in the center.
Has input focus.

Menu box. It has a frame, a panel for layout control, and multiple
menu items. Has input focus.

Terminal emulator. It has a frame and a two dimension edit box in the
center. Has input focus.


gitgrub home:
my fork page:

reply via email to

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