[2] | 1 | ; File name : MenuPage.inc
|
---|
| 2 | ; Project name : XTIDE Univeral BIOS Configurator
|
---|
| 3 | ; Created date : 16.4.2010
|
---|
| 4 | ; Last update : 25.4.2010
|
---|
| 5 | ; Author : Tomi Tilli
|
---|
| 6 | ; Description : Structs for menu pages and items.
|
---|
| 7 | %ifndef MENUPAGE_INC
|
---|
| 8 | %define MENUPAGE_INC
|
---|
| 9 |
|
---|
| 10 | ; Variables for menu page (main menu and submenus)
|
---|
| 11 | struc MENUPAGE
|
---|
| 12 | .bItemCnt resb 1 ; Number of MENUPAGEITEM structs
|
---|
| 13 | resb 1
|
---|
| 14 | .prgbItemToVal resb 2 ; Ptr to menuitem index to value lookup table
|
---|
| 15 | .rgMenuPageItem: ; MENUPAGEITEM structs (variable number)
|
---|
| 16 | endstruc
|
---|
| 17 |
|
---|
| 18 |
|
---|
| 19 | ; Variables for single menuitem
|
---|
| 20 | struc MENUPAGEITEM
|
---|
| 21 | .fnActivate resb 2 ; Offset to Menuitem activation function
|
---|
| 22 | .fnNameFormat resb 2 ; Offset to Menuitem name formatting function
|
---|
| 23 | .pValue resb 2 ; Offset to Menuitem value
|
---|
| 24 |
|
---|
| 25 | .pSubMenuPage: ; Ptr to MENUPAGE for new submenu
|
---|
| 26 | .wValueMin resb 2 ; Minimum integer value
|
---|
| 27 |
|
---|
| 28 | .rgszLookup: ; Ptr to lookup table for string values
|
---|
| 29 | .wValueMax: ; Maximum integer value
|
---|
| 30 | .wValueMask resb 2 ; Bitmask for Menuitem value flag
|
---|
| 31 |
|
---|
| 32 | .szName resb 2 ; Offset to Menuitem name string
|
---|
| 33 | .szInfo resb 2 ; Offset to Menuitem information string
|
---|
| 34 | .szHelp resb 2 ; Offset to Menuitem help string
|
---|
| 35 | .szDialog resb 2 ; Offset to new value or other dialog string
|
---|
| 36 | .bFlags resb 1 ; Menuitem flags
|
---|
| 37 | .bType resb 1 ; Menuitem type
|
---|
| 38 | endstruc
|
---|
| 39 |
|
---|
| 40 | ; Bit defines for MENUPAGEITEM.bFlags
|
---|
| 41 | FLG_MENUPAGEITEM_VISIBLE EQU (1<<0) ; Item is visible
|
---|
| 42 |
|
---|
| 43 | ; Values for MENUPAGEITEM.bType
|
---|
| 44 | TYPE_MENUPAGEITEM_BACK EQU (0<<1) ; Back to previous submenu
|
---|
| 45 | TYPE_MENUPAGEITEM_NEXT EQU (1<<1) ; Open next submenu
|
---|
| 46 | TYPE_MENUPAGEITEM_SPECIAL EQU (2<<1) ; Special menuitem without value
|
---|
| 47 | TYPE_MENUPAGEITEM_UNSIGNED_BYTE EQU (3<<1) ; Menuitem with unsigned byte value
|
---|
| 48 | TYPE_MENUPAGEITEM_UNSIGNED_WORD EQU (4<<1) ; Menuitem with unsigned word value
|
---|
| 49 | TYPE_MENUPAGEITEM_HEX_BYTE EQU (5<<1) ; Menuitem with hexadecimal byte value
|
---|
| 50 | TYPE_MENUPAGEITEM_HEX_WORD EQU (6<<1) ; Menuitem with hexadecimal word value
|
---|
| 51 | TYPE_MENUPAGEITEM_FLAG EQU (7<<1) ; Menuitem with boolean flag value
|
---|
| 52 |
|
---|
| 53 |
|
---|
| 54 | %endif ; MENUPAGE_INC
|
---|