Index: trunk/doc/user/09_appendix/action_src/layer.html =================================================================== --- trunk/doc/user/09_appendix/action_src/layer.html (nonexistent) +++ trunk/doc/user/09_appendix/action_src/layer.html (revision 543) @@ -0,0 +1,18 @@ +Change a layer property or layer ordering, depending on the argument: +

+Up or down moves the layer one slot up or down in layer ordering. Top or bottom +moves the layer to the top or bottom in layer ordering. Layers are rendered +from bottom to top: layers higher on the list will render over layers lower +on the list. This matters especially if appearance/layer_alpha is 1 and +layers are solid with no translucencly. +

+Del removes the currently selected layer. +

+getidx returns the index of the currently selected layer as an integer; +getlen returns the number of layers as an integer. These are useful for +user scripting. +

+setcolor and rename changes the color or name of the currently selected layer +(new color or name supplied as a second argument). +

+all-visible and all-invisible changes visibility of all layers. \ No newline at end of file Index: trunk/doc/user/09_appendix/src/Makefile =================================================================== --- trunk/doc/user/09_appendix/src/Makefile (nonexistent) +++ trunk/doc/user/09_appendix/src/Makefile (revision 543) @@ -0,0 +1,26 @@ +CAMVRND = ../../../../src/camv-rnd +CLEANFILES=../action_details.html ../action_reference.html ../formats.html ../dialogs.html + +all: $(CLEANFILES) + +../action_details.html: ./action_compiler.sh ../action_src/*.html librnd_acts + ./action_compiler.sh ../action_src/*.html LIBRND librnd_acts/*.html > ../action_details.html + +../action_reference.html : ./dump_actions_to_html.sh $(CAMVRND) ../action_details.html librnd_acts + ./dump_actions_to_html.sh > ../action_reference.html + +librnd_acts: FORCE + svn checkout svn://svn.repo.hu/librnd/trunk/doc/action librnd_acts + + +../formats.html: gen_formats.sh ../../../../src_plugins/io_*/*.pup ../../../../src_plugins/import_*/*.pup ../../../../src_plugins/export_*/*.pup + ./gen_formats.sh > ../formats.html + +../dialogs.html: $(CAMVRND) ./gen_dialogs.sh ./dialog_extra.awk + ./gen_dialogs.sh > ../dialogs.html + +FORCE: + +clean: + rm $(CLEANFILES) + -rm -rf librnd_acts Index: trunk/doc/user/09_appendix/src/action_compiler.sh =================================================================== --- trunk/doc/user/09_appendix/src/action_compiler.sh (nonexistent) +++ trunk/doc/user/09_appendix/src/action_compiler.sh (revision 543) @@ -0,0 +1,180 @@ +#!/bin/sh + +SEP="<@@@@>" +SEPH="<@@H@@>" + +compile() +{ + awk -v "SEP=$SEP" -v "SEPH=$SEPH" ' + BEGIN { + q="\"" + SEP="^" SEP + SEPH="^" SEPH + } + + function strip(s) { + sub("^[ \t]*", "", s) + sub("[ \t]*$", "", s) + return s + } + + function read_tag(tag, tmp1,tmp2) { + getline tmp1 + getline tmp2 + if (tmp2 ~ " "/dev/stderr" + exit(1) + } + + function notav(s) { + if (s == "") return "n/a" + return s + } + + function end_act() + { + if (current != "") + print "" + currrent = "" + } + + ($0 ~ SEP) { + end_act() + action = "" + $1="" + current=tolower(strip($0)) + sub("^.*/", "", current) + sub(".html$", "", current) + + if (current in ANAME) + aname = ANAME[current] + else + aname = current + + print "" + print "

" aname "

" + print "
" + print "

" + print "" + print "
Syntax summary:" notav(SYNTAX[current]) + print "
Help text:" notav(HELP[current]) + print "
Registered by:" notav(COOKIE[current]) + print "
" + print "

" + next + } + + + ($0 ~ SEPH) { + end_act() + action = "" + $1="" + print "

" $0 "

" + aname="" + next + } + + (current == "") && (/^A/) { + # reading the action list: new action + action=strip($0) + sub("^A", "", action) + aname= action + action = tolower(action) +# avoid saving duplicates at the main action node + if (action in SEEN) + action = action "_dup" + else + ANAME[action] = aname + SEEN[action] = 1 + next + } + + + (current == "") && (/^D/) { + # reading the action list: help line + tmp = $0 + sub("^D", "", tmp) + HELP[action]=HELP[action] "\n" tmp + next + } + + (current == "") && (/^S/) { + # reading the action list: syntax line + tmp = $0 + sub("^S", "", tmp) + SYNTAX[action]=SYNTAX[action] "\n" tmp + next + } + + (current == "") && (/^C/) { + # reading the action list: cookie line + tmp = $0 + sub("^C", "", tmp) + COOKIE[action]=COOKIE[action] "\n" tmp + next + } + + /^/ { + arg = read_tag("arg") + print "" arg "" + next + } + + /^/ { + ex = read_tag("example") + print "Example:", ex, "
" + next + } + + /^/ { + act = tolower(read_tag("act")) + print "" act "" + next + } + + { + print + } + + END { + end_act() + } + ' +} + +echo ' + + + + camv-rnd user manual - action details + + + + +

camv-rnd actions (details)

+' + +( + ( + cd ../../../../src + ./camv-rnd --dump-actions 2>/dev/null + ) + for fn in "$@" + do + if test "$fn" = "LIBRND" + then + echo "" + echo "$SEPH librnd actions (common to Ringdove)" + else + echo "" + echo "$SEP $fn" + tr "\n\r\t" " " < $fn | sed "s@<@\n<@g;s@>@>\n@g;" + fi + done +) | compile + +echo ' + + +' Property changes on: trunk/doc/user/09_appendix/src/action_compiler.sh ___________________________________________________________________ Added: svn:executable ## -0,0 +1 ## +* \ No newline at end of property Index: trunk/doc/user/09_appendix/src/dialog_extra.awk =================================================================== --- trunk/doc/user/09_appendix/src/dialog_extra.awk (nonexistent) +++ trunk/doc/user/09_appendix/src/dialog_extra.awk (revision 543) @@ -0,0 +1,6 @@ +# extra information about dialog boxes; anything that can not be extracte +# automatically from the code. Arrays indexed by id or source. +BEGIN { + ACTION["brave"] = "brave()" +# ACTION["progress"] = "n/a"; COMMENT["progress"] = "no action API yet (but it is planned)" +} Index: trunk/doc/user/09_appendix/src/dump_actions_to_html.sh =================================================================== --- trunk/doc/user/09_appendix/src/dump_actions_to_html.sh (nonexistent) +++ trunk/doc/user/09_appendix/src/dump_actions_to_html.sh (revision 543) @@ -0,0 +1,121 @@ +#!/bin/sh + +# collates the camv-rnd action table into a html doc page + +asrc="../action_src" +lsrc="librnd_acts" + +cd ../../../../src +camv_rnd_ver=`./camv-rnd --version` +camv_rnd_rev=`svn info ^/ | awk '/Revision:/ { + print $0 + got_rev=1 + exit + } + END { + if (!got_rev) + print "Rev unknown" + } + '` +cd ../doc/user/09_appendix/src + +echo " + + + camv-rnd user manual + + + + +

+

camv-rnd User Manual: Appendix

+

+

Action Reference

+" +echo "" a "" "" "" "" + } + + a="" + s="" + d="" + c="" +} + + +/^A/ { + flush_sd() + sub("^A", "", $0) + a = a "
" $0 + next +} + +/^D/ { + sub("^D", "", $0) + d = d "
" $0 + next +} + +/^S/ { + sub("^S", "", $0) + s = s "
" $0 + next +} + +/^C/ { + sub("^C", "", $0) + c = c "
" $0 + next +} + +' | sort -fu | awk -v "asrc=$asrc" -v "lsrc=$lsrc" ' +# insert links around actions where applicable + BEGIN { + q = "\"" + } + // { + pre = $0 + sub(".*", "", pre) + post = $0 + sub(".*", "", post) + act = $0 + sub(".*", "", act) + sub(".*", "", act) + loact = tolower(act) + fn = asrc "/" loact ".html" + lfn = lsrc "/" loact ".html" + if ((getline < fn) == 1) + print pre "" post + else if ((getline < lfn) == 1) + print pre "" post + else + print pre "" post + close(fn) + close(lfn) + next + } + + { print $0 } + + END { + print "
\n" "" +echo $camv_rnd_ver ", " $camv_rnd_rev +echo "" +echo "
Action Description Syntax Plugin" +( + cd ../../../../src + ./camv-rnd --dump-actions 2>/dev/null +) | awk ' + +function flush_sd() +{ + if ( a != "" || s != "" || d != "" ) { + sub("^
", "", a) + sub("^
", "", d) + sub("^
", "", s) + sub("^
", "", c) + print "
" d "" s "" c "" act "" act " (RND)" act "
" + print "

RND: this action comes from librnd and is common to all ringdove applications." + print "" + print "" + } +' Property changes on: trunk/doc/user/09_appendix/src/dump_actions_to_html.sh ___________________________________________________________________ Added: svn:executable ## -0,0 +1 ## +* \ No newline at end of property Index: trunk/doc/user/09_appendix/src/gen_dialogs.sh =================================================================== --- trunk/doc/user/09_appendix/src/gen_dialogs.sh (nonexistent) +++ trunk/doc/user/09_appendix/src/gen_dialogs.sh (revision 543) @@ -0,0 +1,91 @@ +#!/bin/sh + +trunk=../../../.. + +# exceptions +dlgtbl=' +BEGIN { + # if source filename is the index and value regex-matches either id or name + # just ignore that line + IGNORE["src_plugins/dialogs/dlg_view.c"] = "" + IGNORE["src_plugins/dialogs/act_dad.c"] = "" +} +' + +echo ' + + + + camv-rnd - list of file formats + + + + + +

camv-rnd User Manual: Appendix

+

+

List of GUI dialog boxes

+ + +
ID + dialog box name + action + source + comments +' + +$trunk/util/devhelpers/list_dialogs.sh | awk -F "[\t]" ' +function orna(s) +{ + if ((s == "") || (s == "")) return "n/a" + return s +} + +'"$dlgtbl"' +'"`cat dialog_extra.awk`"' + +function out(id, name, src, action, comment ,acturl1,acturl2,fn,tmp) { + if (action == "") { + if (id in ACTION) action = ACTION[id] + else if (src in ACTION) action = ACTION[src] + } + + if (action != "") { + acturl1 = action + sub("[(].*", "", acturl1) + fn = "../action_src/" acturl1 ".html" + if ((getline tmp < fn) == 1) { + acturl1 = "" + acturl2 = "" + } + else { + acturl1 = "" + acturl2 = "" + } + close(fn) + } + + if (comment == "") { + if (id in COMMENT) comment = COMMENT[id] + else if (src in COMMENT) comment = COMMENT[src] + else comment = " " + } + + print "
" orna(id) "" orna(name) "" acturl1 orna(action) acturl2 "" src "" comment +} + +{ + id=$1 + name=$2 + src=$3 + if ((src in IGNORE) && ((name ~ IGNORE[src]) || (id ~ IGNORE[src]))) + next + out(id, name, src) +} +' + +echo ' +
+ + +' Property changes on: trunk/doc/user/09_appendix/src/gen_dialogs.sh ___________________________________________________________________ Added: svn:executable ## -0,0 +1 ## +* \ No newline at end of property Index: trunk/doc/user/09_appendix/src/gen_formats.sh =================================================================== --- trunk/doc/user/09_appendix/src/gen_formats.sh (nonexistent) +++ trunk/doc/user/09_appendix/src/gen_formats.sh (revision 543) @@ -0,0 +1,104 @@ +#!/bin/sh + +PLUGINS=../../../../src_plugins + +echo ' + + + + camv-rnd - list of file formats + + + + + +

camv-rnd User Manual: Appendix

+

+

File format support

+ + + +
plugin native state reads formats writes formats +' + +files_io=`ls $PLUGINS/io_*/*.pup | sort` +files_e=`ls $PLUGINS/export_*/*.pup | sort` +files_i=`ls $PLUGINS/import_*/*.pup | sort` + +for n in $files_io $files_i $files_e +do + bn=`basename $n` + bn=${bn%%.pup} + sed ' + /^[$]fmt[-]/ { s@^@'$bn' @; p } + /^[$]state/ { s@^@'$bn' @; p } + { d } + ' $n +done | awk ' + BEGIN { + plgs = 0 + } + { + if ($1 != last) { + PLG[plgs] = $1 + last = $1 + plgs++ + } + p=$1 + f=$2 + text=$0 + sub("^[^ \t]+[ \t]+[^ \t]+[ \t]+", "", text) + DATA[p, f] = DATA[p, f] SUBSEP text + } + + function col(mask ,n,v,i,A) { + print " " + v = split(DATA[mask], A, "[" SUBSEP "]") + if (v == 0) { + print "n/a" + return + } + i = 0; + for(n = 1; n <= v; n++) { + if (A[n] == "") + continue; + if (i) + print "
" + print " " A[n] + i++ + } + } + + function strip(s) + { + gsub("[" SUBSEP "]", " ", s) + sub("^[ \t]*", "", s) + sub("[ \t]*$", "", s) + return s + } + + function row(plg) { + print "
" plg + print "" strip(DATA[plg, "$fmt-native"]) + print "" strip(DATA[plg, "$state"]) + col(plg SUBSEP "$fmt-feature-r") + col(plg SUBSEP "$fmt-feature-w") + } + + END { + for(p=0; p < plgs; p++) + if (DATA[PLG[p], "$fmt-native"] ~ "yes") + row(PLG[p]) + + for(p=0; p < plgs; p++) + if (!(DATA[PLG[p], "$fmt-native"] ~ "yes")) + row(PLG[p]) + } +' + + +echo ' +
+ + +' Property changes on: trunk/doc/user/09_appendix/src/gen_formats.sh ___________________________________________________________________ Added: svn:executable ## -0,0 +1 ## +* \ No newline at end of property