[Date Prev] [Date Next] [Thread Prev] [Thread Next] Date Index Thread Index Search archive:
Date:Mon Apr 15 15:43:05 1996 
Subject:keyboard events in graphic window 
From:A . Sloman 
Volume-ID:960415.01 

Does anyone have any code for adding keyboard event handler to
a graphic window?

I am producing an extension to rc_graphic, combined with objectclass,
which does a subset of things the GO (Graphical Objects) library
was supposed to do, and a a number things it did not attempt to do.

I know how to add mouse event handlers (button down, up, drag, or move)
to a poplog graphic window, and I have found some pointers to keyboard
event handling in the REF files, but as ever it's a lot of work putting
all the things together to find out how to actually make it work, so if
anyone has some sample code I'll be grateful.

My rc_ extension library will soon be generally available at our ftp
site, though it will need Poplog > V15.0 as it uses objectclass a lot.

It provides picture objects that are movable, draggable, rotateable,
scaleable, etc. and can have arbitrary callback actions attached to
them. But it does not handle bitmaps, only objects that can be drawn
using the rc_graphic facilities, and strings to be printed on or
alongside them.

For bitmaps see David Young's "popvision" library available from the
Sussex Poplog ftp site.

    ftp://ftp.cogs.susx.ac.uk/pub/poplog/

Aaron
PS
In particular, it would be useful to be able to tell the width in pixels
of the current font if it is a fixed size font or the width (and height)
that a string would take if printed.