Tooltips and repaints and exposures... some explanations?

This forum is read only. No new submissions are accepted.

Questions about motif? Contact us

3 posts / 0 new
Last post
Tooltips and repaints and exposures... some explanations?

Submitted by Anonymous (not verified) on Fri, 06/15/2012 - 12:07

How exactly do popup widgets work... some trigger repaints for the parent draw area while others do not.
Could someone explain how refresh/repaint/expose? work... I`m a n00b with graphics.
Thanks in advance
‹ Problems with highlights in popup menu Segmentation Fault ›

Anonymous

Fri, 10/31/2003 - 20:37#1

Tooltips and repaints and exposures... some explanations?

When a popup is displayed, nothing happend for its parent - nothing of the parent is getting exposed. When the popup disappears, one or more expose events are issued to all windows that were previously covered by the popup. the widget for that window is responsible for handling the expose event and repainting itself. Most widgets will redraw themselves when they receive this expose event. Some, like the Motif DrawingArea will not, since it is merely a canvas that knows nothing about what the app has drawn there. For the DrawingArea, the app should register an XmNexposeCallback, and the registered callback should redraw itself.

Anonymous

Tue, 11/04/2003 - 15:22#2

Tooltips and repaints and exposures... some explanations?

As far as drawing area are concerned, you could also create a second pixmap (XCreatePixmap) with same width and height as your drawing area and use it as an off screen buffer.

When drawing, draw in both the drawing area and the bg pixmap. Upon expose, just "dump" the content of the bg pixmap in the primary drawing area.