Changeset 4034 for trunk/gui


Ignore:
Timestamp:
Nov 4, 2013 1:17:52 PM (11 years ago)
Author:
ldelgass
Message:

Add key press/release events

File:
1 edited

Legend:

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

    r4031 r4034  
    7171    protected method AdjustSetting {what {value ""}}
    7272    protected method FixSettings { args  }
     73    protected method KeyPress { key }
     74    protected method KeyRelease { key }
    7375    protected method MouseClick { button x y }
    7476    protected method MouseDoubleClick { button x y }
     
    281283        0,0 $itk_component(view) -fill both -reqwidth $w
    282284    blt::table configure $itk_component(plotarea) c1 -resize none
     285
     286    # Bindings for keyboard events
     287    bind $itk_component(view) <KeyPress> \
     288        [itcl::code $this KeyPress %N]
     289    bind $itk_component(view) <KeyRelease> \
     290        [itcl::code $this KeyRelease %N]
    283291
    284292    # Bindings for rotation via mouse
     
    988996}
    989997
     998itcl::body Rappture::GeoViewer::KeyPress {k} {
     999    SendCmd "key press $k"
     1000}
     1001
     1002itcl::body Rappture::GeoViewer::KeyRelease {k} {
     1003    SendCmd "key release $k"
     1004}
     1005
    9901006itcl::body Rappture::GeoViewer::MouseClick {button x y} {
    9911007    if {0} {
Note: See TracChangeset for help on using the changeset viewer.