Re: ada, curses and windows



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.
.



Relevant Pages

  • Re: Paint event of a panel
    ... don't draw borders in the paint event. ... using the window properties or handle the non-client messages correctly. ...
    (microsoft.public.dotnet.languages.vb)
  • Re: Paint event of a panel
    ... Will it work the same way if I sublcass the panel and set it ... don't draw borders in the paint event. ... > using the window properties or handle the non-client messages correctly. ... > itself and why you should draw your borders correctly. ...
    (microsoft.public.dotnet.languages.vb)
  • Re: ada, curses and windows
    ... but no windows appears... ... borders; you have to draw the borders yourself, ... That's what I remember from the two programs I wrote with curses back ...
    (comp.lang.ada)
  • GDI+ drawing speed within MFC dialog (help)
    ... I need to draw a raw data plot into a framed area of a bigger MFC ... dialog window. ... performance of the system and found a useful set of benchmark programs at http://www.codeproject.com/vcpp/gdiplus/gdiplusspeed.asp From these I concluded that the initial draw speed via a cached bitmap was sufficient for my data update rate, and the exposure redraw rate was also excellent. ... I created a simple static frame as the container for the GDI+ plot and timed the code. ...
    (microsoft.public.dotnet.framework.windowsforms)
  • Re: Aaarrrggghhh -- that ugly flicker!
    ... meant was it is often better just to draw straight to the window. ... This method is a little slow, because the offscreen memory-DC is created ... Double-buffering will also be twice as slow as it needs to be. ...
    (microsoft.public.vb.general.discussion)