[GRASS5] XDRIVER and hour glass cursor while drawing?

Markus Neteler neteler at itc.it
Wed Apr 30 13:18:05 EDT 2003


On Tue, Apr 29, 2003 at 11:56:59PM +0100, Glynn Clements wrote:
> 
> Markus Neteler wrote:
> 
> > My question is if it were possible to modify the XDRIVER
> > to show a hour glass cursor instead of the common arrow
> > when drawing in the GRASS monitor?
> > This is already implemented when the user is resizing
> > the monitor (redraw event).
> 
> By "drawing", do you actually mean:
> 
> a) drawing (i.e. from the point that a drawing command is received to
> the time it completes), or

Yes. For example:

GRASS 5.1.0-cvs:~ > time d.vect map=streetmap.shp

real    0m29.497s
user    0m12.998s
sys     0m3.318s

GRASS 5.1.0-cvs:~ > v.info streetmap.shp
 |----------------------------------------------------------------------------|
 |   Type of Map:  Vector (level: 2)
 |   Number of points:       0               Number of areas:      0
 |   Number of lines:        651414          Number of islands:    0
 |   Number of boundaries:   0               Number of faces:      0
 |   Number of centroids:    0               Number of kernels:    0

The file size is 110 MB.

When drawing several vector maps of this type, I wait of course even longer.
During the d.vect run the hour glass were great to see to be informed that
the drawing is still running (which is less obvious than for raster maps).

> b) whenever a client is connected but isn't waiting on one of the
> R_get_location_with_* functions, or

mhh, less important (for me).
 
> c) something else?
> 
> The problem with a) is that many drawing modules actually perform
> multiple drawing operations; e.g. rasters are drawn using one command
> per source row. There isn't any way for the driver to know where the
> larger operation begins and ends. A straightforward implementation
> would turn the pointer to an hourglass/clock at the start of each row
> and back to the arrow at the end of each row, which might result in a
> flickering cursor. This issue doesn't apply to redraw, which has a
> definite start and end.

But: while drawing one cannot resize the monitor. For this the draw
event is caught. Maybe it could be also used to change the cursor
(as it is exactly the same situation)?

Markus




More information about the grass-dev mailing list