chiark / gitweb /
where-vessels: Include panner and (nonfunctional) zoom buttons
authorIan Jackson <ian@liberator.(none)>
Thu, 10 Dec 2009 20:23:12 +0000 (20:23 +0000)
committerIan Jackson <ian@liberator.(none)>
Thu, 10 Dec 2009 20:23:12 +0000 (20:23 +0000)
yarrg/where-vessels

index a8278925d0bf2302f6ce1d0904db604744329e58..a7afc1eab7cccc1d1fdd5b9fd3d22335732b75b7 100755 (executable)
@@ -1,5 +1,10 @@
 #!/usr/bin/wish
 
+pkg_mkIndex .
+set auto_path [concat . $auto_path]
+
+package require panner
+
 set us Aristarchus
 
 proc manyset {list args} {
@@ -114,9 +119,9 @@ set canvas .f.c
 canvas $canvas
 #$canvas configure -width 1000 -height 800
 pack $canvas -expand 1 -fill both
-pack .f -expand 1 -fill both
+pack .f -expand 1 -fill both -side left
 
-set scale 15
+set scale 16
 
 proc coord {c} {
        global scale
@@ -188,4 +193,21 @@ foreach nk [lsort [array names $note]] {
        puts "IGNORED NOTE $nk"
 }
 
+frame .ctrl
+pack .ctrl -side right
+
+panner::canvas-scroll-bbox .f.c
+panner::create .ctrl.pan .f.c 200 200
+
+pack .ctrl.pan -side top -pady 20 -padx 20
+frame .ctrl.zoom
+pack .ctrl.zoom -side top
+
+button .ctrl.zoom.out -text - -font {Courier 16}
+button .ctrl.zoom.in  -text + -font  {Courier 16}
+pack .ctrl.zoom.out .ctrl.zoom.in -side left
+
+#. configure -width 640 -height 480
+wm geometry . 1024x480
+
 #puts "[$canvas bbox all]"