Xref: utzoo comp.windows.x:25495 comp.windows.x.motif:384 Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!rutgers!mcnc!rti!dg-rtp!dg-rtp!brennan From: brennan@rtp.dg.com (Dave Brennan) Newsgroups: comp.windows.x,comp.windows.x.motif Subject: "To scroll, or to let Motif scroll?" - that is the question. Message-ID: Date: 8 Aug 90 22:27:37 GMT Sender: usenet@dg-rtp.dg.com (Usenet Administration) Organization: Data General, RTP, NC Lines: 28 This is a rather simple question, I just don't know if the answer is all that simple, or what the answer is. For those of you who don't know, Motif has a scrolled window widget which manages to perform scrolling by moving a (usually) larger window (in the Xlib sense) around inside a smaller viewport window. The larger window is a child of the viewport so it is clipped to the viewport window. I need to decide if I should use this widget to do scrolling or if I should use a fixed window without the viewport. Using the scrolled window has the advantage that I need only handle vanilla expose events - because the server is moving the window it copies the visible area and generates expose events (rather than graphics expose events) for areas that have to be redrawn. If I do the scrolling in my code I'll have to take care of the copying (via XCopyArea) and graphics expose events as well. However, I get the feeling that there may be some drawbacks to using the Motif scrolled window as opposed to handling the scrolling directly. I've got both ways working and the scrolled window appears to be faster, but I still have optimizations to make to my code. I sure would appreciate it if I could get some ideas about which method to use. Thanks! |\ Dave Brennan | \____oo_ brennan@rtp.dg.com =========================================((__| /___> ...rti!dg-rtp!brennan User Interfaces, Data General | // daveb@rpitsmts.bitnet Research Triangle Park, NC |// Phone: (919) 248-6330