summaryrefslogtreecommitdiffstats
path: root/src/bltGrLegdOp.C
diff options
context:
space:
mode:
authorjoye <joye>2014-04-09 18:06:49 (GMT)
committerjoye <joye>2014-04-09 18:06:49 (GMT)
commit4013a25fbbd042d11b8933e50c30c8db5491e8b0 (patch)
tree48ae1029ec2ded82d0a778e94f9088755891279e /src/bltGrLegdOp.C
parentdd2b1a1cdee24d6d0f61f1c6afa992b98b43c9f7 (diff)
downloadblt-4013a25fbbd042d11b8933e50c30c8db5491e8b0.zip
blt-4013a25fbbd042d11b8933e50c30c8db5491e8b0.tar.gz
blt-4013a25fbbd042d11b8933e50c30c8db5491e8b0.tar.bz2
*** empty log message ***
Diffstat (limited to 'src/bltGrLegdOp.C')
-rw-r--r--src/bltGrLegdOp.C22
1 files changed, 9 insertions, 13 deletions
diff --git a/src/bltGrLegdOp.C b/src/bltGrLegdOp.C
index 54b01ed..8a6d97e 100644
--- a/src/bltGrLegdOp.C
+++ b/src/bltGrLegdOp.C
@@ -35,10 +35,6 @@ extern "C" {
#include "bltGrLegd.h"
#include "bltGrElem.h"
-extern int GetElementFromObj(Graph* graphPtr, Tcl_Obj *objPtr,
- Element **elemPtrPtr);
-extern int SelectRange(Legend* legendPtr, Element *fromPtr, Element *toPtr);
-
static void SelectCmdProc(ClientData clientData);
static void EventuallyInvokeSelectCmd(Legend* legendPtr);
static int SelectionOp(Graph* graphPtr, Tcl_Interp* interp,
@@ -270,7 +266,7 @@ static int FocusOp(Graph* graphPtr, Tcl_Interp* interp,
if (objc == 4) {
Element* elemPtr;
- if (GetElementFromObj(graphPtr, objv[3], &elemPtr) != TCL_OK)
+ if (legendPtr->getElementFromObj(objv[3], &elemPtr) != TCL_OK)
return TCL_ERROR;
if ((elemPtr != NULL) && (elemPtr != legendPtr->focusPtr_)) {
@@ -298,7 +294,7 @@ static int GetOp(Graph* graphPtr, Tcl_Interp* interp,
if (((ops->hide) == 0) && (legendPtr->nEntries_ > 0)) {
Element* elemPtr;
- if (GetElementFromObj(graphPtr, objv[3], &elemPtr) != TCL_OK)
+ if (legendPtr->getElementFromObj(objv[3], &elemPtr) != TCL_OK)
return TCL_ERROR;
if (elemPtr)
@@ -339,7 +335,7 @@ static int SelectionAnchorOp(Graph* graphPtr, Tcl_Interp* interp,
Legend* legendPtr = graphPtr->legend;
Element* elemPtr;
- if (GetElementFromObj(graphPtr, objv[4], &elemPtr) != TCL_OK)
+ if (legendPtr->getElementFromObj(objv[4], &elemPtr) != TCL_OK)
return TCL_ERROR;
// Set both the anchor and the mark. Indicates that a single entry
@@ -368,7 +364,7 @@ static int SelectionIncludesOp(Graph* graphPtr, Tcl_Interp* interp,
{
Legend* legendPtr = graphPtr->legend;
Element* elemPtr;
- if (GetElementFromObj(graphPtr, objv[4], &elemPtr) != TCL_OK)
+ if (legendPtr->getElementFromObj(objv[4], &elemPtr) != TCL_OK)
return TCL_ERROR;
int boo = legendPtr->entryIsSelected(elemPtr);
@@ -383,7 +379,7 @@ static int SelectionMarkOp(Graph* graphPtr, Tcl_Interp* interp,
LegendOptions* ops = (LegendOptions*)legendPtr->ops_;
Element* elemPtr;
- if (GetElementFromObj(graphPtr, objv[4], &elemPtr) != TCL_OK)
+ if (legendPtr->getElementFromObj(objv[4], &elemPtr) != TCL_OK)
return TCL_ERROR;
if (legendPtr->selAnchorPtr_ == NULL) {
@@ -406,7 +402,7 @@ static int SelectionMarkOp(Graph* graphPtr, Tcl_Interp* interp,
legendPtr->flags &= ~SELECT_TOGGLE;
legendPtr->flags |= SELECT_SET;
- SelectRange(legendPtr, legendPtr->selAnchorPtr_, elemPtr);
+ legendPtr->selectRange(legendPtr->selAnchorPtr_, elemPtr);
Tcl_SetStringObj(Tcl_GetObjResult(interp), elemPtr->name(), -1);
legendPtr->selMarkPtr_ = elemPtr;
@@ -448,7 +444,7 @@ static int SelectionSetOp(Graph* graphPtr, Tcl_Interp* interp,
}
Element *firstPtr;
- if (GetElementFromObj(graphPtr, objv[4], &firstPtr) != TCL_OK)
+ if (legendPtr->getElementFromObj(objv[4], &firstPtr) != TCL_OK)
return TCL_ERROR;
if ((firstPtr->hide()) && ((legendPtr->flags & SELECT_CLEAR)==0)) {
@@ -459,7 +455,7 @@ static int SelectionSetOp(Graph* graphPtr, Tcl_Interp* interp,
Element* lastPtr = firstPtr;
if (objc > 5) {
- if (GetElementFromObj(graphPtr, objv[5], &lastPtr) != TCL_OK)
+ if (legendPtr->getElementFromObj(objv[5], &lastPtr) != TCL_OK)
return TCL_ERROR;
if (lastPtr->hide() && ((legendPtr->flags & SELECT_CLEAR) == 0)) {
@@ -472,7 +468,7 @@ static int SelectionSetOp(Graph* graphPtr, Tcl_Interp* interp,
if (firstPtr == lastPtr)
legendPtr->selectEntry(firstPtr);
else
- SelectRange(legendPtr, firstPtr, lastPtr);
+ legendPtr->selectRange(firstPtr, lastPtr);
// Set both the anchor and the mark. Indicates that a single entry is
// selected