dmg@ssc-vax.UUCP (David Geary) (03/03/88)
Can anyone out there tell me why the following code does not draw
or put any text in the window?
#include <suntool/sunview.h>
#include <suntool/tty.h>
Frame MainWindow;
Tty tty;
Pixwin *pw;
main()
{
MainWindow = window_create(NULL, FRAME, FRAME_LABEL, "Sun-Cimple", 0);
tty = window_create(MainWindow, TTY, 0);
pw = (Pixwin *)window_get(MainWindow,WIN_PIXWIN);
pw_vector(pw, 100, 100, 200, 100, PIX_SRC, 1);
pw_vector(pw, 100, 200, 200, 200, PIX_SRC, 1);
pw_vector(pw, 100, 100, 100, 200, PIX_SRC, 1);
pw_vector(pw, 200, 100, 200, 200, PIX_SRC, 1);
pw_text(pw, 125, 150, PIX_SRC, 0, "Hey, I'm Some Text\n");
window_main_loop(MainWindow);
}
From the bottom of page 92 in the SunView Programmer's Guide:
"Aside from the canvas pixwin, all windows, REGARDLESS OF TYPE,
have a pixwin which is available as the value of WIN_PIXWIN. However
most applications should not need to explicityly write pixels into
other types of windows."
Of course, my application would love to be able to write to a TTY
window, which is what I'm trying to do.
Any help is severly appreciated...
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~ "...Raven hair and ruby lips, ~
~ Sparks Fly from the fingertips..." ~
~ ~
~ Witchy Woman, The Eagles ~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
--
***********************************************************
* David Geary, Boeing Aerospace Co., Seattle, WA *
* I disclaim all disclaimers.... *
***********************************************************