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/graphics/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, int n, const window_handler& obj)
    as above with handler object obj.

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, const window_handler& obj)
    as above with handler object obj.

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
Christian Uhrig 2017-04-07