summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorjoye <joye>2014-04-17 17:42:03 (GMT)
committerjoye <joye>2014-04-17 17:42:03 (GMT)
commit1610af22d5f99d66237256a446fbb36ea54c7364 (patch)
tree7adfa0aaa2b4b8bd7b12353c351b924fd2700229 /src
parent9caebde9f70de2451a69021472ab824182e88fa1 (diff)
downloadblt-1610af22d5f99d66237256a446fbb36ea54c7364.zip
blt-1610af22d5f99d66237256a446fbb36ea54c7364.tar.gz
blt-1610af22d5f99d66237256a446fbb36ea54c7364.tar.bz2
*** empty log message ***
Diffstat (limited to 'src')
-rw-r--r--src/bltGrHairs.C13
-rw-r--r--src/bltGrHairs.h4
-rw-r--r--src/bltGraph.C10
3 files changed, 18 insertions, 9 deletions
diff --git a/src/bltGrHairs.C b/src/bltGrHairs.C
index 2141043..6ed7b58 100644
--- a/src/bltGrHairs.C
+++ b/src/bltGrHairs.C
@@ -123,10 +123,23 @@ void Crosshairs::configure()
segArr_[1].x1 = graphPtr_->left_;
segArr_[1].x2 = graphPtr_->right_;
+ enable();
+}
+
+void Crosshairs::enable()
+{
+ CrosshairsOptions* ops = (CrosshairsOptions*)ops_;
if (!ops->hide)
on();
}
+void Crosshairs::disable()
+{
+ CrosshairsOptions* ops = (CrosshairsOptions*)ops_;
+ if (!ops->hide)
+ off();
+}
+
void Crosshairs::off()
{
if (Tk_IsMapped(graphPtr_->tkwin_) && (visible_)) {
diff --git a/src/bltGrHairs.h b/src/bltGrHairs.h
index a7307f6..012060c 100644
--- a/src/bltGrHairs.h
+++ b/src/bltGrHairs.h
@@ -52,7 +52,7 @@ typedef struct {
} CrosshairsOptions;
class Crosshairs {
- private:
+ protected:
GC gc_;
public:
@@ -69,6 +69,8 @@ class Crosshairs {
void configure();
void on();
void off();
+ void enable();
+ void disable();
};
#endif
diff --git a/src/bltGraph.C b/src/bltGraph.C
index c768dbc..94b3869 100644
--- a/src/bltGraph.C
+++ b/src/bltGraph.C
@@ -794,22 +794,16 @@ void Graph::reconfigure()
configureMarkers();
}
-// Support
-
// Crosshairs
void Graph::enableCrosshairs()
{
- CrosshairsOptions* ops = (CrosshairsOptions*)crosshairs_->ops_;
- if (!ops->hide)
- crosshairs_->on();
+ crosshairs_->enable();
}
void Graph::disableCrosshairs()
{
- CrosshairsOptions* ops = (CrosshairsOptions*)crosshairs_->ops_;
- if (!ops->hide)
- crosshairs_->off();
+ crosshairs_->disable();
}
// Pens