Search the FAQ Archives

3 - A - B - C - D - E - F - G - H - I - J - K - L - M
N - O - P - Q - R - S - T - U - V - W - X - Y - Z - Internet FAQ Archives Frequently Asked Questions (FAQ)
Section - 38. What widget is appropriate to use as a drawing canvas?

( Single Page )
[ Usenet FAQs | Web FAQs | Documents | RFC Index | Business Photos and Profiles ]

Top Document: Frequently Asked Questions (FAQ)
Previous Document: 37. Where can I find a hypertext widget or source code?
Next Document: 39.!What is this link problem with _get_wmShellWidgetClass, XtInherit?
See reader questions & answers on this topic! - Help others by sharing your knowledge

Some widget sets have a widget particularly for this purpose -- a
WorkSpace or DrawingArea which doesn't display anything but lets your Xt 
application know when it has been re-exposed, resized, and when it has received
user key and mouse input. 

The best thing to do for other widget sets -- including the Athena set 
-- is to create or obtain such a widget; this is preferable to drawing into a 
core widget and grabbing events with XtAddEventHandler(), which loses a number 
of benefits of Xt and encapsulation of the functionality .  

The publicly-available programs xball and xpic include other versions. 
The Display widget in the XG library (libXG-2.0.tar.Z on provides a 
generic way of drawing graphics in a widget.

The Athena Widget manual (mit/doc/Xaw/Template in the R5 distribution) 
includes a tutorial and source code to a simple widget which is suitable for 

The Free Widget Foundation set contains a Canvas widget.

User Contributions:

Comment about this article, ask questions, or add new information about this topic: