summaryrefslogtreecommitdiffstats
path: root/mac/tkMacScrlbr.c
diff options
context:
space:
mode:
Diffstat (limited to 'mac/tkMacScrlbr.c')
-rw-r--r--mac/tkMacScrlbr.c29
1 files changed, 15 insertions, 14 deletions
diff --git a/mac/tkMacScrlbr.c b/mac/tkMacScrlbr.c
index 1a3f82d..32eb6a4 100644
--- a/mac/tkMacScrlbr.c
+++ b/mac/tkMacScrlbr.c
@@ -10,12 +10,13 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkMacScrlbr.c,v 1.5 2000/11/22 01:49:38 ericm Exp $
+ * RCS: @(#) $Id: tkMacScrlbr.c,v 1.6 2001/11/23 02:06:27 das Exp $
*/
#include "tkScrollbar.h"
#include "tkMacInt.h"
#include <Controls.h>
+#include <ControlDefinitions.h>
/*
* The following definitions should really be in MacOS
@@ -516,15 +517,15 @@ TkpScrollbarPosition(
(**macScrollPtr->sbHandle).contrlHilite = 255;
}
switch (part) {
- case inUpButton:
+ case kControlUpButtonPart:
return TOP_ARROW;
- case inPageUp:
+ case kControlPageUpPart:
return TOP_GAP;
- case inThumb:
+ case kControlIndicatorPart:
return SLIDER;
- case inPageDown:
+ case kControlPageDownPart:
return BOTTOM_GAP;
- case inDownButton:
+ case kControlDownButtonPart:
return BOTTOM_ARROW;
default:
return OUTSIDE;
@@ -687,22 +688,22 @@ ScrollbarActionProc(
ControlRef theControl, /* Handle to scrollbat control */
ControlPartCode partCode) /* Part of scrollbar that was "hit" */
{
- register TkScrollbar *scrollPtr = (TkScrollbar *) GetCRefCon(theControl);
+ register TkScrollbar *scrollPtr = (TkScrollbar *) GetControlReference(theControl);
Tcl_DString cmdString;
Tcl_DStringInit(&cmdString);
Tcl_DStringAppend(&cmdString, scrollPtr->command,
scrollPtr->commandSize);
- if (partCode == inUpButton || partCode == inDownButton) {
+ if (partCode == kControlUpButtonPart || partCode == kControlDownButtonPart) {
Tcl_DStringAppendElement(&cmdString, "scroll");
Tcl_DStringAppendElement(&cmdString,
- (partCode == inUpButton ) ? "-1" : "1");
+ (partCode == kControlUpButtonPart ) ? "-1" : "1");
Tcl_DStringAppendElement(&cmdString, "unit");
- } else if (partCode == inPageUp || partCode == inPageDown) {
+ } else if (partCode == kControlPageUpPart || partCode == kControlPageDownPart) {
Tcl_DStringAppendElement(&cmdString, "scroll");
Tcl_DStringAppendElement(&cmdString,
- (partCode == inPageUp ) ? "-1" : "1");
+ (partCode == kControlPageUpPart ) ? "-1" : "1");
Tcl_DStringAppendElement(&cmdString, "page");
}
Tcl_Preserve((ClientData) scrollPtr->interp);
@@ -770,7 +771,7 @@ ScrollbarBindProc(
where.h = eventPtr->xbutton.x + bounds.left;
where.v = eventPtr->xbutton.y + bounds.top;
part = TestControl(macScrollPtr->sbHandle, where);
- if (part == inThumb && scrollPtr->jump == false) {
+ if (part == kControlIndicatorPart && scrollPtr->jump == false) {
/*
* Case 1: In thumb, no jump scrolling. Call track control
* with the thumb action proc which will do most of the work.
@@ -781,14 +782,14 @@ ScrollbarBindProc(
part = TrackControl(macScrollPtr->sbHandle, where,
(ControlActionUPP) thumbActionProc);
activeScrollPtr = NULL;
- } else if (part == inThumb) {
+ } else if (part == kControlIndicatorPart) {
/*
* Case 2: in thumb with jump scrolling. Call TrackControl
* with a NULL action proc. Use the new value of the control
* to set update the control.
*/
part = TrackControl(macScrollPtr->sbHandle, where, NULL);
- if (part == inThumb) {
+ if (part == kControlIndicatorPart) {
double newFirstFraction, thumbWidth;
Tcl_DString cmdString;
char vauleString[TCL_DOUBLE_SPACE];