[PD-cvs] pd/src u_main.tk,1.1.1.4.2.7.4.65,1.1.1.4.2.7.4.66

Mathieu Bouchard matju at users.sourceforge.net
Sun May 9 17:13:45 CEST 2004


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

Modified Files:
      Tag: impd_0_37
	u_main.tk 
Log Message:
improved property dialogs again


Index: u_main.tk
===================================================================
RCS file: /cvsroot/pure-data/pd/src/u_main.tk,v
retrieving revision 1.1.1.4.2.7.4.65
retrieving revision 1.1.1.4.2.7.4.66
diff -C2 -d -r1.1.1.4.2.7.4.65 -r1.1.1.4.2.7.4.66
*** u_main.tk	8 May 2004 04:06:09 -0000	1.1.1.4.2.7.4.65
--- u_main.tk	9 May 2004 15:13:43 -0000	1.1.1.4.2.7.4.66
***************
*** 57,60 ****
--- 57,71 ----
  }
  
+ # very small icons:
+ image create bitmap icon_plus -data "#define z_width 7\n#define z_height 7
+ static unsigned char z_bits[] = { 8,8,8,127,8,8,8 };"
+ image create bitmap icon_minus -data "#define z_width 7\n#define z_height 7
+ static unsigned char z_bits[] = { 0,0,0,127,0,0,0 };"
+ image create bitmap icon_uparrow -data "#define z_width 7\n#define z_height 5
+ static unsigned char z_bits[] = { 8,28,62,127,0 };"
+ image create bitmap icon_downarrow -data "#define z_width 7\n#define z_height 5
+ static unsigned char z_bits[] = { 0,127,62,28,8 };"
+ 
+ 
  # Tearoff is set to true by default:
  set pd_tearoff 1
***************
*** 891,896 ****
  			event $id clickeditevent $canvas $cx $cy $b $f}
  	}
! 	#!@#$ "elseif" should go here ?
! 	if {$edit && [llength [$canvas bbox ${id}BASE]]} {
  	    foreach {x1 y1 x2 y2} [$canvas bbox ${id}BASE] {}
  	    if {abs($y2-3-$cy)<=3} {
--- 902,906 ----
  			event $id clickeditevent $canvas $cx $cy $b $f}
  	}
! 	if {!($f&8) && $edit && [llength [$canvas bbox ${id}BASE]]} {
  	    foreach {x1 y1 x2 y2} [$canvas bbox ${id}BASE] {}
  	    if {abs($y2-3-$cy)<=3} {
***************
*** 1294,1298 ****
  		pack  $f.label -side left
  		frame $f.side -relief ridge -borderwidth 2
- 		pack  $f.side -side top
  		foreach {i side} {0 left 1 right 2 top 3 bottom} {
  			radiobutton $f.side.$side -value $i \
--- 1304,1307 ----
***************
*** 1303,1307 ****
  		pack $f.side.top    -side    top
  		pack $f.side.bottom -side bottom
! 		pack $f -side top
  	    }
  	    color {
--- 1312,1316 ----
  		pack $f.side.top    -side    top
  		pack $f.side.bottom -side bottom
! 		pack  $f.side -side left
  	    }
  	    color {
***************
*** 1312,1343 ****
  		switch -regexp -- $c { ^# { set c 0x[string trimleft $c #] } }
  		set c [expr $c & 0xFCFCFC]
! 		button $f.color -text "      " -width 10 \
  			-command [list iemgui_choose_col $w $name $label] \
  			-relief sunken -background [format #%6.6x $c] \
  			-highlightbackground       [format #%6.6x $c]
  		
! 		button $f.preset -text "..." -command [list color_popup $self $w $name $i]
  		pack  $f.label $f.color $f.preset -side left
- 		pack $f -side top
  	    }
  	    choice {
- 		set i 0
  		frame $f
  		label $f.label -text [lindex $label 0]
  		pack $f.label $f -side left
  		foreach part [lrange $label 1 end] {
! 			radiobutton $f.$i -text $part -value $i -variable _($self:$name)
! 			pack $f.$i -side top
  			incr i
  		}
- 		pack $f -side top
  	    }
  	    toggle {
! 		checkbutton $f -text $label -variable _($self:$name)
! 		pack $f -side top
  	    }
  	    section {
  	        label $f -text $label -bg "#0000aa" -fg "#ffff55" -font {helvetica -10 bold}
- 		pack $f -side top -fill x
  	    }
  	    default {
--- 1321,1350 ----
  		switch -regexp -- $c { ^# { set c 0x[string trimleft $c #] } }
  		set c [expr $c & 0xFCFCFC]
! 		button $f.color -text "      " -font {Courier 8} -width 10 \
  			-command [list iemgui_choose_col $w $name $label] \
  			-relief sunken -background [format #%6.6x $c] \
  			-highlightbackground       [format #%6.6x $c]
  		
! 		button $f.preset -text "..." -font {Helvetica 8} -command [list color_popup $self $w $name $i]
  		pack  $f.label $f.color $f.preset -side left
  	    }
  	    choice {
  		frame $f
+ 		set i 0
  		label $f.label -text [lindex $label 0]
  		pack $f.label $f -side left
  		foreach part [lrange $label 1 end] {
! 			radiobutton $f.$i -text $part -value $i -variable _($self:$name) -anchor w
! 			pack $f.$i -side top -fill x
  			incr i
  		}
  	    }
  	    toggle {
! 		frame $f
! 		label $f.label -text $label
! 		checkbutton $f.toggle -variable _($self:name)
  	    }
  	    section {
  	        label $f -text $label -bg "#0000aa" -fg "#ffff55" -font {helvetica -10 bold}
  	    }
  	    default {
***************
*** 1348,1358 ****
  		pack $f.entry -side left
  		bind $f.entry <Return> "$ok $w"
! 		if {[string compare $type "entry"]} {
! 			label $f.type -text "($type)"
! 			pack $f.type
  		}
- 		pack $f -side top
  	    }
  	}
      }
  }
--- 1355,1376 ----
  		pack $f.entry -side left
  		bind $f.entry <Return> "$ok $w"
! 		switch -regexp -- $type {
! 		    integer|float|fontsize {
! 			frame $f.b -borderwidth 0
! 			button $f.b.1 -image icon_uparrow   -command "incr _($self:$name) +1"
! 			button $f.b.2 -image icon_downarrow -command "incr _($self:$name) -1"
! 			pack $f.b.1 $f.b.2 -side top
! 			pack $f.b -side left
! 		    }
! 		    entry {}
! 		    default {
! 			label $f.type -text "($type)" -fg "#808080"
! 			pack $f.type -side right -anchor e
! 		    }
  		}
  	    }
  	}
+ 	pack $f -side top -fill x
+ 	catch {$f.label configure -width 15 -anchor e}
      }
  }
***************
*** 1680,1693 ****
      set fi $fields($_($obj:class))
  
!     if {[lsearch $fi      w]>=0} {lappend props w "width(px): " entry {-width 7}}
!     if {[lsearch $fi      h]>=0} {lappend props h "height(px): " entry {-width 7}}
!     if {[lsearch $fi   hold]>=0} {lappend props  hold  "hold time(ms): " entry {-width 9}}
!     if {[lsearch $fi  break]>=0} {lappend props break "break time(ms): " entry {-width 9}}
      
!     if {[lsearch $fi    min]>=0} {lappend props min "minimum value: " entry {-width 9}}
!     if {[lsearch $fi    max]>=0} {lappend props max "maximum value: " entry {-width 9}}
      if {[lsearch $fi is_log]>=0} {lappend props is_log [list "Mode: " "linear" "logarithmic"] choice {}}
      if {[lsearch $fi    isa]>=0} {lappend props loadbang "init" toggle {}}
!     if {[lsearch $fi      n]>=0} {lappend props n "n: " entry {-width 4}}
      if {[lsearch $fi steady]>=0} {lappend props steady [list "Steadiness: " "jump on click" "steady on click"] choice {}}
      properties_dialog $self .$self iemgui_ok $props
--- 1698,1711 ----
      set fi $fields($_($obj:class))
  
!     if {[lsearch $fi      w]>=0} {lappend props w "width(px): " integer {-width 7}}
!     if {[lsearch $fi      h]>=0} {lappend props h "height(px): " integer {-width 7}}
!     if {[lsearch $fi   hold]>=0} {lappend props  hold  "hold time(ms): " float {-width 9}}
!     if {[lsearch $fi  break]>=0} {lappend props break "break time(ms): " float {-width 9}}
      
!     if {[lsearch $fi    min]>=0} {lappend props min "minimum value: " float {-width 9}}
!     if {[lsearch $fi    max]>=0} {lappend props max "maximum value: " float {-width 9}}
      if {[lsearch $fi is_log]>=0} {lappend props is_log [list "Mode: " "linear" "logarithmic"] choice {}}
      if {[lsearch $fi    isa]>=0} {lappend props loadbang "init" toggle {}}
!     if {[lsearch $fi      n]>=0} {lappend props n "n: " integer {-width 4}}
      if {[lsearch $fi steady]>=0} {lappend props steady [list "Steadiness: " "jump on click" "steady on click"] choice {}}
      properties_dialog $self .$self iemgui_ok $props
***************
*** 1699,1703 ****
      lappend props ldy "label y offset: " entry {-width  5}
      lappend props fstyle {"Typeface: " "courier (typewriter)" "helvetica (sansserif)" "times (serif)"} choice {}
!     lappend props fs "font size: " entry {-width 5}
      lappend props bcol "background color: " color {}
      if {[lsearch $fi   fcol]>=0} {lappend props fcol "foreground color: " color {}}
--- 1717,1721 ----
      lappend props ldy "label y offset: " entry {-width  5}
      lappend props fstyle {"Typeface: " "courier (typewriter)" "helvetica (sansserif)" "times (serif)"} choice {}
!     lappend props fs "font size: " fontsize {-width 5}
      lappend props bcol "background color: " color {}
      if {[lsearch $fi   fcol]>=0} {lappend props fcol "foreground color: " color {}}
***************
*** 1713,1719 ****
      	bind $id <<PrevWindow>> {tk::TabToWindow [tk_focusPrev %W]}
      }
! 
!     $id.w.entry select from 0
!     $id.w.entry select adjust end
      focus $id.w.entry
  }
--- 1731,1738 ----
      	bind $id <<PrevWindow>> {tk::TabToWindow [tk_focusPrev %W]}
      }
!     catch {
! 	$id.w.entry select from 0
! 	$id.w.entry select adjust end
!     }
      focus $id.w.entry
  }
***************
*** 2330,2338 ****
  ############ evaluator
  
- image create bitmap icon_plus -data "#define z_width 7\n#define z_height 7
- static unsigned char z_bits[] = { 8,8,8,127,8,8,8 };"
- image create bitmap icon_minus -data "#define z_width 7\n#define z_height 7
- static unsigned char z_bits[] = { 0,0,0,127,0,0,0 };"
- 
  proc listener_new {self name command} {
  	global _
--- 2349,2352 ----
***************
*** 2617,2621 ****
    files -open "open file(s) on startup"
    void -verbose "extra printout on startup and when searching for files"
!   void -d "specify debug level"
    void -noloadbang "disable the effect of [loadbang]"
    string -send "send a message at startup (after patches are loaded)"
--- 2631,2635 ----
    files -open "open file(s) on startup"
    void -verbose "extra printout on startup and when searching for files"
!   int -d "debug level"
    void -noloadbang "disable the effect of [loadbang]"
    string -send "send a message at startup (after patches are loaded)"





More information about the Pd-cvs mailing list