diff options
-rwxr-xr-x | extensions/gui/ix/index.psp | 81 | ||||
-rwxr-xr-x | extensions/gui/ix/mat.wid | 18 |
2 files changed, 93 insertions, 6 deletions
diff --git a/extensions/gui/ix/index.psp b/extensions/gui/ix/index.psp new file mode 100755 index 00000000..0dfe9cd9 --- /dev/null +++ b/extensions/gui/ix/index.psp @@ -0,0 +1,81 @@ +<html><head><title>::ix::{gui}</title></head>
+<%
+import random, string
+sys.stdout=req
+def rc(): return "#%06x" % random.randint(0,16777216)
+things = {'control' : {
+ 'kbd' : {'desc' : 'resizable, velocity sensitive keyboard'},
+ 'grid' : {'desc' : 'x-y control surface'},
+ 'ngrid' : {'desc' : 'multi-parameter x-y control surface'},
+ 'filter' : {'desc' : 'biquad front-end'},
+ 'nob' : {'desc' : 'micro/macro knob (tkzinc)'},
+ 'knob' : {'desc' : 'micro/macro knob'}
+ }, 'edit' : {
+ 'mat' : {'desc' : 'general purpose editing surface'},
+ 'lg' : {'desc' : 'multi-set vector editor'},
+ 'tile' : {'desc' : 'drum/grid/list editor'}
+ }, 'analyze' : {
+ 'sp' : {'desc' : 'rgb-pixmap'},
+ 'spectrum' : {'desc' : 'dual-band spectrum graph'},
+ 'img' : {'desc' : 'images'}
+ }, 'container' : {
+ 'dd' : {'desc' : 'drag\'n\'drop'},
+ 'tree' : {'desc': 'heirarchical data management'},
+ 'q' : {'desc' : 'queue'},
+ 'dm' : {'desc' : 'dropdownmenu'}
+ }, '?' : {
+ 'README' :{'desc' : """
+ these are my pd gui objects.
+
+ """}, 'INSTALL' : {'desc' : """
+<b>cd /usr/local/lib/pd && cvs -d :pserver:anonymous@cvs.sf.net:/cvsroot/pure-data co extensions/gui/ix</b><br><b>echo -path /usr/local/lib/pd/extensions/gui/ix >> ~/.pdrc</b><br>
+see DEPS for more tips
+"""}, 'DEPS' : {'desc' : """
+tcl >=8.5:<br>
+<b>cvs -d :pserver:anonymous@cvs.sf.net:/cvsroot/tcl co tcl <font size=-1>&& cd tcl/unix&& ./configure && make install & cd ../..</font></b><br>
+<b>cvs -d :pserver:anonymous@cvs.sf.net:/cvsroot/tktoolkit co tk <font size=-1>&& cd tk/unix&& ./configure --enable-xft && make install & cd ../..</font></b><br><br>
+widgets are currently hosted by the [widget] external<br><b>cvs -d :pserver:anonymous@cvs.sf.net:/cvsroot/pure-data co externals/miXed <font size=-1>&& cd externals/miXed && make && cp bin/* /usr/local/lib/pd/extra</font></b><br><i>-or-</i> checkout all of externals and in <font size=-1><b>cd externals/build && scons install</b></font><br><br>a cornucopia and smorgasboard of Tk libraries are used throughout the feast<br>
+<b>for ext in blt snack tkdnd tkimg tkpath tktable tktreectrl ; do cvs -d :pserver:anonymous@cvs.sf.net:/cvsroot/$ext co $ext; cd $ext && ./configure && make install && cd ..; done</b><br>
+last i checked tkpath was actually a module in tclbitprint<br>and thats all..
+
+"""}
+ }}
+
+script = []
+for cat in things.iterkeys():
+ script.append("""document.getElementById('%s_items').style.display='none'""" % cat)
+ script.append("""document.getElementById('cat_%s').style.backgroundColor='gray'""" % cat)
+print "<script>\nfunction hideCats() {\n" + str.join(";\n",script) + "\n}\n</script>"
+
+script = []
+for cat in things.iterkeys():
+ for item in things[cat].iterkeys():
+ script.append("""document.getElementById('item_info_%s').style.display='none'""" % item)
+ script.append("""document.getElementById('item_%s').style.backgroundColor='gray'""" % item)
+print "<script>\nfunction hideItems() {\n" + str.join(";\n",script) + "\n}\n</script>"
+
+%>
+<style>span {font: bitstream vera sans, tahoma, helvetica, sans-serif}</style>
+<body bgcolor=<%print rc()%> topmargin=0 leftmargin=0 marginwidth=0 marginheight=0><div style="background-color:<%print rc()%>" width=100%>
+<%
+for cat in things.iterkeys():
+ print """<span id="cat_%(cat)s" style="background-color: gray; padding: 6px"><span style="font-size: 14px; padding: 4px; color: %(fg)s; background-color: %(bg)s" onmouseover="hideCats();document.getElementById('%(cat)s_items').style.display='';document.getElementById('cat_%(cat)s').style.backgroundColor='white'">
+ %(cat)s
+ </span></span> """ % {'fg' : rc(), 'bg' : rc(), 'cat' : cat}
+
+print """</div><div style="background-color %(bg)s">""" % {'bg' : rc()}
+
+for cat in things.iterkeys():
+ print """<span id=%(cat)s_items style="display: none">""" % {'cat' : cat}
+ for item in things[cat].iterkeys():
+ print """<span id=item_%(item)s style="backgound-color: black" onmouseover="hideItems();document.getElementById('item_info_%(item)s').style.display='';document.getElementById('item_%(item)s').style.backgroundColor='white'">%(item)s</span>""" % {'item' : item}
+ print "</span>"
+
+print "<br>"
+
+for cat in things.iterkeys():
+ for item in things[cat].iterkeys():
+ print """<span id=item_info_%(item)s style="display: none"><img src=%(item)s.PNG style="float: left">%(content)s""" % {'item' : item, 'content' : things[cat][item]['desc']}
+ print "</span>"
+
+%>
diff --git a/extensions/gui/ix/mat.wid b/extensions/gui/ix/mat.wid index 09e74ce6..237bf772 100755 --- a/extensions/gui/ix/mat.wid +++ b/extensions/gui/ix/mat.wid @@ -54,9 +54,9 @@ namespace eval ::ix { if {$is eq "all"} {set is [dict keys $_($t)]}
foreach id $is {
set tags [list item i$id $id]
+ set color [dict get $_($t:g) $_($t:cg) color]
switch [dict get $_($t) $id type] {
note {
- set color [dict get $_($t:g) $_($t:cg) color]
$p.m create path [::tkpath::coords rect 0 0 0 0 -rx 3 -ry 3] -tags [concat $tags r] -stroke [color [lighten $color 0.4]] -strokeopacity 1.0 -fill [color $color] -fillopacity 0.08
$p.m create path [::tkpath::coords rect 0 0 0 0 -rx 3 -ry 3] -tags [concat $tags q] -fill [color $color] -strokewidth 0 -fillopacity 0.8
}
@@ -64,7 +64,8 @@ namespace eval ::ix { snack:::sound s$id
set filename [dict get $_($t) $id filename]
s$id read $filename
- $p.m create waveform 0 0 -tags [concat $tags w] -sound s$id
+ $p.m create path [::tkpath::coords rect 0 0 0 0 -rx 3 -ry 3] -tags [concat $tags r] -strokewidth 0 -fill [color $color] -fillopacity 0.08
+ $p.m create waveform 0 0 -tags [concat $tags w] -sound s$id -fill white
set length [expr [s$id length] / ($_($t:samplerate) + 0.0) * 1000]
mat_item_ua $p $t $id abs [dict create xx [expr [dict get $_($t) $id x] + $length]] 0
$p.m create text 0 0 -tags [concat $tags tl] -font {{bitstream vera sans} 8} -fill HotPink -anchor nw -justify left -text "[string range $length 0 10] s"
@@ -167,9 +168,14 @@ namespace eval ::ix { }
sound {
set waveform [$p.m find withtag "i$id && w"]
+ set r [$p.m find withtag "i$id && r"]
+# set ro [expr int($ro / 2.)]
+ set ro 6
+ $p.m coords $r [::tkpath::coords rect $x $y $sx $sy -rx $ro -ry $ro]
+ $p.m itemconfigure $r -fillopacity [dict get $_($t) $id v] -fill $color
$p.m coords $waveform $x $y
-# $p.m itemconfigure $waveform -width $sx -height $sy
- $p.m itemconfigure $waveform -width $sx
+ $p.m itemconfigure $waveform -width $sx -height [expr int($sy)]
+# $p.m itemconfigure $waveform -width $sx
$p.m coords [$p.m find withtag "i$id && tl"] [expr $x + 4] [expr $y + 4]
$p.m coords [$p.m find withtag "i$id && tlr"] [$p.m bbox [$p.m find withtag "i$id && tl"] ]
$p.m coords [$p.m find withtag "i$id && tf"] [expr $x + $sx] [expr $y + 4]
@@ -253,8 +259,8 @@ namespace eval ::ix { } else {
set clicked [mat_cleansel $p $t [$p.m find overlapping [expr $x - 2] [expr $y - 2] [expr $x + 2] [expr $y + 2]]]
if {$clicked ne ""} {
- mat_resize_modes $p $t $x $y [lindex $clicked 0]
- if {[llength $_($t:sel)] <= 1} {mat_updatesel $p $t [lindex $clicked 0]}
+ mat_resize_modes $p $t $x $y [lindex $clicked end]
+ if {[llength $_($t:sel)] <= 1} {mat_updatesel $p $t [lindex $clicked end]}
} else {
mat_mode $p $t move_canvas
}
|