diff options
-rw-r--r-- | src/bltConfig.C | 91 | ||||
-rw-r--r-- | src/bltConfig.h | 7 | ||||
-rw-r--r-- | src/bltGrAxis.C | 12 | ||||
-rw-r--r-- | src/bltGrElemBar.C | 12 | ||||
-rw-r--r-- | src/bltGrElemLine.C | 20 | ||||
-rw-r--r-- | src/bltGrElemOp.C | 2 | ||||
-rw-r--r-- | src/bltGrHairs.C | 2 | ||||
-rw-r--r-- | src/bltGrLegd.C | 6 | ||||
-rw-r--r-- | src/bltGrMarker.C | 10 | ||||
-rw-r--r-- | src/bltGraph.C | 24 |
10 files changed, 48 insertions, 138 deletions
diff --git a/src/bltConfig.C b/src/bltConfig.C index 727283a..814095e 100644 --- a/src/bltConfig.C +++ b/src/bltConfig.C @@ -89,61 +89,6 @@ #define PIXELS_POS 1 #define PIXELS_ANY 2 -/* - *--------------------------------------------------------------------------- - * - * Blt_GetPixelsFromObj -- - * - * Like Tk_GetPixelsFromObj, but checks for negative, zero. - * - * Results: - * A standard TCL result. - * - *--------------------------------------------------------------------------- - */ -int -Blt_GetPixelsFromObj( - Tcl_Interp *interp, - Tk_Window tkwin, - Tcl_Obj *objPtr, - int check, /* Can be PIXELS_POS, PIXELS_NNEG, - * or PIXELS_ANY, */ - int *valuePtr) -{ - int length; - - if (Tk_GetPixelsFromObj(interp, tkwin, objPtr, &length) != TCL_OK) { - return TCL_ERROR; - } - if (length >= SHRT_MAX) { - Tcl_AppendResult(interp, "bad distance \"", Tcl_GetString(objPtr), - "\": too big to represent", (char *)NULL); - return TCL_ERROR; - } - switch (check) { - case PIXELS_NNEG: - if (length < 0) { - Tcl_AppendResult(interp, "bad distance \"", Tcl_GetString(objPtr), - "\": can't be negative", (char *)NULL); - return TCL_ERROR; - } - break; - - case PIXELS_POS: - if (length <= 0) { - Tcl_AppendResult(interp, "bad distance \"", Tcl_GetString(objPtr), - "\": must be positive", (char *)NULL); - return TCL_ERROR; - } - break; - - case PIXELS_ANY: - break; - } - *valuePtr = length; - return TCL_OK; -} - int Blt_GetPadFromObj( Tcl_Interp *interp, /* Interpreter to send results back to */ @@ -163,14 +108,12 @@ Blt_GetPadFromObj( (char *)NULL); return TCL_ERROR; } - if (Blt_GetPixelsFromObj(interp, tkwin, objv[0], PIXELS_NNEG, - &side1) != TCL_OK) { + if (Tk_GetPixelsFromObj(interp, tkwin, objv[0], &side1) != TCL_OK) { return TCL_ERROR; } side2 = side1; if ((objc > 1) && - (Blt_GetPixelsFromObj(interp, tkwin, objv[1], PIXELS_NNEG, - &side2) != TCL_OK)) { + (Tk_GetPixelsFromObj(interp, tkwin, objv[1], &side2) != TCL_OK)) { return TCL_ERROR; } /* Don't update the pad structure until we know both values are okay. */ @@ -749,36 +692,12 @@ DoConfig( } break; - case BLT_CONFIG_PIXELS_NNEG: - { - int value; - - if (Blt_GetPixelsFromObj(interp, tkwin, objPtr, - PIXELS_NNEG, &value) != TCL_OK) { - return TCL_ERROR; - } - *(int *)ptr = value; - } - break; - case BLT_CONFIG_PIXELS: { int value; - if (Blt_GetPixelsFromObj(interp, tkwin, objPtr, PIXELS_ANY, - &value) != TCL_OK) { - return TCL_ERROR; - } - *(int *)ptr = value; - } - break; - - case BLT_CONFIG_PIXELS_POS: - { - int value; - - if (Blt_GetPixelsFromObj(interp, tkwin, objPtr, PIXELS_POS, - &value) != TCL_OK) { + if (Tk_GetPixelsFromObj(interp, tkwin, objPtr, &value) + != TCL_OK) { return TCL_ERROR; } *(int *)ptr = value; @@ -921,8 +840,6 @@ FormatConfigValue( return Tcl_NewDoubleObj(*(double *)ptr); case BLT_CONFIG_PIXELS: - case BLT_CONFIG_PIXELS_POS: - case BLT_CONFIG_PIXELS_NNEG: return Tcl_NewIntObj(*(int *)ptr); case BLT_CONFIG_RELIEF: diff --git a/src/bltConfig.h b/src/bltConfig.h index b1dc6b7..a1bba8a 100644 --- a/src/bltConfig.h +++ b/src/bltConfig.h @@ -135,10 +135,6 @@ typedef enum { BLT_CONFIG_LIST, BLT_CONFIG_OBJ, BLT_CONFIG_PAD, - BLT_CONFIG_PIXELS_NNEG, /* 1.1c 2m 3.2i excluding negative - values. */ - BLT_CONFIG_PIXELS_POS, /* 1.1c 2m 3.2i excluding negative - * values and zero. */ BLT_CONFIG_STATE, BLT_CONFIG_BACKGROUND } Blt_ConfigTypes; @@ -272,9 +268,6 @@ extern const char *Blt_NameOfState(int state); extern void Blt_FreeOptions(Blt_ConfigSpec *specs, char *widgRec, Display *display, int needFlags); -extern int Blt_GetPixelsFromObj(Tcl_Interp *interp, Tk_Window tkwin, - Tcl_Obj *objPtr, int flags, int *valuePtr); - extern int Blt_GetPadFromObj(Tcl_Interp *interp, Tk_Window tkwin, Tcl_Obj *objPtr, Blt_Pad *padPtr); diff --git a/src/bltGrAxis.C b/src/bltGrAxis.C index 429ddee..7be8064 100644 --- a/src/bltGrAxis.C +++ b/src/bltGrAxis.C @@ -210,7 +210,7 @@ static Blt_ConfigSpec configSpecs[] = Tk_Offset(Axis, obj.tags), ALL_GRAPHS | BLT_CONFIG_NULL_OK}, {BLT_CONFIG_SYNONYM, "-bd", "borderWidth", (char *)NULL, (char *)NULL, 0, ALL_GRAPHS}, - {BLT_CONFIG_PIXELS_NNEG, "-borderwidth", "borderWidth", "BorderWidth", + {BLT_CONFIG_PIXELS, "-borderwidth", "borderWidth", "BorderWidth", DEF_AXIS_BORDERWIDTH, Tk_Offset(Axis, borderWidth), ALL_GRAPHS | BLT_CONFIG_DONT_SET_DEFAULT}, {BLT_CONFIG_BITMASK, "-checklimits", "checkLimits", "CheckLimits", @@ -242,7 +242,7 @@ static Blt_ConfigSpec configSpecs[] = {BLT_CONFIG_DASHES, "-griddashes", "gridDashes", "GridDashes", DEF_AXIS_GRIDDASHES, Tk_Offset(Axis, major.dashes), BLT_CONFIG_NULL_OK | ALL_GRAPHS}, - {BLT_CONFIG_PIXELS_NNEG, "-gridlinewidth", "gridLineWidth", + {BLT_CONFIG_PIXELS, "-gridlinewidth", "gridLineWidth", "GridLineWidth", DEF_AXIS_GRIDLINEWIDTH, Tk_Offset(Axis, major.lineWidth), BLT_CONFIG_DONT_SET_DEFAULT | ALL_GRAPHS}, @@ -255,7 +255,7 @@ static Blt_ConfigSpec configSpecs[] = {BLT_CONFIG_DASHES, "-gridminordashes", "gridMinorDashes", "GridDashes", DEF_AXIS_GRIDDASHES, Tk_Offset(Axis, minor.dashes), BLT_CONFIG_NULL_OK | ALL_GRAPHS}, - {BLT_CONFIG_PIXELS_NNEG, "-gridminorlinewidth", "gridMinorLineWidth", + {BLT_CONFIG_PIXELS, "-gridminorlinewidth", "gridMinorLineWidth", "GridLineWidth", DEF_AXIS_GRIDLINEWIDTH, Tk_Offset(Axis, minor.lineWidth), BLT_CONFIG_DONT_SET_DEFAULT | ALL_GRAPHS}, @@ -275,7 +275,7 @@ static Blt_ConfigSpec configSpecs[] = {BLT_CONFIG_CUSTOM, "-limitsformat", "limitsFormat", "LimitsFormat", (char *)NULL, Tk_Offset(Axis, limitsFormats), BLT_CONFIG_NULL_OK | ALL_GRAPHS, &formatOption}, - {BLT_CONFIG_PIXELS_NNEG, "-linewidth", "lineWidth", "LineWidth", + {BLT_CONFIG_PIXELS, "-linewidth", "lineWidth", "LineWidth", DEF_AXIS_LINEWIDTH, Tk_Offset(Axis, lineWidth), ALL_GRAPHS | BLT_CONFIG_DONT_SET_DEFAULT}, {BLT_CONFIG_BOOLEAN, "-logscale", "logScale", "LogScale", @@ -301,7 +301,7 @@ static Blt_ConfigSpec configSpecs[] = {BLT_CONFIG_OBJ, "-scrollcommand", "scrollCommand", "ScrollCommand", (char *)NULL, Tk_Offset(Axis, scrollCmdObjPtr), ALL_GRAPHS | BLT_CONFIG_NULL_OK}, - {BLT_CONFIG_PIXELS_POS, "-scrollincrement", "scrollIncrement", + {BLT_CONFIG_PIXELS, "-scrollincrement", "scrollIncrement", "ScrollIncrement", DEF_AXIS_SCROLL_INCREMENT, Tk_Offset(Axis, scrollUnits), ALL_GRAPHS|BLT_CONFIG_DONT_SET_DEFAULT}, {BLT_CONFIG_CUSTOM, "-scrollmax", "scrollMax", "ScrollMax", (char *)NULL, @@ -327,7 +327,7 @@ static Blt_ConfigSpec configSpecs[] = GRAPH | STRIPCHART}, {BLT_CONFIG_FONT, "-tickfont", "tickFont", "Font", DEF_AXIS_TICKFONT_BARCHART, Tk_Offset(Axis, tickFont), BARCHART}, - {BLT_CONFIG_PIXELS_NNEG, "-ticklength", "tickLength", "TickLength", + {BLT_CONFIG_PIXELS, "-ticklength", "tickLength", "TickLength", DEF_AXIS_TICKLENGTH, Tk_Offset(Axis, tickLength), ALL_GRAPHS | BLT_CONFIG_DONT_SET_DEFAULT}, {BLT_CONFIG_INT, "-tickdefault", "tickDefault", "TickDefault", diff --git a/src/bltGrElemBar.C b/src/bltGrElemBar.C index 7b6e128..75327e6 100644 --- a/src/bltGrElemBar.C +++ b/src/bltGrElemBar.C @@ -248,15 +248,15 @@ static Blt_ConfigSpec barPenConfigSpecs[] = (char *)NULL, 0, ALL_PENS}, {BLT_CONFIG_SYNONYM, "-bg", "background", (char *)NULL, (char *)NULL, 0, ALL_PENS}, - {BLT_CONFIG_PIXELS_NNEG, "-borderwidth", "borderWidth", "BorderWidth", + {BLT_CONFIG_PIXELS, "-borderwidth", "borderWidth", "BorderWidth", DEF_PEN_BORDERWIDTH, Tk_Offset(BarPen, borderWidth), ALL_PENS}, {BLT_CONFIG_CUSTOM, "-errorbarcolor", "errorBarColor", "ErrorBarColor", DEF_BAR_ERRORBAR_COLOR, Tk_Offset(BarPen, errorBarColor), ALL_PENS, &bltColorOption}, - {BLT_CONFIG_PIXELS_NNEG, "-errorbarwidth", "errorBarWidth","ErrorBarWidth", + {BLT_CONFIG_PIXELS, "-errorbarwidth", "errorBarWidth","ErrorBarWidth", DEF_BAR_ERRORBAR_LINE_WIDTH, Tk_Offset(BarPen, errorBarLineWidth), ALL_PENS | BLT_CONFIG_DONT_SET_DEFAULT}, - {BLT_CONFIG_PIXELS_NNEG, "-errorbarcap", "errorBarCap", "ErrorBarCap", + {BLT_CONFIG_PIXELS, "-errorbarcap", "errorBarCap", "ErrorBarCap", DEF_BAR_ERRORBAR_CAP_WIDTH, Tk_Offset(BarPen, errorBarCapWidth), ALL_PENS | BLT_CONFIG_DONT_SET_DEFAULT}, {BLT_CONFIG_SYNONYM, "-fg", "foreground", (char *)NULL, @@ -317,18 +317,18 @@ static Blt_ConfigSpec barElemConfigSpecs[] = { (char *)NULL, 0, 0}, {BLT_CONFIG_LIST, "-bindtags", "bindTags", "BindTags", DEF_BAR_TAGS, Tk_Offset(BarElement, obj.tags), BLT_CONFIG_NULL_OK}, - {BLT_CONFIG_PIXELS_NNEG, "-borderwidth", "borderWidth", "BorderWidth", + {BLT_CONFIG_PIXELS, "-borderwidth", "borderWidth", "BorderWidth", DEF_BAR_BORDERWIDTH, Tk_Offset(BarElement, builtinPen.borderWidth), 0}, {BLT_CONFIG_SYNONYM, "-color", "background", (char *)NULL, (char *)NULL, 0, 0}, {BLT_CONFIG_CUSTOM, "-errorbarcolor", "errorBarColor", "ErrorBarColor", DEF_BAR_ERRORBAR_COLOR, Tk_Offset(BarElement, builtinPen.errorBarColor), 0, &bltColorOption}, - {BLT_CONFIG_PIXELS_NNEG,"-errorbarwidth", "errorBarWidth", "ErrorBarWidth", + {BLT_CONFIG_PIXELS,"-errorbarwidth", "errorBarWidth", "ErrorBarWidth", DEF_BAR_ERRORBAR_LINE_WIDTH, Tk_Offset(BarElement, builtinPen.errorBarLineWidth), BLT_CONFIG_DONT_SET_DEFAULT}, - {BLT_CONFIG_PIXELS_NNEG, "-errorbarcap", "errorBarCap", "ErrorBarCap", + {BLT_CONFIG_PIXELS, "-errorbarcap", "errorBarCap", "ErrorBarCap", DEF_BAR_ERRORBAR_CAP_WIDTH, Tk_Offset(BarElement, builtinPen.errorBarCapWidth), BLT_CONFIG_DONT_SET_DEFAULT}, diff --git a/src/bltGrElemLine.C b/src/bltGrElemLine.C index 9376fef..7c5b5c8 100644 --- a/src/bltGrElemLine.C +++ b/src/bltGrElemLine.C @@ -454,11 +454,11 @@ static Blt_ConfigSpec lineElemConfigSpecs[] = {BLT_CONFIG_CUSTOM, "-errorbarcolor", "errorBarColor", "ErrorBarColor", DEF_LINE_ERRORBAR_COLOR, Tk_Offset(LineElement, builtinPen.errorBarColor), 0, &bltColorOption}, - {BLT_CONFIG_PIXELS_NNEG,"-errorbarwidth", "errorBarWidth", "ErrorBarWidth", + {BLT_CONFIG_PIXELS,"-errorbarwidth", "errorBarWidth", "ErrorBarWidth", DEF_LINE_ERRORBAR_LINE_WIDTH, Tk_Offset(LineElement, builtinPen.errorBarLineWidth), BLT_CONFIG_DONT_SET_DEFAULT}, - {BLT_CONFIG_PIXELS_NNEG, "-errorbarcap", "errorBarCap", "ErrorBarCap", + {BLT_CONFIG_PIXELS, "-errorbarcap", "errorBarCap", "ErrorBarCap", DEF_LINE_ERRORBAR_CAP_WIDTH, Tk_Offset(LineElement, builtinPen.errorBarCapWidth), BLT_CONFIG_DONT_SET_DEFAULT}, @@ -473,7 +473,7 @@ static Blt_ConfigSpec lineElemConfigSpecs[] = {BLT_CONFIG_RELIEF, "-legendrelief", "legendRelief", "LegendRelief", DEF_LINE_LABEL_RELIEF, Tk_Offset(LineElement, legendRelief), BLT_CONFIG_DONT_SET_DEFAULT}, - {BLT_CONFIG_PIXELS_NNEG, "-linewidth", "lineWidth", "LineWidth", + {BLT_CONFIG_PIXELS, "-linewidth", "lineWidth", "LineWidth", DEF_LINE_PEN_WIDTH, Tk_Offset(LineElement, builtinPen.traceWidth), BLT_CONFIG_DONT_SET_DEFAULT}, {BLT_CONFIG_CUSTOM, "-mapx", "mapX", "MapX", @@ -491,14 +491,14 @@ static Blt_ConfigSpec lineElemConfigSpecs[] = DEF_LINE_OUTLINE_COLOR, Tk_Offset(LineElement, builtinPen.symbol.outlineColor), 0, &bltColorOption}, - {BLT_CONFIG_PIXELS_NNEG, "-outlinewidth", "outlineWidth", "OutlineWidth", + {BLT_CONFIG_PIXELS, "-outlinewidth", "outlineWidth", "OutlineWidth", DEF_LINE_OUTLINE_WIDTH, Tk_Offset(LineElement, builtinPen.symbol.outlineWidth), BLT_CONFIG_DONT_SET_DEFAULT}, {BLT_CONFIG_CUSTOM, "-pen", "pen", "Pen", (char *)NULL, Tk_Offset(LineElement, normalPenPtr), BLT_CONFIG_NULL_OK, &bltLinePenOption}, - {BLT_CONFIG_PIXELS_NNEG, "-pixels", "pixels", "Pixels", DEF_LINE_PIXELS, + {BLT_CONFIG_PIXELS, "-pixels", "pixels", "Pixels", DEF_LINE_PIXELS, Tk_Offset(LineElement, builtinPen.symbol.size), GRAPH | STRIPCHART}, {BLT_CONFIG_DOUBLE, "-reduce", "reduce", "Reduce", DEF_LINE_REDUCE, Tk_Offset(LineElement, rTolerance), @@ -578,16 +578,16 @@ static Blt_ConfigSpec linePenConfigSpecs[] = {BLT_CONFIG_CUSTOM, "-errorbarcolor", "errorBarColor", "ErrorBarColor", DEF_LINE_ERRORBAR_COLOR, Tk_Offset(LinePen, errorBarColor), ALL_PENS, &bltColorOption}, - {BLT_CONFIG_PIXELS_NNEG, "-errorbarwidth", "errorBarWidth", "ErrorBarWidth", + {BLT_CONFIG_PIXELS, "-errorbarwidth", "errorBarWidth", "ErrorBarWidth", DEF_LINE_ERRORBAR_LINE_WIDTH, Tk_Offset(LinePen, errorBarLineWidth), ALL_PENS | BLT_CONFIG_DONT_SET_DEFAULT}, - {BLT_CONFIG_PIXELS_NNEG, "-errorbarcap", "errorBarCap", "ErrorBarCap", + {BLT_CONFIG_PIXELS, "-errorbarcap", "errorBarCap", "ErrorBarCap", DEF_LINE_ERRORBAR_CAP_WIDTH, Tk_Offset(LinePen, errorBarCapWidth), BLT_CONFIG_DONT_SET_DEFAULT}, {BLT_CONFIG_CUSTOM, "-fill", "fill", "Fill", DEF_PEN_FILL_COLOR, Tk_Offset(LinePen, symbol.fillColor), BLT_CONFIG_NULL_OK | ALL_PENS, &bltColorOption}, - {BLT_CONFIG_PIXELS_NNEG, "-linewidth", "lineWidth", "LineWidth", + {BLT_CONFIG_PIXELS, "-linewidth", "lineWidth", "LineWidth", (char *)NULL, Tk_Offset(LinePen, traceWidth), ALL_PENS| BLT_CONFIG_DONT_SET_DEFAULT}, {BLT_CONFIG_CUSTOM, "-offdash", "offDash", "OffDash", DEF_PEN_OFFDASH_COLOR, @@ -595,10 +595,10 @@ static Blt_ConfigSpec linePenConfigSpecs[] = &bltColorOption}, {BLT_CONFIG_CUSTOM, "-outline", "outline", "Outline", DEF_PEN_OUTLINE_COLOR, Tk_Offset(LinePen, symbol.outlineColor), ALL_PENS, &bltColorOption}, - {BLT_CONFIG_PIXELS_NNEG, "-outlinewidth", "outlineWidth", "OutlineWidth", + {BLT_CONFIG_PIXELS, "-outlinewidth", "outlineWidth", "OutlineWidth", DEF_PEN_OUTLINE_WIDTH, Tk_Offset(LinePen, symbol.outlineWidth), BLT_CONFIG_DONT_SET_DEFAULT | ALL_PENS}, - {BLT_CONFIG_PIXELS_NNEG, "-pixels", "pixels", "Pixels", DEF_PEN_PIXELS, + {BLT_CONFIG_PIXELS, "-pixels", "pixels", "Pixels", DEF_PEN_PIXELS, Tk_Offset(LinePen, symbol.size), ALL_PENS}, {BLT_CONFIG_FILL, "-showerrorbars", "showErrorBars", "ShowErrorBars", DEF_LINE_SHOW_ERRORBARS, Tk_Offset(LinePen, errorBarShow), diff --git a/src/bltGrElemOp.C b/src/bltGrElemOp.C index 6a401f3..199764e 100644 --- a/src/bltGrElemOp.C +++ b/src/bltGrElemOp.C @@ -1500,7 +1500,7 @@ CgetOp( */ static Blt_ConfigSpec closestSpecs[] = { - {BLT_CONFIG_PIXELS_NNEG, "-halo", (char *)NULL, (char *)NULL, + {BLT_CONFIG_PIXELS, "-halo", (char *)NULL, (char *)NULL, (char *)NULL, Tk_Offset(ClosestSearch, halo), 0}, {BLT_CONFIG_BOOLEAN, "-interpolate", (char *)NULL, (char *)NULL, (char *)NULL, Tk_Offset(ClosestSearch, mode), 0 }, diff --git a/src/bltGrHairs.C b/src/bltGrHairs.C index 617380a..7983766 100644 --- a/src/bltGrHairs.C +++ b/src/bltGrHairs.C @@ -89,7 +89,7 @@ static Blt_ConfigSpec configSpecs[] = Tk_Offset(Crosshairs, dashes), BLT_CONFIG_NULL_OK}, {BLT_CONFIG_BOOLEAN, "-hide", "hide", "Hide", DEF_HAIRS_HIDE, Tk_Offset(Crosshairs, hidden), BLT_CONFIG_DONT_SET_DEFAULT}, - {BLT_CONFIG_PIXELS_NNEG, "-linewidth", "lineWidth", "Linewidth", + {BLT_CONFIG_PIXELS, "-linewidth", "lineWidth", "Linewidth", DEF_HAIRS_LINE_WIDTH, Tk_Offset(Crosshairs, lineWidth), BLT_CONFIG_DONT_SET_DEFAULT}, {BLT_CONFIG_CUSTOM, "-position", "position", "Position", diff --git a/src/bltGrLegd.C b/src/bltGrLegd.C index c232dd6..00978c3 100644 --- a/src/bltGrLegd.C +++ b/src/bltGrLegd.C @@ -254,7 +254,7 @@ static Blt_ConfigSpec configSpecs[] = {BLT_CONFIG_BACKGROUND, "-activebackground", "activeBackground", "ActiveBackground", DEF_LEGEND_ACTIVEBACKGROUND, Tk_Offset(Legend, activeBg), 0}, - {BLT_CONFIG_PIXELS_NNEG, "-activeborderwidth", "activeBorderWidth", + {BLT_CONFIG_PIXELS, "-activeborderwidth", "activeBorderWidth", "BorderWidth", DEF_LEGEND_BORDERWIDTH, Tk_Offset(Legend, entryBW), BLT_CONFIG_DONT_SET_DEFAULT}, {BLT_CONFIG_COLOR, "-activeforeground", "activeForeground", @@ -268,7 +268,7 @@ static Blt_ConfigSpec configSpecs[] = {BLT_CONFIG_SYNONYM, "-bg", "background", (char *)NULL, (char *)NULL, 0, 0}, {BLT_CONFIG_BACKGROUND, "-background", "background", "Background", DEF_LEGEND_BACKGROUND, Tk_Offset(Legend, normalBg),BLT_CONFIG_NULL_OK}, - {BLT_CONFIG_PIXELS_NNEG, "-borderwidth", "borderWidth", "BorderWidth", + {BLT_CONFIG_PIXELS, "-borderwidth", "borderWidth", "BorderWidth", DEF_LEGEND_BORDERWIDTH, Tk_Offset(Legend, borderWidth), BLT_CONFIG_DONT_SET_DEFAULT}, {BLT_CONFIG_SYNONYM, "-bd", "borderWidth", (char *)NULL, (char *)NULL, 0,0}, @@ -324,7 +324,7 @@ static Blt_ConfigSpec configSpecs[] = {BLT_CONFIG_BACKGROUND, "-selectbackground", "selectBackground", "Background", DEF_LEGEND_SELECTBACKGROUND, Tk_Offset(Legend, selInFocusBg), 0}, - {BLT_CONFIG_PIXELS_NNEG, "-selectborderwidth", "selectBorderWidth", + {BLT_CONFIG_PIXELS, "-selectborderwidth", "selectBorderWidth", "BorderWidth", DEF_LEGEND_SELECTBORDERWIDTH, Tk_Offset(Legend, selBW), BLT_CONFIG_DONT_SET_DEFAULT}, {BLT_CONFIG_STRING, "-selectcommand", "selectCommand", "SelectCommand", diff --git a/src/bltGrMarker.C b/src/bltGrMarker.C index 39aec1d..f8fd284 100644 --- a/src/bltGrMarker.C +++ b/src/bltGrMarker.C @@ -397,7 +397,7 @@ static Blt_ConfigSpec lineConfigSpecs[] = Tk_Offset(LineMarker, worldPts), BLT_CONFIG_NULL_OK, &coordsOption}, {BLT_CONFIG_DASHES, "-dashes", "dashes", "Dashes", DEF_MARKER_DASHES, Tk_Offset(LineMarker, dashes), BLT_CONFIG_NULL_OK}, - {BLT_CONFIG_PIXELS_NNEG, "-dashoffset", "dashOffset", "DashOffset", + {BLT_CONFIG_PIXELS, "-dashoffset", "dashOffset", "DashOffset", DEF_MARKER_DASH_OFFSET, Tk_Offset(LineMarker, dashes.offset), BLT_CONFIG_DONT_SET_DEFAULT}, {BLT_CONFIG_STRING, "-element", "element", "Element", DEF_MARKER_ELEMENT, @@ -406,7 +406,7 @@ static Blt_ConfigSpec lineConfigSpecs[] = Tk_Offset(LineMarker, fillColor), BLT_CONFIG_NULL_OK}, {BLT_CONFIG_JOIN_STYLE, "-join", "join", "Join", DEF_MARKER_JOIN_STYLE, Tk_Offset(LineMarker, joinStyle), BLT_CONFIG_DONT_SET_DEFAULT}, - {BLT_CONFIG_PIXELS_NNEG, "-linewidth", "lineWidth", "LineWidth", + {BLT_CONFIG_PIXELS, "-linewidth", "lineWidth", "LineWidth", DEF_MARKER_LINE_WIDTH, Tk_Offset(LineMarker, lineWidth), BLT_CONFIG_DONT_SET_DEFAULT}, {BLT_CONFIG_BITMASK, "-hide", "hide", "Hide", DEF_MARKER_HIDE, @@ -558,7 +558,7 @@ static Blt_ConfigSpec polygonConfigSpecs[] = Tk_Offset(PolygonMarker, fill), BLT_CONFIG_NULL_OK, &colorPairOption}, {BLT_CONFIG_JOIN_STYLE, "-join", "join", "Join", DEF_MARKER_JOIN_STYLE, Tk_Offset(PolygonMarker, joinStyle), BLT_CONFIG_DONT_SET_DEFAULT}, - {BLT_CONFIG_PIXELS_NNEG, "-linewidth", "lineWidth", "LineWidth", + {BLT_CONFIG_PIXELS, "-linewidth", "lineWidth", "LineWidth", DEF_MARKER_LINE_WIDTH, Tk_Offset(PolygonMarker, lineWidth), BLT_CONFIG_DONT_SET_DEFAULT}, {BLT_CONFIG_BITMASK, "-hide", "hide", "Hide", DEF_MARKER_HIDE, @@ -802,7 +802,7 @@ static Blt_ConfigSpec windowConfigSpecs[] = &coordsOption}, {BLT_CONFIG_STRING, "-element", "element", "Element", DEF_MARKER_ELEMENT, Tk_Offset(WindowMarker, elemName), BLT_CONFIG_NULL_OK}, - {BLT_CONFIG_PIXELS_POS, "-height", "height", "Height", DEF_MARKER_HEIGHT, + {BLT_CONFIG_PIXELS, "-height", "height", "Height", DEF_MARKER_HEIGHT, Tk_Offset(WindowMarker, reqHeight), BLT_CONFIG_DONT_SET_DEFAULT}, {BLT_CONFIG_BITMASK, "-hide", "hide", "Hide", DEF_MARKER_HIDE, Tk_Offset(WindowMarker, flags), BLT_CONFIG_DONT_SET_DEFAULT, @@ -817,7 +817,7 @@ static Blt_ConfigSpec windowConfigSpecs[] = Tk_Offset(WindowMarker, state), BLT_CONFIG_DONT_SET_DEFAULT}, {BLT_CONFIG_BOOLEAN, "-under", "under", "Under", DEF_MARKER_UNDER, Tk_Offset(WindowMarker, drawUnder), BLT_CONFIG_DONT_SET_DEFAULT}, - {BLT_CONFIG_PIXELS_POS, "-width", "width", "Width", DEF_MARKER_WIDTH, + {BLT_CONFIG_PIXELS, "-width", "width", "Width", DEF_MARKER_WIDTH, Tk_Offset(WindowMarker, reqWidth), BLT_CONFIG_DONT_SET_DEFAULT}, {BLT_CONFIG_STRING, "-window", "window", "Window", DEF_MARKER_WINDOW, Tk_Offset(WindowMarker, childName), BLT_CONFIG_NULL_OK}, diff --git a/src/bltGraph.C b/src/bltGraph.C index cd4201c..24238b1 100644 --- a/src/bltGraph.C +++ b/src/bltGraph.C @@ -145,10 +145,10 @@ static Blt_ConfigSpec configSpecs[] = {BLT_CONFIG_SYNONYM, "-bg", "background", (char *)NULL, (char *)NULL, 0, 0}, {BLT_CONFIG_SYNONYM, "-bm", "bottomMargin", (char *)NULL, (char *)NULL, 0, 0}, - {BLT_CONFIG_PIXELS_NNEG, "-borderwidth", "borderWidth", "BorderWidth", + {BLT_CONFIG_PIXELS, "-borderwidth", "borderWidth", "BorderWidth", DEF_GRAPH_BORDERWIDTH, Tk_Offset(Graph, borderWidth), BLT_CONFIG_DONT_SET_DEFAULT}, - {BLT_CONFIG_PIXELS_NNEG, "-bottommargin", "bottomMargin", "Margin", + {BLT_CONFIG_PIXELS, "-bottommargin", "bottomMargin", "Margin", DEF_GRAPH_MARGIN, Tk_Offset(Graph, bottomMargin.reqSize), 0}, {BLT_CONFIG_STRING, "-bottomvariable", "bottomVariable", "BottomVariable", DEF_GRAPH_MARGIN_VAR, Tk_Offset(Graph, bottomMargin.varName), @@ -170,16 +170,16 @@ static Blt_ConfigSpec configSpecs[] = DEF_GRAPH_FONT, Tk_Offset(Graph, titleTextStyle.font), 0}, {BLT_CONFIG_COLOR, "-foreground", "foreground", "Foreground", DEF_GRAPH_TITLE_COLOR, Tk_Offset(Graph, titleTextStyle.color), 0}, - {BLT_CONFIG_PIXELS_NNEG, "-halo", "halo", "Halo", DEF_GRAPH_HALO, + {BLT_CONFIG_PIXELS, "-halo", "halo", "Halo", DEF_GRAPH_HALO, Tk_Offset(Graph, halo), 0}, - {BLT_CONFIG_PIXELS_NNEG, "-height", "height", "Height", DEF_GRAPH_HEIGHT, + {BLT_CONFIG_PIXELS, "-height", "height", "Height", DEF_GRAPH_HEIGHT, Tk_Offset(Graph, reqHeight), 0}, {BLT_CONFIG_COLOR, "-highlightbackground", "highlightBackground", "HighlightBackground", DEF_GRAPH_HIGHLIGHT_BACKGROUND, Tk_Offset(Graph, highlightBgColor), 0}, {BLT_CONFIG_COLOR, "-highlightcolor", "highlightColor", "HighlightColor", DEF_GRAPH_HIGHLIGHT_COLOR, Tk_Offset(Graph, highlightColor), 0}, - {BLT_CONFIG_PIXELS_NNEG, "-highlightthickness", "highlightThickness", + {BLT_CONFIG_PIXELS, "-highlightthickness", "highlightThickness", "HighlightThickness", DEF_GRAPH_HIGHLIGHT_WIDTH, Tk_Offset(Graph, highlightWidth), BLT_CONFIG_DONT_SET_DEFAULT}, {BLT_CONFIG_BITMASK, "-unmaphiddenelements", "unmapHiddenElements", @@ -191,7 +191,7 @@ static Blt_ConfigSpec configSpecs[] = BLT_CONFIG_DONT_SET_DEFAULT}, {BLT_CONFIG_JUSTIFY, "-justify", "justify", "Justify", DEF_GRAPH_JUSTIFY, Tk_Offset(Graph, titleTextStyle.justify), BLT_CONFIG_DONT_SET_DEFAULT}, - {BLT_CONFIG_PIXELS_NNEG, "-leftmargin", "leftMargin", "Margin", + {BLT_CONFIG_PIXELS, "-leftmargin", "leftMargin", "Margin", DEF_GRAPH_MARGIN, Tk_Offset(Graph, leftMargin.reqSize), BLT_CONFIG_DONT_SET_DEFAULT}, {BLT_CONFIG_STRING, "-leftvariable", "leftVariable", "LeftVariable", @@ -200,7 +200,7 @@ static Blt_ConfigSpec configSpecs[] = {BLT_CONFIG_SYNONYM, "-lm", "leftMargin", (char *)NULL, (char *)NULL, 0, 0}, {BLT_CONFIG_BACKGROUND, "-plotbackground", "plotBackground", "Background", DEF_GRAPH_PLOT_BACKGROUND, Tk_Offset(Graph, plotBg), 0}, - {BLT_CONFIG_PIXELS_NNEG, "-plotborderwidth", "plotBorderWidth", + {BLT_CONFIG_PIXELS, "-plotborderwidth", "plotBorderWidth", "PlotBorderWidth", DEF_GRAPH_PLOT_BORDERWIDTH, Tk_Offset(Graph, plotBW), BLT_CONFIG_DONT_SET_DEFAULT}, {BLT_CONFIG_PAD, "-plotpadx", "plotPadX", "PlotPad", DEF_GRAPH_PLOT_PADX, @@ -212,7 +212,7 @@ static Blt_ConfigSpec configSpecs[] = BLT_CONFIG_DONT_SET_DEFAULT}, {BLT_CONFIG_RELIEF, "-relief", "relief", "Relief", DEF_GRAPH_RELIEF, Tk_Offset(Graph, relief), BLT_CONFIG_DONT_SET_DEFAULT}, - {BLT_CONFIG_PIXELS_NNEG, "-rightmargin", "rightMargin", "Margin", + {BLT_CONFIG_PIXELS, "-rightmargin", "rightMargin", "Margin", DEF_GRAPH_MARGIN, Tk_Offset(Graph, rightMargin.reqSize), BLT_CONFIG_DONT_SET_DEFAULT}, {BLT_CONFIG_STRING, "-rightvariable", "rightVariable", "RightVariable", @@ -227,18 +227,18 @@ static Blt_ConfigSpec configSpecs[] = {BLT_CONFIG_STRING, "-title", "title", "Title", DEF_GRAPH_TITLE, Tk_Offset(Graph, title), BLT_CONFIG_NULL_OK}, {BLT_CONFIG_SYNONYM, "-tm", "topMargin", (char *)NULL, (char *)NULL, 0, 0}, - {BLT_CONFIG_PIXELS_NNEG, "-topmargin", "topMargin", "Margin", + {BLT_CONFIG_PIXELS, "-topmargin", "topMargin", "Margin", DEF_GRAPH_MARGIN, Tk_Offset(Graph, topMargin.reqSize), BLT_CONFIG_DONT_SET_DEFAULT}, {BLT_CONFIG_STRING, "-topvariable", "topVariable", "TopVariable", DEF_GRAPH_MARGIN_VAR, Tk_Offset(Graph, topMargin.varName), BLT_CONFIG_NULL_OK}, - {BLT_CONFIG_PIXELS_NNEG, "-width", "width", "Width", DEF_GRAPH_WIDTH, + {BLT_CONFIG_PIXELS, "-width", "width", "Width", DEF_GRAPH_WIDTH, Tk_Offset(Graph, reqWidth), 0}, - {BLT_CONFIG_PIXELS_NNEG, "-plotwidth", "plotWidth", "PlotWidth", + {BLT_CONFIG_PIXELS, "-plotwidth", "plotWidth", "PlotWidth", (char *)NULL, Tk_Offset(Graph, reqPlotWidth), BLT_CONFIG_DONT_SET_DEFAULT}, - {BLT_CONFIG_PIXELS_NNEG, "-plotheight", "plotHeight", "PlotHeight", + {BLT_CONFIG_PIXELS, "-plotheight", "plotHeight", "PlotHeight", (char *)NULL, Tk_Offset(Graph, reqPlotHeight), BLT_CONFIG_DONT_SET_DEFAULT}, {BLT_CONFIG_END, NULL, NULL, NULL, NULL, 0, 0} |