diff options
author | joye <joye> | 2014-06-04 17:30:54 (GMT) |
---|---|---|
committer | joye <joye> | 2014-06-04 17:30:54 (GMT) |
commit | 6b0d697c9848b65a016ebfb12abd1cdb50aa7927 (patch) | |
tree | f50b118be4b0ffc55fb376600723258e39715ac9 | |
parent | 32cb8bf3e3c83fc994d5ef93a897951411d3638b (diff) | |
download | blt-6b0d697c9848b65a016ebfb12abd1cdb50aa7927.zip blt-6b0d697c9848b65a016ebfb12abd1cdb50aa7927.tar.gz blt-6b0d697c9848b65a016ebfb12abd1cdb50aa7927.tar.bz2 |
*** empty log message ***
-rw-r--r-- | src/bltGrBind.h | 2 | ||||
-rw-r--r-- | src/bltGrLegd.C | 2 | ||||
-rw-r--r-- | src/bltGrLegdOp.C | 2 | ||||
-rw-r--r-- | tests/legend.tcl | 10 |
4 files changed, 15 insertions, 1 deletions
diff --git a/src/bltGrBind.h b/src/bltGrBind.h index 78d5014..305cf34 100644 --- a/src/bltGrBind.h +++ b/src/bltGrBind.h @@ -63,6 +63,8 @@ class BindTable { void deleteBindings(ClientData object); void doEvent(XEvent*); void pickItem(XEvent*); + + ClientData currentItem() {return currentItem_;} }; diff --git a/src/bltGrLegd.C b/src/bltGrLegd.C index e8ea6fe..73ec682 100644 --- a/src/bltGrLegd.C +++ b/src/bltGrLegd.C @@ -848,6 +848,8 @@ int Legend::getElementFromObj(Tcl_Obj* objPtr, Element** elemPtrPtr) if (!strcmp(string, "anchor")) elemPtr = selAnchorPtr_; + else if (!strcmp(string, "current")) + elemPtr = (Element*)bindTable_->currentItem(); else if (!strcmp(string, "first")) elemPtr = getFirstElement(); else if (!strcmp(string, "focus")) diff --git a/src/bltGrLegdOp.C b/src/bltGrLegdOp.C index 96125ba..6a4d8de 100644 --- a/src/bltGrLegdOp.C +++ b/src/bltGrLegdOp.C @@ -275,7 +275,7 @@ static int GetOp(ClientData clientData, Tcl_Interp* interp, return TCL_ERROR; if (elemPtr) - Tcl_SetStringObj(Tcl_GetObjResult(interp), elemPtr->name_,-1); + Tcl_SetStringObj(Tcl_GetObjResult(interp), elemPtr->name_, -1); } return TCL_OK; } diff --git a/tests/legend.tcl b/tests/legend.tcl index 0a55cfa..5c775eb 100644 --- a/tests/legend.tcl +++ b/tests/legend.tcl @@ -63,6 +63,16 @@ bltCmd $graph legend configure -fg #bltCmd $graph legend deactivate bltCmd $graph legend focus data1 bltCmd $graph legend focus +#bltCmd $graph legend get anchor +#bltCmd $graph legend get current +#bltCmd $graph legend get first +#bltCmd $graph legend get last +#bltCmd $graph legend get end +#bltCmd $graph legend get next.row +#bltCmd $graph legend get next.column +#bltCmd $graph legend get previous.row +#bltCmd $graph legend get previous.column +#bltCmd $graph legend get @100,100 #bltCmd $graph legend get data1 bltCmd $graph legend selection anchor data1 bltCmd $graph legend selection mark data1 |