[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Mouse in scroll bar



Subject:   RE>>Mouse in scroll bar

> Date: 3/28/94 4:10 PM
> To: Rodney Daughtrey
> From: uunet!ils.nwu.edu!lynch
> From cambridge.apple.com!owner-info-mcl  Mon Mar 28 14:52:59 1994 remote from
uunet
> Received: from brazil.cambridge.apple.com by relay1.UU.NET with SMTP 
	(5.61/UUNET-internet-primary) id AAwjfj19610; Mon, 28 Mar 94 14:52:59 -0500
> Received: from ministry.cambridge.apple.com by brazil.cambridge.apple.com with
SMTP (5.64/25-eef)
	id AA28306; Mon, 28 Mar 94 14:24:16 -0500
	for dhm%proact@uunet.UU.NET
> Received: by cambridge.apple.com (5.64/25-eef)
	id AA14593; Mon, 28 Mar 94 14:47:12 -0500
> Received: from brazil.cambridge.apple.com by cambridge.apple.com with SMTP
(5.64/25-eef)
	id AA14587; Mon, 28 Mar 94 14:47:09 -0500
> Received: from aristotle.ils.nwu.edu by brazil.cambridge.apple.com with SMTP
(5.64/25-eef)
	id AA28277; Mon, 28 Mar 94 14:20:15 -0500
	for info-mcl@cambridge.apple.com
> Received: from [129.105.100.156] (lynch.ils.nwu.edu) by aristotle.ils.nwu.edu
(4.1/SMI-ACNS-1.03)
	id AA05055; Mon, 28 Mar 94 13:39:27 CST
> Date: Mon, 28 Mar 94 13:39:27 CST
> Message-Id: <9403281939.AA05055@aristotle.ils.nwu.edu>
> To: "Byron Davies" <mesqm5!byron_davies.tempe#u#cim>
> From: uunet!ils.nwu.edu!lynch
> Subject: Re: Mouse in scroll bar
> Cc: cambridge.apple.com!info-mcl

> >  REGARDING           Mouse in scroll bar
> >Is there an easy way to test if the mouse is in the scroll bar?  Or is there
> >another solution to the problem we're having?  We are treating each line in
the
> >Fred window as an active object, with a command being executed when the line
is
> >double-clicked.  Unfortunately, when someone clicks too fast in the scroll
bar,
> >the command is invoked.
> >
> >To rephrase my question, is there a way to prevent scroll bar clicks from
> >leaking through to the underlying window?

> In your view-click-event-handler where you test for double-click, include a
> test that where [the mouse-position second argument] is not within 16
> pixels of the right side of the window.

> If you are doing your double-click test in some sort of dialog-item-action,
> move it to view-click-event-handler.

> There really is no way to get the window to not get the scroll clicks.

> [Actually, the window gets the clicks and passes them on to the scroll
> bars, which apparently does its duty and then passes the click onto the
> window, just in case.]

I don't think this is quite right -- after the window passes the click event to
the scroll bar, the scroll bar does not pass the click event back to the window.
 An example: 

(make-instance 'ccl:window
  :view-subviews (list (make-instance 'ccl:scroll-bar-dialog-item
                         :view-position #@(20 20))))

(trace ccl:view-click-event-handler)

Now, clicking on the scroll bar produces:

? 
|Calling (CCL:VIEW-CLICK-EVENT-HANDLER #<WINDOW "Untitled" #x1AA74F1> 7405595) 
| Calling (CCL:VIEW-CLICK-EVENT-HANDLER #<CCL:SCROLL-BAR-DIALOG-ITEM #x1AA7479>
7405595) 
| CCL:VIEW-CLICK-EVENT-HANDLER returned NIL
|CCL:VIEW-CLICK-EVENT-HANDLER returned NIL
? 

Regardless, Rich's solution for testing the mouse click position being within 16
pixels of the right side of the window should still work...

> -- 
> --
> -- "TANSTAAFL" Rich lynch@ils.nwu.edu

---------------------
Rodney Daughtrey               Domain:  rodney@pro-solution.com
Proactive Solutions Inc.         UUCP:  uunet!proact!rodney   
5314 S. Yale Ave., Suite 402    Voice:  918.492.5199
Tulsa, OK  74135                  FAX:  918.492.5193