AT&T UNIX™PC Unix System V Users Manual - tenox

AT&T UNIX™PC Unix System V Users Manual - tenox AT&T UNIX™PC Unix System V Users Manual - tenox

01.01.2013 Views

MEMORY (3C} MEMORY (3C) Character movement is performed differently in different implementations. Thus overlapping moves may yield surprises. - 2-

MENU (3T) {AT&T UNIX PC only ) MENU ( 3T ) NAME menu - display and accept menus SYNOPSIS #include < menu.h > int menu(menu, op) menu_t *menu; int op; DESCRIPTION This routine manipulates a menu as determined by the operation code ( op ). If the op arg is M_BEGIN, the menu is initialized and displayed. If op is M_INPUT, user input is accepted. If op is M_END, the menu is terminated and removed from the display. If op is M_DESEL, all currently-selected items are de-selected before the menu is processed. These functions may be combined in many ways. By specifying (M_DESEL I M_BEGIN I M_INPUT I M_END), the caller creates a "pop-up" menu which is initialized (displayed), used for input, then removed. Generally, (M_BEGIN I M_INPUT) is used for the first call, M_INPUT for each subsequent interaction, and M_END when the menu is to be discarded. M_DESEL can be added to clear bad choices after an error. During the M_INPUT function, the user may point to items with the mouse or with the keyboard (arrows, Prev, Next, Beg, Home, End). The user may mark entries with the mouse or keyboard (Sleet, Mark), or may qualify one or more items by typing. The Cancl, Clear Line, Back Space, and Return keys perform their generic editing functions. For larger menus, the Roll and Page keys may be used to scroll through choices which do not fit in the prevailing window. All other keys, including Enter, are returned to the caller. The menu structure has the following form: typedef struct { char char char char char char char char char int track_t int int int mitem_t mitem_t *m_label; *m_title; *m_prompt; m_rows; m_cols; m_iwidth; m_iheight; m_fiags; m_lbuf[M_MAXLINE]; m_win; *m_track; m_oldwidth; m_oldheight; m_selcnt; *m_items; *m_curi; - 1 - /* menu label *I /* menu title *I /* menu prompt *I /* desired rows *I /* desired cols *I /* item width *I /* item height * I I* flags * I /* input buffer *I /* window pointer *I /* menu track list ptr *I /* last window width *I /* last window height *I /* count of # selected *I I* pointer to items *I /* current item *I

MENU (3T) {AT&T UNIX PC only ) MENU ( 3T )<br />

NAME<br />

menu - display and accept menus<br />

SYNOPSIS<br />

#include < menu.h ><br />

int menu(menu, op)<br />

menu_t *menu;<br />

int op;<br />

DESCRIPTION<br />

This routine manipulates a menu as determined by the operation<br />

code ( op ). If the op arg is M_BEGIN, the menu is initialized and<br />

displayed. If op is M_INPUT, user input is accepted. If op is<br />

M_END, the menu is terminated and removed from the display.<br />

If op is M_DESEL, all currently-selected items are de-selected<br />

before the menu is processed. These functions may be combined<br />

in many ways. By specifying<br />

(M_DESEL I M_BEGIN I M_INPUT I M_END), the caller creates<br />

a "pop-up" menu which is initialized (displayed), used for input,<br />

then removed. Generally, (M_BEGIN I M_INPUT) is used for the<br />

first call, M_INPUT for each subsequent interaction, and M_END<br />

when the menu is to be discarded. M_DESEL can be added to<br />

clear bad choices after an error.<br />

During the M_INPUT function, the user may point to items with<br />

the mouse or with the keyboard (arrows, Prev, Next, Beg, Home,<br />

End). The user may mark entries with the mouse or keyboard<br />

(Sleet, Mark), or may qualify one or more items by typing. The<br />

Cancl, Clear Line, Back Space, and Return keys perform their<br />

generic editing functions. For larger menus, the Roll and Page<br />

keys may be used to scroll through choices which do not fit in the<br />

prevailing window.<br />

All other keys, including Enter, are returned to the caller.<br />

The menu structure has the following form:<br />

typedef struct<br />

{<br />

char<br />

char<br />

char<br />

char<br />

char<br />

char<br />

char<br />

char<br />

char<br />

int<br />

track_t<br />

int<br />

int<br />

int<br />

mitem_t<br />

mitem_t<br />

*m_label;<br />

*m_title;<br />

*m_prompt;<br />

m_rows;<br />

m_cols;<br />

m_iwidth;<br />

m_iheight;<br />

m_fiags;<br />

m_lbuf[M_MAXLINE];<br />

m_win;<br />

*m_track;<br />

m_oldwidth;<br />

m_oldheight;<br />

m_selcnt;<br />

*m_items;<br />

*m_curi;<br />

- 1 -<br />

/* menu label *I<br />

/* menu title *I<br />

/* menu prompt *I<br />

/* desired rows *I<br />

/* desired cols *I<br />

/* item width *I<br />

/* item height * I<br />

I* flags * I<br />

/* input buffer *I<br />

/* window pointer *I<br />

/* menu track list ptr *I<br />

/* last window width *I<br />

/* last window height *I<br />

/* count of # selected *I<br />

I* pointer to items *I<br />

/* current item *I

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!