Baseclasses
Definition
An instance A of type GraphWinInterface is an interface to the graphical attributes of a GraphWin object. GraphWinInterface posses an option flush, which determines if the update() method redraws the graph. If flush is set to false, the graph is not redrawn. This can be useful, if a subsequent operation, e.g. zoom_graph(), shall be called first, before the changes are displayed.
#include < AGD/GraphWinInterface.h >
Creation
GraphWinInterface | A(GraphWin& GW) | creates an instance A of type GraphWinInterface initialized to an interface to GW. |
GraphWinInterface | A(const GraphWinInterface& gwi) | |
copy constructor. |
Operations
GraphWinInterface inherits the operations from its base class LayoutInterface
(see Sect. Layout Interfaces).
Example
We use a GraphWinInterface to apply an AGD layout algorithm to a graph displayed in a GraphWin.
#include <LEDA/graphwin.h> #include <AGD/GraphWinInterface.h> #include <AGD/PlanarizationLayout.h> int main() { // create a GraphWin and let user edit a graph GraphWin GW; GW.open(); // create an interface to GW for AGD alg's GraphWinInterface GWI(GW); PlanarizationLayout L; // apply L and display the drawing in GW L.call(GW.get_graph(),GWI); // let the user edit the result GW.edit(); }
© Copyright 1998-2001, Algorithmic Solutions Software GmbH. All rights reserved.
2001-08-13