[PD-cvs] SF.net SVN: pure-data:[10723] branches/pd-devel/0.41.4/src

eighthave at users.sourceforge.net eighthave at users.sourceforge.net
Tue Feb 3 06:45:43 CET 2009


Revision: 10723
          http://pure-data.svn.sourceforge.net/pure-data/?rev=10723&view=rev
Author:   eighthave
Date:     2009-02-03 05:45:42 +0000 (Tue, 03 Feb 2009)

Log Message:
-----------
renamed things inside gatom and pd_iemgui to follow the new attempt at a panel naming scheme; also, renamed $id to $mytoplevel in iemgui to match the rest of the code

Modified Paths:
--------------
    branches/pd-devel/0.41.4/src/gatom_panel.tcl
    branches/pd-devel/0.41.4/src/iemgui_panel.tcl
    branches/pd-devel/0.41.4/src/pd.tk
    branches/pd-devel/0.41.4/src/pkgIndex.tcl

Modified: branches/pd-devel/0.41.4/src/gatom_panel.tcl
===================================================================
--- branches/pd-devel/0.41.4/src/gatom_panel.tcl	2009-02-03 05:40:41 UTC (rev 10722)
+++ branches/pd-devel/0.41.4/src/gatom_panel.tcl	2009-02-03 05:45:42 UTC (rev 10723)
@@ -1,9 +1,9 @@
 
-package provide gatom 0.1
+package provide gatom_panel 0.1
 
 package require wheredoesthisgo
 
-namespace eval ::gatom:: {
+namespace eval ::gatom_panel:: {
 	namespace export pdtk_gatom_dialog
 }
 
@@ -22,7 +22,7 @@
 # [eval concat $$variablename].  There should be an easier way but I don't see
 # it yet.
 
-proc ::gatom::escape {sym} {
+proc ::gatom_panel::escape {sym} {
     if {[string length $sym] == 0} {
         set ret "-"
     } else {
@@ -35,7 +35,7 @@
     return [unspace_text $ret]
 }
 
-proc ::gatom::unescape {sym} {
+proc ::gatom_panel::unescape {sym} {
     if {[string equal -length 1 $sym "-"]} {
         set ret [string replace $sym 0 0 ""]
     } else {
@@ -47,29 +47,29 @@
 proc gatom_apply {mytoplevel} {
 	# TODO kludge!! until a common approach to ::pd_bindings::panel_bindings
 	# is sorted out
-	::gatom::apply $mytoplevel
+	::gatom_panel::apply $mytoplevel
 }
 
-proc ::gatom::apply {mytoplevel} {
+proc ::gatom_panel::apply {mytoplevel} {
 	global gatomlabel_position
 	
     pdsend "$mytoplevel param \
                  [$mytoplevel.width.entry get] \
                  [$mytoplevel.limits.lower.entry get] \
                  [$mytoplevel.limits.upper.entry get] \
-                 [::gatom::escape [$mytoplevel.gatomlabel.name.entry get]] \
+                 [::gatom_panel::escape [$mytoplevel.gatomlabel.name.entry get]] \
                  $gatomlabel_position($mytoplevel) \
-                 [::gatom::escape [$mytoplevel.s_r.send.entry get]] \
-                 [::gatom::escape [$mytoplevel.s_r.receive.entry get]]"
+                 [::gatom_panel::escape [$mytoplevel.s_r.send.entry get]] \
+                 [::gatom_panel::escape [$mytoplevel.s_r.receive.entry get]]"
 }
 
 
 proc gatom_cancel {mytoplevel} {
 	# TODO kludge!! until a common approach to ::pd_bindings::panel_bindings
 	# is sorted out
-	::gatom::cancel $mytoplevel
+	::gatom_panel::cancel $mytoplevel
 }
-proc ::gatom::cancel {mytoplevel} {
+proc ::gatom_panel::cancel {mytoplevel} {
     pdsend "$mytoplevel cancel"
 }
 
@@ -77,15 +77,15 @@
 proc gatom_ok {mytoplevel} {
 	# TODO kludge!! until a common approach to ::pd_bindings::panel_bindings
 	# is sorted out
-	::gatom::ok $mytoplevel
+	::gatom_panel::ok $mytoplevel
 }
-proc ::gatom::ok {mytoplevel} {
-    ::gatom::apply $mytoplevel
-    ::gatom::cancel $mytoplevel
+proc ::gatom_panel::ok {mytoplevel} {
+    ::gatom_panel::apply $mytoplevel
+    ::gatom_panel::cancel $mytoplevel
 }
 
 # set up the panel with the info from pd
-proc ::gatom::pdtk_gatom_dialog {mytoplevel initwidth initlower initupper \
+proc ::gatom_panel::pdtk_gatom_dialog {mytoplevel initwidth initlower initupper \
 									 initgatomlabel_position \
 									 initgatomlabel initsend initreceive} {
 	global gatomlabel_position
@@ -113,7 +113,7 @@
 	}
 }
 
-proc ::gatom::create_panel {mytoplevel} {
+proc ::gatom_panel::create_panel {mytoplevel} {
 	global gatomlabel_position
 
     toplevel $mytoplevel -background $::panel_background
@@ -124,7 +124,7 @@
 		#wm attributes $mytoplevel -transparent 1
 		#$mytoplevel configure -highlightthickness 1
 	}
-    wm protocol $mytoplevel WM_DELETE_WINDOW "::gatom::cancel $mytoplevel"
+    wm protocol $mytoplevel WM_DELETE_WINDOW "::gatom_panel::cancel $mytoplevel"
 
     ::pd_bindings::panel_bindings $mytoplevel "gatom"
 
@@ -200,13 +200,13 @@
     frame $mytoplevel.buttonframe -pady 5 -background $::panel_background
     pack $mytoplevel.buttonframe -side top -fill x -pady 2m
     button $mytoplevel.buttonframe.cancel -text {Cancel} \
-        -command "::gatom::cancel $mytoplevel" -highlightbackground $::panel_background
+        -command "::gatom_panel::cancel $mytoplevel" -highlightbackground $::panel_background
     pack $mytoplevel.buttonframe.cancel -side left -expand 1
     button $mytoplevel.buttonframe.apply -text {Apply} \
-        -command "::gatom::apply $mytoplevel" -highlightbackground $::panel_background
+        -command "::gatom_panel::apply $mytoplevel" -highlightbackground $::panel_background
     pack $mytoplevel.buttonframe.apply -side left -expand 1
     button $mytoplevel.buttonframe.ok -text {OK} \
-        -command "::gatom::ok $mytoplevel" -highlightbackground $::panel_background
+        -command "::gatom_panel::ok $mytoplevel" -highlightbackground $::panel_background
     pack $mytoplevel.buttonframe.ok -side left -expand 1
 
     $mytoplevel.width.entry select from 0

Modified: branches/pd-devel/0.41.4/src/iemgui_panel.tcl
===================================================================
--- branches/pd-devel/0.41.4/src/iemgui_panel.tcl	2009-02-03 05:40:41 UTC (rev 10722)
+++ branches/pd-devel/0.41.4/src/iemgui_panel.tcl	2009-02-03 05:45:42 UTC (rev 10723)
@@ -2,9 +2,9 @@
 # WARRANTIES, see the file, "LICENSE.txt," in this distribution.
 # Copyright (c) 1997-2009 Miller Puckette.
 
-package provide pd_iemgui 0.1
+package provide iemgui_panel 0.1
 
-namespace eval ::pd_iemgui:: {
+namespace eval ::iemgui_panel:: {
 	variable define_min_flashhold 50
 	variable define_min_flashbreak 10
 	variable define_min_fontsize 4
@@ -12,10 +12,10 @@
 	namespace export pdtk_iemgui_dialog
 }
 
-# TODO rename $id to $mytoplevel
+# TODO rename $mytoplevel to $mytoplevel
 
-proc ::pd_iemgui::clip_dim {id} {
-    set vid [string trimleft $id .]
+proc ::iemgui_panel::clip_dim {mytoplevel} {
+    set vid [string trimleft $mytoplevel .]
 	
     set var_iemgui_wdt [concat iemgui_wdt_$vid]
     global $var_iemgui_wdt
@@ -28,32 +28,32 @@
     
     if {[eval concat $$var_iemgui_wdt] < [eval concat $$var_iemgui_min_wdt]} {
         set $var_iemgui_wdt [eval concat $$var_iemgui_min_wdt]
-        $id.dim.w_ent configure -textvariable $var_iemgui_wdt
+        $mytoplevel.dim.w_ent configure -textvariable $var_iemgui_wdt
     }
     if {[eval concat $$var_iemgui_hgt] < [eval concat $$var_iemgui_min_hgt]} {
         set $var_iemgui_hgt [eval concat $$var_iemgui_min_hgt]
-        $id.dim.h_ent configure -textvariable $var_iemgui_hgt
+        $mytoplevel.dim.h_ent configure -textvariable $var_iemgui_hgt
     }
 }
 
-proc ::pd_iemgui::clip_num {id} {
-    set vid [string trimleft $id .]
+proc ::iemgui_panel::clip_num {mytoplevel} {
+    set vid [string trimleft $mytoplevel .]
 	
     set var_iemgui_num [concat iemgui_num_$vid]
     global $var_iemgui_num
     
     if {[eval concat $$var_iemgui_num] > 2000} {
         set $var_iemgui_num 2000
-        $id.para.num_ent configure -textvariable $var_iemgui_num
+        $mytoplevel.para.num_ent configure -textvariable $var_iemgui_num
     }
     if {[eval concat $$var_iemgui_num] < 1} {
         set $var_iemgui_num 1
-        $id.para.num_ent configure -textvariable $var_iemgui_num
+        $mytoplevel.para.num_ent configure -textvariable $var_iemgui_num
     }
 }
 
-proc ::pd_iemgui::sched_rng {id} {
-    set vid [string trimleft $id .]
+proc ::iemgui_panel::sched_rng {mytoplevel} {
+    set vid [string trimleft $mytoplevel .]
 	
     set var_iemgui_min_rng [concat iemgui_min_rng_$vid]
     global $var_iemgui_min_rng
@@ -70,27 +70,27 @@
             set hhh [eval concat $$var_iemgui_min_rng]
             set $var_iemgui_min_rng [eval concat $$var_iemgui_max_rng]
             set $var_iemgui_max_rng $hhh
-            $id.rng.max_ent configure -textvariable $var_iemgui_max_rng
-            $id.rng.min_ent configure -textvariable $var_iemgui_min_rng }
+            $mytoplevel.rng.max_ent configure -textvariable $var_iemgui_max_rng
+            $mytoplevel.rng.min_ent configure -textvariable $var_iemgui_min_rng }
         if {[eval concat $$var_iemgui_max_rng] < $define_min_flashhold} {
             set $var_iemgui_max_rng $iemgui_define_min_flashhold
-            $id.rng.max_ent configure -textvariable $var_iemgui_max_rng
+            $mytoplevel.rng.max_ent configure -textvariable $var_iemgui_max_rng
         }
         if {[eval concat $$var_iemgui_min_rng] < $define_min_flashbreak} {
             set $var_iemgui_min_rng $define_min_flashbreak
-            $id.rng.min_ent configure -textvariable $var_iemgui_min_rng
+            $mytoplevel.rng.min_ent configure -textvariable $var_iemgui_min_rng
         }
     }
     if {[eval concat $$var_iemgui_rng_sch] == 1} {
         if {[eval concat $$var_iemgui_min_rng] == 0.0} {
             set $var_iemgui_min_rng 1.0
-            $id.rng.min_ent configure -textvariable $var_iemgui_min_rng
+            $mytoplevel.rng.min_ent configure -textvariable $var_iemgui_min_rng
         }
     }
 }
 
-proc ::pd_iemgui::verify_rng {id} {
-    set vid [string trimleft $id .]
+proc ::iemgui_panel::verify_rng {mytoplevel} {
+    set vid [string trimleft $mytoplevel .]
 	
     set var_iemgui_min_rng [concat iemgui_min_rng_$vid]
     global $var_iemgui_min_rng
@@ -102,24 +102,24 @@
     if {[eval concat $$var_iemgui_lin0_log1] == 1} {
         if {[eval concat $$var_iemgui_max_rng] == 0.0 && [eval concat $$var_iemgui_min_rng] == 0.0} {
             set $var_iemgui_max_rng 1.0
-            $id.rng.max_ent configure -textvariable $var_iemgui_max_rng
+            $mytoplevel.rng.max_ent configure -textvariable $var_iemgui_max_rng
 		}
         if {[eval concat $$var_iemgui_max_rng] > 0} {
             if {[eval concat $$var_iemgui_min_rng] <= 0} {
                 set $var_iemgui_min_rng [expr [eval concat $$var_iemgui_max_rng] * 0.01]
-                $id.rng.min_ent configure -textvariable $var_iemgui_min_rng
+                $mytoplevel.rng.min_ent configure -textvariable $var_iemgui_min_rng
             }
         } else {
             if {[eval concat $$var_iemgui_min_rng] > 0} {
                 set $var_iemgui_max_rng [expr [eval concat $$var_iemgui_min_rng] * 0.01]
-                $id.rng.max_ent configure -textvariable $var_iemgui_max_rng
+                $mytoplevel.rng.max_ent configure -textvariable $var_iemgui_max_rng
             }
         }
     }
 }
 
-proc ::pd_iemgui::clip_fontsize {id} {
-    set vid [string trimleft $id .]
+proc ::iemgui_panel::clip_fontsize {mytoplevel} {
+    set vid [string trimleft $mytoplevel .]
 	
     set var_iemgui_gn_fs [concat iemgui_gn_fs_$vid]
     global $var_iemgui_gn_fs
@@ -128,12 +128,12 @@
 	
     if {[eval concat $$var_iemgui_gn_fs] < $define_min_fontsize} {
         set $var_iemgui_gn_fs $define_min_fontsize
-        $id.label.fs_ent configure -textvariable $var_iemgui_gn_fs
+        $mytoplevel.label.fs_ent configure -textvariable $var_iemgui_gn_fs
     }
 }
 
-proc ::pd_iemgui::set_col_example {id} {
-    set vid [string trimleft $id .]
+proc ::iemgui_panel::set_col_example {mytoplevel} {
+    set vid [string trimleft $mytoplevel .]
 	
     set var_iemgui_bcol [concat iemgui_bcol_$vid]
     global $var_iemgui_bcol
@@ -142,28 +142,28 @@
     set var_iemgui_lcol [concat iemgui_lcol_$vid]
     global $var_iemgui_lcol
     
-    $id.colors.sections.lb_bk configure \
+    $mytoplevel.colors.sections.lb_bk configure \
 		-background [format "#%6.6x" [eval concat $$var_iemgui_bcol]] \
 		-activebackground [format "#%6.6x" [eval concat $$var_iemgui_bcol]] \
 		-foreground [format "#%6.6x" [eval concat $$var_iemgui_lcol]] \
 		-activeforeground [format "#%6.6x" [eval concat $$var_iemgui_lcol]]
     
     if { [eval concat $$var_iemgui_fcol] >= 0 } {
-		$id.colors.sections.fr_bk configure \
+		$mytoplevel.colors.sections.fr_bk configure \
 			-background [format "#%6.6x" [eval concat $$var_iemgui_bcol]] \
 			-activebackground [format "#%6.6x" [eval concat $$var_iemgui_bcol]] \
 			-foreground [format "#%6.6x" [eval concat $$var_iemgui_fcol]] \
 			-activeforeground [format "#%6.6x" [eval concat $$var_iemgui_fcol]]
     } else {
-		$id.colors.sections.fr_bk configure \
+		$mytoplevel.colors.sections.fr_bk configure \
 			-background [format "#%6.6x" [eval concat $$var_iemgui_bcol]] \
 			-activebackground [format "#%6.6x" [eval concat $$var_iemgui_bcol]] \
 			-foreground [format "#%6.6x" [eval concat $$var_iemgui_bcol]] \
 			-activeforeground [format "#%6.6x" [eval concat $$var_iemgui_bcol]]}
 }
 
-proc ::pd_iemgui::preset_col {id presetcol} {
-    set vid [string trimleft $id .]
+proc ::iemgui_panel::preset_col {mytoplevel presetcol} {
+    set vid [string trimleft $mytoplevel .]
 	
     set var_iemgui_l2_f1_b0 [concat iemgui_l2_f1_b0_$vid]
     global $var_iemgui_l2_f1_b0
@@ -177,11 +177,11 @@
     if { [eval concat $$var_iemgui_l2_f1_b0] == 0 } { set $var_iemgui_bcol $presetcol }
     if { [eval concat $$var_iemgui_l2_f1_b0] == 1 } { set $var_iemgui_fcol $presetcol }
     if { [eval concat $$var_iemgui_l2_f1_b0] == 2 } { set $var_iemgui_lcol $presetcol }
-    ::pd_iemgui::set_col_example $id
+    ::iemgui_panel::set_col_example $mytoplevel
 }
 
-proc ::pd_iemgui::choose_col_bkfrlb {id} {
-    set vid [string trimleft $id .]
+proc ::iemgui_panel::choose_col_bkfrlb {mytoplevel} {
+    set vid [string trimleft $mytoplevel .]
 	
     set var_iemgui_l2_f1_b0 [concat iemgui_l2_f1_b0_$vid]
     global $var_iemgui_l2_f1_b0
@@ -213,11 +213,11 @@
 			set $var_iemgui_lcol [string replace $helpstring 0 0 "0x"]
 			set $var_iemgui_lcol [expr [eval concat $$var_iemgui_lcol] & 0xFCFCFC] }
     }
-    ::pd_iemgui::set_col_example $id
+    ::iemgui_panel::set_col_example $mytoplevel
 }
 
-proc ::pd_iemgui::lilo {id} {
-    set vid [string trimleft $id .]
+proc ::iemgui_panel::lilo {mytoplevel} {
+    set vid [string trimleft $mytoplevel .]
 	
     set var_iemgui_lin0_log1 [concat iemgui_lin0_log1_$vid]
     global $var_iemgui_lin0_log1
@@ -226,21 +226,21 @@
     set var_iemgui_lilo1 [concat iemgui_lilo1_$vid]
     global $var_iemgui_lilo1
 	
-    ::pd_iemgui::sched_rng $id
+    ::iemgui_panel::sched_rng $mytoplevel
 	
     if {[eval concat $$var_iemgui_lin0_log1] == 0} {
         set $var_iemgui_lin0_log1 1
-        $id.para.lilo configure -text [eval concat $$var_iemgui_lilo1]
-        ::pd_iemgui::verify_rng $id
-        ::pd_iemgui::sched_rng $id
+        $mytoplevel.para.lilo configure -text [eval concat $$var_iemgui_lilo1]
+        ::iemgui_panel::verify_rng $mytoplevel
+        ::iemgui_panel::sched_rng $mytoplevel
     } else {
         set $var_iemgui_lin0_log1 0
-        $id.para.lilo configure -text [eval concat $$var_iemgui_lilo0]
+        $mytoplevel.para.lilo configure -text [eval concat $$var_iemgui_lilo0]
     }
 }
 
-proc ::pd_iemgui::toggle_font {id gn_f} {
-    set vid [string trimleft $id .]
+proc ::iemgui_panel::toggle_font {mytoplevel gn_f} {
+    set vid [string trimleft $mytoplevel .]
 	
     set var_iemgui_gn_f [concat iemgui_gn_f_$vid]
     global $var_iemgui_gn_f
@@ -254,45 +254,45 @@
 	}
 	set current_font_spec "{$current_font} 12 $::font_weight"
 	
-	$id.label.fontpopup_label configure -text $current_font \
+	$mytoplevel.label.fontpopup_label configure -text $current_font \
 		-font $current_font_spec
-	$id.label.name_entry configure -font $current_font_spec
-	$id.colors.sections.fr_bk configure -font $current_font_spec
-	$id.colors.sections.lb_bk configure -font $current_font_spec
+	$mytoplevel.label.name_entry configure -font $current_font_spec
+	$mytoplevel.colors.sections.fr_bk configure -font $current_font_spec
+	$mytoplevel.colors.sections.lb_bk configure -font $current_font_spec
 }
 
-proc ::pd_iemgui::lb {id} {
-    set vid [string trimleft $id .]
+proc ::iemgui_panel::lb {mytoplevel} {
+    set vid [string trimleft $mytoplevel .]
 	
     set var_iemgui_loadbang [concat iemgui_loadbang_$vid]
     global $var_iemgui_loadbang
 	
     if {[eval concat $$var_iemgui_loadbang] == 0} {
         set $var_iemgui_loadbang 1
-        $id.para.lb configure -text "init"
+        $mytoplevel.para.lb configure -text "init"
     } else {
         set $var_iemgui_loadbang 0
-        $id.para.lb configure -text "no init"
+        $mytoplevel.para.lb configure -text "no init"
     }
 }
 
-proc ::pd_iemgui::stdy_jmp {id} {
-    set vid [string trimleft $id .]
+proc ::iemgui_panel::stdy_jmp {mytoplevel} {
+    set vid [string trimleft $mytoplevel .]
 	
     set var_iemgui_steady [concat iemgui_steady_$vid]
     global $var_iemgui_steady
     
     if {[eval concat $$var_iemgui_steady]} {
         set $var_iemgui_steady 0
-        $id.para.stdy_jmp configure -text "jump on click"
+        $mytoplevel.para.stdy_jmp configure -text "jump on click"
     } else {
         set $var_iemgui_steady 1
-        $id.para.stdy_jmp configure -text "steady on click"
+        $mytoplevel.para.stdy_jmp configure -text "steady on click"
     }
 }
 
-proc ::pd_iemgui::apply {id} {
-    set vid [string trimleft $id .]
+proc ::iemgui_panel::apply {mytoplevel} {
+    set vid [string trimleft $mytoplevel .]
 	
     set var_iemgui_wdt [concat iemgui_wdt_$vid]
     global $var_iemgui_wdt
@@ -339,12 +339,12 @@
     set var_iemgui_lcol [concat iemgui_lcol_$vid]
     global $var_iemgui_lcol
     
-    ::pd_iemgui::clip_dim $id
-    ::pd_iemgui::clip_num $id
-    ::pd_iemgui::sched_rng $id
-    ::pd_iemgui::verify_rng $id
-    ::pd_iemgui::sched_rng $id
-    ::pd_iemgui::clip_fontsize $id
+    ::iemgui_panel::clip_dim $mytoplevel
+    ::iemgui_panel::clip_num $mytoplevel
+    ::iemgui_panel::sched_rng $mytoplevel
+    ::iemgui_panel::verify_rng $mytoplevel
+    ::iemgui_panel::sched_rng $mytoplevel
+    ::iemgui_panel::clip_fontsize $mytoplevel
     
     if {[eval concat $$var_iemgui_snd] == ""} {set hhhsnd "empty"} else {set hhhsnd [eval concat $$var_iemgui_snd]}
     if {[eval concat $$var_iemgui_rcv] == ""} {set hhhrcv "empty"} else {set hhhrcv [eval concat $$var_iemgui_rcv]}
@@ -363,7 +363,7 @@
     set hhhrcv [unspace_text $hhhrcv]
     set hhhgui_nam [unspace_text $hhhgui_nam]
     
-    pdsend [concat $id dialog \
+    pdsend [concat $mytoplevel dialog \
 			[eval concat $$var_iemgui_wdt] \
 			[eval concat $$var_iemgui_hgt] \
 			[eval concat $$var_iemgui_min_rng] \
@@ -388,23 +388,23 @@
 proc iemgui_cancel {mytoplevel} {
 	# TODO kludge!! until a common approach to ::pd_bindings::panel_bindings
 	# is sorted out
-	::pd_iemgui::cancel $mytoplevel
+	::iemgui_panel::cancel $mytoplevel
 }
-proc ::pd_iemgui::cancel {id} {
-	pdsend "$id cancel"
+proc ::iemgui_panel::cancel {mytoplevel} {
+	pdsend "$mytoplevel cancel"
 }
 
 proc iemgui_ok {mytoplevel} {
 	# TODO kludge!! until a common approach to ::pd_bindings::panel_bindings
 	# is sorted out
-	::pd_iemgui::ok $mytoplevel
+	::iemgui_panel::ok $mytoplevel
 }
-proc ::pd_iemgui::ok {id} {
-    ::pd_iemgui::apply $id
-    ::pd_iemgui::cancel $id
+proc ::iemgui_panel::ok {mytoplevel} {
+    ::iemgui_panel::apply $mytoplevel
+    ::iemgui_panel::cancel $mytoplevel
 }
 
-proc ::pd_iemgui::pdtk_iemgui_dialog {id mainheader dim_header \
+proc ::iemgui_panel::pdtk_iemgui_dialog {mytoplevel mainheader dim_header \
 									   wdt min_wdt wdt_label \
 									   hgt min_hgt hgt_label \
 									   rng_header min_rng min_rng_label max_rng \
@@ -416,7 +416,7 @@
 									   gn_dx gn_dy gn_f gn_fs \
 									   bcol fcol lcol} {
 	
-    set vid [string trimleft $id .]
+    set vid [string trimleft $mytoplevel .]
 	
     set var_iemgui_wdt [concat iemgui_wdt_$vid]
     global $var_iemgui_wdt
@@ -504,108 +504,108 @@
     
     set $var_iemgui_l2_f1_b0 0
 	
-    toplevel $id -background $::panel_background
-    wm title $id [format "%s Properties" $mainheader]
-    wm resizable $id 0 0
-    wm protocol $id WM_DELETE_WINDOW [concat ::pd_iemgui::cancel $id]
+    toplevel $mytoplevel -background $::panel_background
+    wm title $mytoplevel [format "%s Properties" $mainheader]
+    wm resizable $mytoplevel 0 0
+    wm protocol $mytoplevel WM_DELETE_WINDOW [concat ::iemgui_panel::cancel $mytoplevel]
         
-    ::pd_bindings::panel_bindings $id "iemgui"
+    ::pd_bindings::panel_bindings $mytoplevel "iemgui"
 
-    frame $id.dim -background $::panel_background
-    pack $id.dim -side top
-    label $id.dim.head -text $dim_header -background $::panel_background
-    label $id.dim.w_lab -text $wdt_label -width 6 -background $::panel_background
-    entry $id.dim.w_ent -textvariable $var_iemgui_wdt -width 5 \
+    frame $mytoplevel.dim -background $::panel_background
+    pack $mytoplevel.dim -side top
+    label $mytoplevel.dim.head -text $dim_header -background $::panel_background
+    label $mytoplevel.dim.w_lab -text $wdt_label -width 6 -background $::panel_background
+    entry $mytoplevel.dim.w_ent -textvariable $var_iemgui_wdt -width 5 \
 		-highlightbackground $::panel_background
-    label $id.dim.dummy1 -text " " -width 10 -background $::panel_background
-    label $id.dim.h_lab -text $hgt_label -width 6 -background $::panel_background
-    entry $id.dim.h_ent -textvariable $var_iemgui_hgt -width 5 \
+    label $mytoplevel.dim.dummy1 -text " " -width 10 -background $::panel_background
+    label $mytoplevel.dim.h_lab -text $hgt_label -width 6 -background $::panel_background
+    entry $mytoplevel.dim.h_ent -textvariable $var_iemgui_hgt -width 5 \
 		-highlightbackground $::panel_background
-    pack $id.dim.head -side top
-    pack $id.dim.w_lab $id.dim.w_ent $id.dim.dummy1 -side left
+    pack $mytoplevel.dim.head -side top
+    pack $mytoplevel.dim.w_lab $mytoplevel.dim.w_ent $mytoplevel.dim.dummy1 -side left
     if { $hgt_label != "empty" } {
-        pack $id.dim.h_lab $id.dim.h_ent -side left}
+        pack $mytoplevel.dim.h_lab $mytoplevel.dim.h_ent -side left}
 	
-    frame $id.rng -background $::panel_background
-    pack $id.rng -side top
-    label $id.rng.head -text $rng_header -background $::panel_background
-    label $id.rng.min_lab -text $min_rng_label -width 6 -background $::panel_background
-    entry $id.rng.min_ent -textvariable $var_iemgui_min_rng -width 9 \
+    frame $mytoplevel.rng -background $::panel_background
+    pack $mytoplevel.rng -side top
+    label $mytoplevel.rng.head -text $rng_header -background $::panel_background
+    label $mytoplevel.rng.min_lab -text $min_rng_label -width 6 -background $::panel_background
+    entry $mytoplevel.rng.min_ent -textvariable $var_iemgui_min_rng -width 9 \
 		-highlightbackground $::panel_background
-    label $id.rng.dummy1 -text " " -width 1 -background $::panel_background
-    label $id.rng.max_lab -text $max_rng_label -width 8 -background $::panel_background
-    entry $id.rng.max_ent -textvariable $var_iemgui_max_rng -width 9 \
+    label $mytoplevel.rng.dummy1 -text " " -width 1 -background $::panel_background
+    label $mytoplevel.rng.max_lab -text $max_rng_label -width 8 -background $::panel_background
+    entry $mytoplevel.rng.max_ent -textvariable $var_iemgui_max_rng -width 9 \
 		-highlightbackground $::panel_background
     if { $rng_header != "empty" } {
-        pack $id.rng.head -side top
+        pack $mytoplevel.rng.head -side top
         if { $min_rng_label != "empty" } {
-            pack $id.rng.min_lab $id.rng.min_ent -side left}
+            pack $mytoplevel.rng.min_lab $mytoplevel.rng.min_ent -side left}
         if { $max_rng_label != "empty" } {
-            pack $id.rng.dummy1 \
-				$id.rng.max_lab $id.rng.max_ent -side left} }
+            pack $mytoplevel.rng.dummy1 \
+				$mytoplevel.rng.max_lab $mytoplevel.rng.max_ent -side left} }
     
     if { [eval concat $$var_iemgui_lin0_log1] >= 0 || [eval concat $$var_iemgui_loadbang] >= 0 || [eval concat $$var_iemgui_num] > 0 || [eval concat $$var_iemgui_steady] >= 0 } {
-        label $id.space1 -text "" -background $::panel_background
-        pack $id.space1 -side top }
+        label $mytoplevel.space1 -text "" -background $::panel_background
+        pack $mytoplevel.space1 -side top }
 	
-    frame $id.para -background $::panel_background
-    pack $id.para -side top
-    label $id.para.dummy2 -text "" -width 1 -background $::panel_background
-    label $id.para.dummy3 -text "" -width 1 -background $::panel_background
+    frame $mytoplevel.para -background $::panel_background
+    pack $mytoplevel.para -side top
+    label $mytoplevel.para.dummy2 -text "" -width 1 -background $::panel_background
+    label $mytoplevel.para.dummy3 -text "" -width 1 -background $::panel_background
     if {[eval concat $$var_iemgui_lin0_log1] == 0} {
-        button $id.para.lilo -text [eval concat $$var_iemgui_lilo0] -width 5 \
-			-command "::pd_iemgui::lilo $id" -highlightbackground $::panel_background }
+        button $mytoplevel.para.lilo -text [eval concat $$var_iemgui_lilo0] -width 5 \
+			-command "::iemgui_panel::lilo $mytoplevel" -highlightbackground $::panel_background }
     if {[eval concat $$var_iemgui_lin0_log1] == 1} {
-        button $id.para.lilo -text [eval concat $$var_iemgui_lilo1] -width 5 \
-			-command "::pd_iemgui::lilo $id" -highlightbackground $::panel_background }
+        button $mytoplevel.para.lilo -text [eval concat $$var_iemgui_lilo1] -width 5 \
+			-command "::iemgui_panel::lilo $mytoplevel" -highlightbackground $::panel_background }
     if {[eval concat $$var_iemgui_loadbang] == 0} {
-        button $id.para.lb -text "no init" -width 5 \
-			-command "::pd_iemgui::lb $id" -highlightbackground $::panel_background }
+        button $mytoplevel.para.lb -text "no init" -width 5 \
+			-command "::iemgui_panel::lb $mytoplevel" -highlightbackground $::panel_background }
     if {[eval concat $$var_iemgui_loadbang] == 1} {
-        button $id.para.lb -text "init" -width 5 \
-			-command "::pd_iemgui::lb $id" -highlightbackground $::panel_background }
-    label $id.para.num_lab -text $num_label -width 9 -background $::panel_background
-    entry $id.para.num_ent -textvariable $var_iemgui_num -width 4 \
+        button $mytoplevel.para.lb -text "init" -width 5 \
+			-command "::iemgui_panel::lb $mytoplevel" -highlightbackground $::panel_background }
+    label $mytoplevel.para.num_lab -text $num_label -width 9 -background $::panel_background
+    entry $mytoplevel.para.num_ent -textvariable $var_iemgui_num -width 4 \
 		-highlightbackground $::panel_background
 
     if {[eval concat $$var_iemgui_steady] == 0} {
-        button $id.para.stdy_jmp -command "::pd_iemgui::stdy_jmp $id" \
+        button $mytoplevel.para.stdy_jmp -command "::iemgui_panel::stdy_jmp $mytoplevel" \
 			-text "jump on click" -width 11 -highlightbackground $::panel_background }
     if {[eval concat $$var_iemgui_steady] == 1} {
-        button $id.para.stdy_jmp -command "::pd_iemgui::stdy_jmp $id" \
+        button $mytoplevel.para.stdy_jmp -command "::iemgui_panel::stdy_jmp $mytoplevel" \
 			-text "steady on click" -width 11 -highlightbackground $::panel_background }
     if {[eval concat $$var_iemgui_lin0_log1] >= 0} {
-        pack $id.para.lilo -side left -expand 1}
+        pack $mytoplevel.para.lilo -side left -expand 1}
     if {[eval concat $$var_iemgui_loadbang] >= 0} {
-        pack $id.para.dummy2 $id.para.lb -side left -expand 1}
+        pack $mytoplevel.para.dummy2 $mytoplevel.para.lb -side left -expand 1}
     if {[eval concat $$var_iemgui_num] > 0} {
-        pack $id.para.dummy3 $id.para.num_lab $id.para.num_ent -side left -expand 1}
+        pack $mytoplevel.para.dummy3 $mytoplevel.para.num_lab $mytoplevel.para.num_ent -side left -expand 1}
     if {[eval concat $$var_iemgui_steady] >= 0} {
-        pack $id.para.dummy3 $id.para.stdy_jmp -side left -expand 1}
+        pack $mytoplevel.para.dummy3 $mytoplevel.para.stdy_jmp -side left -expand 1}
 	
-	frame $id.spacer0 -height 4 -background $::panel_background
-	pack $id.spacer0 -side top
+	frame $mytoplevel.spacer0 -height 4 -background $::panel_background
+	pack $mytoplevel.spacer0 -side top
     
-	labelframe $id.s_r -borderwidth 1 -pady 4 -text "messages" \
+	labelframe $mytoplevel.s_r -borderwidth 1 -pady 4 -text "messages" \
         -font highlight_font -background $::panel_background
-	pack $id.s_r -side top -fill x -ipadx 5
-    frame $id.s_r.send -background $::panel_background
-    pack $id.s_r.send -side top
-    label $id.s_r.send.lab -text "   send-symbol:" -width 12  -justify right \
+	pack $mytoplevel.s_r -side top -fill x -ipadx 5
+    frame $mytoplevel.s_r.send -background $::panel_background
+    pack $mytoplevel.s_r.send -side top
+    label $mytoplevel.s_r.send.lab -text "   send-symbol:" -width 12  -justify right \
 		-background $::panel_background
-    entry $id.s_r.send.ent -textvariable $var_iemgui_snd -width 22 \
+    entry $mytoplevel.s_r.send.ent -textvariable $var_iemgui_snd -width 22 \
 		-highlightbackground $::panel_background
     if { $snd != "nosndno" } {
-        pack $id.s_r.send.lab $id.s_r.send.ent -side left}
+        pack $mytoplevel.s_r.send.lab $mytoplevel.s_r.send.ent -side left}
     
-    frame $id.s_r.receive -background $::panel_background
-    pack $id.s_r.receive -side top
-    label $id.s_r.receive.lab -text "receive-symbol:" -width 12 -justify right \
+    frame $mytoplevel.s_r.receive -background $::panel_background
+    pack $mytoplevel.s_r.receive -side top
+    label $mytoplevel.s_r.receive.lab -text "receive-symbol:" -width 12 -justify right \
 		-background $::panel_background
-    entry $id.s_r.receive.ent -textvariable $var_iemgui_rcv -width 22 \
+    entry $mytoplevel.s_r.receive.ent -textvariable $var_iemgui_rcv -width 22 \
 		-highlightbackground $::panel_background
     if { $rcv != "norcvno" } {
-        pack $id.s_r.receive.lab $id.s_r.receive.ent -side left}
+        pack $mytoplevel.s_r.receive.lab $mytoplevel.s_r.receive.ent -side left}
     
 	# get the current font name from the int given from C-space (gn_f)
 	set current_font $::font_family
@@ -614,181 +614,181 @@
     if {[eval concat $$var_iemgui_gn_f] == 2} \
 		{ set current_font "Times" }
 	
-	frame $id.spacer1 -height 7 -background $::panel_background
-	pack $id.spacer1 -side top
+	frame $mytoplevel.spacer1 -height 7 -background $::panel_background
+	pack $mytoplevel.spacer1 -side top
     
-	labelframe $id.label -borderwidth 1 -text "label" -pady 4 \
+	labelframe $mytoplevel.label -borderwidth 1 -text "label" -pady 4 \
 		-font highlight_font -background $::panel_background
-	pack $id.label -side top -fill x
-    entry $id.label.name_entry -textvariable $var_iemgui_gui_nam -width 30 \
+	pack $mytoplevel.label -side top -fill x
+    entry $mytoplevel.label.name_entry -textvariable $var_iemgui_gui_nam -width 30 \
 		-font [list $current_font 12 $::font_weight] \
 		-highlightbackground $::panel_background
-    pack $id.label.name_entry -side top -expand yes -fill both -padx 5
+    pack $mytoplevel.label.name_entry -side top -expand yes -fill both -padx 5
     
-    frame $id.label.xy -padx 27 -pady 1 -background $::panel_background
-    pack $id.label.xy -side top
-    label $id.label.xy.x_lab -text "x offset" -width 6 -background $::panel_background
-    entry $id.label.xy.x_entry -textvariable $var_iemgui_gn_dx -width 5 \
+    frame $mytoplevel.label.xy -padx 27 -pady 1 -background $::panel_background
+    pack $mytoplevel.label.xy -side top
+    label $mytoplevel.label.xy.x_lab -text "x offset" -width 6 -background $::panel_background
+    entry $mytoplevel.label.xy.x_entry -textvariable $var_iemgui_gn_dx -width 5 \
 		-highlightbackground $::panel_background
-    label $id.label.xy.dummy1 -text " " -width 2 -background $::panel_background
-    label $id.label.xy.y_lab -text "y offset" -width 6 -background $::panel_background
-    entry $id.label.xy.y_entry -textvariable $var_iemgui_gn_dy -width 5 \
+    label $mytoplevel.label.xy.dummy1 -text " " -width 2 -background $::panel_background
+    label $mytoplevel.label.xy.y_lab -text "y offset" -width 6 -background $::panel_background
+    entry $mytoplevel.label.xy.y_entry -textvariable $var_iemgui_gn_dy -width 5 \
 		-highlightbackground $::panel_background
-    pack $id.label.xy.x_lab $id.label.xy.x_entry $id.label.xy.dummy1 \
-		$id.label.xy.y_lab $id.label.xy.y_entry -side left -anchor e
+    pack $mytoplevel.label.xy.x_lab $mytoplevel.label.xy.x_entry $mytoplevel.label.xy.dummy1 \
+		$mytoplevel.label.xy.y_lab $mytoplevel.label.xy.y_entry -side left -anchor e
     
-	label $id.label.fontpopup_label -text $current_font \
+	label $mytoplevel.label.fontpopup_label -text $current_font \
 		-relief groove -font [list $current_font 12 $::font_weight] -padx 5
-    pack $id.label.fontpopup_label -side left -anchor w -expand yes -fill x
-    label $id.label.fontsize_label -text "size" -width 4 -background $::panel_background
-    entry $id.label.fontsize_entry -textvariable $var_iemgui_gn_fs -width 5 \
+    pack $mytoplevel.label.fontpopup_label -side left -anchor w -expand yes -fill x
+    label $mytoplevel.label.fontsize_label -text "size" -width 4 -background $::panel_background
+    entry $mytoplevel.label.fontsize_entry -textvariable $var_iemgui_gn_fs -width 5 \
 		-highlightbackground $::panel_background
-	pack $id.label.fontsize_entry $id.label.fontsize_label \
+	pack $mytoplevel.label.fontsize_entry $mytoplevel.label.fontsize_label \
 		-side right -anchor e -padx 5 -pady 5
-	menu $id.popup
-	$id.popup add command \
+	menu $mytoplevel.popup
+	$mytoplevel.popup add command \
 		-label $::font_family \
 		-font [format {{%s} 12 %s} $::font_family $::font_weight] \
-		-command "::pd_iemgui::toggle_font $id 0" 
-	$id.popup add command \
+		-command "::iemgui_panel::toggle_font $mytoplevel 0" 
+	$mytoplevel.popup add command \
 		-label "Helvetica" \
 		-font [format {Helvetica 12 %s} $::font_weight] \
-		-command "::pd_iemgui::toggle_font $id 1" 
-	$id.popup add command \
+		-command "::iemgui_panel::toggle_font $mytoplevel 1" 
+	$mytoplevel.popup add command \
 		-label "Times" \
 		-font [format {Times 12 %s} $::font_weight] \
-		-command "::pd_iemgui::toggle_font $id 2" 
-	bind $id.label.fontpopup_label <Button> \
-		[list tk_popup $id.popup %X %Y]
+		-command "::iemgui_panel::toggle_font $mytoplevel 2" 
+	bind $mytoplevel.label.fontpopup_label <Button> \
+		[list tk_popup $mytoplevel.popup %X %Y]
 	
-	frame $id.spacer2 -height 7 -background $::panel_background
-	pack $id.spacer2 -side top
+	frame $mytoplevel.spacer2 -height 7 -background $::panel_background
+	pack $mytoplevel.spacer2 -side top
     
-    labelframe $id.colors -borderwidth 1 -text "colors" -font highlight_font \
+    labelframe $mytoplevel.colors -borderwidth 1 -text "colors" -font highlight_font \
 		-background $::panel_background
-    pack $id.colors -fill x -ipadx 5 -ipady 4
+    pack $mytoplevel.colors -fill x -ipadx 5 -ipady 4
     
-    frame $id.colors.select -background $::panel_background
-    pack $id.colors.select -side top
-    radiobutton $id.colors.select.radio0 -value 0 -variable \
+    frame $mytoplevel.colors.select -background $::panel_background
+    pack $mytoplevel.colors.select -side top
+    radiobutton $mytoplevel.colors.select.radio0 -value 0 -variable \
 		$var_iemgui_l2_f1_b0 -text "background" -width 10 -justify left \
 		-background $::panel_background
-    radiobutton $id.colors.select.radio1 -value 1 -variable \
+    radiobutton $mytoplevel.colors.select.radio1 -value 1 -variable \
 		$var_iemgui_l2_f1_b0 -text "front" -width 5 -justify left \
 		-background $::panel_background
-    radiobutton $id.colors.select.radio2 -value 2 -variable \
+    radiobutton $mytoplevel.colors.select.radio2 -value 2 -variable \
 		$var_iemgui_l2_f1_b0 -text "label" -width 5 -justify left \
 		-background $::panel_background
     if { [eval concat $$var_iemgui_fcol] >= 0 } {
-		pack $id.colors.select.radio0 $id.colors.select.radio1 \
-			$id.colors.select.radio2 -side left
+		pack $mytoplevel.colors.select.radio0 $mytoplevel.colors.select.radio1 \
+			$mytoplevel.colors.select.radio2 -side left
 	} else {
-		pack $id.colors.select.radio0 $id.colors.select.radio2 -side left
+		pack $mytoplevel.colors.select.radio0 $mytoplevel.colors.select.radio2 -side left
 	}
     
-    frame $id.colors.sections -background $::panel_background
-    pack $id.colors.sections -side top
-    button $id.colors.sections.but -command "::pd_iemgui::choose_col_bkfrlb $id" \
+    frame $mytoplevel.colors.sections -background $::panel_background
+    pack $mytoplevel.colors.sections -side top
+    button $mytoplevel.colors.sections.but -command "::iemgui_panel::choose_col_bkfrlb $mytoplevel" \
 		-text "compose color" -width 12 -highlightbackground $::panel_background
-    pack $id.colors.sections.but -side left -anchor w -padx 10 -pady 5 \
+    pack $mytoplevel.colors.sections.but -side left -anchor w -padx 10 -pady 5 \
 		-expand yes -fill x
     if { [eval concat $$var_iemgui_fcol] >= 0 } {
-		label $id.colors.sections.fr_bk -text "o=||=o" -width 6 \
+		label $mytoplevel.colors.sections.fr_bk -text "o=||=o" -width 6 \
 			-background [format "#%6.6x" [eval concat $$var_iemgui_bcol]] \
 			-activebackground [format "#%6.6x" [eval concat $$var_iemgui_bcol]] \
 			-foreground [format "#%6.6x" [eval concat $$var_iemgui_fcol]] \
 			-activeforeground [format "#%6.6x" [eval concat $$var_iemgui_fcol]] \
 			-font [list $current_font 12 $::font_weight] -padx 2 -pady 2 -relief ridge
     } else {
-		label $id.colors.sections.fr_bk -text "o=||=o" -width 6 \
+		label $mytoplevel.colors.sections.fr_bk -text "o=||=o" -width 6 \
 			-background [format "#%6.6x" [eval concat $$var_iemgui_bcol]] \
 			-activebackground [format "#%6.6x" [eval concat $$var_iemgui_bcol]] \
 			-foreground [format "#%6.6x" [eval concat $$var_iemgui_bcol]] \
 			-activeforeground [format "#%6.6x" [eval concat $$var_iemgui_bcol]] \
 			-font [list $current_font 12 $::font_weight] -padx 2 -pady 2 -relief ridge
 	}
-	label $id.colors.sections.lb_bk -text "testlabel" -width 9 \
+	label $mytoplevel.colors.sections.lb_bk -text "testlabel" -width 9 \
 		-background [format "#%6.6x" [eval concat $$var_iemgui_bcol]] \
 		-activebackground [format "#%6.6x" [eval concat $$var_iemgui_bcol]] \
 		-foreground [format "#%6.6x" [eval concat $$var_iemgui_lcol]] \
 		-activeforeground [format "#%6.6x" [eval concat $$var_iemgui_lcol]] \
 		-font [list $current_font 12 $::font_weight] -padx 2 -pady 2 -relief ridge
-    pack $id.colors.sections.lb_bk $id.colors.sections.fr_bk \
+    pack $mytoplevel.colors.sections.lb_bk $mytoplevel.colors.sections.fr_bk \
 		-side right -anchor e -expand yes -fill both -pady 7
 	
 	# color scheme by Mary Ann Benedetto http://piR2.org
-    frame $id.colors.r1 -background $::panel_background
-    pack $id.colors.r1 -side top
+    frame $mytoplevel.colors.r1 -background $::panel_background
+    pack $mytoplevel.colors.r1 -side top
     foreach i { 0 1 2 3 4 5 6 7 8 9} \
 		hexcol { 0xFFFFFF 0xDFDFDF 0xBBBBBB 0xFFC7C6 0xFFE3C6 \
 					 0xFEFFC6 0xC6FFC7 0xc6FEFF 0xC7C6FF 0xE3C6FF } \
 		{
-			label $id.colors.r1.c$i -background [format "#%6.6x" $hexcol] \
+			label $mytoplevel.colors.r1.c$i -background [format "#%6.6x" $hexcol] \
 				-activebackground [format "#%6.6x" $hexcol] -relief ridge \
 				-padx 7 -pady 0
-			bind $id.colors.r1.c$i <Button> [format "::pd_iemgui::preset_col %s %d" $id $hexcol] 
+			bind $mytoplevel.colors.r1.c$i <Button> [format "::iemgui_panel::preset_col %s %d" $mytoplevel $hexcol] 
 		}
-    pack $id.colors.r1.c0 $id.colors.r1.c1 $id.colors.r1.c2 $id.colors.r1.c3 \
-		$id.colors.r1.c4 $id.colors.r1.c5 $id.colors.r1.c6 $id.colors.r1.c7 \
-		$id.colors.r1.c8 $id.colors.r1.c9 -side left
+    pack $mytoplevel.colors.r1.c0 $mytoplevel.colors.r1.c1 $mytoplevel.colors.r1.c2 $mytoplevel.colors.r1.c3 \
+		$mytoplevel.colors.r1.c4 $mytoplevel.colors.r1.c5 $mytoplevel.colors.r1.c6 $mytoplevel.colors.r1.c7 \
+		$mytoplevel.colors.r1.c8 $mytoplevel.colors.r1.c9 -side left
     
-    frame $id.colors.r2 -background $::panel_background
-    pack $id.colors.r2 -side top
+    frame $mytoplevel.colors.r2 -background $::panel_background
+    pack $mytoplevel.colors.r2 -side top
     foreach i { 0 1 2 3 4 5 6 7 8 9 } \
 		hexcol { 0x9F9F9F 0x7C7C7C 0x606060 0xFF0400 0xFF8300 \
 					 0xFAFF00 0x00FF04 0x00FAFF 0x0400FF 0x9C00FF } \
 		{
-			label $id.colors.r2.c$i -background [format "#%6.6x" $hexcol] \
+			label $mytoplevel.colors.r2.c$i -background [format "#%6.6x" $hexcol] \
 				-activebackground [format "#%6.6x" $hexcol] -relief ridge \
 				-padx 7 -pady 0
-			bind  $id.colors.r2.c$i <Button> \
-				[format "::pd_iemgui::preset_col %s %d" $id $hexcol] 
+			bind  $mytoplevel.colors.r2.c$i <Button> \
+				[format "::iemgui_panel::preset_col %s %d" $mytoplevel $hexcol] 
 		}
-    pack $id.colors.r2.c0 $id.colors.r2.c1 $id.colors.r2.c2 $id.colors.r2.c3 \
-		$id.colors.r2.c4 $id.colors.r2.c5 $id.colors.r2.c6 $id.colors.r2.c7 \
-		$id.colors.r2.c8 $id.colors.r2.c9 -side left
+    pack $mytoplevel.colors.r2.c0 $mytoplevel.colors.r2.c1 $mytoplevel.colors.r2.c2 $mytoplevel.colors.r2.c3 \
+		$mytoplevel.colors.r2.c4 $mytoplevel.colors.r2.c5 $mytoplevel.colors.r2.c6 $mytoplevel.colors.r2.c7 \
+		$mytoplevel.colors.r2.c8 $mytoplevel.colors.r2.c9 -side left
     
-    frame $id.colors.r3 -background $::panel_background
-    pack $id.colors.r3 -side top
+    frame $mytoplevel.colors.r3 -background $::panel_background
+    pack $mytoplevel.colors.r3 -side top
     foreach i { 0 1 2 3 4 5 6 7 8 9 } \
 		hexcol { 0x404040 0x202020 0x000000 0x551312 0x553512 \
 					 0x535512 0x0F4710 0x0E4345 0x131255 0x2F004D } \
 		{
-			label $id.colors.r3.c$i -background [format "#%6.6x" $hexcol] \
+			label $mytoplevel.colors.r3.c$i -background [format "#%6.6x" $hexcol] \
 				-activebackground [format "#%6.6x" $hexcol] -relief ridge \
 				-padx 7 -pady 0
-			bind  $id.colors.r3.c$i <Button> \
-				[format "::pd_iemgui::preset_col %s %d" $id $hexcol] 
+			bind  $mytoplevel.colors.r3.c$i <Button> \
+				[format "::iemgui_panel::preset_col %s %d" $mytoplevel $hexcol] 
 		}
-    pack $id.colors.r3.c0 $id.colors.r3.c1 $id.colors.r3.c2 $id.colors.r3.c3 \
-		$id.colors.r3.c4 $id.colors.r3.c5 $id.colors.r3.c6 $id.colors.r3.c7 \
-		$id.colors.r3.c8 $id.colors.r3.c9 -side left
+    pack $mytoplevel.colors.r3.c0 $mytoplevel.colors.r3.c1 $mytoplevel.colors.r3.c2 $mytoplevel.colors.r3.c3 \
+		$mytoplevel.colors.r3.c4 $mytoplevel.colors.r3.c5 $mytoplevel.colors.r3.c6 $mytoplevel.colors.r3.c7 \
+		$mytoplevel.colors.r3.c8 $mytoplevel.colors.r3.c9 -side left
     
-    frame $id.cao -pady 10 -background $::panel_background
-    pack $id.cao -side top
-    button $id.cao.cancel -command "::pd_iemgui::cancel $id" \
+    frame $mytoplevel.cao -pady 10 -background $::panel_background
+    pack $mytoplevel.cao -side top
+    button $mytoplevel.cao.cancel -command "::iemgui_panel::cancel $mytoplevel" \
 		-text "Cancel" -width 6 -highlightbackground $::panel_background
-    label $id.cao.dummy1 -text "" -width 3 -background $::panel_background
-	button $id.cao.apply -text "Apply" -width 6 -command "::pd_iemgui::apply $id" \
+    label $mytoplevel.cao.dummy1 -text "" -width 3 -background $::panel_background
+	button $mytoplevel.cao.apply -text "Apply" -width 6 -command "::iemgui_panel::apply $mytoplevel" \
 		-highlightbackground $::panel_background
-    label $id.cao.dummy2 -text "" -width 3 -background $::panel_background
-    button $id.cao.ok -text {OK} -width 6 -command "::pd_iemgui::ok $id" \
+    label $mytoplevel.cao.dummy2 -text "" -width 3 -background $::panel_background
+    button $mytoplevel.cao.ok -text {OK} -width 6 -command "::iemgui_panel::ok $mytoplevel" \
 		-highlightbackground $::panel_background
     
-    pack $id.cao.cancel $id.cao.dummy1 -side left
-	pack $id.cao.apply $id.cao.dummy2 -side left
-    pack $id.cao.ok -side left
+    pack $mytoplevel.cao.cancel $mytoplevel.cao.dummy1 -side left
+	pack $mytoplevel.cao.apply $mytoplevel.cao.dummy2 -side left
+    pack $mytoplevel.cao.ok -side left
 	
     if {[info tclversion] < 8.4} {
-        bind $id <Key-Tab> {tkTabToWindow [tk_focusNext %W]}
-        bind $id <<PrevWindow>> {tkTabToWindow [tk_focusPrev %W]}
+        bind $mytoplevel <Key-Tab> {tkTabToWindow [tk_focusNext %W]}
+        bind $mytoplevel <<PrevWindow>> {tkTabToWindow [tk_focusPrev %W]}
     } else {
-        bind $id <Key-Tab> {tk::TabToWindow [tk_focusNext %W]}
-        bind $id <<PrevWindow>> {tk::TabToWindow [tk_focusPrev %W]}
+        bind $mytoplevel <Key-Tab> {tk::TabToWindow [tk_focusNext %W]}
+        bind $mytoplevel <<PrevWindow>> {tk::TabToWindow [tk_focusPrev %W]}
     }
     
-    $id.dim.w_ent select from 0
-    $id.dim.w_ent select adjust end
-    focus $id.dim.w_ent
+    $mytoplevel.dim.w_ent select from 0
+    $mytoplevel.dim.w_ent select adjust end
+    focus $mytoplevel.dim.w_ent
 }
 

Modified: branches/pd-devel/0.41.4/src/pd.tk
===================================================================
--- branches/pd-devel/0.41.4/src/pd.tk	2009-02-03 05:40:41 UTC (rev 10722)
+++ branches/pd-devel/0.41.4/src/pd.tk	2009-02-03 05:45:42 UTC (rev 10723)
@@ -61,8 +61,8 @@
 package require pd_bindings
 package require pd_post
 package require font_panel
-package require gatom
-package require pd_iemgui
+package require gatom_panel
+package require iemgui_panel
 package require pdtk_array
 package require pdtk_canvas
 package require pdtk_text
@@ -72,9 +72,9 @@
 # import into the global namespace for backwards compatibility
 namespace import ::pd_connect::pdsend
 namespace import ::pd_post::pdtk_post
-namespace import ::pd_iemgui::pdtk_iemgui_dialog
-namespace import ::gatom::pdtk_gatom_dialog
 namespace import ::font_panel::pdtk_canvas_dofont
+namespace import ::gatom_panel::pdtk_gatom_dialog
+namespace import ::iemgui_panel::pdtk_iemgui_dialog
 
 #------------------------------------------------------------------------------#
 # coding style

Modified: branches/pd-devel/0.41.4/src/pkgIndex.tcl
===================================================================
--- branches/pd-devel/0.41.4/src/pkgIndex.tcl	2009-02-03 05:40:41 UTC (rev 10722)
+++ branches/pd-devel/0.41.4/src/pkgIndex.tcl	2009-02-03 05:45:42 UTC (rev 10723)
@@ -13,8 +13,8 @@
 package ifneeded pd_connect 0.1 [list source [file join $dir pd_connect.tcl]]
 package ifneeded find_panel 0.1 [list source [file join $dir find_panel.tcl]]
 package ifneeded font_panel 0.1 [list source [file join $dir font_panel.tcl]]
-package ifneeded gatom 0.1 [list source [file join $dir gatom.tcl]]
-package ifneeded pd_iemgui 0.1 [list source [file join $dir pd_iemgui.tcl]]
+package ifneeded gatom_panel 0.1 [list source [file join $dir gatom_panel.tcl]]
+package ifneeded iemgui_panel 0.1 [list source [file join $dir iemgui_panel.tcl]]
 package ifneeded pd_menucommands 0.1 [list source [file join $dir pd_menucommands.tcl]]
 package ifneeded pd_menus 0.1 [list source [file join $dir pd_menus.tcl]]
 package ifneeded pd_post 0.1 [list source [file join $dir pd_post.tcl]]


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Pd-cvs mailing list