From 2823c7b2d44cef9da30d5175f02a09a960038b10 Mon Sep 17 00:00:00 2001 From: joye Date: Fri, 23 May 2014 16:21:47 +0000 Subject: *** empty log message *** --- src/bltGrAxis.C | 1 - src/bltGrAxis.h | 1 - src/bltGrMarkerOp.C | 20 -------------------- src/bltGraph.C | 15 +++------------ src/bltGraph.h | 1 - tests/axis.tcl | 1 - tests/barelement.tcl | 1 - tests/lineelement.tcl | 1 - tests/marker.tcl | 1 - 9 files changed, 3 insertions(+), 39 deletions(-) diff --git a/src/bltGrAxis.C b/src/bltGrAxis.C index 9aa4e3d..fcbd708 100644 --- a/src/bltGrAxis.C +++ b/src/bltGrAxis.C @@ -201,7 +201,6 @@ Axis::Axis(Graph* graphPtr, const char* name, int margin, Tcl_HashEntry* hPtr) link =NULL; chain =NULL; - detail_ =NULL; titlePos_.x =0; titlePos_.y =0; titleWidth_ =0; diff --git a/src/bltGrAxis.h b/src/bltGrAxis.h index ad90e37..6cdd20c 100644 --- a/src/bltGrAxis.h +++ b/src/bltGrAxis.h @@ -168,7 +168,6 @@ class Axis { Blt_ChainLink link; Blt_Chain chain; - const char *detail_; Point2d titlePos_; unsigned short int titleWidth_; unsigned short int titleHeight_; diff --git a/src/bltGrMarkerOp.C b/src/bltGrMarkerOp.C index dbc08b1..88bd8a9 100644 --- a/src/bltGrMarkerOp.C +++ b/src/bltGrMarkerOp.C @@ -348,25 +348,6 @@ static int FindOp(ClientData clientData, Tcl_Interp* interp, return TCL_OK; } -static int GetOp(ClientData clientData, Tcl_Interp* interp, - int objc, Tcl_Obj* const objv[]) -{ - Graph* graphPtr = (Graph*)clientData; - if (objc<4) - return TCL_ERROR; - - const char* string = Tcl_GetString(objv[3]); - if (!strcmp(string, "current")) { - Marker* markerPtr = (Marker*)Blt_GetCurrentItem(graphPtr->bindTable_); - - if (markerPtr == NULL) - return TCL_OK; - - Tcl_SetStringObj(Tcl_GetObjResult(interp), markerPtr->name_, -1); - } - return TCL_OK; -} - static int NamesOp(ClientData clientData, Tcl_Interp* interp, int objc, Tcl_Obj* const objv[]) { @@ -455,7 +436,6 @@ const Ensemble markerEnsemble[] = { {"delete", DeleteOp, 0}, {"exists", ExistsOp, 0}, {"find", FindOp, 0}, - {"get", GetOp, 0}, {"lower", RelinkOp, 0}, {"names", NamesOp, 0}, {"raise", RelinkOp, 0}, diff --git a/src/bltGraph.C b/src/bltGraph.C index 570bbd7..fd237b6 100644 --- a/src/bltGraph.C +++ b/src/bltGraph.C @@ -653,20 +653,14 @@ int Graph::getPen(Tcl_Obj* objPtr, Pen** penPtrPtr) // Elements -void Graph::destroyElement(Element* elemPtr) -{ - legend_->removeElement(elemPtr); - - delete elemPtr; -} - void Graph::destroyElements() { Tcl_HashSearch iter; for (Tcl_HashEntry* hPtr=Tcl_FirstHashEntry(&elements_.table, &iter); hPtr; hPtr = Tcl_NextHashEntry(&iter)) { Element* elemPtr = (Element*)Tcl_GetHashValue(hPtr); - destroyElement(elemPtr); + legend_->removeElement(elemPtr); + delete elemPtr; } Tcl_DeleteHashTable(&elements_.table); @@ -1237,7 +1231,6 @@ Axis* Graph::nearestAxis(int x, int y) bbox[4] = bbox[0]; if (Blt_PointInPolygon(&t, bbox, 5)) { - axisPtr->detail_ = "label"; return axisPtr; } } @@ -1258,14 +1251,12 @@ Axis* Graph::nearestAxis(int x, int y) bbox[4] = bbox[0]; if (Blt_PointInPolygon(&t, bbox, 5)) { - axisPtr->detail_ = "title"; return axisPtr; } } if (ops->lineWidth > 0) { if ((x <= axisPtr->right_) && (x >= axisPtr->left_) && (y <= axisPtr->bottom_) && (y >= axisPtr->top_)) { - axisPtr->detail_ = "line"; return axisPtr; } } @@ -1277,7 +1268,7 @@ Axis* Graph::nearestAxis(int x, int y) void Blt_GraphTags(Blt_BindTable table, ClientData object, ClientData context, Blt_List list) { - Graph* graphPtr = (Graph*)Blt_GetBindingData(table); + Graph* graphPtr = (Graph*)table->clientData; ClassId classId = (ClassId)(long(context)); switch (classId) { diff --git a/src/bltGraph.h b/src/bltGraph.h index d3889bc..12c452f 100644 --- a/src/bltGraph.h +++ b/src/bltGraph.h @@ -237,7 +237,6 @@ class Graph { int isElementHidden(Blt::Marker*); virtual int createElement(int, Tcl_Obj* const []) =0; - void destroyElement(Element*); int getElement(Tcl_Obj*, Element**); ClientData elementTag(const char*); diff --git a/tests/axis.tcl b/tests/axis.tcl index 0c2176f..f26ed05 100644 --- a/tests/axis.tcl +++ b/tests/axis.tcl @@ -75,7 +75,6 @@ bltCmd $graph axis configure x -color #bltCmd $graph axis deactivate foo #bltCmd $graph axis delete foo #bltCmd $graph axis focus x -#bltCmd $graph axis get x #bltCmd $graph axis invtransform x #bltCmd $graph axis limits x #bltCmd $graph axis margin x diff --git a/tests/barelement.tcl b/tests/barelement.tcl index 94c0da5..5574432 100644 --- a/tests/barelement.tcl +++ b/tests/barelement.tcl @@ -70,7 +70,6 @@ bltCmd $graph element create data4 bltCmd $graph element create data5 bltCmd $graph element delete data4 data5 bltCmd $graph element exists data1 -#bltCmd $graph element get bltCmd $graph element lower data1 bltCmd $graph element lower data2 data3 bltCmd $graph element names diff --git a/tests/lineelement.tcl b/tests/lineelement.tcl index ebf858c..b4200f4 100644 --- a/tests/lineelement.tcl +++ b/tests/lineelement.tcl @@ -83,7 +83,6 @@ bltCmd $graph element create data4 bltCmd $graph element create data5 bltCmd $graph element delete data4 data5 bltCmd $graph element exists data1 -#bltCmd $graph element get bltCmd $graph element lower data1 bltCmd $graph element lower data2 data3 bltCmd $graph element names diff --git a/tests/marker.tcl b/tests/marker.tcl index 2a9e702..cca9629 100644 --- a/tests/marker.tcl +++ b/tests/marker.tcl @@ -22,7 +22,6 @@ set foo [$graph marker create line foo] bltCmd $graph marker delete $foo bltCmd $graph marker exists $mm bltCmd $graph marker find enclosed 0 0 2 200 -bltCmd $graph marker get name current bltCmd $graph marker lower $mm bltCmd $graph marker lower $mm $nn bltCmd $graph marker names -- cgit v0.12