next up previous contents index
Next: Postscript Files ( ps_file Up: Graphics Previous: Panels ( panel )   Contents   Index


Menues ( menu )

Definition

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

#include < LEDA/menu.h >

Creation

menu M creates an empty menu M.

Operations

int M.button(string s, int n) adds a button with label s and number n to M.

int 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).

int 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.

int 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.

int M.button(string s, int n, window& W)
    adds a button with label s, number n, and attached window W to M.Whenever the button is pressed W is opened.

int 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.

void M.separator() inserts a separator (horizontal line) at the current position.

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 index
Next: Postscript Files ( ps_file Up: Graphics Previous: Panels ( panel )   Contents   Index
LEDA research project
2000-02-09