From ec4bc2494c4fb1810aa082909fbcd8c6ce865a1d Mon Sep 17 00:00:00 2001 From: wolfsuit Date: Thu, 3 Oct 2002 06:24:54 +0000 Subject: 2002-10-02 Jim Ingham * macosx/tkMacOSXScrlbr.c (TkpDisplayScrollbar): Put the Tk scrollbar pointer into the control reference data for the Mac scrollbar, so we can get it out again in the ScrollbarActionProc. --- ChangeLog | 6 ++++++ macosx/tkMacOSXScrlbr.c | 13 +++++-------- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/ChangeLog b/ChangeLog index 9ab90d5..0a890a2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2002-10-02 Jim Ingham + + * macosx/tkMacOSXScrlbr.c (TkpDisplayScrollbar): Put the Tk scrollbar + pointer into the control reference data for the Mac scrollbar, so we + can get it out again in the ScrollbarActionProc. + 2002-10-02 Jeff Hobbs * generic/tkText.c (TextBlinkProc): don't blink the cursor unless diff --git a/macosx/tkMacOSXScrlbr.c b/macosx/tkMacOSXScrlbr.c index 0b22c3e..432aa1e 100644 --- a/macosx/tkMacOSXScrlbr.c +++ b/macosx/tkMacOSXScrlbr.c @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkMacOSXScrlbr.c,v 1.3 2002/09/22 07:46:53 wolfsuit Exp $ + * RCS: @(#) $Id: tkMacOSXScrlbr.c,v 1.4 2002/10/03 06:24:54 wolfsuit Exp $ */ #include "tkScrollbar.h" @@ -252,15 +252,12 @@ TkpDisplayScrollbar( procID = kControlScrollBarLiveProc; windowRef = GetWindowFromPort(destPort); - CreateScrollBarControl (windowRef, &r, initialValue, + CreateScrollBarControl(windowRef, &r, initialValue, minValue, maxValue, maxValue - minValue, true, NULL, &(macScrollPtr->sbHandle)); + SetControlReference(macScrollPtr->sbHandle, (SInt32) scrollPtr); - /* macScrollPtr->sbHandle = NewControl(windowRef, &r, "\p", - false, initialValue,minValue,maxValue, - procID, (SInt32) scrollPtr); */ - /* * If we are foremost then make us active. */ @@ -366,8 +363,8 @@ TkpComputeScrollbarGeometry( if (fieldLength < 0) { fieldLength = 0; } - scrollPtr->sliderFirst = fieldLength*scrollPtr->firstFraction; - scrollPtr->sliderLast = fieldLength*scrollPtr->lastFraction; + scrollPtr->sliderFirst = fieldLength * scrollPtr->firstFraction; + scrollPtr->sliderLast = fieldLength * scrollPtr->lastFraction; /* * Adjust the slider so that some piece of it is always -- cgit v0.12