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.

ool<br />

GW.set post rotate handler(GeoEditScene ∗ sc, F handler)<br />

sets the handler that is called after every<br />

rotate operation. handler must have type<br />

void (∗handler)(GeoWin&, const T :: value type&,<br />

double x, double x, double a).<br />

template <br />

bool GW.set end change handler(GeoEditScene ∗ sc, F handler)<br />

sets the handler that is called when a geometric object<br />

from (∗sc) ends changing. handler gets the object<br />

as the second parameter. handler must have type<br />

void (∗handler)(GeoWin&, const T :: value type &).<br />

Generator functions: <strong>The</strong> following operation can be used to set a generator function<br />

for an edit scene. <strong>The</strong> operation uses member templates. If your compiler does not support<br />

member templates, you should use instead the templated function geowin set generate fcn.<br />

template <br />

bool GW.set generate fcn(GeoEditScene ∗ sc, void (∗f)(GeoWin& gw,<br />

T & L))<br />

sets the generator function for edit scene (∗sc). <strong>The</strong><br />

function gets the GeoWin where (∗sc) belongs to and<br />

a reference to the container L of (∗sc). <strong>The</strong> function<br />

should write the generated objects to L.<br />

Editing of objects in a scene: It is possible to edit single objects in an editable scene.<br />

For this purpose an edit object - function can be set for editable scenes. This function has<br />

type<br />

void (∗f)(GeoWin& gw, T & obj , int nr)<br />

where gw is the GeoW in-object where the scene belongs to, obj is a reference to the<br />

object that will be edited and nr is the edit mode of the scene.<br />

template <br />

bool GW.set edit object fcn(GeoEditScene ∗ sc, T2 f)<br />

sets the edit object - function of scene sc to f.<br />

template <br />

void∗ GW.get edit object fcn(GeoEditScene ∗ sc)<br />

Transformation objects:<br />

returns the edit object - function of scene sc .<br />

GeoWin supports affine transformations of selected objects in editable scenes for the<br />

<strong>LEDA</strong> rat- and float-kernel classes. <strong>The</strong> used transformation classes are rat transform<br />

and transform respectively. <strong>The</strong> following class templates can be used to instantiate<br />

transformation objects. <strong>The</strong>y are derived from type geowin transform.

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

Saved successfully!

Ooh no, something went wrong!