How to move the cursor at (x,y), clear the screen & inverse the color

How to move the cursor at (x,y), clear the screen & inverse the color

Post by Remo Franceschel » Fri, 01 Aug 1997 04:00:00



Hi, could someone tell me how:
- move the cursor at (x, y)
- clear the screen
- inverse the background color with foreground color

I use Linux Slackware 1.2.13, with gcc 2.7.
PLEASE HELP, thanks
REMO FRANCESCHELLI - ITIAV 4a Info.
http://www.geocities.com/SiliconValley/Lakes/7668
(Programmazione in Pascal)
** Concentrazione = Forza **

 
 
 

How to move the cursor at (x,y), clear the screen & inverse the color

Post by Neil Moor » Fri, 01 Aug 1997 04:00:00



> Hi, could someone tell me how:
> - move the cursor at (x, y)
> - clear the screen
> - inverse the background color with foreground color

man ncurses (man terminfo or man termcap if you want to be a *
about it)

--
-Neil Moore          http://www.veryComputer.com/~amethyst/


 
 
 

How to move the cursor at (x,y), clear the screen & inverse the color

Post by J. Fa » Mon, 11 Aug 1997 04:00:00




> > Hi, could someone tell me how:
> > - move the cursor at (x, y)

move(x,y) in the ncurses.h should do the trick

Quote:> > - clear the screen

use erase() or clear() in the ncurses.h
> > - inverse the background color with foreground color

> man ncurses (man terminfo or man termcap if you want to be a *
> about it)

> --
> -Neil Moore          http://www.veryComputer.com/~amethyst/


 
 
 

How to move the cursor at (x,y), clear the screen & inverse the color

Post by Robert Wues » Mon, 11 Aug 1997 04:00:00





> > > Hi, could someone tell me how:
> > > - move the cursor at (x, y)
> move(x,y) in the ncurses.h should do the trick

It's actually move(y,x).  All of the curses lib is wierd this way.

> > > - clear the screen
> use erase() or clear() in the ncurses.h

> > > - inverse the background color with foreground color

> > man ncurses (man terminfo or man termcap if you want to be a *
> > about it)

> > --
> > -Neil Moore          http://www.veryComputer.com/~amethyst/


--
Robert Wuest, PE                Empowered           Kemet Electronics


 
 
 

How to move the cursor at (x,y), clear the screen & inverse the color

Post by Robert Wues » Tue, 12 Aug 1997 04:00:00





> > > Hi, could someone tell me how:
> > > - move the cursor at (x, y)
> move(x,y) in the ncurses.h should do the trick

It's actually move(y,x).  All of the curses lib is wierd this way.

> > > - clear the screen
> use erase() or clear() in the ncurses.h

> > > - inverse the background color with foreground color

> > man ncurses (man terminfo or man termcap if you want to be a *
> > about it)

> > --
> > -Neil Moore          http://www.veryComputer.com/~amethyst/


--
Robert Wuest, PE                Empowered           Kemet Electronics


 
 
 

How to move the cursor at (x,y), clear the screen & inverse the color

Post by T.E.Dicke » Tue, 12 Aug 1997 04:00:00


: It's actually move(y,x).  All of the curses lib is wierd this way.
That's an artifact related to the cursor movement escape sequences on
some (i.e., ANSI) terminals; the y value appears first in the sequence.
So curses was built over/with termcap, and the designers fed a lot of
the latter's details up into the curses level.

(But what _that_ was done - that's been a while...)

--
Thomas E.*ey

http://www.veryComputer.com/

 
 
 

How to move the cursor at (x,y), clear the screen & inverse the color

Post by Chris Wate » Wed, 13 Aug 1997 04:00:00





>: It's actually move(y,x).  All of the curses lib is wierd this way.
>That's an artifact related to the cursor movement escape sequences on
>some (i.e., ANSI) terminals;

Actually, I think it has more to do with the fact that terminal
positions are specified as "row, column," rather than as "x, y."
Unless, OC, you're using a graphics terminal or a plotter.

The fact that "row, column" is backwards from "x, y" is a historical
artifact dating back hundreds of years before the invention of the
computer.  Anyway, it has nothing to do with the curses library being
"wierd."  The curses library works the way you *should* expect.
What's weird is systems like Borland's conio, where you have to say
"gotoxy(column, row)."  Sorry, but "column, row" is *wrong*!  :-)
--
Chris Waters             |


www.dsp.net/xtifr/ (web) |    volcaniconi-        standalone haiku.

 
 
 

How to move the cursor at (x,y), clear the screen & inverse the color

Post by Jeff Rea » Sun, 17 Aug 1997 04:00:00



> It's actually move(y,x).  All of the curses lib is wierd this way.

All the character displays I can think of have been addressed this way.
Probably it's due to a most-significant, least-significant relationship,
i.e., to address a character at row y, column x, you would use an offset
of (y * 80) + x or something like that. Of course, with the attribute
byte on all IBM PC displays, you would multiply again by 2.
--
----------------------------------------------------------------------


Anime & Sonic Fan,             / Linux rules!
All Around Nice Guy           / Let's keep the Net and the Land FREE!
----------------------------------------------------------------------
 
 
 

How to move the cursor at (x,y), clear the screen & inverse the color

Post by James Junmin Fa » Sun, 17 Aug 1997 04:00:00


I think it's because of the convention in life. We only say row m,
column n, not column n, row m.



> > It's actually move(y,x).  All of the curses lib is wierd this way.

> All the character displays I can think of have been addressed this way.
> Probably it's due to a most-significant, least-significant relationship,
> i.e., to address a character at row y, column x, you would use an offset
> of (y * 80) + x or something like that. Of course, with the attribute
> byte on all IBM PC displays, you would multiply again by 2.
> --
> ----------------------------------------------------------------------


> Anime & Sonic Fan,             / Linux rules!
> All Around Nice Guy           / Let's keep the Net and the Land FREE!
> ----------------------------------------------------------------------

 
 
 

1. Inverse screen colours on boot screen

I have an old IPX station with a cgthree frame buffer
(GX card i think).

In the NVRAM on this box I can see two boolean parameters
called "inverse?" and "inverse-screen?". The values of
these addresses can be changed to cause the boot up
screen to appear white text on a black background rather
rather than the default black on white.

being able to do this is important to me as I need to
minimise the brightness/luminesence of the screen due
to the environment in which the box is being used.

I was setting these booleans from the Forth prompt by
using :

true to inverse?
true to inverse-screen?

So on the IPX box i was putting these into the NVRAMRC.

However, on an Ultra 1 with an Sbus TurboGX+ frame buffer
I get a data access error message from OpenBoot when
I try to do this.

Can anybody, anywhere help me with this?  I need some
help fairly urgently.

-----------------------
Simon Budd

2. SCO UNIX and Quantum Scirocco harddisk

3. Move cursor & put some color..

4. root password change

5. clear command - Clear does not clear my screen.

6. colors

7. screen flickers when cursor moves in/out of window

8. Odd /var/log/syslog message

9. Millenium II: Screen jiggles when cursor moves between windows

10. How to write Full Screen shell script supporting cursor moving up and down?

11. Cursor trashes screen when moved

12. screen and clearing a background color problems.

13. All console screens and cursor changed to color red after reboot - help!