Algorithmic Solutions > LEDA > LEDA Guide > GraphWin > Programming Interface > Miscellaneous Operations

Miscellaneous Operations

On this page we present some small, but useful functions provided by GraphWin.

Operations

The operation
    void gw.message(string msg);
displays the string msg at the top of the window. If msg is the empty string, the previous message is deleted.
    bool gw.wait(const msg);
displays msg and waits until the done-button is pressed or exit is selected from the file-menu. The result of the operation is true in the first case, and false in the second case.
    int gw.open_panel(panel& P);
displays the panel P centered on gw and returns the result of P.open(). During the execution of P.open() all menus of gw are disabled.
    node gw.ask_node();
asks the user to select a node by clicking with the left mouse button on it. The selected node is returned; nil if the click does not hit a node.
    node gw.ask_edge();
asks the user to select an edge by clicking with the left mouse button on it. The selected edge is returned; nil if the click does not hit an edge.
    void gw.get_bounding_box(double& x0, double& y0, 
                             double& x1, double& y1);
computes the coordinates (x0,y0,x1,y1) of the minimal area rectangular bounding box containing the current layout of the graph.

See also:

GraphWin

Programming Interface

Interactive Interface

Attributes and Parameters


Graph Data Types


Windows and Panels


Strings


Manual Pages:

Manual Page GraphWin




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