summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/bltGrAxisOp.C14
-rw-r--r--src/bltGrElem.C1
-rw-r--r--src/bltGrElem.h1
-rw-r--r--src/bltGrElemOp.C17
-rw-r--r--src/bltGrElemOption.C2
-rw-r--r--src/bltGrMisc.h9
-rw-r--r--src/bltGrPenOp.C2
-rw-r--r--src/bltGrXAxisOp.C2
-rw-r--r--src/bltGraph.C33
-rw-r--r--src/bltGraphBar.C2
-rw-r--r--src/bltGraphLine.C2
-rw-r--r--src/bltGraphOp.C8
12 files changed, 41 insertions, 52 deletions
diff --git a/src/bltGrAxisOp.C b/src/bltGrAxisOp.C
index 9345a50..c5fb792 100644
--- a/src/bltGrAxisOp.C
+++ b/src/bltGrAxisOp.C
@@ -79,7 +79,7 @@ int AxisObjConfigure(Axis* axisPtr, Tcl_Interp* interp,
if (axisPtr->configure() != TCL_OK)
return TCL_ERROR;
- graphPtr->flags |= RESET_AXES;
+ graphPtr->flags |= RESET;
graphPtr->eventuallyRedraw();
break;
@@ -186,7 +186,7 @@ static int DeleteOp(ClientData clientData, Tcl_Interp* interp,
if (axisPtr->refCount_ == 0)
delete axisPtr;
- graphPtr->flags |= RESET_AXES;
+ graphPtr->flags |= RESET;
graphPtr->eventuallyRedraw();
return TCL_OK;
@@ -513,7 +513,7 @@ int AxisActivateOp(Axis* axisPtr, Tcl_Interp* interp,
axisPtr->active_ = (string[0] == 'a') ? 1 : 0;
if (!ops->hide && axisPtr->use_) {
- graphPtr->flags |= RESET_AXES;
+ graphPtr->flags |= RESET;
graphPtr->eventuallyRedraw();
}
@@ -525,7 +525,7 @@ int AxisInvTransformOp(Axis* axisPtr, Tcl_Interp* interp,
{
Graph* graphPtr = axisPtr->graphPtr_;
- if (graphPtr->flags & RESET_AXES)
+ if (graphPtr->flags & RESET)
graphPtr->resetAxes();
int sy;
@@ -549,7 +549,7 @@ int AxisLimitsOp(Axis* axisPtr, Tcl_Interp* interp,
AxisOptions* ops = (AxisOptions*)axisPtr->ops();
Graph* graphPtr = axisPtr->graphPtr_;
- if (graphPtr->flags & RESET_AXES)
+ if (graphPtr->flags & RESET)
graphPtr->resetAxes();
double min, max;
@@ -586,7 +586,7 @@ int AxisTransformOp(Axis* axisPtr, Tcl_Interp* interp,
{
Graph* graphPtr = axisPtr->graphPtr_;
- if (graphPtr->flags & RESET_AXES)
+ if (graphPtr->flags & RESET)
graphPtr->resetAxes();
double x;
@@ -689,7 +689,7 @@ int AxisViewOp(Axis* axisPtr, Tcl_Interp* interp,
ops->reqMax = EXP10(ops->reqMax);
}
- graphPtr->flags |= RESET_AXES;
+ graphPtr->flags |= RESET;
graphPtr->eventuallyRedraw();
return TCL_OK;
diff --git a/src/bltGrElem.C b/src/bltGrElem.C
index b38911f..9f96185 100644
--- a/src/bltGrElem.C
+++ b/src/bltGrElem.C
@@ -53,7 +53,6 @@ Element::Element(Graph* graphPtr, const char* name, Tcl_HashEntry* hPtr)
active_ =0;
labelActive_ =0;
- flags =0;
link =NULL;
}
diff --git a/src/bltGrElem.h b/src/bltGrElem.h
index 309cf59..bcdba31 100644
--- a/src/bltGrElem.h
+++ b/src/bltGrElem.h
@@ -135,7 +135,6 @@ class Element {
int active_;
int labelActive_;
- unsigned int flags;
Blt_ChainLink link;
protected:
diff --git a/src/bltGrElemOp.C b/src/bltGrElemOp.C
index 3384146..7a5959c 100644
--- a/src/bltGrElemOp.C
+++ b/src/bltGrElemOp.C
@@ -67,11 +67,10 @@ int ElementObjConfigure( Element* elemPtr, Tcl_Interp* interp,
Tk_RestoreSavedOptions(&savedOptions);
}
- elemPtr->flags |= MAP_ITEM;
if (elemPtr->configure() != TCL_OK)
return TCL_ERROR;
- graphPtr->flags |= RESET_AXES;
+ graphPtr->flags |= RESET;
graphPtr->eventuallyRedraw();
break;
@@ -184,7 +183,7 @@ static int ActivateOp(ClientData clientData, Tcl_Interp* interp,
elemPtr->active_ = 1;
- graphPtr->flags |= RESET_AXES;
+ graphPtr->flags |= RESET;
graphPtr->eventuallyRedraw();
return TCL_OK;
@@ -220,7 +219,7 @@ static int ClosestOp(ClientData clientData, Tcl_Interp* interp,
GraphOptions* gops = (GraphOptions*)graphPtr->ops_;
ClosestSearch* searchPtr = &gops->search;
- if (graphPtr->flags & RESET_AXES)
+ if (graphPtr->flags & RESET)
graphPtr->resetAxes();
int x;
@@ -314,7 +313,7 @@ static int DeactivateOp(ClientData clientData, Tcl_Interp* interp,
elemPtr->active_ = 0;
}
- graphPtr->flags |= RESET_AXES;
+ graphPtr->flags |= RESET;
graphPtr->eventuallyRedraw();
return TCL_OK;
@@ -331,7 +330,7 @@ static int DeleteOp(ClientData clientData, Tcl_Interp* interp,
graphPtr->destroyElement(elemPtr);
}
- graphPtr->flags |= RESET_AXES;
+ graphPtr->flags |= RESET;
graphPtr->eventuallyRedraw();
return TCL_OK;
@@ -393,7 +392,7 @@ static int LowerOp(ClientData clientData, Tcl_Interp* interp,
}
Blt_Chain_Destroy(chain);
- graphPtr->flags |= RESET_AXES;
+ graphPtr->flags |= RESET;
graphPtr->eventuallyRedraw();
Tcl_SetObjResult(interp, DisplayListObj(graphPtr));
@@ -458,7 +457,7 @@ static int RaiseOp(ClientData clientData, Tcl_Interp* interp,
}
Blt_Chain_Destroy(chain);
- graphPtr->flags |= RESET_AXES;
+ graphPtr->flags |= RESET;
graphPtr->eventuallyRedraw();
Tcl_SetObjResult(interp, DisplayListObj(graphPtr));
@@ -505,7 +504,7 @@ static int ShowOp(ClientData clientData, Tcl_Interp* interp,
elemPtr->link = link;
}
- graphPtr->flags |= RESET_AXES;
+ graphPtr->flags |= RESET;
graphPtr->eventuallyRedraw();
Tcl_SetObjResult(interp, DisplayListObj(graphPtr));
diff --git a/src/bltGrElemOption.C b/src/bltGrElemOption.C
index 6cf4f26..c098965 100644
--- a/src/bltGrElemOption.C
+++ b/src/bltGrElemOption.C
@@ -441,7 +441,7 @@ static void VectorChangedProc(Tcl_Interp* interp, ClientData clientData,
Element* elemPtr = valuesPtr->elemPtr;
Graph* graphPtr = elemPtr->graphPtr_;
- graphPtr->flags |= RESET_AXES;
+ graphPtr->flags |= RESET;
graphPtr->eventuallyRedraw();
}
diff --git a/src/bltGrMisc.h b/src/bltGrMisc.h
index ba83d0d..dfe1ef4 100644
--- a/src/bltGrMisc.h
+++ b/src/bltGrMisc.h
@@ -43,12 +43,11 @@ using namespace std;
#define MAP_ITEM (1<<4)
-#define RESET_AXES (1<<5)
+#define RESET (1<<5)
#define LAYOUT (1<<6)
-#define MAP_AXES (1<<7)
-#define MAP_ELEMENTS (1<<8)
-#define MAP_MARKERS (1<<9)
-#define CACHE_DIRTY (1<<10)
+#define MAP (1<<7)
+#define MAP_MARKERS (1<<8)
+#define CACHE_DIRTY (1<<9)
#define MARGIN_NONE -1
#define MARGIN_BOTTOM 0 /* x */
diff --git a/src/bltGrPenOp.C b/src/bltGrPenOp.C
index e9c949e..9d156e9 100644
--- a/src/bltGrPenOp.C
+++ b/src/bltGrPenOp.C
@@ -59,7 +59,7 @@ int PenObjConfigure(Graph* graphPtr, Pen* penPtr,
if (penPtr->configure() != TCL_OK)
return TCL_ERROR;
- graphPtr->flags |= RESET_AXES;
+ graphPtr->flags |= RESET;
graphPtr->eventuallyRedraw();
break;
diff --git a/src/bltGrXAxisOp.C b/src/bltGrXAxisOp.C
index 78a6cb8..c6529c4 100644
--- a/src/bltGrXAxisOp.C
+++ b/src/bltGrXAxisOp.C
@@ -193,7 +193,7 @@ static int UseOp(ClientData clientData, Tcl_Interp* interp,
axisPtr->use_ =1;
}
- graphPtr->flags |= RESET_AXES;
+ graphPtr->flags |= RESET;
graphPtr->eventuallyRedraw();
return TCL_OK;
diff --git a/src/bltGraph.C b/src/bltGraph.C
index da918aa..601d72e 100644
--- a/src/bltGraph.C
+++ b/src/bltGraph.C
@@ -82,7 +82,7 @@ Graph::Graph(ClientData clientData, Tcl_Interp* interp,
GraphInstCmdProc, this,
GraphInstCmdDeleteProc);
- flags = RESET_AXES;
+ flags = RESET;
nextMarkerId_ = 1;
legend_ = new Legend(this);
@@ -219,10 +219,10 @@ int Graph::configure()
void Graph::map()
{
- if (flags & RESET_AXES) {
- cerr << "RESET_AXES" << endl;
+ if (flags & RESET) {
+ cerr << "RESET" << endl;
resetAxes();
- flags &= ~RESET_AXES;
+ flags &= ~RESET;
flags |= (LAYOUT | CACHE_DIRTY);
}
@@ -230,17 +230,17 @@ void Graph::map()
cerr << "LAYOUT" << endl;
layoutGraph();
flags &= ~LAYOUT;
- flags |= (MAP_AXES | MAP_ELEMENTS | MAP_MARKERS | CACHE_DIRTY);
+ flags |= (MAP | MAP_MARKERS | CACHE_DIRTY);
}
- if (flags & MAP_AXES) {
- cerr << "MAP_AXES" << endl;
+ if (flags & MAP) {
+ cerr << "MAP" << endl;
mapAxes();
- flags &= ~MAP_AXES;
+ mapElements();
+ flags &= ~MAP;
flags |= CACHE_DIRTY;
}
- mapElements();
mapMarkers();
}
@@ -384,7 +384,7 @@ int Graph::print(const char *ident, Blt_Ps ps)
height_ = Tk_ReqHeight(tkwin_);
Blt_Ps_ComputeBoundingBox(setupPtr, width_, height_);
- flags |= RESET_AXES;
+ flags |= RESET;
/* Turn on PostScript measurements when computing the graph's layout. */
Blt_Ps_SetPrinting(ps, 1);
@@ -468,7 +468,7 @@ int Graph::print(const char *ident, Blt_Ps ps)
// Redraw the graph in order to re-calculate the layout as soon as
// possible. This is in the case the crosshairs are active.
- flags |= RESET_AXES;
+ flags |= RESET;
eventuallyRedraw();
return result;
@@ -700,15 +700,8 @@ void Graph::mapElements()
for (Blt_ChainLink link =Blt_Chain_FirstLink(elements_.displayList);
link; link = Blt_Chain_NextLink(link)) {
Element* elemPtr = (Element*)Blt_Chain_GetValue(link);
-
- if ((flags & MAP_ELEMENTS) || (elemPtr->flags & MAP_ITEM)) {
- cerr << "MAP_ELEMENTS" << endl;
- elemPtr->map();
- elemPtr->flags &= ~MAP_ITEM;
- }
+ elemPtr->map();
}
-
- flags &= ~MAP_ELEMENTS;
}
void Graph::drawElements(Drawable drawable)
@@ -1350,7 +1343,7 @@ static ClientData PickEntry(ClientData clientData, int x, int y,
Graph* graphPtr = (Graph*)clientData;
GraphOptions* ops = (GraphOptions*)graphPtr->ops_;
- if (graphPtr->flags & (MAP_AXES | MAP_ELEMENTS | MAP_MARKERS)) {
+ if (graphPtr->flags & (MAP | MAP_MARKERS)) {
*contextPtr = (ClientData)NULL;
return NULL;
}
diff --git a/src/bltGraphBar.C b/src/bltGraphBar.C
index 5f66f43..6f40b14 100644
--- a/src/bltGraphBar.C
+++ b/src/bltGraphBar.C
@@ -239,7 +239,7 @@ int BarGraph::createPen(const char* penName, int objc, Tcl_Obj* const objv[])
return TCL_ERROR;
}
- flags |= RESET_AXES;
+ flags |= RESET;
eventuallyRedraw();
return TCL_OK;
diff --git a/src/bltGraphLine.C b/src/bltGraphLine.C
index 2c73e79..bae3b5f 100644
--- a/src/bltGraphLine.C
+++ b/src/bltGraphLine.C
@@ -201,7 +201,7 @@ int LineGraph::createPen(const char* penName, int objc, Tcl_Obj* const objv[])
return TCL_ERROR;
}
- flags |= RESET_AXES;
+ flags |= RESET;
eventuallyRedraw();
return TCL_OK;
diff --git a/src/bltGraphOp.C b/src/bltGraphOp.C
index 0089f48..7c7d700 100644
--- a/src/bltGraphOp.C
+++ b/src/bltGraphOp.C
@@ -89,7 +89,7 @@ int GraphObjConfigure(Graph* graphPtr, Tcl_Interp* interp,
if (graphPtr->configure() != TCL_OK)
return TCL_ERROR;
- graphPtr->flags |= RESET_AXES;
+ graphPtr->flags |= RESET;
graphPtr->eventuallyRedraw();
break;
@@ -264,7 +264,7 @@ static int InvtransformOp(ClientData clientData, Tcl_Interp* interp, int objc,
(Tcl_GetDoubleFromObj(interp, objv[3], &y) != TCL_OK))
return TCL_ERROR;
- if (graphPtr->flags & RESET_AXES)
+ if (graphPtr->flags & RESET)
graphPtr->resetAxes();
// Perform the reverse transformation, converting from window coordinates
@@ -291,7 +291,7 @@ static int TransformOp(ClientData clientData, Tcl_Interp* interp, int objc,
(Tcl_GetDoubleFromObj(interp, objv[3], &y) != TCL_OK))
return TCL_ERROR;
- if (graphPtr->flags & RESET_AXES)
+ if (graphPtr->flags & RESET)
graphPtr->resetAxes();
// Perform the transformation from window to graph coordinates. Note that
@@ -446,7 +446,7 @@ void GraphEventProc(ClientData clientData, XEvent* eventPtr)
}
}
else if (eventPtr->type == ConfigureNotify) {
- graphPtr->flags |= RESET_AXES;
+ graphPtr->flags |= RESET;
graphPtr->eventuallyRedraw();
}
}