Functions | |
int | mt_MenuBar (APPvar *app, OBJECT *menu, int mode) |
Install the desktop menu. | |
int | mt_MenuTnormal (APPvar *app, WINDOW *win, int title, int mode) |
Hilight or unhilight a title in a menu. | |
int | mt_MenuIcheck (APPvar *app, WINDOW *win, int title, int mode) |
Check or uncheck an entry in a menu. | |
int | mt_MenuText (APPvar *app, WINDOW *win, int title, char *txt) |
Change the text of a menu entry. | |
int | mt_MenuDisable (APPvar *app) |
Disable the desktop menu. | |
int | mt_MenuEnable (APPvar *app) |
Enable the desktop menu. | |
int | mt_MenuPopUp (APPvar *app, void *data, int x, int y, int max, int size, int item, int mode) |
Display and handle a menu popup. | |
void | mt_MenuScroll (APPvar *app, WINDOW *win, int dir) |
Scroll the titles of a window menu. |
int mt_MenuBar | ( | APPvar * | app, | |
OBJECT * | menu, | |||
int | mode | |||
) |
Install the desktop menu.
app | application descriptor, | |
menu | objects tree standing for the menu, | |
mode | possible values are :
|
int mt_MenuDisable | ( | APPvar * | app | ) |
Disable the desktop menu.
app | application descriptor. |
int mt_MenuEnable | ( | APPvar * | app | ) |
Enable the desktop menu.
app | application descriptor. |
Check or uncheck an entry in a menu.
app | application descriptor, | |
win | window descriptor containing a menu or NULL for desktop menu, | |
item | index of menu entry, | |
check | possible values are :
|
Extended objects are correctly handled by this function.
int mt_MenuPopUp | ( | APPvar * | app, | |
void * | list, | |||
int | xpop, | |||
int | ypop, | |||
int | size, | |||
int | seen, | |||
int | item, | |||
int | mode | |||
) |
Display and handle a menu popup.
app | application descriptor, | |
list | address of a valid object tree or a list of entries (see mode), | |
xpop,ypop | menu popup position in the desktop, | |
size | if P_LIST is used, indicates the number of element in list, otherwise this value is ignored, | |
seen | if P_LIST is used, indicates the maximum of entries seen in the popup, otherwise this value is ignored, | |
item | an index in list array : the entry matching to this item is centered (and popup parent too) on the mouse position, | |
mode | a bit field, possible values are :
|
A list of entries is a pointer such as "char *ptxt[]"
. If the seen parameter is used, the popup is displayed with a slider and contains seen items.
Keyboards can be used to naviguate in the popup (up and down arrow) and validate an entry (RETURN or ENTER keys).
With a P_LIST mode, the menu popup aspect can be defined by the user from the WinDom configuration file (see windom.popup variables).
Scroll the titles of a window menu.
app | application descriptor, | |
win | window descriptor having an menu, | |
dir | scroll direction :
|
Change the text of a menu entry.
app | application descriptor, | |
win | window descriptor containing a menu or NULL for desktop menu, | |
item | index of menu entry, | |
txt | new entry label. |
Extended objects are correctly handled by this function.
Hilight or unhilight a title in a menu.
app | application descriptor, | |
win | window descriptor containing a menu or NULL for desktop menu, | |
title | index of title menu, | |
mode | possible values are :
|