Article View: comp.sys.mac
Article #37096Re: CDEF problems
From: Lloyd Lim
Date: Thu, 02 Feb 1989 00:38
Date: Thu, 02 Feb 1989 00:38
40 lines
2540 bytes
2540 bytes
In article <4280@hubcap.UUCP> you write:
>If i give my
>button a return code corresponding to an indicator > 129 or so, then
>the Drag function in the CDEF gets called when I press on the button.
>This is no problem cause i can do all my highlighting there. However, it
>never sends the appropriate part code back to TrackControl. Thus, I don't
>know if the mouse was released in or out of the button; TrackControl
>always gets a zero back.
>
>If, on the other hand, I make the button a part, code <128 or so. Then
>drag never gets called. However, it seems that Draw gets called when i
>press the mouse inside the button. Does this mean that I must do the
>highlighting in the Draw function? (I don't want to use default
>highlighting because one of the CDEF options is no highlighting.)
>
>So is it necessary to do the highlighting in the Draw function? Is
>it possible to get TrackControl to return the correct part code/indicator
>code when i define the button as an indicator rather than a part?
I missed the original question but I think I can answer you.
Yes, the highlighting is done in the Draw routine. This is the correct place.
You sholdn't be doing anything with an indicator or in the Drag unless you
actually have an indicator.
If the param to Draw is 0, you draw the whole button normally. If the param to
Draw is inButton (I think, I don't have references with me), you invert the
button. If one of the options is no highlighting, you just check the variation
code and if it's one for no highlighting, don't invert it. Actually, these
days with color, instead of xoring stuff to invert, you have to switch the
foreground and background colors and redraw the thing you're inverting.
I hope I'm making sense. I don't really know what special thing you're trying
to do. You can mail me if you have more questions.
+++
Lloyd Lim Internet: lim@iris.ucdavis.edu
Compuserve: 72647,660
US Mail: 146 Lysle Leach Hall, U.C. Davis, Davis, CA 95616
Technical Details
Message-ID:
<3598@ucdavis.ucdavis.edu>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!ames!pasteur!ucbvax!ucdavis!iris!limReferences:
<4280@hubcap.UUCP>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!ames!pasteur!ucbvax!ucdavis!iris!lim From: lim@iris.ucdavis.edu (Lloyd Lim) Newsgroups: comp.sys.mac,comp.sys.mac.programmer Subject: Re: CDEF problems Keywords: CDEF Message-ID: <3598@ucdavis.ucdavis.edu> Date: 2 Feb 89 00:38:21 GMT References: <4280@hubcap.UUCP> Sender: uucp@ucdavis.ucdavis.edu Reply-To: lim@iris.ucdavis.edu (Lloyd Lim) Organization: U.C. Davis - Department of Electrical Engineering and Computer Science Lines: 40