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.

virtual bool is_running(const GeoWin&) { return true; }<br />

virtual point get_next_point(const GeoWin&) = 0;<br />

virtual long get_next_action(const GeoWin&)<br />

{ return GEOWIN_STOP_MOVE_SELECTED; }<br />

};<br />

At the start and at the end of an animation the member functions init and finish<br />

are called. <strong>The</strong> animation is stopped if is running returns false. <strong>The</strong> member functions<br />

get next point and get next action specify the animation. get next point delivers<br />

the next point of the animation path. get next action currently can return two<br />

values: GEOWIN MOVE SELECTED (moves the selected objects of the scene) and<br />

GEOWIN STOP MOVE SELECTED (stops the movement of the selected objects of the<br />

scene).<br />

bool<br />

GW.animate(geo scene sc, geowin animation& anim)<br />

starts animation anim for edit scene sc.<br />

b) Window Operations<br />

void GW.close( ) closes GW .<br />

double GW.get xmin( ) returns the minimal x-coordinate of the drawing area.<br />

double GW.get ymin( ) returns the minimal y-coordinate of the drawing area.<br />

double GW.get xmax( ) returns the maximal x-coordinate of the drawing area.<br />

double GW.get ymax( ) returns the maximal y-coordinate of the drawing area.<br />

void<br />

GW.display(int x = window :: center, int y = window :: center)<br />

opens GW at (x, y).<br />

window& GW.get window( ) returns a reference to the drawing window.<br />

void<br />

GW.init(double xmin, double xmax, double ymin)<br />

same as window::init(xmin, xmax, ymin, g).<br />

void GW.init(double x1 , double x2 , double y1 , double y2 ,<br />

int r = GEOWIN MARGIN )<br />

inializes the window so that the rectangle with lower<br />

left corner (x1 − r, y1 − r) and upper right corner<br />

(x2 + r, y2 + r) is visible. <strong>The</strong> window must be open.<br />

GEOW IN MARGIN is a default value provided by<br />

GeoWin.<br />

void GW.redraw( ) redraws the contents of GW (all visible scenes).<br />

int GW.set cursor(int cursor id = −1)<br />

sets the mouse cursor to cursor id.

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

Saved successfully!

Ooh no, something went wrong!