Path: utzoo!attcan!uunet!snorkelwacker!bloom-beacon!EXPO.LCS.MIT.EDU!kit From: kit@EXPO.LCS.MIT.EDU (Chris D. Peterson) Newsgroups: comp.windows.x Subject: Re: Xlib graphics within widgets Message-ID: <8910262037.AA16779@expo.lcs.mit.edu> Date: 26 Oct 89 20:37:37 GMT References: <5666@shlump.nac.dec.com> Sender: daemon@bloom-beacon.MIT.EDU Organization: The Internet Lines: 25 > > A better, better solution is to write your own widget to do the job. > I aggree it is not difficult to create a widget, but since in most > widget toolkits exist allready > the drawing widget (DEC : window , MOTIF : drawing_area, ...) ... why > re-invent the wheel ? I did not mean that you should write a widget to do generic drawing, I meant that you should write a widget to do whatever task it is that you feel requires these graphics. For instance write yourself a BarGraph widget, or a Plotting widget, etc. Use Xt to build yourself an object that will do the task. This will not only make for a more compact program, but will make things easier to understand since all the Xlib calls will be wrapped up in widgets, and not in the main body of the program. Modularity, and Object-Oriented programming, what a great idea :-) [ Okay, I'll get off my soapbox now... ] Chris D. Peterson MIT X Consortium Net: kit@expo.lcs.mit.edu Phone: (617) 253 - 9608 Address: MIT - Room NE43-213