🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.windows.interviews
Article #877

Re: Rubber Banding in InterViews

#877
From: Mark Linton
Date: Sun, 14 Apr 1991 04:23
24 lines
1872 bytes
In article <10241@mentor.cc.purdue.edu>, zhengt@mentor.cc.purdue.edu (Tong Zheng) writes:
|> I am working on a project that offers user to draw
|> a rubber banding box to select portion of a Graphic
|> area.  Well, I found a RubberRect class and implemented
|> in my codes, I got the rectangular box, but had seen
|> two problems,
|> 
|> 1) When the program received a DownEvent, I created the
|>    RubberRect object, then if a MotionEvent arrives,
|>    method Track() will be used to erase previous box
|>    and draw a new box upon currect pointer position,
|>    UpEvent will terminate this rubber banding session.
|>    I think I follow the right track to form a rubber banding,
|>    but funny thing is I never am able to get a MotionEvent.
|> 2) The rubber box can't redraw itself when is exposed after a
|>    obscuring.  

Rubberbands are not interactors; their only purpose is to abstract
objects that can be quickly drawn and erased (normally using xor).
Therefore, rubberbands do not automatically get MotionEvents, you must
catch them explicitly in the interactor that contains the rubberband.
Similarly, if you want the rubberband to be redrawn upon exposure then
you need to have your interactor's Redraw operation make sure to redraw
the rubberband.
Technical Details
Message-ID: <1991Apr14.042340.5510@odin.corp.sgi.com>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!swrinde!elroy.jpl.nasa.gov!decwrl!sgi!shinobu!odin!marktwain.rad.sgi.com!linton
References: <10241@mentor.cc.purdue.edu>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!swrinde!elroy.jpl.nasa.gov!decwrl!sgi!shinobu!odin!marktwain.rad.sgi.com!linton
From: linton@marktwain.rad.sgi.com (Mark Linton)
Newsgroups: comp.windows.interviews
Subject: Re: Rubber Banding in InterViews
Keywords: Rubber Banding InterViews
Message-ID: <1991Apr14.042340.5510@odin.corp.sgi.com>
Date: 14 Apr 91 04:23:40 GMT
References: <10241@mentor.cc.purdue.edu>
Sender: news@odin.corp.sgi.com (Net News)
Reply-To: linton@marktwain.rad.sgi.com (Mark Linton)
Organization: sgi
Lines: 24