diff options
-rw-r--r-- | src/bltGrBind.C | 6 | ||||
-rw-r--r-- | src/bltGrLegd.C | 10 | ||||
-rw-r--r-- | src/bltGraph.C | 15 |
3 files changed, 15 insertions, 16 deletions
diff --git a/src/bltGrBind.C b/src/bltGrBind.C index 2d282a8..362bfe9 100644 --- a/src/bltGrBind.C +++ b/src/bltGrBind.C @@ -143,7 +143,7 @@ void BindTable::deleteBindings(ClientData object) #define REPICK_IN_PROGRESS (1<<0) #define LEFT_GRABBED_ITEM (1<<1) -const char** Blt_GraphTags(BindTable* table, ClientData object, ClientData context, int* num); +const char** BltGraphTags(BindTable* table, ClientData object, ClientData context, int* num); static void BltDoEvent(BindTable* bindPtr, XEvent* eventPtr, ClientData item, ClientData context) @@ -159,7 +159,7 @@ static void BltDoEvent(BindTable* bindPtr, XEvent* eventPtr, return; int nTags; - const char** tagArray = Blt_GraphTags(bindPtr, item, context, &nTags); + const char** tagArray = BltGraphTags(bindPtr, item, context, &nTags); Tk_BindEvent(bindPtr->bindingTable, eventPtr, bindPtr->tkwin, nTags, (void**)tagArray); @@ -307,7 +307,7 @@ static void PickCurrentItem(BindTable* bindPtr, XEvent* eventPtr) Tcl_Release(oldItem); } -static void BindProc(ClientData clientData, XEvent *eventPtr) +static void BindProc(ClientData clientData, XEvent* eventPtr) { // This code below keeps track of the current modifier state in // bindPtr->state. This information is used to defer repicks of the diff --git a/src/bltGrLegd.C b/src/bltGrLegd.C index 6d20be9..5a73838 100644 --- a/src/bltGrLegd.C +++ b/src/bltGrLegd.C @@ -47,7 +47,7 @@ using namespace Blt; static void SelectCmdProc(ClientData); static Tk_SelectionProc SelectionProc; -static Blt_BindPickProc PickEntryProc; +static Blt_BindPickProc LegendPickEntry; // OptionSpecs @@ -195,7 +195,7 @@ Legend::Legend(Graph* graphPtr) ops->titleStyle.justify =TK_JUSTIFY_LEFT; bindTable_ = new BindTable(graphPtr->interp_, graphPtr->tkwin_, - graphPtr, PickEntryProc); + graphPtr, LegendPickEntry); Tcl_InitHashTable(&selectTable_, TCL_ONE_WORD_KEYS); @@ -875,7 +875,7 @@ int Legend::getElementFromObj(Tcl_Obj* objPtr, Element** elemPtrPtr) return TCL_ERROR; ClientData classId; - elemPtr = (Element*)PickEntryProc(graphPtr_, x, y, &classId); + elemPtr = (Element*)LegendPickEntry(graphPtr_, x, y, &classId); } else { if (graphPtr_->getElement(objPtr, &elemPtr) != TCL_OK) @@ -1043,8 +1043,8 @@ static void SelectCmdProc(ClientData clientData) Tcl_Release(legendPtr); } -static ClientData PickEntryProc(ClientData clientData, int x, int y, - ClientData *contextPtr) +static ClientData LegendPickEntry(ClientData clientData, int x, int y, + ClientData *contextPtr) { Graph* graphPtr = (Graph*)clientData; Legend* legendPtr = graphPtr->legend_; diff --git a/src/bltGraph.C b/src/bltGraph.C index f18f0bb..e5b1620 100644 --- a/src/bltGraph.C +++ b/src/bltGraph.C @@ -55,7 +55,7 @@ using namespace Blt; extern int PostScriptPreamble(Graph* graphPtr, const char *fileName, Blt_Ps ps); -static Blt_BindPickProc PickEntry; +static Blt_BindPickProc GraphPickEntry; // OptionSpecs @@ -119,7 +119,7 @@ Graph::Graph(ClientData clientData, Tcl_Interp* interp, axes_.displayList = Blt_Chain_Create(); elements_.displayList = Blt_Chain_Create(); markers_.displayList = Blt_Chain_Create(); - bindTable_ = new BindTable(interp_, tkwin_, this, PickEntry); + bindTable_ = new BindTable(interp_, tkwin_, this, GraphPickEntry); if (createAxes() != TCL_OK) { valid_ =0; @@ -1260,8 +1260,8 @@ Axis* Graph::nearestAxis(int x, int y) return NULL; } -const char** Blt_GraphTags(BindTable* table, ClientData object, - ClientData context, int* num) +const char** BltGraphTags(BindTable* table, ClientData object, + ClientData context, int* num) { Graph* graphPtr = (Graph*)table->clientData; ClassId classId = (ClassId)(long(context)); @@ -1345,8 +1345,8 @@ const char** Blt_GraphTags(BindTable* table, ClientData object, // the display list from back to front. That way, if the points from // two different elements overlay each other exactly, the one that's on // top (visible) is picked. -static ClientData PickEntry(ClientData clientData, int x, int y, - ClientData* contextPtr) +static ClientData GraphPickEntry(ClientData clientData, int x, int y, + ClientData* contextPtr) { Graph* graphPtr = (Graph*)clientData; GraphOptions* ops = (GraphOptions*)graphPtr->ops_; @@ -1356,10 +1356,9 @@ static ClientData PickEntry(ClientData clientData, int x, int y, return NULL; } + // Sample coordinate is in one of the graph margins. Can only pick an axis. Region2d exts; graphPtr->extents(&exts); - - // Sample coordinate is in one of the graph margins. Can only pick an axis. if ((x >= exts.right) || (x < exts.left) || (y >= exts.bottom) || (y < exts.top)) { Axis* axisPtr = graphPtr->nearestAxis(x, y); |