Changeset 4991 for branches/uiuc_vtk_viewers
- Timestamp:
- Feb 10, 2015, 6:30:24 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/uiuc_vtk_viewers/gui/scripts/vtkisosurfaceviewer.tcl
r4954 r4991 2535 2535 set value [LegendPointToValue $x $y] 2536 2536 2537 # Setup the location of the tooltip 2537 2538 set tx [expr $x + 15] 2538 2539 set ty [expr $y - 5] 2540 2541 # Setup the text for the tooltip 2539 2542 if { [info exists _isolines($y)] } { 2540 2543 Rappture::Tooltip::text $c [format "$title %g (isosurface)" $_isolines($y)] … … 2542 2545 Rappture::Tooltip::text $c [format "$title %g" $value] 2543 2546 } 2547 2548 # Show the tooltip 2544 2549 Rappture::Tooltip::tooltip show $c +$tx,+$ty 2545 2550 } … … 2583 2588 # 2584 2589 itcl::body Rappture::VtkIsosurfaceViewer::ReceiveLegend { colormap title min max size } { 2585 # puts stderr "ReceiveLegend colormap=$colormap title=$title range=$min,$max size=$size"2590 # puts stderr "ReceiveLegend colormap=$colormap title=$title range=$min,$max size=$size" 2586 2591 set _title $title 2587 2592 regsub {\(mag\)} $title "" _title … … 2603 2608 # DrawLegend -- 2604 2609 # 2605 # Draws the legend in its owncanvas on the right side of the plot area.2610 # Draws the legend on the canvas on the right side of the plot area. 2606 2611 # 2607 2612 itcl::body Rappture::VtkIsosurfaceViewer::DrawLegend {} { … … 2658 2663 $c bind sensor <Motion> [itcl::code $this MotionLegend %x %y] 2659 2664 $c bind sensor <ButtonPress-1> [itcl::code $this LegendB1Motion press %x %y] 2660 $c bind sensor <B1-Motion> [itcl::code $this LegendB1Motion motion %x %y]2665 # $c bind sensor <B1-Motion> [itcl::code $this LegendB1Motion motion %x %y] 2661 2666 $c bind sensor <ButtonRelease-1> [itcl::code $this LegendB1Motion release %x %y] 2662 2667 … … 2789 2794 # USAGE: LegendTitleAction apply <value> 2790 2795 # 2791 # Used internally to handle the dropdown list for the field range text inputs. 2792 # The post option is invoked when a field range is pressed to launch a text 2793 # input field. The enter option is invoked when the user mouses over a field 2794 # range. The leave option is invoked when the user moves the mouse away from a 2795 # field range. The save option is invoked whenever a value is set for a field 2796 # range, and alerts the visualization server. 2796 # Used internally to handle the mouseover and popup entry for the field range 2797 # inputs. The enter option is invoked when the user moves the mouse over the 2798 # min or max field range. The leave option is invoked when the user moves the 2799 # mouse away from the min or max field range. The popup option is invoked when 2800 # the user click's on a field range. The popup option stores internally which 2801 # widget is requesting a popup ( in the _mouseOver variable) and calls the 2802 # activate command of the widget. The widget's activate command calls back to 2803 # this method to get the xywh dimensions of the popup editor. After the user 2804 # changes focus or sets the value in the editor, the editor calls this methods 2805 # validate and apply options to set the value. 2797 2806 # 2798 2807 # ---------------------------------------------------------------------- … … 2810 2819 } 2811 2820 popup { 2821 DisableMouseRotationBindings 2812 2822 set which [lindex $args 0] 2813 2823 set _mouseOver $which … … 2821 2831 set info(w) [expr $x2 - $x1] 2822 2832 set info(h) [expr $y2 - $y1] 2823 puts "array: [array get info]"2824 2833 return [array get info] 2825 2834 } … … 2828 2837 error "wrong # args: should be \"editor validate value\"" 2829 2838 } 2839 SetupMouseRotationBindings 2830 2840 } 2831 2841 apply {
Note: See TracChangeset
for help on using the changeset viewer.