diff options
-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 |