summaryrefslogtreecommitdiffstats
path: root/src/bltGraph.C
diff options
context:
space:
mode:
authorjoye <joye>2014-04-16 19:33:46 (GMT)
committerjoye <joye>2014-04-16 19:33:46 (GMT)
commit67f584c7ce5046ef221344903ce32bca5dec2bf4 (patch)
tree61dac6d9e0e823200271e8af60163fea1ca420d1 /src/bltGraph.C
parent8de9835650ca47d192f7976c4d02105fe15aeff7 (diff)
downloadblt-67f584c7ce5046ef221344903ce32bca5dec2bf4.zip
blt-67f584c7ce5046ef221344903ce32bca5dec2bf4.tar.gz
blt-67f584c7ce5046ef221344903ce32bca5dec2bf4.tar.bz2
*** empty log message ***
Diffstat (limited to 'src/bltGraph.C')
-rw-r--r--src/bltGraph.C43
1 files changed, 20 insertions, 23 deletions
diff --git a/src/bltGraph.C b/src/bltGraph.C
index db16f6b..67ebac6 100644
--- a/src/bltGraph.C
+++ b/src/bltGraph.C
@@ -61,7 +61,6 @@ extern void Blt_LayoutGraph(Graph* graphPtr);
static Blt_BindPickProc PickEntry;
static void AdjustAxisPointers(Graph* graphPtr);
-static void UpdateMarginTraces(Graph* graphPtr);
// OptionSpecs
@@ -328,7 +327,7 @@ Graph::~Graph()
GraphOptions* ops = (GraphOptions*)ops_;
Blt::DestroyMarkers(this);
- Blt_DestroyElements(this); // must come before legend and others
+ destroyElements(); // must come before legend and others
if (crosshairs_)
delete crosshairs_;
@@ -507,7 +506,7 @@ void Graph::display()
flags &= ~MAP_WORLD;
flags &= ~REDRAW_WORLD;
- UpdateMarginTraces(this);
+ updateMarginTraces();
}
void Graph::map()
@@ -524,7 +523,7 @@ void Graph::map()
if (flags & MAP_WORLD)
Blt_MapAxes(this);
- Blt_MapElements(this);
+ mapElements();
Blt::MapMarkers(this);
flags &= ~(MAP_ALL);
}
@@ -560,7 +559,7 @@ void Graph::drawPlot(Drawable drawable)
}
Blt_DrawAxisLimits(this, drawable);
- Blt_DrawElements(this, drawable);
+ drawElements(drawable);
}
/*
@@ -711,40 +710,38 @@ void Graph::extents(Region2d* regionPtr)
regionPtr->bottom = (double)(vOffset_ + vRange_ + ops->yPad);
}
-// Support
-
-static void UpdateMarginTraces(Graph* graphPtr)
+void Graph::updateMarginTraces()
{
- GraphOptions* ops = (GraphOptions*)graphPtr->ops_;
+ GraphOptions* ops = (GraphOptions*)ops_;
+
Margin* marginPtr;
Margin* endPtr;
-
for (marginPtr = ops->margins, endPtr = marginPtr + 4;
marginPtr < endPtr; marginPtr++) {
- if (marginPtr->varName != NULL) { /* Trigger variable traces */
+ if (marginPtr->varName) {
int size;
-
- if ((marginPtr->site == MARGIN_LEFT) ||
- (marginPtr->site == MARGIN_RIGHT)) {
+ if ((marginPtr->site == MARGIN_LEFT) || (marginPtr->site == MARGIN_RIGHT))
size = marginPtr->width;
- } else {
+ else
size = marginPtr->height;
- }
- Tcl_SetVar(graphPtr->interp_, marginPtr->varName, Blt_Itoa(size),
+
+ Tcl_SetVar(interp_, marginPtr->varName, Blt_Itoa(size),
TCL_GLOBAL_ONLY);
}
}
}
-void Blt_ReconfigureGraph(Graph* graphPtr)
+void Graph::reconfigure()
{
- graphPtr->configure();
- graphPtr->legend_->configure();
- // Blt_ConfigureElements(graphPtr);
- Blt_ConfigureAxes(graphPtr);
- Blt::ConfigureMarkers(graphPtr);
+ configure();
+ legend_->configure();
+ configureElements();
+ Blt_ConfigureAxes(this);
+ Blt::ConfigureMarkers(this);
}
+// Support
+
void Blt_GraphTags(Blt_BindTable table, ClientData object, ClientData context,
Blt_List list)
{