summaryrefslogtreecommitdiffstats
path: root/macosx
diff options
context:
space:
mode:
authorwolfsuit <wolfsuit>2002-10-03 06:24:54 (GMT)
committerwolfsuit <wolfsuit>2002-10-03 06:24:54 (GMT)
commitec4bc2494c4fb1810aa082909fbcd8c6ce865a1d (patch)
tree2b12019e8bb0743ca1f7ac6c3fe6978006f0d4ec /macosx
parent2ed830f34e5dd2e299da3d0bcf9bbadf0d4cd774 (diff)
downloadtk-ec4bc2494c4fb1810aa082909fbcd8c6ce865a1d.zip
tk-ec4bc2494c4fb1810aa082909fbcd8c6ce865a1d.tar.gz
tk-ec4bc2494c4fb1810aa082909fbcd8c6ce865a1d.tar.bz2
2002-10-02 Jim Ingham <jingham@apple.com>
* 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.
Diffstat (limited to 'macosx')
-rw-r--r--macosx/tkMacOSXScrlbr.c13
1 files changed, 5 insertions, 8 deletions
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