diff options
author | William Joye <wjoye@cfa.harvard.edu> | 2018-07-11 16:22:43 (GMT) |
---|---|---|
committer | William Joye <wjoye@cfa.harvard.edu> | 2018-07-11 16:22:43 (GMT) |
commit | aa55a04e564c14ac4ce941458a5b166ef7722795 (patch) | |
tree | f00e1d10c761de54aafae68e804f0e27a3480589 | |
parent | a769d3606fd121d7952d2e97b6929dac9ade6181 (diff) | |
download | blt-aa55a04e564c14ac4ce941458a5b166ef7722795.zip blt-aa55a04e564c14ac4ce941458a5b166ef7722795.tar.gz blt-aa55a04e564c14ac4ce941458a5b166ef7722795.tar.bz2 |
new UPDATE3DCB for markers
-rw-r--r-- | ds9/library/markeranalysisplot3d.tcl | 12 | ||||
-rw-r--r-- | tksao/frame/box.C | 3 | ||||
-rw-r--r-- | tksao/frame/callback.C | 2 | ||||
-rw-r--r-- | tksao/frame/callback.h | 6 | ||||
-rw-r--r-- | tksao/frame/circle.C | 3 | ||||
-rw-r--r-- | tksao/frame/ellipse.C | 3 | ||||
-rw-r--r-- | tksao/frame/frmarker.C | 1 | ||||
-rw-r--r-- | tksao/frame/marker.C | 3 | ||||
-rw-r--r-- | tksao/frame/point.C | 3 | ||||
-rw-r--r-- | tksao/frame/polygon.C | 3 |
10 files changed, 34 insertions, 5 deletions
diff --git a/ds9/library/markeranalysisplot3d.tcl b/ds9/library/markeranalysisplot3d.tcl index dce3a09..e5c0dc6 100644 --- a/ds9/library/markeranalysisplot3d.tcl +++ b/ds9/library/markeranalysisplot3d.tcl @@ -223,6 +223,18 @@ proc MarkerAnalysisPlot3dMarker {vvarname} { } # hardcoded marker.C +proc MarkerAnalysisPlot3dSliceCB {frame id} { + global imarker + + set vvarname ${imarker(prefix,plot3d)}${id}${frame} + upvar #0 $vvarname vvar + global $vvarname + + set vvar(slice) [$frame get fits slice 2 $vvar(system)] + MarkerAnalysisPlot3dMarker $vvarname +} + +# hardcoded marker.C proc MarkerAnalysisPlot3dDeleteCB {frame id} { # this routine could be called by the region # after the dialog has been deleted diff --git a/tksao/frame/box.C b/tksao/frame/box.C index 1cbc57c..dcf0a06 100644 --- a/tksao/frame/box.C +++ b/tksao/frame/box.C @@ -159,12 +159,15 @@ void Box::analysis(AnalysisTask mm, int which) parent->options->cmdName); addCallBack(CallBack::DELETECB, analysisPlot3dCB_[1], parent->options->cmdName); + addCallBack(CallBack::UPDATE3DCB, analysisPlot3dCB_[2], + parent->options->cmdName); } if (analysisPlot3d_ && !which) { deleteCallBack(CallBack::MOVECB, analysisPlot3dCB_[0]); deleteCallBack(CallBack::EDITCB, analysisPlot3dCB_[0]); deleteCallBack(CallBack::ROTATECB, analysisPlot3dCB_[0]); deleteCallBack(CallBack::DELETECB, analysisPlot3dCB_[1]); + deleteCallBack(CallBack::UPDATE3DCB, analysisPlot3dCB_[2]); } analysisPlot3d_ = which; diff --git a/tksao/frame/callback.C b/tksao/frame/callback.C index 757cb86..a6dab0c 100644 --- a/tksao/frame/callback.C +++ b/tksao/frame/callback.C @@ -40,7 +40,7 @@ CallBack::CallBack(Tcl_Interp* interp, Type type, type_ = type; if (proc) - strncpy(proc_, proc, 32); + strncpy(proc_, proc, 64); else proc_[0] = '\0'; diff --git a/tksao/frame/callback.h b/tksao/frame/callback.h index 4857cc0..197d98f 100644 --- a/tksao/frame/callback.h +++ b/tksao/frame/callback.h @@ -17,14 +17,14 @@ class CallBack { DELETECB, TEXTCB, COLORCB, LINEWIDTHCB, PROPERTYCB, FONTCB, KEYCB, - UPDATECB}; + UPDATECB,UPDATE3DCB}; private: Tcl_Interp* interp_; Type type_; - char proc_[128]; - char arg_[256]; + char proc_[64]; + char arg_[64]; CallBack* previous_; CallBack* next_; diff --git a/tksao/frame/circle.C b/tksao/frame/circle.C index ab92ab2..93aaf30 100644 --- a/tksao/frame/circle.C +++ b/tksao/frame/circle.C @@ -134,11 +134,14 @@ void Circle::analysis(AnalysisTask mm, int which) parent->options->cmdName); addCallBack(CallBack::DELETECB, analysisPlot3dCB_[1], parent->options->cmdName); + addCallBack(CallBack::UPDATE3DCB, analysisPlot3dCB_[2], + parent->options->cmdName); } if (analysisPlot3d_ && !which) { deleteCallBack(CallBack::MOVECB, analysisPlot3dCB_[0]); deleteCallBack(CallBack::EDITCB, analysisPlot3dCB_[0]); deleteCallBack(CallBack::DELETECB, analysisPlot3dCB_[1]); + deleteCallBack(CallBack::UPDATE3DCB, analysisPlot3dCB_[2]); } analysisPlot3d_ = which; diff --git a/tksao/frame/ellipse.C b/tksao/frame/ellipse.C index 8dee1ea..a48f2be 100644 --- a/tksao/frame/ellipse.C +++ b/tksao/frame/ellipse.C @@ -136,12 +136,15 @@ void Ellipse::analysis(AnalysisTask mm, int which) parent->options->cmdName); addCallBack(CallBack::DELETECB, analysisPlot3dCB_[1], parent->options->cmdName); + addCallBack(CallBack::UPDATE3DCB, analysisPlot3dCB_[2], + parent->options->cmdName); } if (analysisPlot3d_ && !which) { deleteCallBack(CallBack::MOVECB, analysisPlot3dCB_[0]); deleteCallBack(CallBack::EDITCB, analysisPlot3dCB_[0]); deleteCallBack(CallBack::ROTATECB, analysisPlot3dCB_[0]); deleteCallBack(CallBack::DELETECB, analysisPlot3dCB_[1]); + deleteCallBack(CallBack::UPDATE3DCB, analysisPlot3dCB_[2]); } analysisPlot3d_ = which; diff --git a/tksao/frame/frmarker.C b/tksao/frame/frmarker.C index 8b9ac89..3975c5d 100644 --- a/tksao/frame/frmarker.C +++ b/tksao/frame/frmarker.C @@ -6859,6 +6859,7 @@ void Base::updateCBMarkers(List<Marker>* ml) Marker* mm=ml->head(); while (mm) { mm->doCallBack(CallBack::UPDATECB); + mm->doCallBack(CallBack::UPDATE3DCB); mm=mm->next(); } } diff --git a/tksao/frame/marker.C b/tksao/frame/marker.C index fd03b3f..6aa5674 100644 --- a/tksao/frame/marker.C +++ b/tksao/frame/marker.C @@ -28,7 +28,8 @@ const char* Marker::analysisPlot2dCB_[] = { const char* Marker::analysisPlot3dCB_[] = { "MarkerAnalysisPlot3dCB", - "MarkerAnalysisPlot3dDeleteCB" + "MarkerAnalysisPlot3dDeleteCB", + "MarkerAnalysisPlot3dSliceCB" }; const char* Marker::analysisPandaCB_[] = { diff --git a/tksao/frame/point.C b/tksao/frame/point.C index 8019f35..4b0ff92 100644 --- a/tksao/frame/point.C +++ b/tksao/frame/point.C @@ -706,10 +706,13 @@ void Point::analysis(AnalysisTask mm, int which) parent->options->cmdName); addCallBack(CallBack::DELETECB, analysisPlot3dCB_[1], parent->options->cmdName); + addCallBack(CallBack::UPDATE3DCB, analysisPlot3dCB_[2], + parent->options->cmdName); } if (analysisPlot3d_ && !which) { deleteCallBack(CallBack::MOVECB, analysisPlot3dCB_[0]); deleteCallBack(CallBack::DELETECB, analysisPlot3dCB_[1]); + deleteCallBack(CallBack::UPDATE3DCB, analysisPlot3dCB_[2]); } analysisPlot3d_ = which; diff --git a/tksao/frame/polygon.C b/tksao/frame/polygon.C index a3f4456..8439f2d 100644 --- a/tksao/frame/polygon.C +++ b/tksao/frame/polygon.C @@ -273,12 +273,15 @@ void Polygon::analysis(AnalysisTask mm, int which) parent->options->cmdName); addCallBack(CallBack::DELETECB, analysisPlot3dCB_[1], parent->options->cmdName); + addCallBack(CallBack::UPDATE3DCB, analysisPlot3dCB_[2], + parent->options->cmdName); } if (analysisPlot3d_ && !which) { deleteCallBack(CallBack::MOVECB, analysisPlot3dCB_[0]); deleteCallBack(CallBack::EDITCB, analysisPlot3dCB_[0]); deleteCallBack(CallBack::ROTATECB, analysisPlot3dCB_[0]); deleteCallBack(CallBack::DELETECB, analysisPlot3dCB_[1]); + deleteCallBack(CallBack::UPDATE3DCB, analysisPlot3dCB_[2]); } analysisPlot3d_ = which; |