summaryrefslogtreecommitdiffstats
path: root/src/bltGrAxis.C
diff options
context:
space:
mode:
authorjoye <joye>2014-03-12 22:39:49 (GMT)
committerjoye <joye>2014-03-12 22:39:49 (GMT)
commit12d15eef6a59bd1d463dae1ec1011f44f808049f (patch)
tree498b1ea1bf8cfe01d59fcd95ac3fd24a1f45f48d /src/bltGrAxis.C
parentfe320cd13c4b61ee54506965ad20b88d619ed59f (diff)
downloadblt-12d15eef6a59bd1d463dae1ec1011f44f808049f.zip
blt-12d15eef6a59bd1d463dae1ec1011f44f808049f.tar.gz
blt-12d15eef6a59bd1d463dae1ec1011f44f808049f.tar.bz2
*** empty log message ***
Diffstat (limited to 'src/bltGrAxis.C')
-rw-r--r--src/bltGrAxis.C65
1 files changed, 2 insertions, 63 deletions
diff --git a/src/bltGrAxis.C b/src/bltGrAxis.C
index 9343890..1a8fe28 100644
--- a/src/bltGrAxis.C
+++ b/src/bltGrAxis.C
@@ -3805,69 +3805,8 @@ Axis *Blt_NearestAxis(Graph* graphPtr, int x, int y)
ClientData Blt_MakeAxisTag(Graph* graphPtr, const char *tagName)
{
- Tcl_HashEntry *hPtr;
int isNew;
-
- hPtr = Tcl_CreateHashEntry(&graphPtr->axes.tagTable, tagName, &isNew);
+ Tcl_HashEntry *hPtr =
+ Tcl_CreateHashEntry(&graphPtr->axes.tagTable, tagName, &isNew);
return Tcl_GetHashKey(&graphPtr->axes.tagTable, hPtr);
}
-
-static Blt_OptionFreeProc FreeAxisProc;
-static Blt_OptionPrintProc AxisToObjProc;
-static Blt_OptionParseProc ObjToAxisProc;
-Blt_CustomOption bltXAxisOption = {
- ObjToAxisProc, AxisToObjProc, FreeAxisProc, (ClientData)CID_AXIS_X
-};
-Blt_CustomOption bltYAxisOption = {
- ObjToAxisProc, AxisToObjProc, FreeAxisProc, (ClientData)CID_AXIS_Y
-};
-
-static void FreeAxisProc(ClientData clientData, Display *display,
- char *widgRec, int offset)
-{
- Axis **axisPtrPtr = (Axis **)(widgRec + offset);
-
- if (*axisPtrPtr) {
- ReleaseAxis(*axisPtrPtr);
- *axisPtrPtr = NULL;
- }
-}
-
-static int ObjToAxisProc(ClientData clientData, Tcl_Interp* interp,
- Tk_Window tkwin, Tcl_Obj *objPtr,
- char *widgRec, int offset, int flags)
-{
- ClassId classId = (ClassId)clientData;
- Axis **axisPtrPtr = (Axis **)(widgRec + offset);
- Axis *axisPtr;
- Graph* graphPtr;
-
- if (flags & BLT_CONFIG_NULL_OK) {
- const char *string;
-
- string = Tcl_GetString(objPtr);
- if (string[0] == '\0') {
- ReleaseAxis(*axisPtrPtr);
- *axisPtrPtr = NULL;
- return TCL_OK;
- }
- }
- graphPtr = Blt_GetGraphFromWindowData(tkwin);
- if (GetAxisByClass(interp, graphPtr, objPtr, classId, &axisPtr)
- != TCL_OK) {
- return TCL_ERROR;
- }
- ReleaseAxis(*axisPtrPtr);
- *axisPtrPtr = axisPtr;
- return TCL_OK;
-}
-
-static Tcl_Obj *AxisToObjProc(ClientData clientData, Tcl_Interp* interp,
- Tk_Window tkwin, char *widgRec,
- int offset, int flags)
-{
- Axis* axisPtr = *(Axis **)(widgRec + offset);
- const char* name = axisPtr ? axisPtr->obj.name : "";
- return Tcl_NewStringObj(name, -1);
-}
-