1 | Text User Interface using comboot |
---|
2 | --------------------------------- |
---|
3 | |
---|
4 | This is a menu system written by Murali Krishnan Ganapathy and ported |
---|
5 | from OpenWatcom to gcc by HPA. It is currently being maintained by the |
---|
6 | original author. |
---|
7 | |
---|
8 | To configure the menus, you need to set up a menu configuration file |
---|
9 | to have the menu items you desire, then build the menu system using |
---|
10 | make. You can use either simple.c or complex.c as a starting point |
---|
11 | for your own menu configuration file; If your menu system is only going |
---|
12 | to have entries corresponding to things which can be executed directly, |
---|
13 | then you can create a file in ".menu" format instead of the C code. |
---|
14 | |
---|
15 | See MENU_FORMAT for the syntax of .menu files |
---|
16 | |
---|
17 | The resulting code is a 32-bit COMBOOT code, and hence can be executed |
---|
18 | only under syslinux. You can use tools like bochs to help debug your |
---|
19 | code. |
---|
20 | |
---|
21 | Menu Features currently supported are: |
---|
22 | * menu items, |
---|
23 | * submenus, |
---|
24 | * disabled items, |
---|
25 | * checkboxes, |
---|
26 | * invisible items (useful for dynamic menus), and |
---|
27 | * Radio menus, |
---|
28 | * Context sensitive help |
---|
29 | * Authenticated users |
---|
30 | * Editing commands associated with items |
---|
31 | |
---|
32 | The keys used are: |
---|
33 | |
---|
34 | * Arrow Keys, PgUp, PgDn, Home, End Keys |
---|
35 | * Space to switch state of a checkbox |
---|
36 | * Enter to choose the item |
---|
37 | * Escape to exit from it |
---|
38 | * Shortcut keys |
---|
39 | |
---|
40 | Features |
---|
41 | -------- |
---|
42 | This is a general purpose menu system implemented using only BIOS calls, |
---|
43 | so it can be executed in a COMBOOT environment as well. It is highly |
---|
44 | customizable. Some features include: |
---|
45 | |
---|
46 | * Status line |
---|
47 | Display any help information associated with each menu item. |
---|
48 | * Window |
---|
49 | Specify a window within which the menu system draws all its menu's. |
---|
50 | It is upto the user to ensure that the menu's fit within the window. |
---|
51 | * Positioning submenus |
---|
52 | By default, each submenu is positioned just below the corresponding |
---|
53 | entry of the parent menu. However, the user may position each menu |
---|
54 | at a specific location of his choice. This is useful, when the menu's |
---|
55 | have lots of options. |
---|
56 | * Registering handlers for each menu item |
---|
57 | This is mainly used for checkboxes and radiomenu's, where a selection may |
---|
58 | result in disabling other menu items/checkboxes |
---|
59 | * Global Screen Handler |
---|
60 | This is called every time the menu is redrawn. The user can display |
---|
61 | additional information (usually outside the window where the menu is |
---|
62 | being displayed). See the complex.c for an example, where the global |
---|
63 | handler is used to display the choices made so far. |
---|
64 | * Global Keys Handler |
---|
65 | This is called every time the user presses a key which the menu |
---|
66 | system does not understand. This can be used to display context |
---|
67 | sensitive help. See complex.c for how to use this hook to implement |
---|
68 | a context sensitive help system as well as "On the fly" editing |
---|
69 | of commands associated with menus. |
---|
70 | * Shortcut Keys |
---|
71 | With each item one can register a shortcut key from [A-Za-z0-9]. |
---|
72 | Pressing a key within that range, will take you to the next item |
---|
73 | with that shortcut key (so you can have multiple items with the |
---|
74 | same shortcut key). The default shortcut key for each item, is |
---|
75 | the lower case version of the first char of the item in the range |
---|
76 | [A-Za-z0-9]. |
---|
77 | * Escape Keys |
---|
78 | Each item entry can have a substring enclosed in < and >. This part |
---|
79 | is highlighted. Can be used to highlight the shortcut keys. By default |
---|
80 | if an item has a <, then the first char inside < and > in the range |
---|
81 | [A-Za-z0-9] is converted to lower case and set as the shortcut key. |
---|
82 | * Ontimeout handler |
---|
83 | The user can register an ontimeout handler, which gets called if |
---|
84 | no key has been pressed for a user specific amount of time (default 5 min). |
---|
85 | For an example see the complex.c file. |
---|
86 | |
---|
87 | Credits |
---|
88 | ------- |
---|
89 | * The Watcom developers and Peter Anvin for figuring out an OS |
---|
90 | independent startup code. |
---|
91 | * Thomas for porting the crypt function and removing all C library |
---|
92 | dependencies |
---|
93 | * Peter Anvin for porting the code to GCC |
---|
94 | |
---|
95 | - Murali (gmurali+guicd@cs.uchicago.edu) |
---|