next up previous contents
Next: Postscript Files (ps_file) Up: Graphics Previous: Panels for parameter handlers

   
Menues (menu)

Definition

Menues are special panels consisting only of a vertical list of buttons.

Creation

menu M; creates an empty menu M.

menu

M(string s); creates an empty menu M with header s.

   

Operations

void M.button(string s, int n) adds a button with label s and number n to M.
void M.button(string s) adds a new button to M with label s and number equal to its position in the list of all buttons (starting with 0).
void M.button(string s, int n, void (*F)(int))
    adds a button with label s, number n and action function F to M. Function F is called with actual parameter n whenever the button is pressed.
void M.button(string s, void (*F)(int))
    adds a button with label s, number equal to its rank and action function F to M. Function F is called with the number of the button as argument whenever the button is pressed.
void M.button(string s, window& W)
    adds a button with label s and attached window W to M. Whenever the button is pressed W is opened and W.read_mouse() is returned.
int M.open(window& W, int x, int y)
    open and read menu M at position (x,y) in window W.


next up previous contents
Next: Postscript Files (ps_file) Up: Graphics Previous: Panels for parameter handlers
LEDA research project
1998-10-02