Title: | DECWINDOWS 26-JAN-89 to 29-NOV-90 |
Notice: | See 1639.0 for VMS V5.3 kit; 2043.0 for 5.4 IFT kit |
Moderator: | STAR::VATNE |
Created: | Mon Oct 30 1989 |
Last Modified: | Mon Dec 31 1990 |
Last Successful Update: | Fri Jun 06 1997 |
Number of topics: | 3726 |
Total number of notes: | 19516 |
Argh... Can someone shed some light on how I'd go about registering a GraphicsExpose event handler for a WINDOW widget? ADD EVENT HANDLER requires an event mask, and I can't find such a critter for GraphicsExpose events. In just plain 'ole X, you don't have to worry 'bout issuing a SELECT INPUT for graphics exposure, since you indicate your interest in the event by setting the appropriate field in the GC. Hints or suggestions? I really don't want to write my own event dispatcher to account for this single event, but that's the only solution I can think of right now. Mike Endsley SWS @ STO
T.R | Title | User | Personal Name | Date | Lines |
---|---|---|---|---|---|
1225.1 | PSW::WINALSKI | Meetings are our most important product | Wed Aug 02 1989 20:21 | 27 | |
You let the Toolkit do it for you. When you create the window widget, specify an expose callback. Here is the UIL for a window widget with such a routine: object status_center_data: window { arguments { adb_bottom_attachment= DwtAttachOppWidget; adb_bottom_widget= label status_center_label; adb_left_attachment= DwtAttachWidget; adb_left_widget= label status_center_label; border_width= 0; height= 15; width= 360; }; callbacks { create = procedure create_coord_proc(k_coord_center); expose = procedure expose_coord(k_coord_center); }; }; The expose callback routine gets called for expose events, graphics expose events, and noExpose events. --PSW | |||||
1225.2 | HANNAH::MESSENGER | Bob Messenger | Wed Aug 02 1989 22:20 | 16 | |
Re: .0 > ADD EVENT HANDLER requires an event mask, and I can't find such a > critter for GraphicsExpose events. The third parameter to XtAddEventHandler is "other", which is "A Boolean value that indicates whether this procedure should be called on nonmaskable events, which include Graphics Expose, No Expose...". In other words, instead of setting a bit in the event_mask parameter, to get GraphicsExpose events you should set the other parameter to True. Your procedure should be prepared discard events you aren't interested, such as SelectionClear, SelectionRequest, etc. -- Bob | |||||
1225.3 | Thanks -- I'll give it a whirl | MDVAX3::ENDSLEY | MJ Endsley, SWS @ St. Louis | Thu Aug 03 1989 10:10 | 18 |
RE: .1 Hmm... Your description of the expose callback doesn't match what I've been seeing (e.g. I've been getting expected Expose events, but not GraphicsExpose nor NoExpose). Let me check and ensure that consarned bit is set in the GC. RE: .2 Ah Hah! That's what the magic meant. I'll give it a whirl and see what happens. Thanks much gents... Mike Endsley SWS @ STO |