Update of /cvsroot/pure-data/externals/unauthorized/scrolllist In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18936/scrolllist
Added Files: CHANGES.LOG INSTALL Makefile README Untitled-1.pd ave-lucifer.txt help-scrolllist.pd scrolllist.c scrolllist.pd_linux scrolllist.tk scrolllist.tk2c tk2c.bash yesterday.txt Log Message: scrolllist 0.1
--- NEW FILE: scrolllist.c --- /*---------------------- scrolllist~ ------------------------------------------ */ /* */ /* scrolllist~ : scrolling list of text items */ /* constructor : scrolllist | scrolllist <capacity> <width> <height> */ /* */ /* Copyleft Yves Degoyon ( ydegoyon@free.fr ) */ /* */ /* This program is free software; you can redistribute it and/or */ /* modify it under the terms of the GNU General Public License */ /* as published by the Free Software Foundation; either version 2 */ /* of the License, or (at your option) any later version. */ /* */ /* See file LICENSE for further informations on licensing terms. */ /* */ /* This program is distributed in the hope that it will be useful, */ /* but WITHOUT ANY WARRANTY; without even the implied warranty of */ /* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */ /* GNU General Public License for more details. */ /* */ [...961 lines suppressed...]
scrolllist_widgetbehavior.w_getrectfn = scrolllist_getrect; scrolllist_widgetbehavior.w_displacefn = scrolllist_displace; scrolllist_widgetbehavior.w_selectfn = scrolllist_select; scrolllist_widgetbehavior.w_activatefn = NULL; scrolllist_widgetbehavior.w_deletefn = scrolllist_deleteobj; scrolllist_widgetbehavior.w_visfn = scrolllist_vis; scrolllist_widgetbehavior.w_clickfn = scrolllist_click;
#if PD_MINOR_VERSION >= 37 class_setpropertiesfn(scrolllist_class, scrolllist_properties); class_setsavefn(scrolllist_class, scrolllist_save); #else scrolllist_widgetbehavior.w_propertiesfn = scrolllist_properties; scrolllist_widgetbehavior.w_savefn = scrolllist_save; #endif
class_setwidget(scrolllist_class, &scrolllist_widgetbehavior); class_sethelpsymbol(scrolllist_class, gensym("help-scrolllist.pd")); }
--- NEW FILE: scrolllist.pd_linux --- (This appears to be a binary file; contents omitted.)
--- NEW FILE: ave-lucifer.txt --- (This appears to be a binary file; contents omitted.)
--- NEW FILE: help-scrolllist.pd --- #N canvas 38 85 936 562 10; #X text 574 514 scrolllist 100 200 200; #X text 576 527 scrolllist; #X text 500 515 Examples :; #X text 72 507 Comments and bugs @ ydegoyon@free.fr; #X symbolatom 26 481 30 0 0 0 - - -; #X text 472 332 Note : you can scroll the list by dragging; #X msg 67 79 seek $1; #X floatatom 127 81 5 0 0 0 - - -; #X text 444 129 Change the font; #X msg 116 129 font Helvetica normal 14; #X msg 297 129 font Courier bold 24; #X msg 128 157 scroll 200; #X msg 209 157 scroll -200; #X text 300 156 Scrolling by numbers for the laziest; #X obj 254 183 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 1 1; #X msg 164 183 graphics $1; #X text 383 183 Show or hide graphics; #X msg 277 182 1; #X obj 310 183 loadbang; #X text 498 469 Scrollist lets you display text items in a patch window ; #X text 498 486 Constructor : scrolllist <capacity> <width> <height> | scrolllist ( defaults 100 400 200 ); #X text 168 73 You can seek in the text list; #X text 168 86 It behaves as a circular list; #X text 142 104 Sort the text items; #X text 248 481 Selected text item; #X text 470 397 with the "Properties" dialog; #X text 470 383 You can change all the properties of the object; #X msg 612 57 add $1; #X text 666 58 add a text; #X obj 612 32 l2s; #X text 808 90 insert a text; #X msg 742 89 dystopia; #X msg 612 7 the aesthetics of our anger; #X msg 734 115 atacama; #X text 797 115 replace a text; #X text 828 149 delete a text; #X msg 611 89 insert $1 3; #X obj 709 89 l2s; #X obj 705 115 l2s; #X msg 610 115 replace $1 3; #X msg 612 149 delete $1; #X obj 692 149 hradio 15 1 0 8 empty empty empty 0 -6 0 8 -262144 -1 -1 0; #X obj 555 269 textfile; #X msg 585 236 read yesterday.txt cr; #X msg 620 270 rewind; #X obj 527 269 l2s; #X msg 525 236 add $1; #X obj 748 216 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 1; #X obj 747 237 metro 1000; #X obj 35 222 scrolllist 25 400 200 {Helvetica 12 normal} black green #904562; #X text 470 343 the mouse in the text area; #X msg 33 57 clear; #X text 79 57 clear all; #X obj 482 270 t b; #X text 746 270 read a full text; #X msg 481 295 scroll 12; #X obj 585 213 loadbang; #X obj 73 237 r smsg; #X obj 62 383 s somsg; #X obj 26 455 r somsg; #X obj 14 176 s smsg; #X obj 557 295 s smsg; #X obj 573 176 s smsg; #X msg 95 105 sort; #X msg 617 295 read ave-lucifer.txt cr; #X connect 6 0 60 0; #X connect 7 0 6 0; #X connect 9 0 60 0; #X connect 10 0 60 0; #X connect 11 0 60 0; #X connect 12 0 60 0; #X connect 14 0 15 0; #X connect 15 0 60 0; #X connect 17 0 14 0; #X connect 18 0 17 0; #X connect 27 0 62 0; #X connect 29 0 27 0; #X connect 31 0 37 0; #X connect 32 0 29 0; #X connect 33 0 38 0; #X connect 36 0 62 0; #X connect 37 0 36 0; #X connect 38 0 39 0; #X connect 39 0 62 0; #X connect 40 0 62 0; #X connect 41 0 40 0; #X connect 42 0 45 0; #X connect 42 1 44 0; #X connect 43 0 42 0; #X connect 44 0 42 0; #X connect 45 0 46 0; #X connect 46 0 53 0; #X connect 46 0 61 0; #X connect 47 0 48 0; #X connect 48 0 42 0; #X connect 49 0 58 0; #X connect 51 0 60 0; #X connect 53 0 55 0; #X connect 55 0 61 0; #X connect 56 0 43 0; #X connect 57 0 49 0; #X connect 59 0 4 0; #X connect 63 0 60 0; #X connect 64 0 42 0;
--- NEW FILE: Makefile --- NAME=scrolllist CSYM=scrolllist
current: pd_linux
INCLUDE = -I../../src
# ----------------------- Mac OSX -----------------------
pd_darwin: $(NAME).pd_darwin
.SUFFIXES: .pd_darwin
DARWINCFLAGS = -DPD -O2 -Wall -W -Wshadow -Wstrict-prototypes \ -Wno-unused -Wno-parentheses -Wno-switch
.c.pd_darwin: cc $(DARWINCFLAGS) $(INCLUDE) -o $*.o -c $*.c cc -bundle -undefined suppress -flat_namespace -o $*.pd_darwin $*.o rm -f $*.o ../$*.pd_darwin ln -s $*/$*.pd_darwin ..
# ----------------------- LINUX i386 -----------------------
pd_linux: $(NAME).pd_linux
.SUFFIXES: .pd_linux
LINUXCFLAGS = -DPD -DUNIX -O2 -funroll-loops -fomit-frame-pointer \ -Wall -W -Wno-shadow -Wstrict-prototypes \ -Wno-unused -Wno-parentheses -Wno-switch -Werror -g
.c.pd_linux: ./tk2c.bash < $*.tk > $*.tk2c gcc $(LINUXCFLAGS) $(INCLUDE) -o $*.o -c $*.c ld -export_dynamic -shared -o $*.pd_linux $*.o -lc -lm strip --strip-unneeded $*.pd_linux rm -f $*.o ../$*.pd_linux ln -s $*/$*.pd_linux ..
# ----------------------------------------------------------
install: cp help-*.pd ../../doc/5.reference
clean: rm -f *.o *.pd_* so_locations
--- NEW FILE: tk2c.bash --- #!/bin/bash
#set -x
while read line do for word in $line do if [ "X"$word != "X"${word##} ] then echo // ${line##} break else line=${line//'/\'} #useless, slashes never gets in line=${line//\/\\} #this one's dirty, i know line=${line//;/\\;} line=${line//"/\"} echo 'sys_gui("'$line'\n");' break fi done done
--- NEW FILE: scrolllist.tk --- ############ scrolllist procedures -- ydegoyon@free.fr #########
proc scrolllist_apply {id} { # strip "." from the TK id to make a variable name suffix set vid [string trimleft $id .] # for each variable, make a local variable to hold its name... set var_graph_capacity [concat graph_capacity_$vid] global $var_graph_capacity set var_graph_width [concat graph_width_$vid] global $var_graph_width set var_graph_height [concat graph_height$vid] global $var_graph_height set var_graph_font [concat graph_font$vid] global $var_graph_font set var_graph_bgcolor [concat graph_bgcolor$vid] global $var_graph_bgcolor set var_graph_fgcolor [concat graph_fgcolor$vid] global $var_graph_fgcolor set var_graph_secolor [concat graph_secolor$vid] global $var_graph_secolor
set cmd [concat $id dialog \ [eval concat $$var_graph_capacity] \ [eval concat $$var_graph_width] \ [eval concat $$var_graph_height] \ [eval concat $$var_graph_font] \ [eval concat $$var_graph_bgcolor] \ [eval concat $$var_graph_fgcolor] \ [eval concat $$var_graph_secolor] \ ;] #puts stderr $cmd pd $cmd }
proc scrolllist_cancel {id} { set cmd [concat $id cancel ;] #puts stderr $cmd pd $cmd }
proc scrolllist_ok {id} { scrolllist_apply $id scrolllist_cancel $id }
proc pdtk_scrolllist_dialog {id capacity width height font bgcolor fgcolor secolor} { set vid [string trimleft $id .] set var_graph_capacity [concat graph_capacity_$vid] global $var_graph_capacity set var_graph_width [concat graph_width_$vid] global $var_graph_width set var_graph_height [concat graph_height$vid] global $var_graph_height set var_graph_font [concat graph_font$vid] global $var_graph_font set var_graph_bgcolor [concat graph_bgcolor$vid] global $var_graph_bgcolor set var_graph_fgcolor [concat graph_fgcolor$vid] global $var_graph_fgcolor set var_graph_secolor [concat graph_secolor$vid] global $var_graph_secolor
set $var_graph_capacity $capacity set $var_graph_width $width set $var_graph_height $height set $var_graph_font $font set $var_graph_bgcolor $bgcolor set $var_graph_fgcolor $fgcolor set $var_graph_secolor $secolor
toplevel $id wm title $id {scrolllist} wm protocol $id WM_DELETE_WINDOW [concat scrolllist_cancel $id]
label $id.label -text {SCROLLLIST PROPERTIES} pack $id.label -side top
frame $id.buttonframe pack $id.buttonframe -side bottom -fill x -pady 2m button $id.buttonframe.cancel -text {Cancel}\ -command "scrolllist_cancel $id" button $id.buttonframe.apply -text {Apply}\ -command "scrolllist_apply $id" button $id.buttonframe.ok -text {OK}\ -command "scrolllist_ok $id" pack $id.buttonframe.cancel -side left -expand 1 pack $id.buttonframe.apply -side left -expand 1 pack $id.buttonframe.ok -side left -expand 1
frame $id.1rangef pack $id.1rangef -side top label $id.1rangef.lcapacity -text "Capacity :" entry $id.1rangef.capacity -textvariable $var_graph_capacity -width 7 pack $id.1rangef.lcapacity $id.1rangef.capacity -side left
frame $id.2rangef pack $id.2rangef -side top label $id.2rangef.lwidth -text "Width :" entry $id.2rangef.width -textvariable $var_graph_width -width 7 pack $id.2rangef.lwidth $id.2rangef.width -side left
frame $id.3rangef pack $id.3rangef -side top label $id.3rangef.lheight -text "Height :" entry $id.3rangef.height -textvariable $var_graph_height -width 7 pack $id.3rangef.lheight $id.3rangef.height -side left
frame $id.3_5rangef pack $id.3_5rangef -side top label $id.3_5rangef.lfont -text "Font :" entry $id.3_5rangef.font -textvariable $var_graph_font -width 30 pack $id.3_5rangef.lfont $id.3_5rangef.font -side left
frame $id.4rangef pack $id.4rangef -side top label $id.4rangef.lbgcolor -text "Background Color :" entry $id.4rangef.bgcolor -textvariable $var_graph_bgcolor -width 7 pack $id.4rangef.lbgcolor $id.4rangef.bgcolor -side left
frame $id.5rangef pack $id.5rangef -side top label $id.5rangef.lfgcolor -text "Foreground Color :" entry $id.5rangef.fgcolor -textvariable $var_graph_fgcolor -width 7 pack $id.5rangef.lfgcolor $id.5rangef.fgcolor -side left
frame $id.6rangef pack $id.6rangef -side top label $id.6rangef.lsecolor -text "Selection Color :" entry $id.6rangef.secolor -textvariable $var_graph_secolor -width 7 pack $id.6rangef.lsecolor $id.6rangef.secolor -side left
bind $id.1rangef.capacity <KeyPress-Return> [concat scrolllist_ok $id] bind $id.2rangef.width <KeyPress-Return> [concat scrolllist_ok $id] bind $id.3rangef.height <KeyPress-Return> [concat scrolllist_ok $id] bind $id.3_5rangef.font <KeyPress-Return> [concat scrolllist_ok $id] bind $id.4rangef.bgcolor <KeyPress-Return> [concat scrolllist_ok $id] bind $id.5rangef.fgcolor <KeyPress-Return> [concat scrolllist_ok $id] bind $id.6rangef.secolor <KeyPress-Return> [concat scrolllist_ok $id] }
############ scrolllist procedures END -- ydegoyon@free.fr #########
--- NEW FILE: yesterday.txt --- Yesterday All those backups seemed a waste of pay. Now my database has gone away. Oh I believe in yesterday. Suddenly, There's not half the files there used to be, And there's a milestone hanging over me The system crashed so suddenly. I pushed something wrong What it was I could not say. Now all my data's gone and I long for yesterday-ay-ay-ay. Yesterday, The need for back-ups seemed so far away. I knew my data was all here to stay, Now I believe in yesterday. Yesterday All those backups seemed a waste of pay. Now my database has gone away. Oh I believe in yesterday. Suddenly, There's not half the files there used to be, And there's a milestone hanging over me The system crashed so suddenly. I pushed something wrong What it was I could not say. Now all my data's gone and I long for yesterday-ay-ay-ay. Yesterday, The need for back-ups seemed so far away. I knew my data was all here to stay, Now I believe in yesterday.
--- NEW FILE: Untitled-1.pd --- #N canvas 0 0 999 679 10; #N canvas 0 0 450 300 sub 1; #X obj -24 -13 scrolllist 100 400 200 {Helvetica 10 bold} white black red; #X msg 123 227 graphics 0; #X connect 1 0 0 0; #X coords 0 0 1 1 200 140 1; #X restore 206 100 pd sub;
--- NEW FILE: INSTALL --- untar in /my/pd/dir/externs
cd /my/pd/dir/externs/scrolllist
make clean
make
make install
open help-scrolllist.pd
Thanx for getting here. Yves/
--- NEW FILE: README --- Version 0.01 copyleft 2001 by Yves Degoyon tarballs and updates available @ http://ydegoyon.free.fr/software.html
scrolllist : displays and scrolls a text in a patch window
To install scrolllist, follow the steps from INSTALL
This software is published under GPL terms.
This is software with ABSOLUTELY NO WARRANTY. Use it at your OWN RISK. It's possible to damage e.g. hardware or your hearing due to a bug or for other reasons. We do not warrant that the program is free of infringement of any third-party patents.
*****************************************************************************
--- NEW FILE: CHANGES.LOG --- 0.1 initial version
--- NEW FILE: scrolllist.tk2c --- // ########### scrolllist procedures -- ydegoyon@free.fr ######### sys_gui("proc scrolllist_apply {id} {\n"); // strip "." from the TK id to make a variable name suffix sys_gui("set vid [string trimleft $id .]\n"); // for each variable, make a local variable to hold its name... sys_gui("set var_graph_capacity [concat graph_capacity_$vid]\n"); sys_gui("global $var_graph_capacity\n"); sys_gui("set var_graph_width [concat graph_width_$vid]\n"); sys_gui("global $var_graph_width\n"); sys_gui("set var_graph_height [concat graph_height$vid]\n"); sys_gui("global $var_graph_height\n"); sys_gui("set var_graph_font [concat graph_font$vid]\n"); sys_gui("global $var_graph_font\n"); sys_gui("set var_graph_bgcolor [concat graph_bgcolor$vid]\n"); sys_gui("global $var_graph_bgcolor\n"); sys_gui("set var_graph_fgcolor [concat graph_fgcolor$vid]\n"); sys_gui("global $var_graph_fgcolor\n"); sys_gui("set var_graph_secolor [concat graph_secolor$vid]\n"); sys_gui("global $var_graph_secolor\n"); sys_gui("set cmd [concat $id dialog [eval concat $$var_graph_capacity] [eval concat $$var_graph_width] [eval concat $$var_graph_height] [eval concat $$var_graph_font] [eval concat $$var_graph_bgcolor] [eval concat $$var_graph_fgcolor] [eval concat $$var_graph_secolor] \;]\n"); // puts stderr $cmd sys_gui("pd $cmd\n"); sys_gui("}\n"); sys_gui("proc scrolllist_cancel {id} {\n"); sys_gui("set cmd [concat $id cancel \;]\n"); // puts stderr $cmd sys_gui("pd $cmd\n"); sys_gui("}\n"); sys_gui("proc scrolllist_ok {id} {\n"); sys_gui("scrolllist_apply $id\n"); sys_gui("scrolllist_cancel $id\n"); sys_gui("}\n"); sys_gui("proc pdtk_scrolllist_dialog {id capacity width height font bgcolor fgcolor secolor} {\n"); sys_gui("set vid [string trimleft $id .]\n"); sys_gui("set var_graph_capacity [concat graph_capacity_$vid]\n"); sys_gui("global $var_graph_capacity\n"); sys_gui("set var_graph_width [concat graph_width_$vid]\n"); sys_gui("global $var_graph_width\n"); sys_gui("set var_graph_height [concat graph_height$vid]\n"); sys_gui("global $var_graph_height\n"); sys_gui("set var_graph_font [concat graph_font$vid]\n"); sys_gui("global $var_graph_font\n"); sys_gui("set var_graph_bgcolor [concat graph_bgcolor$vid]\n"); sys_gui("global $var_graph_bgcolor\n"); sys_gui("set var_graph_fgcolor [concat graph_fgcolor$vid]\n"); sys_gui("global $var_graph_fgcolor\n"); sys_gui("set var_graph_secolor [concat graph_secolor$vid]\n"); sys_gui("global $var_graph_secolor\n"); sys_gui("set $var_graph_capacity $capacity\n"); sys_gui("set $var_graph_width $width\n"); sys_gui("set $var_graph_height $height\n"); sys_gui("set $var_graph_font $font\n"); sys_gui("set $var_graph_bgcolor $bgcolor\n"); sys_gui("set $var_graph_fgcolor $fgcolor\n"); sys_gui("set $var_graph_secolor $secolor\n"); sys_gui("toplevel $id\n"); sys_gui("wm title $id {scrolllist}\n"); sys_gui("wm protocol $id WM_DELETE_WINDOW [concat scrolllist_cancel $id]\n"); sys_gui("label $id.label -text {SCROLLLIST PROPERTIES}\n"); sys_gui("pack $id.label -side top\n"); sys_gui("frame $id.buttonframe\n"); sys_gui("pack $id.buttonframe -side bottom -fill x -pady 2m\n"); sys_gui("button $id.buttonframe.cancel -text {Cancel} -command "scrolllist_cancel $id"\n"); sys_gui("button $id.buttonframe.apply -text {Apply} -command "scrolllist_apply $id"\n"); sys_gui("button $id.buttonframe.ok -text {OK} -command "scrolllist_ok $id"\n"); sys_gui("pack $id.buttonframe.cancel -side left -expand 1\n"); sys_gui("pack $id.buttonframe.apply -side left -expand 1\n"); sys_gui("pack $id.buttonframe.ok -side left -expand 1\n"); sys_gui("frame $id.1rangef\n"); sys_gui("pack $id.1rangef -side top\n"); sys_gui("label $id.1rangef.lcapacity -text "Capacity :"\n"); sys_gui("entry $id.1rangef.capacity -textvariable $var_graph_capacity -width 7\n"); sys_gui("pack $id.1rangef.lcapacity $id.1rangef.capacity -side left\n"); sys_gui("frame $id.2rangef\n"); sys_gui("pack $id.2rangef -side top\n"); sys_gui("label $id.2rangef.lwidth -text "Width :"\n"); sys_gui("entry $id.2rangef.width -textvariable $var_graph_width -width 7\n"); sys_gui("pack $id.2rangef.lwidth $id.2rangef.width -side left\n"); sys_gui("frame $id.3rangef\n"); sys_gui("pack $id.3rangef -side top\n"); sys_gui("label $id.3rangef.lheight -text "Height :"\n"); sys_gui("entry $id.3rangef.height -textvariable $var_graph_height -width 7\n"); sys_gui("pack $id.3rangef.lheight $id.3rangef.height -side left\n"); sys_gui("frame $id.3_5rangef\n"); sys_gui("pack $id.3_5rangef -side top\n"); sys_gui("label $id.3_5rangef.lfont -text "Font :"\n"); sys_gui("entry $id.3_5rangef.font -textvariable $var_graph_font -width 30\n"); sys_gui("pack $id.3_5rangef.lfont $id.3_5rangef.font -side left\n"); sys_gui("frame $id.4rangef\n"); sys_gui("pack $id.4rangef -side top\n"); sys_gui("label $id.4rangef.lbgcolor -text "Background Color :"\n"); sys_gui("entry $id.4rangef.bgcolor -textvariable $var_graph_bgcolor -width 7\n"); sys_gui("pack $id.4rangef.lbgcolor $id.4rangef.bgcolor -side left\n"); sys_gui("frame $id.5rangef\n"); sys_gui("pack $id.5rangef -side top\n"); sys_gui("label $id.5rangef.lfgcolor -text "Foreground Color :"\n"); sys_gui("entry $id.5rangef.fgcolor -textvariable $var_graph_fgcolor -width 7\n"); sys_gui("pack $id.5rangef.lfgcolor $id.5rangef.fgcolor -side left\n"); sys_gui("frame $id.6rangef\n"); sys_gui("pack $id.6rangef -side top\n"); sys_gui("label $id.6rangef.lsecolor -text "Selection Color :"\n"); sys_gui("entry $id.6rangef.secolor -textvariable $var_graph_secolor -width 7\n"); sys_gui("pack $id.6rangef.lsecolor $id.6rangef.secolor -side left\n"); sys_gui("bind $id.1rangef.capacity <KeyPress-Return> [concat scrolllist_ok $id]\n"); sys_gui("bind $id.2rangef.width <KeyPress-Return> [concat scrolllist_ok $id]\n"); sys_gui("bind $id.3rangef.height <KeyPress-Return> [concat scrolllist_ok $id]\n"); sys_gui("bind $id.3_5rangef.font <KeyPress-Return> [concat scrolllist_ok $id]\n"); sys_gui("bind $id.4rangef.bgcolor <KeyPress-Return> [concat scrolllist_ok $id]\n"); sys_gui("bind $id.5rangef.fgcolor <KeyPress-Return> [concat scrolllist_ok $id]\n"); sys_gui("bind $id.6rangef.secolor <KeyPress-Return> [concat scrolllist_ok $id]\n"); sys_gui("}\n"); // ########### scrolllist procedures END -- ydegoyon@free.fr #########