[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: graphical things
> Is there a simple way to open a window and plot characters or pixels
> on it?
> Also - how about user input?
The current release has support for Xlib calls, but it does not have
higher level graphical or input support. See the objects "window",
"bitmap", and "xlib".
Here's an example of how to open a simple window and draw to it.
myWin: window copy open.
myWin bitmap rectangle: (10@10) # (60@60) Color: ( | index = 1 | ).
The argument for Color: is usually a "colormapEntry" object, but the
only slot used in these drawing calls is the index slot, so you can
just substitute any kind of object that returns an index. The index
is the colormap index of the installed colormap, so whatever is stored
at that location will determine the color displayed. If you want to
specify your own colors, see "colormap" and "xlib".
As for user input: the "window" object uses "simpleEventHandler" by
default. Copy and modify that event handler to do what you want.