comp.lang.ada
 help / color / mirror / Atom feed
* ada, curses and windows
@ 2009-08-01 19:08 Massimo M.
  2009-08-01 20:34 ` Ludovic Brenta
  0 siblings, 1 reply; 5+ messages in thread
From: Massimo M. @ 2009-08-01 19:08 UTC (permalink / raw)


i can't use windows in curses.
they don't work, i looked for examples, but i find only too complicated
examples. can you give me some easy examples in using windows in ada?

i used 

winInput:=New_Window(Line_Count(8),Column_Count(8),Line_Position(8),Column_Position(8));
box(winInput);
refresh(winInput);

but no windows appears...
if i use 
box(standard_window), the box appears.

thanks in advance

-- 
Spolvera la mia email per rispondermi

"Storia del Mondo. I vulcani eruttarono. Gli oceani ribollirono.
L'universo era in tumulto. Poi venne il cane."
Snoopy

maxy04.splinder.com

questo articolo e` stato inviato via web dal servizio gratuito 
http://www.newsland.it/news segnala gli abusi ad abuse@newsland.it





^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: ada, curses and windows
  2009-08-01 19:08 ada, curses and windows Massimo M.
@ 2009-08-01 20:34 ` Ludovic Brenta
  2009-08-01 23:08   ` Ludovic Brenta
  0 siblings, 1 reply; 5+ messages in thread
From: Ludovic Brenta @ 2009-08-01 20:34 UTC (permalink / raw)


Massimo M. wrote on comp.lang.ada:
> i can't use windows in curses.
> they don't work, i looked for examples, but i find only too complicated
> examples. can you give me some easy examples in using windows in ada?
>
> i used
>
> winInput:=New_Window(Line_Count(8),Column_Count(8),Line_Position(8),Column_Position(8));
> box(winInput);
> refresh(winInput);
>
> but no windows appears...
> if i use
> box(standard_window), the box appears.
>
> thanks in advance

The behaviour you see is correct.  Curses does not draw have window
borders; you have to draw the borders yourself, e.g. with a "box".

That's what I remember from the two programs I wrote with curses back
in 1992 or so.

--
Ludovic Brenta.



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: ada, curses and windows
  2009-08-01 20:34 ` Ludovic Brenta
@ 2009-08-01 23:08   ` Ludovic Brenta
  2009-08-02  7:56     ` Massimo M.
  0 siblings, 1 reply; 5+ messages in thread
From: Ludovic Brenta @ 2009-08-01 23:08 UTC (permalink / raw)


I wrote on comp.lang.ada:
> Massimo M. wrote on comp.lang.ada:
>
>> i can't use windows in curses.
>> they don't work, i looked for examples, but i find only too
>> complicated examples. can you give me some easy examples in
>> using windows in ada?
>
>> i used
>
>> winInput:=New_Window(Line_Count(8),Column_Count(8),Line_Position(8),Column_Position(8));
>> box(winInput);
>> refresh(winInput);
>
>> but no windows appears...
>> if i use
>> box(standard_window), the box appears.
>
>> thanks in advance
>
> The behaviour you see is correct.  Curses does not draw have window
> borders; you have to draw the borders yourself, e.g. with a "box".
>
> That's what I remember from the two programs I wrote with curses back
> in 1992 or so.

BTW, have you considered TextTools[1,2]? It is a library on top of
curses that draws the window borders for you, offers a widget set
(buttons, scroll bars etc.) and even supports the mouse!

[1] http://www.pegasoft.ca/tt.html
[2] http://packages.qa.debian.org/libt/libtexttools.html

--
Ludovic Brenta.



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: ada, curses and windows
  2009-08-01 23:08   ` Ludovic Brenta
@ 2009-08-02  7:56     ` Massimo M.
  2009-08-02  9:16       ` Massimo M.
  0 siblings, 1 reply; 5+ messages in thread
From: Massimo M. @ 2009-08-02  7:56 UTC (permalink / raw)


thank you for the help!

i found the problem. it seems that the "REFRESH" has strange behavior.
if i put a refresh(winInput), the box or the string don't appear, but if i
remove the refresh, the box and the string appear.

-- 
Spolvera la mia email per rispondermi

"Storia del Mondo. I vulcani eruttarono. Gli oceani ribollirono.
L'universo era in tumulto. Poi venne il cane."
Snoopy

maxy04.splinder.com

questo articolo e` stato inviato via web dal servizio gratuito 
http://www.newsland.it/news segnala gli abusi ad abuse@newsland.it





^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: ada, curses and windows
  2009-08-02  7:56     ` Massimo M.
@ 2009-08-02  9:16       ` Massimo M.
  0 siblings, 0 replies; 5+ messages in thread
From: Massimo M. @ 2009-08-02  9:16 UTC (permalink / raw)


i found the problem.
the refresh, referred to the entire screen, erase the windows.
a refresh(winInput) is required, but if windows are used, the
refresh(standard_window) can't be called.

-- 
Spolvera la mia email per rispondermi

"Storia del Mondo. I vulcani eruttarono. Gli oceani ribollirono.
L'universo era in tumulto. Poi venne il cane."
Snoopy

maxy04.splinder.com

questo articolo e` stato inviato via web dal servizio gratuito 
http://www.newsland.it/news segnala gli abusi ad abuse@newsland.it





^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2009-08-02  9:16 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-08-01 19:08 ada, curses and windows Massimo M.
2009-08-01 20:34 ` Ludovic Brenta
2009-08-01 23:08   ` Ludovic Brenta
2009-08-02  7:56     ` Massimo M.
2009-08-02  9:16       ` Massimo M.

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox