31.01.2014 Views

Version 5.0 The LEDA User Manual

Version 5.0 The LEDA User Manual

Version 5.0 The LEDA User Manual

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

int<br />

bool<br />

bool<br />

gw.load layout(istream& istr)<br />

read layout from stream istr.<br />

gw.save layout(ostream& ostr)<br />

save layout to stream ostr.<br />

gw.save layout(string fname, bool ask override = false)<br />

save layout to file fname.<br />

h) Zooming<br />

void gw.zoom(double f) zooms the window by factor f.<br />

void gw.zoom area(double x0 , double y0 , double x1 , double y1 )<br />

performs a zoom operation for the rectangular<br />

area with current coordinates (x0, y0, x1, y0).<br />

void gw.zoom graph( ) performs a zoom operation, such that the graph<br />

fills the entire window.<br />

void gw.unzoom( ) undoes last zoom operation.<br />

i) Operations in Edit-mode<br />

Before entering edit mode ...<br />

gw action<br />

gw action<br />

gw.set action(long mask, gw action func)<br />

gw.get action(long mask)<br />

sets action associated with condition mask<br />

to func and returns previous action for<br />

this condition. Here gw action is the type<br />

void (∗func)(GraphWin&, const point&). For<br />

func = NULL the corresponding action is<br />

deleted.<br />

returns the action associated with condition<br />

mask.<br />

void gw.reset actions( ) resets all actions to their defaults.<br />

void gw.clear actions( ) deletes all actions.<br />

void<br />

gw.add node menu(string label, gw action func)<br />

appends action function func with label label to<br />

the context menu for nodes (opened by clicking<br />

with the right mouse button on a node).

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!