summaryrefslogtreecommitdiffstats
path: root/src/bltGrLegd.C
diff options
context:
space:
mode:
authorjoye <joye>2014-03-03 20:04:47 (GMT)
committerjoye <joye>2014-03-03 20:04:47 (GMT)
commit46712b55900a85512f51c9e915fe2b32b9ce7ae5 (patch)
treea0c106059636d0d36bb9d50331e8a4c3d49337f9 /src/bltGrLegd.C
parent8a6d6847c88cdc585f7d77bb9ead010c45bd8283 (diff)
downloadblt-46712b55900a85512f51c9e915fe2b32b9ce7ae5.zip
blt-46712b55900a85512f51c9e915fe2b32b9ce7ae5.tar.gz
blt-46712b55900a85512f51c9e915fe2b32b9ce7ae5.tar.bz2
*** empty log message ***
Diffstat (limited to 'src/bltGrLegd.C')
-rw-r--r--src/bltGrLegd.C77
1 files changed, 34 insertions, 43 deletions
diff --git a/src/bltGrLegd.C b/src/bltGrLegd.C
index 8a60683..6566905 100644
--- a/src/bltGrLegd.C
+++ b/src/bltGrLegd.C
@@ -650,22 +650,8 @@ static void ConfigureLegend(Graph* graphPtr)
// Ops
-static Blt_OpSpec legendOps[];
-static int nLegendOps;
-
-int Blt_LegendOp(Graph* graphPtr, Tcl_Interp* interp,
- int objc, Tcl_Obj* const objv[])
-{
- GraphLegendProc *proc = Blt_GetOpFromObj(interp, nLegendOps, legendOps,
- BLT_OP_ARG2, objc, objv,0);
- if (proc == NULL)
- return TCL_ERROR;
-
- return (*proc) (graphPtr, interp, objc, objv);
-}
-
static int ActivateOp(Graph* graphPtr, Tcl_Interp* interp,
- int objc, Tcl_Obj *const *objv)
+ int objc, Tcl_Obj* const objv[])
{
Legend *legendPtr = graphPtr->legend;
unsigned int active, redraw;
@@ -745,7 +731,7 @@ static int ActivateOp(Graph* graphPtr, Tcl_Interp* interp,
}
static int BindOp(Graph* graphPtr, Tcl_Interp* interp,
- int objc, Tcl_Obj *const *objv)
+ int objc, Tcl_Obj* const objv[])
{
if (objc == 3) {
Tcl_HashEntry *hPtr;
@@ -769,7 +755,7 @@ static int BindOp(Graph* graphPtr, Tcl_Interp* interp,
}
static int CurselectionOp(Graph* graphPtr, Tcl_Interp* interp,
- int objc, Tcl_Obj *const *objv)
+ int objc, Tcl_Obj* const objv[])
{
Legend *legendPtr = graphPtr->legend;
Tcl_Obj *listObjPtr;
@@ -810,7 +796,7 @@ static int CurselectionOp(Graph* graphPtr, Tcl_Interp* interp,
}
static int FocusOp(Graph* graphPtr, Tcl_Interp* interp,
- int objc, Tcl_Obj *const *objv)
+ int objc, Tcl_Obj* const objv[])
{
Legend *legendPtr = graphPtr->legend;
@@ -837,7 +823,7 @@ static int FocusOp(Graph* graphPtr, Tcl_Interp* interp,
}
static int GetOp(Graph* graphPtr, Tcl_Interp* interp,
- int objc, Tcl_Obj *const *objv)
+ int objc, Tcl_Obj* const objv[])
{
Legend *legendPtr = graphPtr->legend;
@@ -854,24 +840,6 @@ static int GetOp(Graph* graphPtr, Tcl_Interp* interp,
return TCL_OK;
}
-static Blt_OpSpec selectionOps[];
-static int nSelectionOps;
-
-static int SelectionOp(Graph* graphPtr, Tcl_Interp* interp,
- int objc, Tcl_Obj *const *objv)
-{
- GraphLegendProc *proc;
- int result;
-
- proc = Blt_GetOpFromObj(interp, nSelectionOps, selectionOps, BLT_OP_ARG3,
- objc, objv, 0);
- if (proc == NULL) {
- return TCL_ERROR;
- }
- result = (*proc) (graphPtr, interp, objc, objv);
- return result;
-}
-
static Blt_OpSpec legendOps[] =
{
{"activate", 1, ActivateOp, 3, 0, "?pattern?...",},
@@ -886,10 +854,21 @@ static Blt_OpSpec legendOps[] =
};
static int nLegendOps = sizeof(legendOps) / sizeof(Blt_OpSpec);
+int Blt_LegendOp(Graph* graphPtr, Tcl_Interp* interp,
+ int objc, Tcl_Obj* const objv[])
+{
+ GraphLegendProc *proc = Blt_GetOpFromObj(interp, nLegendOps, legendOps,
+ BLT_OP_ARG2, objc, objv,0);
+ if (proc == NULL)
+ return TCL_ERROR;
+
+ return (*proc)(graphPtr, interp, objc, objv);
+}
+
// Selection Widget Ops
static int SelectionAnchorOp(Graph* graphPtr, Tcl_Interp* interp,
- int objc, Tcl_Obj *const *objv)
+ int objc, Tcl_Obj* const objv[])
{
Legend *legendPtr = graphPtr->legend;
Element* elemPtr;
@@ -909,7 +888,7 @@ static int SelectionAnchorOp(Graph* graphPtr, Tcl_Interp* interp,
}
static int SelectionClearallOp(Graph* graphPtr, Tcl_Interp* interp,
- int objc, Tcl_Obj *const *objv)
+ int objc, Tcl_Obj* const objv[])
{
Legend *legendPtr = graphPtr->legend;
@@ -918,7 +897,7 @@ static int SelectionClearallOp(Graph* graphPtr, Tcl_Interp* interp,
}
static int SelectionIncludesOp(Graph* graphPtr, Tcl_Interp* interp,
- int objc, Tcl_Obj *const *objv)
+ int objc, Tcl_Obj* const objv[])
{
Legend *legendPtr = graphPtr->legend;
Element* elemPtr;
@@ -933,7 +912,7 @@ static int SelectionIncludesOp(Graph* graphPtr, Tcl_Interp* interp,
}
static int SelectionMarkOp(Graph* graphPtr, Tcl_Interp* interp,
- int objc, Tcl_Obj *const *objv)
+ int objc, Tcl_Obj* const objv[])
{
Legend *legendPtr = graphPtr->legend;
Element* elemPtr;
@@ -976,7 +955,7 @@ static int SelectionMarkOp(Graph* graphPtr, Tcl_Interp* interp,
}
static int SelectionPresentOp(Graph* graphPtr, Tcl_Interp* interp,
- int objc, Tcl_Obj *const *objv)
+ int objc, Tcl_Obj* const objv[])
{
Legend *legendPtr = graphPtr->legend;
int bool;
@@ -987,7 +966,7 @@ static int SelectionPresentOp(Graph* graphPtr, Tcl_Interp* interp,
}
static int SelectionSetOp(Graph* graphPtr, Tcl_Interp* interp,
- int objc, Tcl_Obj *const *objv)
+ int objc, Tcl_Obj* const objv[])
{
Legend *legendPtr = graphPtr->legend;
Element *firstPtr, *lastPtr;
@@ -1059,6 +1038,18 @@ static Blt_OpSpec selectionOps[] =
};
static int nSelectionOps = sizeof(selectionOps) / sizeof(Blt_OpSpec);
+static int SelectionOp(Graph* graphPtr, Tcl_Interp* interp,
+ int objc, Tcl_Obj* const objv[])
+{
+ GraphLegendProc* proc = Blt_GetOpFromObj(interp, nSelectionOps,
+ selectionOps, BLT_OP_ARG3,
+ objc, objv, 0);
+ if (proc == NULL)
+ return TCL_ERROR;
+
+ return (*proc)(graphPtr, interp, objc, objv);
+}
+
// Support
static void DisplayLegend(ClientData clientData)