Algorithmic Solutions > LEDA > LEDA Guide > Windows and Panels > Window Parameters

Window Parameters

Every window has a list of parameters, such as background color, line width, point style, which control its appearance and the way drawing operations are performed on the window. See the Manual Page for Windows for a list of available parameters and their corresponding types.

Reading and Changing Parameters

Most parameters may be retrieved or changed by get()- and set()-functions. If we use param to denote a window parameter and param_t to denote its type, the operations are
	param_t W.set_param(param_t val);
	param_t W.get_param();

The Example of How to Use a Window uses the set()-operation for setting the width of a node and the Colors example changes the backgroung-color using get() and set().

Tip

The fact that the set-operation returns the old value of the parameter is very convenient when a parameter is to be changed only temporarily. In order to change, for example, the mouse cursor to a "watch symbol" during the execution of a time consuming operation one writes
	int old_cursor=W.set_cursor(XC_watch);
	//some time consuming computation
	W.set_cursor(old_cursor);

Remark: There are a few operations for changing parameters that do not follow the scheme described above. See the Manual Page for Windows for details.

See also:

Windows and Panels

Colors

Drawing Operations

Example of How to Use a Window


Manual Pages:

Manual Page Windows




Please send any suggestions, comments or questions to leda@algorithmic-solutions.com
© Copyright 2001-2003, Algorithmic Solutions Software GmbH