Board index » delphi » Blinking cursor for graph input?

Blinking cursor for graph input?

I am creating a procedure to read input in graphics mode.  The only
problem that I'm having is making a blinking cursor.  The only way I can
think of doing it would be to draw a line and then erase it repeativly.
I don't really want to do it like that and I'm sure there must be a
better way.  Any suggestion?

Thanks,
Stuart Johnston

 

Re:Blinking cursor for graph input?


Quote
ChrisEd wrote:

> I am creating a procedure to read input in graphics mode.  The only
> problem that I'm having is making a blinking cursor.  The only way I can
> think of doing it would be to draw a line and then erase it repeativly.
> I don't really want to do it like that and I'm sure there must be a
> better way.  Any suggestion?

Use a non-blinking cursor.  No reason to repeat the follies of
IBM and Microsoft just because that's what people are used to.

- Alf

Re:Blinking cursor for graph input?


Quote
In article <326978C1.5...@Why.net>, ChrisEd  <S...@Why.net> wrote:

:I am creating a procedure to read input in graphics mode.  The only
:problem that I'm having is making a blinking cursor.  The only way I can

Forget that and make an unblinking cursor with Bar.

   All the best, Timo

....................................................................
Prof. Timo Salmi   Co-moderator of news:comp.archives.msdos.announce
Moderating at ftp:// & http://garbo.uwasa.fi archives  193.166.120.5
Department of Accounting and Business Finance  ; University of Vaasa
mailto:t...@uwasa.fi  <URL:http://uwasa.fi/~ts>  ; FIN-65101,  Finland

Re:Blinking cursor for graph input?


Quote
In article <326A2EC5.1...@online.no> Alf P. Steinbach wrote:
>ChrisEd wrote:

>> I am creating a procedure to read input in graphics mode.  The only
>> problem that I'm having is making a blinking cursor.  The only way Ican
>> think of doing it would be to draw a line and then erase itrepeativly.
>> I don't really want to do it like that and I'm sure there must be a
>> better way.  Any suggestion?

>Use a non-blinking cursor.  No reason to repeat the follies of
>IBM and Microsoft just because that's what people are used to.

Ah, but you are forgetting sight impaired people that depend upon
the movement to help them locate the blessed thing.  :)

When your eyes start to fail you you'll feel differently about the
matter.  Maybe even regret encouraging Stuart to abandon it.

    ...red

You can call it folly if you want,

Re:Blinking cursor for graph input?


Quote
R.E.Donais wrote:

> In article <326A2EC5.1...@online.no> Alf P. Steinbach wrote:

> >ChrisEd wrote:

> >> I am creating a procedure to read input in graphics mode.  The only
> >> problem that I'm having is making a blinking cursor.  The only way Ican
> >> think of doing it would be to draw a line and then erase itrepeativly.
> >> I don't really want to do it like that and I'm sure there must be a
> >> better way.  Any suggestion?

> >Use a non-blinking cursor.  No reason to repeat the follies of
> >IBM and Microsoft just because that's what people are used to.

> Ah, but you are forgetting sight impaired people that depend upon
> the movement to help them locate the blessed thing.  :)

> When your eyes start to fail you you'll feel differently about the
> matter.  Maybe even regret encouraging Stuart to abandon it.

No, I'll not regret it.  True, movement including blinking attracts
the eyes  --  this is a hardwired response, as well as part of the
functionality of some dedicated retina cells (which respond to
changes in the visual field).  However, that attraction is *precisely*
why a blinking cursor is so darn irritating, sort of like a TV:  you
can't avoid looking at it!  No problem making it easy for sight
impaired people to locate the cursor, there are lots of ways (all of
them based on creating changes in the visual field, but only when
the user specifically request it, e.g. by hitting the Home button).

- Alf

Re:Blinking cursor for graph input?


In article: <54dm7r$...@reimari.uwasa.fi>  t...@reimari.uwasa.fi (Timo Salmi)
writes:

Quote

>In article <326978C1.5...@Why.net>, ChrisEd  <S...@Why.net> wrote:
>:I am creating a procedure to read input in graphics mode.  The only
>:problem that I'm having is making a blinking cursor.  The only way I can

>Forget that and make an unblinking cursor with Bar.

A blinking cursor is much easier to spot than a static one though, and this is
even truer on a high resolution screen that might have 6000 or more characters
on it. A blinking cursor can be implemented on a graphics screen with relative
ease. The Basic steps are:

Implement an ISR chained to int 8 (the timer interrupt) that decriments the
blink counter until it reaches zero. When this happens it toggles a boolean to
say that the cursor needs redrawing (or you could just test the actual counter
for zero). The ISR does not decriment the counter if it is already zero.

Poll the boolean flag as part of your main program loop (eg at the same time
you're polling for user input), and draw or undraw the cursor (as determined by
another boolean) and reset the counter, whenever the "ReDraw" boolean has been
set by the ISR.

You could either use an XOR operation to draw/undraw the cursor, or save the
area of the screen below the cursor before it is drawn.

There are a few more details to consider, like if you want a normal and
overwrite (block) cursor, but that's basically it.

-- Jay

 --------------------------------------------------------------------------
| Jason Burgon - author of Graphic Vision, TV-Like GUI for 256 Colour SVGA |
| g...@jayman.demon.co.uk   ftp://SimTel/msdos/turbopas/gv4svga1.zip         |
| ***NEW VERSION OF GV AVAILABLE FROM*** -> http://www.jayman.demon.co.uk  |
 --------------------------------------------------------------------------

Other Threads