diff options
author | joye <joye> | 2014-01-10 17:13:48 (GMT) |
---|---|---|
committer | joye <joye> | 2014-01-10 17:13:48 (GMT) |
commit | 1da831b544be6e4715fa9f44cc171cd714a489fa (patch) | |
tree | 5bb3cd2d9674c660ada000abc2dfe1cd956f8ca3 /src/bltGrMarker.C | |
parent | 7dd9c123f6ab6791cc7a9d4719b0fb26e784fd5c (diff) | |
download | blt-1da831b544be6e4715fa9f44cc171cd714a489fa.zip blt-1da831b544be6e4715fa9f44cc171cd714a489fa.tar.gz blt-1da831b544be6e4715fa9f44cc171cd714a489fa.tar.bz2 |
*** empty log message ***
Diffstat (limited to 'src/bltGrMarker.C')
-rw-r--r-- | src/bltGrMarker.C | 261 |
1 files changed, 143 insertions, 118 deletions
diff --git a/src/bltGrMarker.C b/src/bltGrMarker.C index 2a844eb..b85e690 100644 --- a/src/bltGrMarker.C +++ b/src/bltGrMarker.C @@ -256,52 +256,57 @@ typedef struct { int nOutlinePts; } BitmapMarker; -static Blt_ConfigSpec bitmapConfigSpecs[] = +Blt_CustomOption bitmaskGrMarkerBitmapHideOption = { + ObjToBitmaskProc, BitmaskToObjProc, NULL, (ClientData)HIDE +}; + +static Blt_ConfigSpec bitmapConfigSpecs[] = + { {BLT_CONFIG_ANCHOR, "-anchor", "anchor", "Anchor", DEF_MARKER_ANCHOR, - Tk_Offset(BitmapMarker, anchor), 0}, + Tk_Offset(BitmapMarker, anchor), 0}, {BLT_CONFIG_COLOR, "-background", "background", "Background", - DEF_MARKER_BACKGROUND, Tk_Offset(BitmapMarker, fillColor), - BLT_CONFIG_NULL_OK}, + DEF_MARKER_BACKGROUND, Tk_Offset(BitmapMarker, fillColor), + BLT_CONFIG_NULL_OK}, {BLT_CONFIG_SYNONYM, "-bg", "background", (char *)NULL, (char *)NULL, 0, 0}, {BLT_CONFIG_LIST, "-bindtags", "bindTags", "BindTags", DEF_BITMAP_TAGS, - Tk_Offset(BitmapMarker, obj.tags), BLT_CONFIG_NULL_OK}, + Tk_Offset(BitmapMarker, obj.tags), BLT_CONFIG_NULL_OK}, {BLT_CONFIG_BITMAP, "-bitmap", "bitmap", "Bitmap", DEF_MARKER_BITMAP, - Tk_Offset(BitmapMarker, srcBitmap), BLT_CONFIG_NULL_OK}, + Tk_Offset(BitmapMarker, srcBitmap), BLT_CONFIG_NULL_OK}, {BLT_CONFIG_CUSTOM, "-coords", "coords", "Coords", DEF_MARKER_COORDS, - Tk_Offset(BitmapMarker, worldPts), BLT_CONFIG_NULL_OK, - &coordsOption}, + Tk_Offset(BitmapMarker, worldPts), BLT_CONFIG_NULL_OK, + &coordsOption}, {BLT_CONFIG_STRING, "-element", "element", "Element", DEF_MARKER_ELEMENT, - Tk_Offset(BitmapMarker, elemName), BLT_CONFIG_NULL_OK}, + Tk_Offset(BitmapMarker, elemName), BLT_CONFIG_NULL_OK}, {BLT_CONFIG_SYNONYM, "-fg", "foreground", (char *)NULL, (char *)NULL, 0, 0}, {BLT_CONFIG_SYNONYM, "-fill", "background", (char *)NULL, (char *)NULL, - 0, 0}, + 0, 0}, {BLT_CONFIG_COLOR, "-foreground", "foreground", "Foreground", - DEF_MARKER_FOREGROUND, Tk_Offset(BitmapMarker, outlineColor), - BLT_CONFIG_NULL_OK}, - {BLT_CONFIG_BITMASK, "-hide", "hide", "Hide", DEF_MARKER_HIDE, - Tk_Offset(BitmapMarker, flags), BLT_CONFIG_DONT_SET_DEFAULT, - (Blt_CustomOption *)HIDE}, + DEF_MARKER_FOREGROUND, Tk_Offset(BitmapMarker, outlineColor), + BLT_CONFIG_NULL_OK}, + {BLT_CONFIG_CUSTOM, "-hide", "hide", "Hide", DEF_MARKER_HIDE, + Tk_Offset(BitmapMarker, flags), BLT_CONFIG_DONT_SET_DEFAULT, + &bitmaskGrMarkerBitmapHideOption}, {BLT_CONFIG_CUSTOM, "-mapx", "mapX", "MapX", DEF_MARKER_MAP_X, - Tk_Offset(BitmapMarker, axes.x), 0, &bltXAxisOption}, + Tk_Offset(BitmapMarker, axes.x), 0, &bltXAxisOption}, {BLT_CONFIG_CUSTOM, "-mapy", "mapY", "MapY", DEF_MARKER_MAP_Y, - Tk_Offset(BitmapMarker, axes.y), 0, &bltYAxisOption}, + Tk_Offset(BitmapMarker, axes.y), 0, &bltYAxisOption}, {BLT_CONFIG_STRING, "-name", (char *)NULL, (char *)NULL, DEF_MARKER_NAME, - Tk_Offset(BitmapMarker, obj.name), BLT_CONFIG_NULL_OK}, + Tk_Offset(BitmapMarker, obj.name), BLT_CONFIG_NULL_OK}, {BLT_CONFIG_SYNONYM, "-outline", "foreground", (char *)NULL, (char *)NULL, - 0, 0}, + 0, 0}, {BLT_CONFIG_DOUBLE, "-rotate", "rotate", "Rotate", DEF_MARKER_ANGLE, - Tk_Offset(BitmapMarker, reqAngle), BLT_CONFIG_DONT_SET_DEFAULT}, + Tk_Offset(BitmapMarker, reqAngle), BLT_CONFIG_DONT_SET_DEFAULT}, {BLT_CONFIG_CUSTOM, "-state", "state", "State", DEF_MARKER_STATE, Tk_Offset(BitmapMarker, state), BLT_CONFIG_DONT_SET_DEFAULT, &stateOption}, {BLT_CONFIG_BOOLEAN, "-under", "under", "Under", DEF_MARKER_UNDER, - Tk_Offset(BitmapMarker, drawUnder), BLT_CONFIG_DONT_SET_DEFAULT}, + Tk_Offset(BitmapMarker, drawUnder), BLT_CONFIG_DONT_SET_DEFAULT}, {BLT_CONFIG_PIXELS, "-xoffset", "xOffset", "XOffset", DEF_MARKER_X_OFFSET, - Tk_Offset(BitmapMarker, xOffset), BLT_CONFIG_DONT_SET_DEFAULT}, + Tk_Offset(BitmapMarker, xOffset), BLT_CONFIG_DONT_SET_DEFAULT}, {BLT_CONFIG_PIXELS, "-yoffset", "yOffset", "YOffset", DEF_MARKER_Y_OFFSET, - Tk_Offset(BitmapMarker, yOffset), BLT_CONFIG_DONT_SET_DEFAULT}, + Tk_Offset(BitmapMarker, yOffset), BLT_CONFIG_DONT_SET_DEFAULT}, {BLT_CONFIG_END, NULL, NULL, NULL, NULL, 0, 0} -}; + }; static MarkerConfigProc ConfigureBitmapProc; static MarkerCreateProc CreateBitmapProc; @@ -388,52 +393,57 @@ typedef struct { * if the marker is currently drawn. */ } LineMarker; -static Blt_ConfigSpec lineConfigSpecs[] = +Blt_CustomOption bitmaskGrMarkerLineHideOption = { + ObjToBitmaskProc, BitmaskToObjProc, NULL, (ClientData)HIDE +}; + +static Blt_ConfigSpec lineConfigSpecs[] = + { {BLT_CONFIG_LIST, "-bindtags", "bindTags", "BindTags", DEF_LINE_TAGS, - Tk_Offset(LineMarker, obj.tags), BLT_CONFIG_NULL_OK}, + Tk_Offset(LineMarker, obj.tags), BLT_CONFIG_NULL_OK}, {BLT_CONFIG_CAP_STYLE, "-cap", "cap", "Cap", DEF_MARKER_CAP_STYLE, - Tk_Offset(LineMarker, capStyle), BLT_CONFIG_DONT_SET_DEFAULT}, + Tk_Offset(LineMarker, capStyle), BLT_CONFIG_DONT_SET_DEFAULT}, {BLT_CONFIG_CUSTOM, "-coords", "coords", "Coords", DEF_MARKER_COORDS, - Tk_Offset(LineMarker, worldPts), BLT_CONFIG_NULL_OK, &coordsOption}, + Tk_Offset(LineMarker, worldPts), BLT_CONFIG_NULL_OK, &coordsOption}, {BLT_CONFIG_CUSTOM, "-dashes", "dashes", "Dashes", DEF_MARKER_DASHES, Tk_Offset(LineMarker, dashes), BLT_CONFIG_NULL_OK, &dashesOption}, {BLT_CONFIG_PIXELS, "-dashoffset", "dashOffset", "DashOffset", - DEF_MARKER_DASH_OFFSET, Tk_Offset(LineMarker, dashes.offset), - BLT_CONFIG_DONT_SET_DEFAULT}, + DEF_MARKER_DASH_OFFSET, Tk_Offset(LineMarker, dashes.offset), + BLT_CONFIG_DONT_SET_DEFAULT}, {BLT_CONFIG_STRING, "-element", "element", "Element", DEF_MARKER_ELEMENT, - Tk_Offset(LineMarker, elemName), BLT_CONFIG_NULL_OK}, + Tk_Offset(LineMarker, elemName), BLT_CONFIG_NULL_OK}, {BLT_CONFIG_COLOR, "-fill", "fill", "Fill", (char *)NULL, - Tk_Offset(LineMarker, fillColor), BLT_CONFIG_NULL_OK}, + 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, "-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, - Tk_Offset(LineMarker, flags), BLT_CONFIG_DONT_SET_DEFAULT, - (Blt_CustomOption *)HIDE}, + DEF_MARKER_LINE_WIDTH, Tk_Offset(LineMarker, lineWidth), + BLT_CONFIG_DONT_SET_DEFAULT}, + {BLT_CONFIG_CUSTOM, "-hide", "hide", "Hide", DEF_MARKER_HIDE, + Tk_Offset(LineMarker, flags), BLT_CONFIG_DONT_SET_DEFAULT, + &bitmaskGrMarkerLineHideOption}, {BLT_CONFIG_CUSTOM, "-mapx", "mapX", "MapX", DEF_MARKER_MAP_X, - Tk_Offset(LineMarker, axes.x), 0, &bltXAxisOption}, + Tk_Offset(LineMarker, axes.x), 0, &bltXAxisOption}, {BLT_CONFIG_CUSTOM, "-mapy", "mapY", "MapY", DEF_MARKER_MAP_Y, - Tk_Offset(LineMarker, axes.y), 0, &bltYAxisOption}, + Tk_Offset(LineMarker, axes.y), 0, &bltYAxisOption}, {BLT_CONFIG_STRING, "-name", (char *)NULL, (char *)NULL, DEF_MARKER_NAME, - Tk_Offset(LineMarker, obj.name), BLT_CONFIG_NULL_OK}, + Tk_Offset(LineMarker, obj.name), BLT_CONFIG_NULL_OK}, {BLT_CONFIG_COLOR, "-outline", "outline", "Outline", - DEF_MARKER_OUTLINE_COLOR, Tk_Offset(LineMarker, outlineColor), - BLT_CONFIG_NULL_OK}, + DEF_MARKER_OUTLINE_COLOR, Tk_Offset(LineMarker, outlineColor), + BLT_CONFIG_NULL_OK}, {BLT_CONFIG_CUSTOM, "-state", "state", "State", DEF_MARKER_STATE, Tk_Offset(LineMarker, state), BLT_CONFIG_DONT_SET_DEFAULT, &stateOption}, {BLT_CONFIG_BOOLEAN, "-under", "under", "Under", DEF_MARKER_UNDER, - Tk_Offset(LineMarker, drawUnder), BLT_CONFIG_DONT_SET_DEFAULT}, + Tk_Offset(LineMarker, drawUnder), BLT_CONFIG_DONT_SET_DEFAULT}, {BLT_CONFIG_PIXELS, "-xoffset", "xOffset", "XOffset", DEF_MARKER_X_OFFSET, - Tk_Offset(LineMarker, xOffset), BLT_CONFIG_DONT_SET_DEFAULT}, + Tk_Offset(LineMarker, xOffset), BLT_CONFIG_DONT_SET_DEFAULT}, {BLT_CONFIG_BOOLEAN, "-xor", "xor", "Xor", DEF_MARKER_XOR, - Tk_Offset(LineMarker, xor), BLT_CONFIG_DONT_SET_DEFAULT}, + Tk_Offset(LineMarker, xor), BLT_CONFIG_DONT_SET_DEFAULT}, {BLT_CONFIG_PIXELS, "-yoffset", "yOffset", "YOffset", DEF_MARKER_Y_OFFSET, - Tk_Offset(LineMarker, yOffset), BLT_CONFIG_DONT_SET_DEFAULT}, + Tk_Offset(LineMarker, yOffset), BLT_CONFIG_DONT_SET_DEFAULT}, {BLT_CONFIG_END, NULL, NULL, NULL, NULL, 0, 0} -}; + }; static MarkerConfigProc ConfigureLineProc; static MarkerCreateProc CreateLineProc; @@ -543,52 +553,58 @@ typedef struct { * drawn it again to erase it. */ } PolygonMarker; -static Blt_ConfigSpec polygonConfigSpecs[] = + +Blt_CustomOption bitmaskGrMarkerPolygonHideOption = { + ObjToBitmaskProc, BitmaskToObjProc, NULL, (ClientData)HIDE +}; + +static Blt_ConfigSpec polygonConfigSpecs[] = + { {BLT_CONFIG_LIST, "-bindtags", "bindTags", "BindTags", DEF_POLYGON_TAGS, - Tk_Offset(PolygonMarker, obj.tags), BLT_CONFIG_NULL_OK}, + Tk_Offset(PolygonMarker, obj.tags), BLT_CONFIG_NULL_OK}, {BLT_CONFIG_CAP_STYLE, "-cap", "cap", "Cap", DEF_MARKER_CAP_STYLE, - Tk_Offset(PolygonMarker, capStyle), BLT_CONFIG_DONT_SET_DEFAULT}, + Tk_Offset(PolygonMarker, capStyle), BLT_CONFIG_DONT_SET_DEFAULT}, {BLT_CONFIG_CUSTOM, "-coords", "coords", "Coords", DEF_MARKER_COORDS, - Tk_Offset(PolygonMarker, worldPts), BLT_CONFIG_NULL_OK, &coordsOption}, + Tk_Offset(PolygonMarker, worldPts), BLT_CONFIG_NULL_OK, &coordsOption}, {BLT_CONFIG_CUSTOM, "-dashes", "dashes", "Dashes", DEF_MARKER_DASHES, Tk_Offset(PolygonMarker, dashes), BLT_CONFIG_NULL_OK, &dashesOption}, {BLT_CONFIG_STRING, "-element", "element", "Element", DEF_MARKER_ELEMENT, - Tk_Offset(PolygonMarker, elemName), BLT_CONFIG_NULL_OK}, + Tk_Offset(PolygonMarker, elemName), BLT_CONFIG_NULL_OK}, {BLT_CONFIG_CUSTOM, "-fill", "fill", "Fill", DEF_MARKER_FILL_COLOR, - Tk_Offset(PolygonMarker, fill), BLT_CONFIG_NULL_OK, &colorPairOption}, + 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}, + Tk_Offset(PolygonMarker, joinStyle), BLT_CONFIG_DONT_SET_DEFAULT}, {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, - Tk_Offset(PolygonMarker, flags), BLT_CONFIG_DONT_SET_DEFAULT, - (Blt_CustomOption *)HIDE}, + DEF_MARKER_LINE_WIDTH, Tk_Offset(PolygonMarker, lineWidth), + BLT_CONFIG_DONT_SET_DEFAULT}, + {BLT_CONFIG_CUSTOM, "-hide", "hide", "Hide", DEF_MARKER_HIDE, + Tk_Offset(PolygonMarker, flags), BLT_CONFIG_DONT_SET_DEFAULT, + &bitmaskGrMarkerPolygonHideOption}, {BLT_CONFIG_CUSTOM, "-mapx", "mapX", "MapX", DEF_MARKER_MAP_X, - Tk_Offset(PolygonMarker, axes.x), 0, &bltXAxisOption}, + Tk_Offset(PolygonMarker, axes.x), 0, &bltXAxisOption}, {BLT_CONFIG_CUSTOM, "-mapy", "mapY", "MapY", DEF_MARKER_MAP_Y, - Tk_Offset(PolygonMarker, axes.y), 0, &bltYAxisOption}, + Tk_Offset(PolygonMarker, axes.y), 0, &bltYAxisOption}, {BLT_CONFIG_STRING, "-name", (char *)NULL, (char *)NULL, DEF_MARKER_NAME, - Tk_Offset(PolygonMarker, obj.name), BLT_CONFIG_NULL_OK}, + Tk_Offset(PolygonMarker, obj.name), BLT_CONFIG_NULL_OK}, {BLT_CONFIG_CUSTOM, "-outline", "outline", "Outline", - DEF_MARKER_OUTLINE_COLOR, Tk_Offset(PolygonMarker, outline), - BLT_CONFIG_NULL_OK, &colorPairOption}, + DEF_MARKER_OUTLINE_COLOR, Tk_Offset(PolygonMarker, outline), + BLT_CONFIG_NULL_OK, &colorPairOption}, {BLT_CONFIG_CUSTOM, "-state", "state", "State", DEF_MARKER_STATE, Tk_Offset(PolygonMarker, state), BLT_CONFIG_DONT_SET_DEFAULT, &stateOption}, {BLT_CONFIG_BITMAP, "-stipple", "stipple", "Stipple", DEF_MARKER_STIPPLE, - Tk_Offset(PolygonMarker, stipple), BLT_CONFIG_NULL_OK}, + Tk_Offset(PolygonMarker, stipple), BLT_CONFIG_NULL_OK}, {BLT_CONFIG_BOOLEAN, "-under", "under", "Under", DEF_MARKER_UNDER, - Tk_Offset(PolygonMarker, drawUnder), - BLT_CONFIG_DONT_SET_DEFAULT}, + Tk_Offset(PolygonMarker, drawUnder), + BLT_CONFIG_DONT_SET_DEFAULT}, {BLT_CONFIG_PIXELS, "-xoffset", "xOffset", "XOffset", DEF_MARKER_X_OFFSET, - Tk_Offset(PolygonMarker, xOffset), BLT_CONFIG_DONT_SET_DEFAULT}, + Tk_Offset(PolygonMarker, xOffset), BLT_CONFIG_DONT_SET_DEFAULT}, {BLT_CONFIG_BOOLEAN, "-xor", "xor", "Xor", DEF_MARKER_XOR, - Tk_Offset(PolygonMarker, xor), BLT_CONFIG_DONT_SET_DEFAULT}, + Tk_Offset(PolygonMarker, xor), BLT_CONFIG_DONT_SET_DEFAULT}, {BLT_CONFIG_PIXELS, "-yoffset", "yOffset", "YOffset", DEF_MARKER_Y_OFFSET, - Tk_Offset(PolygonMarker, yOffset), BLT_CONFIG_DONT_SET_DEFAULT}, + Tk_Offset(PolygonMarker, yOffset), BLT_CONFIG_DONT_SET_DEFAULT}, {BLT_CONFIG_END, NULL, NULL, NULL, NULL, 0, 0} -}; + }; static MarkerConfigProc ConfigurePolygonProc; static MarkerCreateProc CreatePolygonProc; @@ -658,61 +674,65 @@ typedef struct { GC fillGC; } TextMarker; +Blt_CustomOption bitmaskGrMarkerTextHideOption = +{ + ObjToBitmaskProc, BitmaskToObjProc, NULL, (ClientData)HIDE +}; static Blt_ConfigSpec textConfigSpecs[] = -{ + { {BLT_CONFIG_ANCHOR, "-anchor", "anchor", "Anchor", DEF_MARKER_ANCHOR, - Tk_Offset(TextMarker, anchor), 0}, + Tk_Offset(TextMarker, anchor), 0}, {BLT_CONFIG_COLOR, "-background", "background", "MarkerBackground", - (char *)NULL, Tk_Offset(TextMarker, fillColor), BLT_CONFIG_NULL_OK}, + (char *)NULL, Tk_Offset(TextMarker, fillColor), BLT_CONFIG_NULL_OK}, {BLT_CONFIG_SYNONYM, "-bg", "background", "Background", (char *)NULL, 0, 0}, {BLT_CONFIG_LIST, "-bindtags", "bindTags", "BindTags", DEF_TEXT_TAGS, - Tk_Offset(TextMarker, obj.tags), BLT_CONFIG_NULL_OK}, + Tk_Offset(TextMarker, obj.tags), BLT_CONFIG_NULL_OK}, {BLT_CONFIG_CUSTOM, "-coords", "coords", "Coords", DEF_MARKER_COORDS, - Tk_Offset(TextMarker, worldPts), BLT_CONFIG_NULL_OK, - &coordsOption}, + Tk_Offset(TextMarker, worldPts), BLT_CONFIG_NULL_OK, + &coordsOption}, {BLT_CONFIG_STRING, "-element", "element", "Element", - DEF_MARKER_ELEMENT, Tk_Offset(TextMarker, elemName), - BLT_CONFIG_NULL_OK}, + DEF_MARKER_ELEMENT, Tk_Offset(TextMarker, elemName), + BLT_CONFIG_NULL_OK}, {BLT_CONFIG_SYNONYM, "-fg", "foreground", "Foreground", (char *)NULL, 0, 0}, {BLT_CONFIG_SYNONYM, "-fill", "background", (char *)NULL, (char *)NULL, - 0, 0}, + 0, 0}, {BLT_CONFIG_FONT, "-font", "font", "Font", DEF_MARKER_FONT, - Tk_Offset(TextMarker, style.font), 0}, + Tk_Offset(TextMarker, style.font), 0}, {BLT_CONFIG_COLOR, "-foreground", "foreground", "Foreground", - DEF_MARKER_FOREGROUND, Tk_Offset(TextMarker, style.color), 0}, + DEF_MARKER_FOREGROUND, Tk_Offset(TextMarker, style.color), 0}, {BLT_CONFIG_JUSTIFY, "-justify", "justify", "Justify", - DEF_MARKER_JUSTIFY, Tk_Offset(TextMarker, style.justify), - BLT_CONFIG_DONT_SET_DEFAULT}, - {BLT_CONFIG_BITMASK, "-hide", "hide", "Hide", DEF_MARKER_HIDE, - Tk_Offset(TextMarker, flags), BLT_CONFIG_DONT_SET_DEFAULT, - (Blt_CustomOption *)HIDE}, + DEF_MARKER_JUSTIFY, Tk_Offset(TextMarker, style.justify), + BLT_CONFIG_DONT_SET_DEFAULT}, + {BLT_CONFIG_CUSTOM, "-hide", "hide", "Hide", DEF_MARKER_HIDE, + Tk_Offset(TextMarker, flags), BLT_CONFIG_DONT_SET_DEFAULT, + &bitmaskGrMarkerTextHideOption}, {BLT_CONFIG_CUSTOM, "-mapx", "mapX", "MapX", DEF_MARKER_MAP_X, - Tk_Offset(TextMarker, axes.x), 0, &bltXAxisOption}, + Tk_Offset(TextMarker, axes.x), 0, &bltXAxisOption}, {BLT_CONFIG_CUSTOM, "-mapy", "mapY", "MapY", DEF_MARKER_MAP_Y, - Tk_Offset(TextMarker, axes.y), 0, &bltYAxisOption}, + Tk_Offset(TextMarker, axes.y), 0, &bltYAxisOption}, {BLT_CONFIG_STRING, "-name", (char *)NULL, (char *)NULL, DEF_MARKER_NAME, - Tk_Offset(TextMarker, obj.name), BLT_CONFIG_NULL_OK}, + Tk_Offset(TextMarker, obj.name), BLT_CONFIG_NULL_OK}, {BLT_CONFIG_SYNONYM, "-outline", "foreground", (char *)NULL, (char *)NULL, - 0, 0}, + 0, 0}, {BLT_CONFIG_PIXELS, "-padx", "padX", "PadX", DEF_MARKER_PAD, - Tk_Offset(TextMarker, style.xPad), BLT_CONFIG_DONT_SET_DEFAULT}, + Tk_Offset(TextMarker, style.xPad), BLT_CONFIG_DONT_SET_DEFAULT}, {BLT_CONFIG_PIXELS, "-pady", "padY", "PadY", DEF_MARKER_PAD, - Tk_Offset(TextMarker, style.yPad), BLT_CONFIG_DONT_SET_DEFAULT}, + Tk_Offset(TextMarker, style.yPad), BLT_CONFIG_DONT_SET_DEFAULT}, {BLT_CONFIG_DOUBLE, "-rotate", "rotate", "Rotate", DEF_MARKER_ANGLE, - Tk_Offset(TextMarker, style.angle), BLT_CONFIG_DONT_SET_DEFAULT}, + Tk_Offset(TextMarker, style.angle), BLT_CONFIG_DONT_SET_DEFAULT}, {BLT_CONFIG_CUSTOM, "-state", "state", "State", DEF_MARKER_STATE, Tk_Offset(TextMarker, state), BLT_CONFIG_DONT_SET_DEFAULT, &stateOption}, {BLT_CONFIG_STRING, "-text", "text", "Text", DEF_MARKER_TEXT, - Tk_Offset(TextMarker, string), BLT_CONFIG_NULL_OK}, + Tk_Offset(TextMarker, string), BLT_CONFIG_NULL_OK}, {BLT_CONFIG_BOOLEAN, "-under", "under", "Under", DEF_MARKER_UNDER, - Tk_Offset(TextMarker, drawUnder), BLT_CONFIG_DONT_SET_DEFAULT}, + Tk_Offset(TextMarker, drawUnder), BLT_CONFIG_DONT_SET_DEFAULT}, {BLT_CONFIG_PIXELS, "-xoffset", "xOffset", "XOffset", DEF_MARKER_X_OFFSET, - Tk_Offset(TextMarker, xOffset), BLT_CONFIG_DONT_SET_DEFAULT}, + Tk_Offset(TextMarker, xOffset), BLT_CONFIG_DONT_SET_DEFAULT}, {BLT_CONFIG_PIXELS, "-yoffset", "yOffset", "YOffset", DEF_MARKER_Y_OFFSET, - Tk_Offset(TextMarker, yOffset), BLT_CONFIG_DONT_SET_DEFAULT}, + Tk_Offset(TextMarker, yOffset), BLT_CONFIG_DONT_SET_DEFAULT}, {BLT_CONFIG_END, NULL, NULL, NULL, NULL, 0, 0} -}; + }; static MarkerConfigProc ConfigureTextProc; static MarkerCreateProc CreateTextProc; @@ -792,42 +812,47 @@ typedef struct { } WindowMarker; -static Blt_ConfigSpec windowConfigSpecs[] = +Blt_CustomOption bitmaskGrMarkerWindowHideOption = { + ObjToBitmaskProc, BitmaskToObjProc, NULL, (ClientData)HIDE +}; + +static Blt_ConfigSpec windowConfigSpecs[] = + { {BLT_CONFIG_ANCHOR, "-anchor", "anchor", "Anchor", DEF_MARKER_ANCHOR, - Tk_Offset(WindowMarker, anchor), 0}, + Tk_Offset(WindowMarker, anchor), 0}, {BLT_CONFIG_LIST, "-bindtags", "bindTags", "BindTags", DEF_WINDOW_TAGS, - Tk_Offset(WindowMarker, obj.tags), BLT_CONFIG_NULL_OK}, + Tk_Offset(WindowMarker, obj.tags), BLT_CONFIG_NULL_OK}, {BLT_CONFIG_CUSTOM, "-coords", "coords", "Coords", DEF_MARKER_COORDS, - Tk_Offset(WindowMarker, worldPts), BLT_CONFIG_NULL_OK, - &coordsOption}, + Tk_Offset(WindowMarker, worldPts), BLT_CONFIG_NULL_OK, + &coordsOption}, {BLT_CONFIG_STRING, "-element", "element", "Element", DEF_MARKER_ELEMENT, - Tk_Offset(WindowMarker, elemName), BLT_CONFIG_NULL_OK}, + Tk_Offset(WindowMarker, elemName), BLT_CONFIG_NULL_OK}, {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, - (Blt_CustomOption *)HIDE}, + Tk_Offset(WindowMarker, reqHeight), BLT_CONFIG_DONT_SET_DEFAULT}, + {BLT_CONFIG_CUSTOM, "-hide", "hide", "Hide", DEF_MARKER_HIDE, + Tk_Offset(WindowMarker, flags), BLT_CONFIG_DONT_SET_DEFAULT, + &bitmaskGrMarkerWindowHideOption}, {BLT_CONFIG_CUSTOM, "-mapx", "mapX", "MapX", DEF_MARKER_MAP_X, - Tk_Offset(WindowMarker, axes.x), 0, &bltXAxisOption}, + Tk_Offset(WindowMarker, axes.x), 0, &bltXAxisOption}, {BLT_CONFIG_CUSTOM, "-mapy", "mapY", "MapY", DEF_MARKER_MAP_Y, - Tk_Offset(WindowMarker, axes.y), 0, &bltYAxisOption}, + Tk_Offset(WindowMarker, axes.y), 0, &bltYAxisOption}, {BLT_CONFIG_STRING, "-name", (char *)NULL, (char *)NULL, DEF_MARKER_NAME, - Tk_Offset(WindowMarker, obj.name), BLT_CONFIG_NULL_OK}, + Tk_Offset(WindowMarker, obj.name), BLT_CONFIG_NULL_OK}, {BLT_CONFIG_CUSTOM, "-state", "state", "State", DEF_MARKER_STATE, Tk_Offset(WindowMarker, state), BLT_CONFIG_DONT_SET_DEFAULT, &stateOption}, {BLT_CONFIG_BOOLEAN, "-under", "under", "Under", DEF_MARKER_UNDER, - Tk_Offset(WindowMarker, drawUnder), BLT_CONFIG_DONT_SET_DEFAULT}, + Tk_Offset(WindowMarker, drawUnder), BLT_CONFIG_DONT_SET_DEFAULT}, {BLT_CONFIG_PIXELS, "-width", "width", "Width", DEF_MARKER_WIDTH, - Tk_Offset(WindowMarker, reqWidth), BLT_CONFIG_DONT_SET_DEFAULT}, + 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}, + Tk_Offset(WindowMarker, childName), BLT_CONFIG_NULL_OK}, {BLT_CONFIG_PIXELS, "-xoffset", "xOffset", "XOffset", DEF_MARKER_X_OFFSET, - Tk_Offset(WindowMarker, xOffset), BLT_CONFIG_DONT_SET_DEFAULT}, + Tk_Offset(WindowMarker, xOffset), BLT_CONFIG_DONT_SET_DEFAULT}, {BLT_CONFIG_PIXELS, "-yoffset", "yOffset", "YOffset", DEF_MARKER_Y_OFFSET, - Tk_Offset(WindowMarker, yOffset), BLT_CONFIG_DONT_SET_DEFAULT}, + Tk_Offset(WindowMarker, yOffset), BLT_CONFIG_DONT_SET_DEFAULT}, {BLT_CONFIG_END, NULL, NULL, NULL, NULL, 0, 0} -}; + }; static MarkerConfigProc ConfigureWindowProc; static MarkerCreateProc CreateWindowProc; |