[PD-cvs] pd/src desire.tk, 1.1.2.600.2.278, 1.1.2.600.2.279 defaults.ddrc, 1.1.2.10.2.16, 1.1.2.10.2.17

chunlee chunlee at users.sourceforge.net
Sat Aug 4 07:30:16 CEST 2007


Update of /cvsroot/pure-data/pd/src
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25420

Modified Files:
      Tag: desiredata
	desire.tk defaults.ddrc 
Log Message:
KeyboardDialog clean up, added font selector for console and virtual keyboard


Index: desire.tk
===================================================================
RCS file: /cvsroot/pure-data/pd/src/Attic/desire.tk,v
retrieving revision 1.1.2.600.2.278
retrieving revision 1.1.2.600.2.279
diff -C2 -d -r1.1.2.600.2.278 -r1.1.2.600.2.279
*** desire.tk	4 Aug 2007 03:48:31 -0000	1.1.2.600.2.278
--- desire.tk	4 Aug 2007 05:30:11 -0000	1.1.2.600.2.279
***************
*** 720,729 ****
  ################## set up main window #########################
  
! class_new Console
  
  def Console init {c} {
  	set @c $c
  	frame $c
! 	text $c.1 -width 72 -height 20 -yscrollcommand "$c.2 set" -font $::look(View:font)
  	scrollbar $c.2 -command "$c.1 yview"
  	pack $c.1 -side left -fill both -expand yes
--- 720,729 ----
  ################## set up main window #########################
  
! class_new Console {View}
  
  def Console init {c} {
  	set @c $c
  	frame $c
! 	text $c.1 -width 72 -height 20 -yscrollcommand "$c.2 set" -font [$self look font]
  	scrollbar $c.2 -command "$c.1 yview"
  	pack $c.1 -side left -fill both -expand yes
***************
*** 7744,7747 ****
--- 7744,7749 ----
      color Box outletfg
      color SelRect rect
+     font KeyboardDialog font
+     font Console font
  section Client keys
    subsection Client put
***************
*** 8175,8179 ****
  class_new KeyboardDialog {Dialog}
  
! set keyboard_layout {
  	{9 " " 67 68 69 70 " " 71 72 73 74 " " 75 76 95 96}
  	{49 10 11 12 13 14 15 16 17 18 19 20 21 22}
--- 8177,8182 ----
  class_new KeyboardDialog {Dialog}
  
! set keyboard_layouts {
! {
  	{9 " " 67 68 69 70 " " 71 72 73 74 " " 75 76 95 96}
  	{49 10 11 12 13 14 15 16 17 18 19 20 21 22}
***************
*** 8184,8188 ****
  }
  
! set keyboard_layout2 {
  	{" " " " 98 " "}
  	{100 " " 102}
--- 8187,8191 ----
  }
  
!  {
  	{" " " " 98 " "}
  	{100 " " 102}
***************
*** 8191,8195 ****
  	{" " 1 2 3}
  }
! 
  
  foreach {k v} {
--- 8194,8198 ----
  	{" " 1 2 3}
  }
! }
  
  foreach {k v} {
***************
*** 8237,8272 ****
  	wm title .$self "Keyboard View" ;# say
  	set i 0; set j 0
  	frame .$self.board
! 	frame .$self.board.key
! 	frame .$self.board.misc
! 	foreach row $::keyboard_layout {
! 		frame .$self.board.key.$i
! 		foreach key $row {
! 			if {$key==" "} {
! 				pack [label .$self.board.key.$i.shim$j -image icon_empty] -side left
! 				incr j
! 				continue
! 			}
! 			set ::keyboard_row_of($key) $i
! 			if {[info exists ::keyboard_width_of($key)]} {
! 				set width $::keyboard_width_of($key)
! 			} else {set width 3}
! 			if {[info exists ::keyboard_text_of($key)]}  {
! 				set text  $::keyboard_text_of($key)
! 			} else  {set text $key}
! 			pack [label .$self.board.key.$i.key$key -text " $text " -relief raise -border 4 \
! 				  -bg "#dddddd" -width $width -font [$self look font]] -side left
! 		}
! 		pack .$self.board.key.$i -fill x
! 		if {$i==0} {pack [label .$self.board.key.shim -image icon_empty]}
  		incr i
  	}
! 	set @row_division $i
! 	foreach row $::keyboard_layout2 {
! 		frame .$self.board.misc.$i
  		foreach key $row {
  			if {$key==" "} {
! 				pack [label .$self.board.misc.$i.shim$j -image icon_empty] -side left
! 				incr j; continue
  			}
  			set ::keyboard_row_of($key) $i
--- 8240,8266 ----
  	wm title .$self "Keyboard View" ;# say
  	set i 0; set j 0
+ 	set @names {key misc}
  	frame .$self.board
! 	set layouts {::keyboard_layout ::keyboard_layout2}
! 	set @keycount 0
! 	foreach layout $::keyboard_layouts {
! 		$self pack_keys $layout [lindex $@names $i] [llength [lindex $::keyboard_layouts [expr $i-1]]]
  		incr i
  	}
! 	pack .$self.board
! 	$@history subscribe $self
! 	$self fade
! }
! 
! def KeyboardDialog pack_keys {keys name off} {
! 	set i $off
! 	frame .$self.board.$name
! 	foreach row $keys {
! 		frame .$self.board.$name.$i
  		foreach key $row {
  			if {$key==" "} {
! 				pack [label .$self.board.$name.$i.shim$@keycount -image icon_empty] -side left
! 				incr @keycount
! 				continue
  			}
  			set ::keyboard_row_of($key) $i
***************
*** 8277,8292 ****
  				set text  $::keyboard_text_of($key)
  			} else  {set text $key}
! 			pack [label .$self.board.misc.$i.key$key -text " $text " -relief raise -border 4 \
  				  -bg "#dddddd" -width $width -font [$self look font]] -side left
  		}
! 		pack .$self.board.misc.$i -fill x
  		incr i
  	}
! 	
! 	pack .$self.board.key -side left
! 	pack .$self.board.misc -side right
! 	pack .$self.board
! 	$@history subscribe $self
! 	$self fade
  }
  
--- 8271,8285 ----
  				set text  $::keyboard_text_of($key)
  			} else  {set text $key}
! 			pack [label .$self.board.$name.$i.key$key -text " $text " -relief raise -border 4 \
  				  -bg "#dddddd" -width $width -font [$self look font]] -side left
  		}
! 		pack .$self.board.$name.$i -fill x
! 		if {$i==0} {pack [label .$self.board.$name.shim -image icon_empty]}
  		incr i
  	}
! 	switch $name {
! 		key {pack .$self.board.key -side left}
! 		misc {pack .$self.board.misc -side right}
! 	}
  }
  
***************
*** 8295,8299 ****
  	if {![info exists ::keyboard_row_of($k)]} {puts "unknown key $k"; return}
  	set i $::keyboard_row_of($k)
! 	if {$i<$@row_division} {set section "key"} else {set section "misc"}
  	switch -regexp -- $type {
  		^KeyPress|ButtonPress$   {
--- 8288,8292 ----
  	if {![info exists ::keyboard_row_of($k)]} {puts "unknown key $k"; return}
  	set i $::keyboard_row_of($k)
! 	if {$i<[llength [lindex $::keyboard_layouts 0]]} {set section "key"} else {set section "misc"}
  	switch -regexp -- $type {
  		^KeyPress|ButtonPress$   {
***************
*** 8312,8316 ****
  		set g [expr 221-$v*13/15]
  		set i $::keyboard_row_of($k)
! 		if {$i<$@row_division} {set section "key"} else {set section "misc"}
  		.$self.board.$section.$i.key$k configure -bg [format #%02x%02x%02x $r $g $g]
  		if {$v} {dict set @fade $k $v} {dict unset @fade $k}
--- 8305,8309 ----
  		set g [expr 221-$v*13/15]
  		set i $::keyboard_row_of($k)
! 		if {$i<[llength [lindex $::keyboard_layouts 0]]} {set section "key"} else {set section "misc"}
  		.$self.board.$section.$i.key$k configure -bg [format #%02x%02x%02x $r $g $g]
  		if {$v} {dict set @fade $k $v} {dict unset @fade $k}

Index: defaults.ddrc
===================================================================
RCS file: /cvsroot/pure-data/pd/src/Attic/defaults.ddrc,v
retrieving revision 1.1.2.10.2.16
retrieving revision 1.1.2.10.2.17
diff -C2 -d -r1.1.2.10.2.16 -r1.1.2.10.2.17
*** defaults.ddrc	3 Aug 2007 02:48:17 -0000	1.1.2.10.2.16
--- defaults.ddrc	4 Aug 2007 05:30:13 -0000	1.1.2.10.2.17
***************
*** 73,76 ****
--- 73,82 ----
      wirearrow 1
    }
+   KeyboardDialog {
+     font {Courier -10}
+   }
+   Console {
+     font {Courier -10}
+   }
  }
  key {





More information about the Pd-cvs mailing list