Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!wuarchive!udel!haven!decuac!bacchus.pa.dec.com!wsl.dec.com!klee From: klee@wsl.dec.com (Ken Lee) Newsgroups: comp.windows.x.motif Subject: Re: Drawing area with mouse move callback ? Message-ID: <1990Oct23.091740@wsl.dec.com> Date: 23 Oct 90 16:17:40 GMT References: <1990Oct22.232454.224@efi.com> Sender: news@wrl.dec.com (News) Reply-To: klee@wsl.dec.com Organization: DEC Western Software Laboratory Lines: 23 In article <1990Oct22.232454.224@efi.com>, chiu@efi.com (Chan Chiu) writes: |> I need a canvas area for my graphics editor area. Looks like drawing |> area widget is intened for such use. However, I find out drawing |> area doesn't support mouse drag callback. |> |> Mouse drag is essential for Mac style bounding box selection. Can I still |> use drawing area with some patches ? Or, do I use a customized widget |> (or Xt, Xlib nonwidget solution) ? XtAddEventHandler will give you a mouse motion callback on any widget. You can also use the translation table entry. Still, in the long run you'll probably be better off writing your own widget to do your graphics. The Motif window widget is intended for quick upgrades of Xlib (or similar) programs to Motif. Your own widget will give you much more flexibility, including full access to the X Toolkit resource, geometry, translation, and subclassing mechanims. -- Ken Lee DEC Western Software Laboratory, Palo Alto, Calif. Internet: klee@wsl.dec.com uucp: uunet!decwrl!klee