|
Example
Result Scenes and Update Functions
Important Notice: Update functions are member template functions.
Unfortunately, MSVC++ 6 does not support such functions. Please
use update objects
with this compiler.
Creating Scenes
To create a scene the operation new_scene() of GeoWin is used.
You can create edit scenes with container T with
template<class T> GeoEditScene<T>* geow.new_scene(T& t);
Result scenes can be created with
template<class I, class R> GeoResultScene<I,R>*
geow.new_scene(void (*update)(const I&, R&), geo_scene sc,
string sc_name);
This operation creates a new result scene with input scene sc
and update function update(). The name of the scene
will be sc_name. geo_scene is the scene
item type of GeoWin (a pointer to the base class of all scenes).
Scene sc has a container of type I. The
update function will use this container evey time the input scene
changes.
It is also possible to use update
objects instead of update functions in result scenes.
template<class I, class R> GeoResultScene<I,R>*
geow.new_scene(geowin_update<I,R>& up, geo_scene sc,
string sc_name);
Using an update object it is also possible to provide a redraw object for
the result scene.
template<class I, class R> GeoResultScene<I,R>*
geow.new_scene(geowin_update<I,R>& up, geowin_redraw& rd,
geo_scene sc, string sc_name);
|