Path: utzoo!attcan!uunet!tut.cis.ohio-state.edu!pacific.mps.ohio-state.edu!zaphod.mps.ohio-state.edu!ncar!ico!attc!marbru From: marbru@attc.UUCP (Martin Brunecky) Newsgroups: comp.windows.x.motif Subject: Re: making our own widget class under XmPrimitive -- but no 3D?? Message-ID: <1208@attc.UUCP> Date: 2 Mar 91 19:14:19 GMT References: <91Feb25.235707est.8813@orasis.vis.toronto.edu> Reply-To: marbru@auto-trol.UUCP (Martin Brunecky) Distribution: na Organization: Auto-trol Technology, Denver Lines: 30 In article <91Feb25.235707est.8813@orasis.vis.toronto.edu> tjhorton@vis.toronto.edu ("Timothy J. Horton") writes: >Has anyone successfully created a widget from the XmPrimitive class? We have, >everything compiles, but no combination of resource settings will make the 3D >shadow effects be drawn (even if I draw NOTHING in the window). > XmPrimitive only provides resources, but no Exposure method. Your widget's exposure has to draw the 3D outline. Note, when subclassing off-of something like XmPrimitive, you better look at the code several times, before you decide: - what this superclass does FOR you - what this superclass does AGAINST you - what you can inherit - what you MUST override You MUST look at the superclass methods which are always called: Initialize and SetValues - normally you shoulkd like what they do, but sometimes they don't do enough (this may be an omission/bug), sometimes they do more than what you want, and you may be forced to un-do that. You must be cerafull about GC's created/destroyed /changed by your superclass. May be not in other widget sets, but definitelly in Motif. Good hacking -- =*= Opinions presented here are solely of my own and not those of Auto-trol =*= Martin Brunecky {...}sunpeaks!auto-trol!marbru (303) 252-2499 (sometimes also: marbru@auto-trol.COM ) Auto-trol Technology Corp. 12500 North Washington St., Denver, CO 80241-2404