diff options
author | joye <joye> | 2014-02-24 21:44:52 (GMT) |
---|---|---|
committer | joye <joye> | 2014-02-24 21:44:52 (GMT) |
commit | d7efe260d3ccad6deca25e7baf71f5befc4e44f2 (patch) | |
tree | c84a8743f8dda75cfac80cb228efd24047bf71fd /src | |
parent | 6ab7e481cab0fb3bf8d04db5af44394e514773fa (diff) | |
download | blt-d7efe260d3ccad6deca25e7baf71f5befc4e44f2.zip blt-d7efe260d3ccad6deca25e7baf71f5befc4e44f2.tar.gz blt-d7efe260d3ccad6deca25e7baf71f5befc4e44f2.tar.bz2 |
*** empty log message ***
Diffstat (limited to 'src')
-rw-r--r-- | src/bltGrAxis.C | 4 | ||||
-rw-r--r-- | src/bltGrElemBar.C | 233 | ||||
-rw-r--r-- | src/bltGrElemLine.C | 65 | ||||
-rw-r--r-- | src/bltGrElemOp.C | 19 | ||||
-rw-r--r-- | src/bltGrPenOp.C | 155 |
5 files changed, 142 insertions, 334 deletions
diff --git a/src/bltGrAxis.C b/src/bltGrAxis.C index e860ad4..b44c31b 100644 --- a/src/bltGrAxis.C +++ b/src/bltGrAxis.C @@ -178,8 +178,8 @@ static Blt_CustomOption useOption = { #define DEF_AXIS_TAGS "all" #define DEF_AXIS_EXTERIOR "1" #define DEF_AXIS_TICK_ANCHOR "c" -#define DEF_AXIS_LIMITS_FONT STD_FONT_NUMBERS -#define DEF_AXIS_TICKFONT STD_FONT_NUMBERS +#define DEF_AXIS_LIMITS_FONT STD_FONT_SMALL +#define DEF_AXIS_TICKFONT STD_FONT_SMALL #define DEF_AXIS_TICKLENGTH "4" #define DEF_AXIS_DIVISIONS "10" #define DEF_AXIS_TITLE NULL diff --git a/src/bltGrElemBar.C b/src/bltGrElemBar.C index a115fe3..5faa855 100644 --- a/src/bltGrElemBar.C +++ b/src/bltGrElemBar.C @@ -186,7 +186,6 @@ typedef struct { int errorBarCapWidth; /* Length of cap on error bars */ } BarElement; -extern Blt_CustomOption bltBarPenOption; extern Blt_CustomOption bltValuesOption; extern Blt_CustomOption bltValuePairsOption; extern Blt_CustomOption bltXAxisOption; @@ -194,109 +193,61 @@ extern Blt_CustomOption bltYAxisOption; extern Blt_CustomOption bltColorOption; extern Blt_CustomOption bltBarStylesOption; -#define DEF_BAR_ACTIVE_PEN "activeBar" -#define DEF_BAR_AXIS_X "x" -#define DEF_BAR_AXIS_Y "y" -#define DEF_BAR_BACKGROUND navyblue -#define DEF_BAR_FOREGROUND bblue -#define DEF_BAR_BORDERWIDTH STD_BORDERWIDTH -#define DEF_BAR_ERRORBAR_COLOR "defcolor" -#define DEF_BAR_ERRORBAR_LINE_WIDTH "1" -#define DEF_BAR_ERRORBAR_CAP_WIDTH "1" -#define DEF_BAR_HIDE "no" -#define DEF_BAR_LABEL NULL -#define DEF_BAR_LABEL_RELIEF "flat" -#define DEF_BAR_NORMAL_STIPPLE "" -#define DEF_BAR_RELIEF "raised" -#define DEF_BAR_SHOW_ERRORBARS "both" -#define DEF_BAR_STATE "normal" -#define DEF_BAR_STACK NULL -#define DEF_BAR_STYLES "" -#define DEF_BAR_TAGS "all" -#define DEF_BAR_WIDTH "0.0" - -#define DEF_PEN_ACTIVE_BACKGROUND rred -#define DEF_PEN_ACTIVE_FOREGROUND pink -#define DEF_PEN_BORDERWIDTH STD_BORDERWIDTH -#define DEF_PEN_NORMAL_BACKGROUND navyblue -#define DEF_PEN_NORMAL_FOREGROUND bblue -#define DEF_PEN_RELIEF "raised" -#define DEF_PEN_STIPPLE "" -#define DEF_PEN_TYPE "bar" -#define DEF_PEN_VALUE_ANCHOR "s" -#define DEF_PEN_VALUE_ANGLE 0 -#define DEF_PEN_VALUE_COLOR black -#define DEF_PEN_VALUE_FONT STD_FONT_SMALL -#define DEF_PEN_VALUE_FORMAT "%g" -#define DEF_PEN_SHOW_VALUES "no" - //*** +extern Tk_ObjCustomOption barPenObjOption; extern Tk_ObjCustomOption pairsObjOption; static Tk_OptionSpec barElemOptionSpecs[] = { + {TK_OPTION_CUSTOM, "-activepen", "activePen", "ActivePen", + "activeBar", -1, Tk_Offset(BarElement, activePenPtr), + BLT_CONFIG_NULL_OK, &barPenObjOption, 0}, {TK_OPTION_BORDER, "-background", "background", "Background", - DEF_BAR_BACKGROUND, - -1, Tk_Offset(BarElement, builtinPen.fill), TK_OPTION_NULL_OK, NULL, 0}, + "navyblue", -1, Tk_Offset(BarElement, builtinPen.fill), 0, NULL, 0}, {TK_OPTION_DOUBLE, "-barwidth", "barWidth", "BarWidth", - DEF_BAR_WIDTH, - -1, Tk_Offset(BarElement, barWidth), 0, NULL, 0}, - {TK_OPTION_SYNONYM, "-bd", NULL, NULL, NULL, - -1, 0, 0, "-borderwidth", 0}, - {TK_OPTION_SYNONYM, "-bg", NULL, NULL, NULL, - -1, 0, 0, "-background", 0}, + 0, -1, Tk_Offset(BarElement, barWidth), 0, NULL, 0}, + {TK_OPTION_SYNONYM, "-bd", NULL, NULL, NULL, -1, 0, 0, "-borderwidth", 0}, + {TK_OPTION_SYNONYM, "-bg", NULL, NULL, NULL, -1, 0, 0, "-background", 0}, {TK_OPTION_PIXELS, "-borderwidth", "borderWidth", "BorderWidth", - DEF_BAR_BORDERWIDTH, - -1, Tk_Offset(BarElement, builtinPen.borderWidth), 0, NULL, 0}, - {TK_OPTION_SYNONYM, "-color", NULL, NULL, NULL, - -1, 0, 0, "-background", 0}, + STD_BORDERWIDTH, -1, Tk_Offset(BarElement, builtinPen.borderWidth), + 0, NULL, 0}, + {TK_OPTION_SYNONYM, "-color", NULL, NULL, NULL, -1, 0, 0, "-background", 0}, {TK_OPTION_CUSTOM, "-data", "data", "Data", NULL, -1, 0, 0, &pairsObjOption, 0}, {TK_OPTION_PIXELS,"-errorbarwidth", "errorBarWidth", "ErrorBarWidth", - DEF_BAR_ERRORBAR_LINE_WIDTH, - -1, Tk_Offset(BarElement, builtinPen.errorBarLineWidth), 0, NULL, 0}, + "1", -1, Tk_Offset(BarElement, builtinPen.errorBarLineWidth), 0, NULL, 0}, {TK_OPTION_PIXELS, "-errorbarcap", "errorBarCap", "ErrorBarCap", - DEF_BAR_ERRORBAR_CAP_WIDTH, - -1, Tk_Offset(BarElement, builtinPen.errorBarCapWidth), 0, NULL, 0}, - {TK_OPTION_SYNONYM, "-fg", NULL, NULL, NULL, - -1, 0, 0, "-foreground", 0}, - {TK_OPTION_SYNONYM, "-fill", NULL, NULL, NULL, - -1, 0, 0, "-background", 0}, + "1", -1, Tk_Offset(BarElement, builtinPen.errorBarCapWidth), 0, NULL, 0}, + {TK_OPTION_SYNONYM, "-fg", NULL, NULL, NULL, -1, 0, 0, "-foreground", 0}, + {TK_OPTION_SYNONYM, "-fill", NULL, NULL, NULL, -1, 0, 0, "-background", 0}, {TK_OPTION_COLOR, "-foreground", "foreground", "Foreground", - DEF_BAR_FOREGROUND, - -1, Tk_Offset(BarElement, builtinPen.outlineColor),TK_OPTION_NULL_OK,NULL,0}, + "bblue", -1, Tk_Offset(BarElement, builtinPen.outlineColor), 0, NULL, 0}, {TK_OPTION_STRING, "-label", "label", "Label", - DEF_BAR_LABEL, - -1, Tk_Offset(BarElement, label), TK_OPTION_NULL_OK, NULL, 0}, + NULL, -1, Tk_Offset(BarElement, label), + TK_OPTION_NULL_OK, NULL, 0}, {TK_OPTION_RELIEF, "-legendrelief", "legendRelief", "LegendRelief", - DEF_BAR_LABEL_RELIEF, - -1, Tk_Offset(BarElement, legendRelief), 0, NULL, 0}, - {TK_OPTION_SYNONYM, "-outline", NULL, NULL, NULL, - -1, 0, 0, "-foreground", 0}, + "flat", -1, Tk_Offset(BarElement, legendRelief), 0, NULL, 0}, + {TK_OPTION_SYNONYM, "-outline", NULL, NULL, NULL, -1, 0, 0, "-foreground", 0}, {TK_OPTION_RELIEF, "-relief", "relief", "Relief", - DEF_BAR_RELIEF, - -1, Tk_Offset(BarElement, builtinPen.relief), 0, NULL, 0}, + "raised", -1, Tk_Offset(BarElement, builtinPen.relief), 0, NULL, 0}, {TK_OPTION_STRING, "-stack", "stack", "Stack", - DEF_BAR_STACK, - -1, Tk_Offset(BarElement, groupName), TK_OPTION_NULL_OK, NULL, 0}, + NULL, -1, Tk_Offset(BarElement, groupName), + TK_OPTION_NULL_OK, NULL, 0}, {TK_OPTION_BITMAP, "-stipple", "stipple", "Stipple", - DEF_BAR_NORMAL_STIPPLE, - -1, Tk_Offset(BarElement, builtinPen.stipple), TK_OPTION_NULL_OK, NULL, 0}, + NULL, -1, Tk_Offset(BarElement, builtinPen.stipple), + TK_OPTION_NULL_OK, NULL, 0}, {TK_OPTION_ANCHOR, "-valueanchor", "valueAnchor", "ValueAnchor", - DEF_PEN_VALUE_ANCHOR, - -1, Tk_Offset(BarElement, builtinPen.valueStyle.anchor), 0, NULL, 0}, + "s", -1, Tk_Offset(BarElement, builtinPen.valueStyle.anchor), 0, NULL, 0}, {TK_OPTION_COLOR, "-valuecolor", "valueColor", "ValueColor", - DEF_PEN_VALUE_COLOR, - -1, Tk_Offset(BarElement, builtinPen.valueStyle.color), 0, NULL, 0}, + "black", -1, Tk_Offset(BarElement, builtinPen.valueStyle.color), 0, NULL, 0}, {TK_OPTION_FONT, "-valuefont", "valueFont", "ValueFont", - DEF_PEN_VALUE_FONT, - -1, Tk_Offset(BarElement, builtinPen.valueStyle.font), 0, NULL, 0}, + STD_FONT_SMALL, -1, Tk_Offset(BarElement, builtinPen.valueStyle.font), + 0, NULL, 0}, {TK_OPTION_STRING, "-valueformat", "valueFormat", "ValueFormat", - DEF_PEN_VALUE_FORMAT, Tk_Offset(BarElement, builtinPen.valueFormat), - -1, TK_OPTION_NULL_OK, NULL, 0}, + "%g", -1, Tk_Offset(BarElement, builtinPen.valueFormat), + TK_OPTION_NULL_OK, NULL, 0}, {TK_OPTION_DOUBLE, "-valuerotate", "valueRotate", "ValueRotate", - DEF_PEN_VALUE_ANGLE, - -1, Tk_Offset(BarElement, builtinPen.valueStyle.angle), 0, NULL, 0}, + 0, -1, Tk_Offset(BarElement, builtinPen.valueStyle.angle), 0, NULL, 0}, {TK_OPTION_END, NULL, NULL, NULL, NULL, -1, 0, 0, NULL, 0} }; @@ -305,59 +256,58 @@ Blt_CustomOption bitmaskBarElemHideOption = ObjToBitmaskProc, BitmaskToObjProc, NULL, (ClientData)HIDE }; +/* static Blt_ConfigSpec barElemConfigSpecs[] = { {BLT_CONFIG_CUSTOM, "-activepen", "activePen", "ActivePen", - DEF_BAR_ACTIVE_PEN, Tk_Offset(BarElement, activePenPtr), + "activeBar", Tk_Offset(BarElement, activePenPtr), BLT_CONFIG_NULL_OK, &bltBarPenOption}, {BLT_CONFIG_BORDER, "-background", "background", "Background", - DEF_BAR_BACKGROUND, Tk_Offset(BarElement, builtinPen.fill), + "navyblue", Tk_Offset(BarElement, builtinPen.fill), BLT_CONFIG_NULL_OK}, {BLT_CONFIG_DOUBLE, "-barwidth", "barWidth", "BarWidth", - DEF_BAR_WIDTH, Tk_Offset(BarElement, barWidth), + 0, Tk_Offset(BarElement, barWidth), BLT_CONFIG_DONT_SET_DEFAULT}, {BLT_CONFIG_SYNONYM, "-bd", "borderWidth", (char *)NULL, (char *)NULL, 0, 0}, {BLT_CONFIG_SYNONYM, "-bg", "background", (char *)NULL, (char *)NULL, 0, 0}, - {BLT_CONFIG_CUSTOM, "-bindtags", "bindTags", "BindTags", DEF_BAR_TAGS, + {BLT_CONFIG_CUSTOM, "-bindtags", "bindTags", "BindTags", "all", Tk_Offset(BarElement, obj.tags), BLT_CONFIG_NULL_OK, &listOption}, {BLT_CONFIG_PIXELS, "-borderwidth", "borderWidth", "BorderWidth", - DEF_BAR_BORDERWIDTH, Tk_Offset(BarElement, builtinPen.borderWidth), 0}, + STD_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, + "defcolor", Tk_Offset(BarElement, builtinPen.errorBarColor), 0, &bltColorOption}, {BLT_CONFIG_PIXELS,"-errorbarwidth", "errorBarWidth", "ErrorBarWidth", - DEF_BAR_ERRORBAR_LINE_WIDTH, + "1", Tk_Offset(BarElement, builtinPen.errorBarLineWidth), BLT_CONFIG_DONT_SET_DEFAULT}, {BLT_CONFIG_PIXELS, "-errorbarcap", "errorBarCap", "ErrorBarCap", - DEF_BAR_ERRORBAR_CAP_WIDTH, + "1", Tk_Offset(BarElement, builtinPen.errorBarCapWidth), BLT_CONFIG_DONT_SET_DEFAULT}, {BLT_CONFIG_SYNONYM, "-fg", "foreground", (char *)NULL, (char *)NULL, 0, 0}, - /* {BLT_CONFIG_CUSTOM, "-data", "data", "Data", (char *)NULL, 0, 0, &bltValuePairsOption}, - */ {BLT_CONFIG_SYNONYM, "-fill", "background", (char *)NULL, (char *)NULL, 0, 0}, {BLT_CONFIG_COLOR, "-foreground", "foreground", "Foreground", - DEF_BAR_FOREGROUND, Tk_Offset(BarElement, builtinPen.outlineColor), + "bblue", Tk_Offset(BarElement, builtinPen.outlineColor), BLT_CONFIG_NULL_OK}, {BLT_CONFIG_STRING, "-label", "label", "Label", (char *)NULL, Tk_Offset(BarElement, label), BLT_CONFIG_NULL_OK}, {BLT_CONFIG_RELIEF, "-legendrelief", "legendRelief", "LegendRelief", - DEF_BAR_LABEL_RELIEF, Tk_Offset(BarElement, legendRelief), + "flat", Tk_Offset(BarElement, legendRelief), BLT_CONFIG_DONT_SET_DEFAULT}, - {BLT_CONFIG_CUSTOM, "-hide", "hide", "Hide", DEF_BAR_HIDE, + {BLT_CONFIG_CUSTOM, "-hide", "hide", "Hide", "no", Tk_Offset(BarElement, flags), BLT_CONFIG_DONT_SET_DEFAULT, &bitmaskBarElemHideOption}, - {BLT_CONFIG_CUSTOM, "-mapx", "mapX", "MapX", DEF_BAR_AXIS_X, + {BLT_CONFIG_CUSTOM, "-mapx", "mapX", "MapX", "x", Tk_Offset(BarElement, axes.x), 0, &bltXAxisOption}, - {BLT_CONFIG_CUSTOM, "-mapy", "mapY", "MapY", DEF_BAR_AXIS_Y, + {BLT_CONFIG_CUSTOM, "-mapy", "mapY", "MapY", "y", Tk_Offset(BarElement, axes.y), 0, &bltYAxisOption}, {BLT_CONFIG_SYNONYM, "-outline", "foreground", (char *)NULL, (char *)NULL, 0, 0}, @@ -365,33 +315,33 @@ static Blt_ConfigSpec barElemConfigSpecs[] = { Tk_Offset(BarElement, normalPenPtr), BLT_CONFIG_NULL_OK, &bltBarPenOption}, {BLT_CONFIG_RELIEF, "-relief", "relief", "Relief", - DEF_BAR_RELIEF, Tk_Offset(BarElement, builtinPen.relief), 0}, + "raised", Tk_Offset(BarElement, builtinPen.relief), 0}, {BLT_CONFIG_CUSTOM, "-showerrorbars", "showErrorBars", "ShowErrorBars", - DEF_BAR_SHOW_ERRORBARS, Tk_Offset(BarElement, builtinPen.errorBarShow), + "both", Tk_Offset(BarElement, builtinPen.errorBarShow), BLT_CONFIG_DONT_SET_DEFAULT, &fillOption}, {BLT_CONFIG_CUSTOM, "-showvalues", "showValues", "ShowValues", - DEF_PEN_SHOW_VALUES, Tk_Offset(BarElement, builtinPen.valueShow), + "no", Tk_Offset(BarElement, builtinPen.valueShow), BLT_CONFIG_DONT_SET_DEFAULT, &fillOption}, - {BLT_CONFIG_STRING, "-stack", "stack", "Stack", DEF_BAR_STACK, + {BLT_CONFIG_STRING, "-stack", "stack", "Stack", NULL, Tk_Offset(BarElement, groupName), BLT_CONFIG_NULL_OK}, - {BLT_CONFIG_CUSTOM, "-state", "state", "State", DEF_BAR_STATE, + {BLT_CONFIG_CUSTOM, "-state", "state", "State", "normal", Tk_Offset(BarElement, state), BLT_CONFIG_DONT_SET_DEFAULT, &stateOption}, {BLT_CONFIG_BITMAP, "-stipple", "stipple", "Stipple", - DEF_BAR_NORMAL_STIPPLE, Tk_Offset(BarElement, builtinPen.stipple), + "", Tk_Offset(BarElement, builtinPen.stipple), BLT_CONFIG_NULL_OK}, - {BLT_CONFIG_CUSTOM, "-styles", "styles", "Styles", DEF_BAR_STYLES, + {BLT_CONFIG_CUSTOM, "-styles", "styles", "Styles", "", Tk_Offset(BarElement, stylePalette), 0, &bltBarStylesOption}, {BLT_CONFIG_ANCHOR, "-valueanchor", "valueAnchor", "ValueAnchor", - DEF_PEN_VALUE_ANCHOR, + "s", Tk_Offset(BarElement, builtinPen.valueStyle.anchor), 0}, {BLT_CONFIG_COLOR, "-valuecolor", "valueColor", "ValueColor", - DEF_PEN_VALUE_COLOR, + "black", Tk_Offset(BarElement, builtinPen.valueStyle.color), 0}, {BLT_CONFIG_FONT, "-valuefont", "valueFont", "ValueFont", - DEF_PEN_VALUE_FONT, + STD_FONT_SMALL, Tk_Offset(BarElement, builtinPen.valueStyle.font), 0}, {BLT_CONFIG_STRING, "-valueformat", "valueFormat", "ValueFormat", - DEF_PEN_VALUE_FORMAT, Tk_Offset(BarElement, builtinPen.valueFormat), + "%g", Tk_Offset(BarElement, builtinPen.valueFormat), BLT_CONFIG_NULL_OK}, {BLT_CONFIG_DOUBLE, "-valuerotate", "valueRotate", "ValueRotate", (char *)NULL, Tk_Offset(BarElement, builtinPen.valueStyle.angle), 0}, @@ -419,124 +369,127 @@ static Blt_ConfigSpec barElemConfigSpecs[] = { Tk_Offset(BarElement, yLow), 0, &bltValuesOption}, {BLT_CONFIG_END, NULL, NULL, NULL, NULL, 0, 0} }; +*/ //*** static Tk_OptionSpec barPenOptionSpecs[] = { {TK_OPTION_BORDER, "-background", "background", "Background", - DEF_PEN_NORMAL_BACKGROUND, + "navyblue", -1, Tk_Offset(BarPen, fill), TK_OPTION_NULL_OK, NULL, 0}, {TK_OPTION_SYNONYM, "-bd", NULL, NULL, NULL, -1, 0, 0, "-borderwidth", 0}, {TK_OPTION_SYNONYM, "-bg", NULL, NULL, NULL, -1, 0, 0, "-background", 0}, {TK_OPTION_PIXELS, "-borderwidth", "borderWidth", "BorderWidth", - DEF_PEN_BORDERWIDTH, + STD_BORDERWIDTH, -1, Tk_Offset(BarPen, borderWidth), 0, NULL, 0}, {TK_OPTION_PIXELS, "-errorbarwidth", "errorBarWidth","ErrorBarWidth", - DEF_BAR_ERRORBAR_LINE_WIDTH, + "1", -1, Tk_Offset(BarPen, errorBarLineWidth), 0, NULL, 0}, {TK_OPTION_PIXELS, "-errorbarcap", "errorBarCap", "ErrorBarCap", - DEF_BAR_ERRORBAR_CAP_WIDTH, + "1", -1, Tk_Offset(BarPen, errorBarCapWidth), 0, NULL, 0}, {TK_OPTION_SYNONYM, "-fg", NULL, NULL, NULL, -1, 0, 0, "-foreground", 0}, {TK_OPTION_SYNONYM, "-fill", NULL, NULL, NULL, -1, 0, 0, "-background", 0}, {TK_OPTION_COLOR, "-foreground", "foreground", "Foreground", - DEF_PEN_NORMAL_FOREGROUND, + "bblue", -1, Tk_Offset(BarPen, outlineColor), TK_OPTION_NULL_OK, NULL, 0}, {TK_OPTION_SYNONYM, "-outline", NULL, NULL, NULL, -1, 0, 0, "-foreground", 0}, {TK_OPTION_RELIEF, "-relief", "relief", "Relief", - DEF_PEN_RELIEF, + "raised", -1, Tk_Offset(BarPen, relief), 0, NULL, 0}, {TK_OPTION_BITMAP, "-stipple", "stipple", "Stipple", - DEF_PEN_STIPPLE, + NULL, -1, Tk_Offset(BarPen, stipple), TK_OPTION_NULL_OK, NULL, 0}, {TK_OPTION_STRING, "-type", "type", "Type", - DEF_PEN_TYPE, + "bar", -1, Tk_Offset(BarPen, typeId), TK_OPTION_NULL_OK, NULL, 0}, {TK_OPTION_ANCHOR, "-valueanchor", "valueAnchor", "ValueAnchor", - DEF_PEN_VALUE_ANCHOR, + "s", -1, Tk_Offset(BarPen, valueStyle.anchor), 0, NULL, 0}, {TK_OPTION_COLOR, "-valuecolor", "valueColor", "ValueColor", - DEF_PEN_VALUE_COLOR, + "black", -1, Tk_Offset(BarPen, valueStyle.color), 0, NULL, 0}, {TK_OPTION_FONT, "-valuefont", "valueFont", "ValueFont", - DEF_PEN_VALUE_FONT, + STD_FONT_SMALL, -1, Tk_Offset(BarPen, valueStyle.font), 0, NULL, 0}, {TK_OPTION_STRING, "-valueformat", "valueFormat", "ValueFormat", - DEF_PEN_VALUE_FORMAT, + "%g", -1, Tk_Offset(BarPen, valueFormat), TK_OPTION_NULL_OK, NULL, 0}, {TK_OPTION_DOUBLE, "-valuerotate", "valueRotate", "ValueRotate", - DEF_PEN_VALUE_ANGLE, + 0, -1, Tk_Offset(BarPen, valueStyle.angle), 0, NULL, 0}, {TK_OPTION_END, NULL, NULL, NULL, NULL, -1, 0, 0, NULL, 0} }; +/* static Blt_ConfigSpec barPenConfigSpecs[] = { {BLT_CONFIG_BORDER, "-background", "background", "Background", - DEF_PEN_ACTIVE_BACKGROUND, Tk_Offset(BarPen, fill), + "rred", Tk_Offset(BarPen, fill), BLT_CONFIG_NULL_OK | ACTIVE_PEN}, {BLT_CONFIG_BORDER, "-background", "background", "Background", - DEF_PEN_NORMAL_BACKGROUND, Tk_Offset(BarPen, fill), + "navyblue", Tk_Offset(BarPen, fill), BLT_CONFIG_NULL_OK | NORMAL_PEN}, {BLT_CONFIG_SYNONYM, "-bd", "borderWidth", (char *)NULL, (char *)NULL, 0, ALL_PENS}, {BLT_CONFIG_SYNONYM, "-bg", "background", (char *)NULL, (char *)NULL, 0, ALL_PENS}, {BLT_CONFIG_PIXELS, "-borderwidth", "borderWidth", "BorderWidth", - DEF_PEN_BORDERWIDTH, Tk_Offset(BarPen, borderWidth), ALL_PENS}, + STD_BORDERWIDTH, Tk_Offset(BarPen, borderWidth), ALL_PENS}, {BLT_CONFIG_CUSTOM, "-errorbarcolor", "errorBarColor", "ErrorBarColor", - DEF_BAR_ERRORBAR_COLOR, Tk_Offset(BarPen, errorBarColor), ALL_PENS, + "defcolor", Tk_Offset(BarPen, errorBarColor), ALL_PENS, &bltColorOption}, {BLT_CONFIG_PIXELS, "-errorbarwidth", "errorBarWidth","ErrorBarWidth", - DEF_BAR_ERRORBAR_LINE_WIDTH, Tk_Offset(BarPen, errorBarLineWidth), + "1", Tk_Offset(BarPen, errorBarLineWidth), ALL_PENS | BLT_CONFIG_DONT_SET_DEFAULT}, {BLT_CONFIG_PIXELS, "-errorbarcap", "errorBarCap", "ErrorBarCap", - DEF_BAR_ERRORBAR_CAP_WIDTH, Tk_Offset(BarPen, errorBarCapWidth), + "1", Tk_Offset(BarPen, errorBarCapWidth), ALL_PENS | BLT_CONFIG_DONT_SET_DEFAULT}, {BLT_CONFIG_SYNONYM, "-fg", "foreground", (char *)NULL, (char *)NULL, 0, ALL_PENS}, {BLT_CONFIG_SYNONYM, "-fill", "background", (char *)NULL, (char *)NULL, 0, ALL_PENS}, {BLT_CONFIG_COLOR, "-foreground", "foreground", "Foreground", - DEF_PEN_ACTIVE_FOREGROUND, Tk_Offset(BarPen, outlineColor), + "pink", Tk_Offset(BarPen, outlineColor), ACTIVE_PEN | BLT_CONFIG_NULL_OK}, {BLT_CONFIG_COLOR, "-foreground", "foreground", "Foreground", - DEF_PEN_NORMAL_FOREGROUND, Tk_Offset(BarPen, outlineColor), + "bblue", Tk_Offset(BarPen, outlineColor), NORMAL_PEN | BLT_CONFIG_NULL_OK}, {BLT_CONFIG_SYNONYM, "-outline", "foreground", (char *)NULL, (char *)NULL, 0, ALL_PENS}, {BLT_CONFIG_RELIEF, "-relief", "relief", "Relief", - DEF_PEN_RELIEF, Tk_Offset(BarPen, relief), ALL_PENS}, + "raised", Tk_Offset(BarPen, relief), ALL_PENS}, {BLT_CONFIG_CUSTOM, "-showerrorbars", "showErrorBars", "ShowErrorBars", - DEF_BAR_SHOW_ERRORBARS, Tk_Offset(BarPen, errorBarShow), + "both", Tk_Offset(BarPen, errorBarShow), BLT_CONFIG_DONT_SET_DEFAULT, &fillOption}, {BLT_CONFIG_CUSTOM, "-showvalues", "showValues", "ShowValues", - DEF_PEN_SHOW_VALUES, Tk_Offset(BarPen, valueShow), + "no", Tk_Offset(BarPen, valueShow), ALL_PENS | BLT_CONFIG_DONT_SET_DEFAULT, &fillOption}, - {BLT_CONFIG_BITMAP, "-stipple", "stipple", "Stipple", DEF_PEN_STIPPLE, + {BLT_CONFIG_BITMAP, "-stipple", "stipple", "Stipple", "", Tk_Offset(BarPen, stipple), ALL_PENS | BLT_CONFIG_NULL_OK}, - {BLT_CONFIG_STRING, "-type", (char *)NULL, (char *)NULL, DEF_PEN_TYPE, + {BLT_CONFIG_STRING, "-type", (char *)NULL, (char *)NULL, "bar", Tk_Offset(BarPen, typeId), ALL_PENS | BLT_CONFIG_NULL_OK}, {BLT_CONFIG_ANCHOR, "-valueanchor", "valueAnchor", "ValueAnchor", - DEF_PEN_VALUE_ANCHOR, Tk_Offset(BarPen, valueStyle.anchor), + "s", Tk_Offset(BarPen, valueStyle.anchor), ALL_PENS}, {BLT_CONFIG_COLOR, "-valuecolor", "valueColor", "ValueColor", - DEF_PEN_VALUE_COLOR, Tk_Offset(BarPen, valueStyle.color), + "black", Tk_Offset(BarPen, valueStyle.color), ALL_PENS}, {BLT_CONFIG_FONT, "-valuefont", "valueFont", "ValueFont", - DEF_PEN_VALUE_FONT, Tk_Offset(BarPen, valueStyle.font), + STD_FONT_SMALL, Tk_Offset(BarPen, valueStyle.font), ALL_PENS}, {BLT_CONFIG_STRING, "-valueformat", "valueFormat", "ValueFormat", - DEF_PEN_VALUE_FORMAT, Tk_Offset(BarPen, valueFormat), + "%g", Tk_Offset(BarPen, valueFormat), ALL_PENS | BLT_CONFIG_NULL_OK}, {BLT_CONFIG_DOUBLE, "-valuerotate", "valueRotate", "ValueRotate", (char *)NULL, Tk_Offset(BarPen, valueStyle.angle), ALL_PENS}, {BLT_CONFIG_END, NULL, NULL, NULL, NULL, 0, 0} }; +*/ /* Forward declarations */ static PenConfigureProc ConfigureBarPenProc; @@ -2224,9 +2177,11 @@ static void DestroyBarProc(Graph* graphPtr, Element* basePtr) Tk_DeleteOptionTable(elemPtr->optionTable); DestroyBarPen(graphPtr, elemPtr->builtinPenPtr); - if (elemPtr->activePenPtr != NULL) { + if (elemPtr->activePenPtr != NULL) Blt_FreePen((Pen *)elemPtr->activePenPtr); - } + if (elemPtr->normalPenPtr != NULL) + Blt_FreePen((Pen *)elemPtr->normalPenPtr); + ResetBar(elemPtr); if (elemPtr->stylePalette != NULL) { Blt_FreeStylePalette(elemPtr->stylePalette); diff --git a/src/bltGrElemLine.C b/src/bltGrElemLine.C index 1dbe082..8139ae6 100644 --- a/src/bltGrElemLine.C +++ b/src/bltGrElemLine.C @@ -376,7 +376,6 @@ extern Blt_CustomOption bltLineStylesOption; extern Blt_CustomOption bltColorOption; extern Blt_CustomOption bltValuesOption; extern Blt_CustomOption bltValuePairsOption; -extern Blt_CustomOption bltLinePenOption; extern Blt_CustomOption bltXAxisOption; extern Blt_CustomOption bltYAxisOption; @@ -387,8 +386,8 @@ extern Tk_ObjCustomOption pairsObjOption; static Tk_OptionSpec lineElemOptionSpecs[] = { {TK_OPTION_CUSTOM, "-activepen", "activePen", "ActivePen", - NULL, -1, Tk_Offset(LineElement, activePenPtr), - BLT_CONFIG_NULL_OK, &linePenObjOption, 0}, + "activeLine", -1, Tk_Offset(LineElement, activePenPtr), + TK_OPTION_NULL_OK, &linePenObjOption, 0}, {TK_OPTION_COLOR, "-areaforeground", "areaForeground", "AreaForeground", NULL, -1, Tk_Offset(LineElement, fillFgColor), TK_OPTION_NULL_OK, NULL, 0}, @@ -434,10 +433,11 @@ static Tk_OptionSpec lineElemOptionSpecs[] = { {TK_OPTION_COLOR, "-valuecolor", "valueColor", "ValueColor", "black", -1, Tk_Offset(LineElement, builtinPen.valueStyle.color),0, NULL, 0}, {TK_OPTION_FONT, "-valuefont", "valueFont", "ValueFont", - STD_FONT_NUMBERS, -1, Tk_Offset(LineElement, builtinPen.valueStyle.font), + STD_FONT_SMALL, -1, Tk_Offset(LineElement, builtinPen.valueStyle.font), 0, NULL, 0}, {TK_OPTION_STRING, "-valueformat", "valueFormat", "ValueFormat", - "%g", -1, Tk_Offset(LineElement, builtinPen.valueFormat), 0, NULL, 0}, + "%g", -1, Tk_Offset(LineElement, builtinPen.valueFormat), + TK_OPTION_NULL_OK, NULL, 0}, {TK_OPTION_DOUBLE, "-valuerotate", "valueRotate", "ValueRotate", 0, -1, Tk_Offset(LineElement, builtinPen.valueStyle.angle), 0, NULL, 0}, {TK_OPTION_END, NULL, NULL, NULL, NULL, -1, 0, 0, NULL, 0} @@ -448,6 +448,7 @@ Blt_CustomOption bitmaskLineElemHideOption = ObjToBitmaskProc, BitmaskToObjProc, NULL, (ClientData)HIDE }; +/* static Blt_ConfigSpec lineElemConfigSpecs[] = { {BLT_CONFIG_CUSTOM, "-activepen", "activePen", "ActivePen", "activeLine", Tk_Offset(LineElement, activePenPtr), @@ -466,10 +467,8 @@ static Blt_ConfigSpec lineElemConfigSpecs[] = { {BLT_CONFIG_CUSTOM, "-dashes", "dashes", "Dashes", NULL, Tk_Offset(LineElement, builtinPen.traceDashes), BLT_CONFIG_NULL_OK, &dashesOption}, - /* {BLT_CONFIG_CUSTOM, "-data", "data", "Data", NULL, 0, 0, &bltValuePairsOption}, - */ {BLT_CONFIG_CUSTOM, "-errorbarcolor", "errorBarColor", "ErrorBarColor", "defcolor", Tk_Offset(LineElement, builtinPen.errorBarColor), 0, &bltColorOption}, @@ -552,7 +551,7 @@ static Blt_ConfigSpec lineElemConfigSpecs[] = { black, Tk_Offset(LineElement, builtinPen.valueStyle.color), 0}, {BLT_CONFIG_FONT, "-valuefont", "valueFont", "ValueFont", - STD_FONT_NUMBERS, + STD_FONT_SMALL, Tk_Offset(LineElement, builtinPen.valueStyle.font), 0}, {BLT_CONFIG_STRING, "-valueformat", "valueFormat", "ValueFormat", "%g", Tk_Offset(LineElement, builtinPen.valueFormat), @@ -584,49 +583,38 @@ static Blt_ConfigSpec lineElemConfigSpecs[] = { Tk_Offset(LineElement, yLow), 0, &bltValuesOption}, {BLT_CONFIG_END, NULL, NULL, NULL, NULL, 0, 0} }; - -//*** +*/ static Tk_OptionSpec linePenOptionSpecs[] = { {TK_OPTION_COLOR, "-color", "color", "Color", - bblue, - -1, Tk_Offset(LinePen, traceColor), 0, NULL, 0}, + "bblue", -1, Tk_Offset(LinePen, traceColor), 0, NULL, 0}, {TK_OPTION_PIXELS, "-errorbarwidth", "errorBarWidth", "ErrorBarWidth", - "1", - -1, Tk_Offset(LinePen, errorBarLineWidth), 0, NULL, 0}, + "1", -1, Tk_Offset(LinePen, errorBarLineWidth), 0, NULL, 0}, {TK_OPTION_PIXELS, "-errorbarcap", "errorBarCap", "ErrorBarCap", - "1", - -1, Tk_Offset(LinePen, errorBarCapWidth), 0, NULL, 0}, + "1", -1, Tk_Offset(LinePen, errorBarCapWidth), 0, NULL, 0}, {TK_OPTION_PIXELS, "-linewidth", "lineWidth", "LineWidth", - "1", - -1, Tk_Offset(LinePen, traceWidth), 0, NULL, 0}, + "1", -1, Tk_Offset(LinePen, traceWidth), 0, NULL, 0}, {TK_OPTION_PIXELS, "-outlinewidth", "outlineWidth", "OutlineWidth", - "1", - -1, Tk_Offset(LinePen, symbol.outlineWidth), 0, NULL, 0}, + "1", -1, Tk_Offset(LinePen, symbol.outlineWidth), 0, NULL, 0}, {TK_OPTION_PIXELS, "-pixels", "pixels", "Pixels", - "0.1i", - -1, Tk_Offset(LinePen, symbol.size), 0, NULL, 0}, + "0.1i", -1, Tk_Offset(LinePen, symbol.size), 0, NULL, 0}, {TK_OPTION_STRING, "-type", "type", "Type", - "line", - -1, Tk_Offset(Pen, typeId), 0, NULL, 0}, + "line", -1, Tk_Offset(Pen, typeId), 0, NULL, 0}, {TK_OPTION_ANCHOR, "-valueanchor", "valueAnchor", "ValueAnchor", - "s", - -1, Tk_Offset(LinePen, valueStyle.anchor), 0, NULL, 0}, + "s", -1, Tk_Offset(LinePen, valueStyle.anchor), 0, NULL, 0}, {TK_OPTION_COLOR, "-valuecolor", "valueColor", "ValueColor", - black, - -1, Tk_Offset(LinePen, valueStyle.color), 0, NULL, 0}, + "black", -1, Tk_Offset(LinePen, valueStyle.color), 0, NULL, 0}, {TK_OPTION_FONT, "-valuefont", "valueFont", "ValueFont", - STD_FONT_NUMBERS, - -1, Tk_Offset(LinePen, valueStyle.font), 0, NULL, 0}, + STD_FONT_SMALL, -1, Tk_Offset(LinePen, valueStyle.font), 0, NULL, 0}, {TK_OPTION_STRING, "-valueformat", "valueFormat", "ValueFormat", - "%g", - -1, Tk_Offset(LinePen, valueFormat), TK_OPTION_NULL_OK, NULL, 0}, + "%g", -1, Tk_Offset(LinePen, valueFormat), + TK_OPTION_NULL_OK, NULL, 0}, {TK_OPTION_DOUBLE, "-valuerotate", "valueRotate", "ValueRotate", - 0, - -1, Tk_Offset(LinePen, valueStyle.angle), 0, NULL, 0}, + 0, -1, Tk_Offset(LinePen, valueStyle.angle), 0, NULL, 0}, {TK_OPTION_END, NULL, NULL, NULL, NULL, -1, 0, 0, NULL, 0} }; +/* static Blt_ConfigSpec linePenConfigSpecs[] = { {BLT_CONFIG_COLOR, "-color", "color", "Color", bblue, Tk_Offset(LinePen, traceColor), ACTIVE_PEN}, @@ -676,7 +664,7 @@ static Blt_ConfigSpec linePenConfigSpecs[] = { {BLT_CONFIG_COLOR, "-valuecolor", "valueColor", "ValueColor", black, Tk_Offset(LinePen, valueStyle.color), ALL_PENS}, {BLT_CONFIG_FONT, "-valuefont", "valueFont", "ValueFont", - STD_FONT_NUMBERS, Tk_Offset(LinePen, valueStyle.font), ALL_PENS}, + STD_FONT_SMALL, Tk_Offset(LinePen, valueStyle.font), ALL_PENS}, {BLT_CONFIG_STRING, "-valueformat", "valueFormat", "ValueFormat", "%g", Tk_Offset(LinePen, valueFormat), ALL_PENS | BLT_CONFIG_NULL_OK}, @@ -684,6 +672,7 @@ static Blt_ConfigSpec linePenConfigSpecs[] = { 0, Tk_Offset(LinePen, valueStyle.angle), ALL_PENS}, {BLT_CONFIG_END, NULL, NULL, NULL, NULL, 0, 0} }; +*/ typedef double (DistanceProc)(int x, int y, Point2d *p, Point2d *q, Point2d *t); @@ -4178,9 +4167,11 @@ static void DestroyLineProc(Graph* graphPtr, Element* basePtr) Tk_DeleteOptionTable(elemPtr->optionTable); DestroyPenProc(graphPtr, (Pen *)&elemPtr->builtinPen); - if (elemPtr->activePenPtr != NULL) { + if (elemPtr->activePenPtr != NULL) Blt_FreePen((Pen *)elemPtr->activePenPtr); - } + if (elemPtr->normalPenPtr != NULL) + Blt_FreePen((Pen *)elemPtr->normalPenPtr); + ResetLine(elemPtr); if (elemPtr->stylesPalette != NULL) { Blt_FreeStylePalette(elemPtr->stylesPalette); diff --git a/src/bltGrElemOp.C b/src/bltGrElemOp.C index 409ad0e..c5aad09 100644 --- a/src/bltGrElemOp.C +++ b/src/bltGrElemOp.C @@ -566,7 +566,7 @@ static int ObjToStyles(ClientData clientData, Tcl_Interp *interp, Blt_Chain_LinkAfter(stylePalette, link, NULL); } stylePtr = Blt_Chain_GetValue(link); - stylePtr->penPtr = elemPtr->normalPenPtr; + stylePtr->penPtr = NORMALPEN(elemPtr); for (i = 0; i < objc; i++) { link = Blt_Chain_AllocLink(size); stylePtr = Blt_Chain_GetValue(link); @@ -710,10 +710,7 @@ static void DestroyElement(Element *elemPtr) FreeDataValues(&elemPtr->x); FreeDataValues(&elemPtr->y); - /* - * Call the element's own destructor to release the memory and - * resources allocated for it. - */ + (*elemPtr->procsPtr->destroyProc) (graphPtr, elemPtr); /* Remove it also from the element display list */ @@ -725,15 +722,15 @@ static void DestroyElement(Element *elemPtr) } } /* Remove the element for the graph's hash table of elements */ - if (elemPtr->hashPtr != NULL) { + if (elemPtr->hashPtr != NULL) Tcl_DeleteHashEntry(elemPtr->hashPtr); - } - if (elemPtr->obj.name != NULL) { + + if (elemPtr->obj.name != NULL) free((void*)(elemPtr->obj.name)); - } - if (elemPtr->label != NULL) { + + if (elemPtr->label != NULL) free((void*)(elemPtr->label)); - } + free(elemPtr); } diff --git a/src/bltGrPenOp.C b/src/bltGrPenOp.C index 2489e52..a1f9f19 100644 --- a/src/bltGrPenOp.C +++ b/src/bltGrPenOp.C @@ -74,7 +74,7 @@ static int PenSetProc(ClientData clientData, Tcl_Interp *interp, if (classId == CID_NONE) classId = graphPtr->classId; - if (Blt_GetPenFromObj(interp, graphPtr, objPtr, classId, &penPtr) + if (Blt_GetPenFromObj(interp, graphPtr, *objPtr, classId, &penPtr) != TCL_OK) return TCL_ERROR; @@ -100,16 +100,6 @@ static Tcl_Obj* PenGetProc(ClientData clientData, Tk_Window tkwin, //*** -static Blt_OptionFreeProc FreePen; -static Blt_OptionParseProc ObjToPen; -static Blt_OptionPrintProc PenToObj; -Blt_CustomOption bltBarPenOption = { - ObjToPen, PenToObj, FreePen, (ClientData)CID_ELEM_BAR -}; -Blt_CustomOption bltLinePenOption = { - ObjToPen, PenToObj, FreePen, (ClientData)CID_ELEM_LINE -}; - static Blt_OptionFreeProc FreeColor; static Blt_OptionParseProc ObjToColor; static Blt_OptionPrintProc ColorToObj; @@ -117,132 +107,20 @@ Blt_CustomOption bltColorOption = { ObjToColor, ColorToObj, FreeColor, (ClientData)0 }; -/*ARGSUSED*/ -static void -FreePen( - ClientData clientData, /* Not used. */ - Display *display, /* Not used. */ - char *widgRec, - int offset) -{ - Pen **penPtrPtr = (Pen **)(widgRec + offset); - - if (*penPtrPtr != NULL) { - Blt_FreePen(*penPtrPtr); - } -} - -/* - *--------------------------------------------------------------------------- - * - * ObjToPen -- - * - * Convert the color value into a string. - * - * Results: - * The string representing the symbol color is returned. - * - *--------------------------------------------------------------------------- - */ -/*ARGSUSED*/ -static int -ObjToPen( - ClientData clientData, /* Not used. */ - Tcl_Interp *interp, /* Interpreter to send results back to */ - Tk_Window tkwin, /* Not used. */ - Tcl_Obj *objPtr, /* String representing pen */ - char *widgRec, /* Widget record */ - int offset, /* Offset to field in structure */ - int flags) -{ - Pen **penPtrPtr = (Pen **)(widgRec + offset); - const char *string; - - string = Tcl_GetString(objPtr); - if ((string[0] == '\0') && (flags & BLT_CONFIG_NULL_OK)) { - Blt_FreePen(*penPtrPtr); - *penPtrPtr = NULL; - } else { - Pen *penPtr; - Graph *graphPtr; - ClassId classId = (ClassId)clientData; /* Element type. */ - - graphPtr = Blt_GetGraphFromWindowData(tkwin); - assert(graphPtr); - - if (classId == CID_NONE) { - classId = graphPtr->classId; - } - if (Blt_GetPenFromObj(interp, graphPtr, objPtr, classId, &penPtr) - != TCL_OK) { - return TCL_ERROR; - } - Blt_FreePen(*penPtrPtr); - *penPtrPtr = penPtr; - } - return TCL_OK; -} - -/* - *--------------------------------------------------------------------------- - * - * PenToObj -- - * - * Parse the name of the name. - * - * Results: - * The return value is a standard TCL result. - * - *--------------------------------------------------------------------------- - */ -/*ARGSUSED*/ -static Tcl_Obj * -PenToObj( - ClientData clientData, /* Not used. */ - Tcl_Interp *interp, /* Not used. */ - Tk_Window tkwin, /* Not used. */ - char *widgRec, /* Widget information record */ - int offset, /* Offset to field in structure */ - int flags) /* Not used. */ -{ - Pen *penPtr = *(Pen **)(widgRec + offset); - - if (penPtr == NULL) { - return Tcl_NewStringObj("", -1); - } else { - return Tcl_NewStringObj(penPtr->name, -1); - } -} - -/*ARGSUSED*/ static void FreeColor( - ClientData clientData, /* Not used. */ - Display *display, /* Not used. */ - char *widgRec, - int offset) + ClientData clientData, /* Not used. */ + Display *display, /* Not used. */ + char *widgRec, + int offset) { - XColor *colorPtr = *(XColor **)(widgRec + offset); - - if ((colorPtr != NULL) && (colorPtr != COLOR_DEFAULT)) { - Tk_FreeColor(colorPtr); - } + XColor *colorPtr = *(XColor **)(widgRec + offset); + + if ((colorPtr != NULL) && (colorPtr != COLOR_DEFAULT)) { + Tk_FreeColor(colorPtr); + } } -/* - *--------------------------------------------------------------------------- - - * ObjToColor -- - * - * Convert the string representation of a color into a XColor pointer. - * - * Results: - * The return value is a standard TCL result. The color pointer is - * written into the widget record. - * - *--------------------------------------------------------------------------- - */ -/*ARGSUSED*/ static int ObjToColor( ClientData clientData, /* Not used. */ @@ -287,19 +165,6 @@ ObjToColor( return TCL_OK; } -/* - *--------------------------------------------------------------------------- - * - * ColorToObj -- - * - * Convert the color value into a string. - * - * Results: - * The string representing the symbol color is returned. - * - *--------------------------------------------------------------------------- - */ -/*ARGSUSED*/ static Tcl_Obj * ColorToObj( ClientData clientData, /* Not used. */ |