[GRASS5] XDRIVER and hour glass cursor while drawing?
Glynn Clements
glynn.clements at virgin.net
Thu May 1 00:08:12 EDT 2003
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
d.vect isn't a "drawing command" from the monitor's perspective.
d.vect repeatedly calls R_move_abs and R_cont_abs; each R_* function
is a "drawing command".
> 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).
Are you saying that you don't see anything until the command
completes?
> > 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)?
That's basically option b). The monitor cannot be resized while a
client is connected; it doesn't matter if it's drawing, waiting on
R_get_location_with_*, or just doing nothing.
The main reason for not taking that route is that it might result in
long-running programs displaying the hourglass cursor inappropriately.
OTOH, you might be willing to live with that.
--
Glynn Clements <glynn.clements at virgin.net>
More information about the grass-dev
mailing list