Path: utzoo!utgpu!watmath!att!ucbvax!bloom-beacon!CRDGW1.GE.COM!DCOOPER%ESDSDF.DECnet From: DCOOPER%ESDSDF.DECnet@CRDGW1.GE.COM Newsgroups: comp.windows.x Subject: Re: Drawing Graphics in a Widget Message-ID: <8908171335.AA06025@crdgw1.ge.com> Date: 17 Aug 89 14:29:00 GMT Sender: daemon@bloom-beacon.MIT.EDU Organization: The Internet Lines: 45 Steve Buck writes: > I also have the problem that when I try to add the procedure draw_graphics > to the translation table it comes back with the error 'X Toolkit Warning: > Actions not found: draw_graphics. Here is how I'm changing > the translation table: > > XtTranslations DisplayTrans; > static char DisplayTransTable[]= > ": draw_graphics() \n\ > : draw_graphics()"; > . > . > . > > Any ideas as to what is wrong would be appreciated. > You need to add an action for your routine, i.e.: static XtActionsRec actionsList[] = { { "draw_graphics", DrawGraphics }, }; ... XtAddActions(actionsList, 1); I added the action before Realizing the toplevel widget, and my DrawGraphics() routine gets called when a ConfigureNotify or Expose event occurs. I have constructed a simple example of using X graphics calls with a widget if you or anyone else is interested. It is small and isolates the toolkit eXpert from having to use a lot of Xlib calls. Dwight Cooper GE Electronic Systems dcooper%esdsdf.decnet@crd.ge.com