[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [XForms] drawing into a foreign window

From: Patrick
Subject: Re: [XForms] drawing into a foreign window
Date: Thu, 29 Dec 2016 13:18:58 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Icedove/38.8.0

Hi Rick

I may have found an in terminal solution here(and a one for mortals!):


Your framebuffer suggestion is a good one and very much appreciated though.

Have a great day-Patrick

On 12/29/2016 12:17 AM, Rick Engebretson wrote:
I'm not sure this still works, but for simple drawing into a virtual terminal you can (could) simply draw directly into the framebuffer (/dev/fb0). IIRC, you can also draw on your XWindow terminal, too, but you just get a mess. One trick on the Linux Virtual Terminal is to set your scroll region so NCurses just writes to probably the bottom of the screen leaving your drawing region alone. Controlling the scroll region is one of the "console codes" escape sequences Jens mentioned.

Not sure about Cobol, but with Pascal I had to write my own line drawing (and other primitives) functions using methods like "Bresenham functions." In the end I realized I was reinventing the wheel and couldn't compete with an army of MIT and DEC professional programmers who made X. But learning is fun, and modern framebuffer virtual terminals on modern displays made even Thomas Dickey (maintainer of both NCurses and XTerm, etc.) challenged. So who knows??

If you are mortal like the rest of us the XForms Image library is a very nice drawing framebuffer array with X widget tools.

Patrick wrote:
Hi Jens, Hi Paul

Paul, this looks like a good suggestion! and Jens's warning about it is noted :)

Hi Jens, I know what I am trying to do is weird, let me explain more.

I really like COBOL and it's a good way to get beat up on mailing lists. It's evolved a lot of the years but it's criticisms are decades old and everyone seems to hate the language even if they know nothing about it.

Anyhow, it has ncurses built in and in it's screen section, you can build text user interfaces really easily. Everything is tightly integrated and because GnuCOBOL compiles to intermediate C rather then Assembly, the runtime is small and hackable.

I love-love this but I can't do 70% of what I want to do because I don't have the ability to draw or add pictures.

I understand the ncurses windows have no relation to X windows. The thing is that in most cases the window that the terminal runs in is just an X window and if I write TUI data to part of it and GUI data to part of it, I should be able to have the best of both worlds. I understand that they cannot mix in the same areas though.

Thanks again-Patrick

On 12/28/2016 03:28 PM, Paul wrote:

Agreeing with all Jens' comments.

You might try it the other way around.

Create a window as usual using XForms.

Get the Xwindow window ID of your window.

Launch an xterm and use the -into option
of xterm to make it use your window.

xterm -into window_id is intended to allow
embedding into other applications.  That
may be what you want?

Paul Nicholson

reply via email to

[Prev in Thread] Current Thread [Next in Thread]