summaryrefslogtreecommitdiffstats
path: root/mac/tkMacScale.c
diff options
context:
space:
mode:
authorjingham <jingham>1999-05-22 06:33:38 (GMT)
committerjingham <jingham>1999-05-22 06:33:38 (GMT)
commiteb02b7f4b5f03cf0252e0733efdebf890095f57c (patch)
tree08690563c402052345246f896205236bfc84d20f /mac/tkMacScale.c
parent49264adc083f7766a5ff40538126526a6a8880c0 (diff)
downloadtk-eb02b7f4b5f03cf0252e0733efdebf890095f57c.zip
tk-eb02b7f4b5f03cf0252e0733efdebf890095f57c.tar.gz
tk-eb02b7f4b5f03cf0252e0733efdebf890095f57c.tar.bz2
Changes needed to get Tk8.1 to compile with stubs on the Mac
Diffstat (limited to 'mac/tkMacScale.c')
-rw-r--r--mac/tkMacScale.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/mac/tkMacScale.c b/mac/tkMacScale.c
index 7a973e8..f3f6fd8 100644
--- a/mac/tkMacScale.c
+++ b/mac/tkMacScale.c
@@ -9,7 +9,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkMacScale.c,v 1.2 1998/09/14 18:23:39 stanton Exp $
+ * RCS: @(#) $Id: tkMacScale.c,v 1.3 1999/05/22 06:35:05 jingham Exp $
*/
#include "tkScale.h"
@@ -156,10 +156,10 @@ TkpDisplayScale(clientData)
*/
Tcl_Preserve((ClientData) scalePtr);
- if ((scalePtr->flags & INVOKE_COMMAND) && (scalePtr->command != NULL)) {
+ if ((scalePtr->flags & INVOKE_COMMAND) && (scalePtr->commandPtr != NULL)) {
Tcl_Preserve((ClientData) interp);
sprintf(string, scalePtr->format, scalePtr->value);
- result = Tcl_VarEval(interp, scalePtr->command, " ", string,
+ result = Tcl_VarEval(interp, scalePtr->commandPtr," ", string,
(char *) NULL);
if (result != TCL_OK) {
Tcl_AddErrorInfo(interp, "\n (command executed by scale)");
@@ -186,7 +186,7 @@ TkpDisplayScale(clientData)
if (scalePtr->flags & GOT_FOCUS) {
gc = Tk_GCForColor(scalePtr->highlightColorPtr, Tk_WindowId(tkwin));
} else {
- gc = Tk_GCForColor(scalePtr->highlightBgColorPtr, Tk_WindowId(tkwin));
+ gc = Tk_GCForColor(scalePtr->highlightColorPtr, Tk_WindowId(tkwin));
}
Tk_DrawFocusHighlight(tkwin, gc, scalePtr->highlightWidth, Tk_WindowId(tkwin));
}
@@ -316,13 +316,13 @@ TkpScaleElement(scalePtr, x, y)
case inSlider:
return SLIDER;
case inInc:
- if (scalePtr->vertical) {
+ if (scalePtr->orient == ORIENT_VERTICAL) {
return TROUGH1;
} else {
return TROUGH2;
}
case inDecr:
- if (scalePtr->vertical) {
+ if (scalePtr->orient == ORIENT_VERTICAL) {
return TROUGH2;
} else {
return TROUGH1;
@@ -382,10 +382,10 @@ TkpSetScaleValue(scalePtr, value, setVar, invokeCommand)
}
TkEventuallyRedrawScale(scalePtr, REDRAW_SLIDER);
- if (setVar && (scalePtr->varName != NULL)) {
+ if (setVar && (scalePtr->varNamePtr != NULL)) {
sprintf(string, scalePtr->format, scalePtr->value);
scalePtr->flags |= SETTING_VAR;
- Tcl_SetVar(scalePtr->interp, scalePtr->varName, string,
+ Tcl_ObjSetVar2(scalePtr->interp, scalePtr->varNamePtr, NULL, Tcl_NewStringObj(string, -1),
TCL_GLOBAL_ONLY);
scalePtr->flags &= ~SETTING_VAR;
}
@@ -418,7 +418,7 @@ TkpPixelToValue(scalePtr, x, y)
{
double value, pixelRange;
- if (scalePtr->vertical) {
+ if (scalePtr->orient == ORIENT_VERTICAL) {
pixelRange = Tk_Height(scalePtr->tkwin) - scalePtr->sliderLength
- 2*scalePtr->inset - 2*scalePtr->borderWidth;
value = y;
@@ -479,7 +479,7 @@ TkpValueToPixel(scalePtr, value)
double valueRange;
valueRange = scalePtr->toValue - scalePtr->fromValue;
- pixelRange = (scalePtr->vertical ? Tk_Height(scalePtr->tkwin)
+ pixelRange = (scalePtr->orient == ORIENT_VERTICAL ? Tk_Height(scalePtr->tkwin)
: Tk_Width(scalePtr->tkwin)) - scalePtr->sliderLength
- 2*scalePtr->inset - 2*scalePtr->borderWidth;
if (valueRange == 0) {