Ignore:
Timestamp:
Jun 11, 2005, 9:56:37 PM (19 years ago)
Author:
mmc
Message:

Added a capability to MainWin? to syncCutBuffer with the
application. The VNC Java client uses the cutbuffer
instead of the selection for Copy/Paste? to desktop, and
this mechanism keeps the two in sync so Copy/Paste? works
properly. Also, added Cut/Copy/Paste? menus to the right
mouse button of various widgets.

Fixed 3D plotting to work with the vtkCutter so it works
better. Also, added support for 3D meshes in addition
to clouds. Meshes store connectivity, so they are better
at representing holes in data. Fixed the 3D plotter so
that rotate is more intuitive, and added lights so you can
see your data better at any angle.

Fixed the loader so that it can load elements with the ""
value, and so that it doesn't duplicate entries found
more than once by *.xml pattern matching.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gui/scripts/textentry.tcl

    r11 r17  
    109109        if {$_mode == "entry"} {
    110110            $itk_component(entry) configure -state normal
     111            $itk_component(emenu) entryconfigure "Cut" -state normal
     112            $itk_component(emenu) entryconfigure "Copy" -state normal
     113            $itk_component(emenu) entryconfigure "Paste" -state normal
    111114            $itk_component(entry) delete 0 end
    112115            $itk_component(entry) insert 0 $newval
    113116            if {!$itk_option(-editable)} {
    114117                $itk_component(entry) configure -state disabled
     118                $itk_component(emenu) entryconfigure "Cut" -state disabled
     119                $itk_component(emenu) entryconfigure "Copy" -state disabled
     120                $itk_component(emenu) entryconfigure "Paste" -state disabled
    115121            }
    116122        } elseif {$_mode == "text"} {
    117123            $itk_component(text) configure -state normal
     124            $itk_component(tmenu) entryconfigure "Cut" -state normal
     125            $itk_component(tmenu) entryconfigure "Copy" -state normal
     126            $itk_component(tmenu) entryconfigure "Paste" -state normal
    118127            $itk_component(text) delete 1.0 end
    119128            $itk_component(text) insert end $newval
    120129            if {!$itk_option(-editable)} {
    121130                $itk_component(text) configure -state disabled
     131                $itk_component(tmenu) entryconfigure "Cut" -state disabled
     132                $itk_component(tmenu) entryconfigure "Copy" -state disabled
     133                $itk_component(tmenu) entryconfigure "Paste" -state disabled
    122134            }
    123135        }
     
    231243                -foreground $itk_option(-textforeground)
    232244
     245            itk_component add emenu {
     246                menu $itk_component(entry).menu -tearoff 0
     247            }
     248            $itk_component(emenu) add command -label "Cut" -accelerator "^X" \
     249                -command [list event generate $itk_component(entry) <<Cut>>]
     250            $itk_component(emenu) add command -label "Copy" -accelerator "^C" \
     251                -command [list event generate $itk_component(entry) <<Copy>>]
     252            $itk_component(emenu) add command -label "Paste" -accelerator "^V" \
     253                -command [list event generate $itk_component(entry) <<Paste>>]
     254            bind $itk_component(entry) <<PopupMenu>> {
     255                tk_popup %W.menu %X %Y
     256            }
     257
    233258            $itk_component(entry) insert end $val
    234259            if {!$itk_option(-editable)} {
     
    270295            $itk_component(scrollbars) contents $itk_component(text)
    271296
     297            itk_component add tmenu {
     298                menu $itk_component(text).menu -tearoff 0
     299            }
     300            $itk_component(tmenu) add command -label "Cut" -accelerator "^X" \
     301                -command [list event generate $itk_component(text) <<Cut>>]
     302            $itk_component(tmenu) add command -label "Copy" -accelerator "^C" \
     303                -command [list event generate $itk_component(text) <<Copy>>]
     304            $itk_component(tmenu) add command -label "Paste" -accelerator "^V" \
     305                -command [list event generate $itk_component(text) <<Paste>>]
     306            bind $itk_component(text) <<PopupMenu>> {
     307                tk_popup %W.menu %X %Y
     308            }
     309
    272310            $itk_component(text) insert end $val
    273311            if {!$itk_option(-editable)} {
    274312                $itk_component(text) configure -state disabled
     313                $itk_component(menu) entryconfigure "Cut" -state disabled
     314                $itk_component(menu) entryconfigure "Copy" -state disabled
     315                $itk_component(menu) entryconfigure "Paste" -state disabled
    275316            }
    276317            set _mode "text"
     
    306347    if {$_mode == "entry"} {
    307348        $itk_component(editor) configure -state $state
     349        $itk_component(emenu) entryconfigure "Cut" -state $state
     350        $itk_component(emenu) entryconfigure "Copy" -state $state
     351        $itk_component(emenu) entryconfigure "Paste" -state $state
    308352    } elseif {$_mode == "text"} {
    309353        $itk_component(text) configure -state $state
     354        $itk_component(tmenu) entryconfigure "Cut" -state $state
     355        $itk_component(tmenu) entryconfigure "Copy" -state $state
     356        $itk_component(tmenu) entryconfigure "Paste" -state $state
    310357    }
    311358}
Note: See TracChangeset for help on using the changeset viewer.