Check-in [34675982d1]
Not logged in

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:improve twv demo
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 34675982d1dea32a08afd1f24ac6d9281219181d
User & Date: chw 2019-06-16 08:18:14
Context
2019-06-16
08:19
some fixes in undroidwish/vanilla build scripts check-in: ff246e49df user: chw tags: trunk
08:18
improve twv demo check-in: 34675982d1 user: chw tags: trunk
06:23
add tk upstream changes check-in: ef0ddeef8f user: chw tags: trunk
Changes

Changes to undroid/tsb/tsb.tcl.

143
144
145
146
147
148
149
150
151
152
153
154
155
156
157

158
159
160
161
162
163
164
165

166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
...
801
802
803
804
805
806
807
808

809
810
811
812
813
814
815
...
817
818
819
820
821
822
823
824

825
826
827
828
829
830
831
...
840
841
842
843
844
845
846

















847
848
849
850
851
852
853
	set tdata $data
	set data $ncols
	set ncols [expr {0 - [llength $data]}]
    }
    if {$ncols == 0} {
	return
    }
    set ret "<table style='border: 1px solid;"
    append ret " margin-left: 1em; border-collapse: collapse; width: 90%'>"
    if {$ncols < 0} {
	set ncols [expr {0 - $ncols}]
	append ret "<tr>"
	for {set i 0} {$i < $ncols} {incr i} {
	    append ret "<th style='border: 1px solid;'>" \
		"<pre style='margin: 0.25em;'>" \

		[::tsb::htmlquote [lindex $data $i]] "</pre></th>"
	}
	append ret "</tr>"
	set data [lrange $data $ncols end]
    }
    if {[info exists tdata]} {
	set data $tdata
    }

    while {[llength $data]} {
	append ret "<tr>"
	for {set i 0} {$i < $ncols} {incr i} {
	    append ret "<td style='border: 1px solid;'>" \
		"<pre style='margin: 0.25em;'>" \
		[::tsb::htmlquote [lindex $data $i]] "</pre></td>"
	}
	append ret "</tr>"
	set data [lrange $data $ncols end]
    }
    append ret "</table><br>"
    htmlraw $ret
}

# Insert various headers (<h1>, <h2> ...) and rulers.

proc h1 {str} {
    htmlraw "<h1>[::tsb::htmlquote $str]</h1>" 1
................................................................................
    set D_style {
	<style>
	body {
	    font-family: sans-serif, Arial, Tahoma, Helvetica;
	    font-size: 90%;
	}
	textarea {
	    font-family: Consolas, monospace; font-size: 100%;

	}
	label {
	    font-family: Consolas, monospace;
	    margin: 1px;
	    padding: 1px;
	}
	pre {
................................................................................
	    white-space: pre-wrap;
	    white-space: -moz-pre-wrap;
	    white-space: -pre-wrap;
	    white-space: -o-pre-wrap;
	    word-wrap: break-word;
	}
	pre, code {
	    font-family: Consolas, monospace; font-size: 100%;

	}
	.infield * {
	    vertical-align: middle;
	}
	.tin {
	    width: 85%;
	    resize: none;
................................................................................
	    padding: 4px;
	}
	.tin:focus {
	    border: 3px solid rgba(81, 203, 238, 1);
	    margin: 2px;
	    padding: 4px;
	}

















	</style>
    }

    # SCRIPT
    set D_script {
	<script type="text/javascript">








|
<


|

<
<
>


|





>

|

<
|


|


|







 







|
>







 







|
>







 







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







143
144
145
146
147
148
149
150

151
152
153
154


155
156
157
158
159
160
161
162
163
164
165
166
167

168
169
170
171
172
173
174
175
176
177
178
179
180
181
...
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
...
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
...
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
	set tdata $data
	set data $ncols
	set ncols [expr {0 - [llength $data]}]
    }
    if {$ncols == 0} {
	return
    }
    set ret "\n<table class='tbl'>"

    if {$ncols < 0} {
	set ncols [expr {0 - $ncols}]
	append ret "\n <thead>\n  <tr>"
	for {set i 0} {$i < $ncols} {incr i} {


	    append ret "\n   <th><pre class='tdpre'>" \
		[::tsb::htmlquote [lindex $data $i]] "</pre></th>"
	}
	append ret "\n  </tr>\n </thead>"
	set data [lrange $data $ncols end]
    }
    if {[info exists tdata]} {
	set data $tdata
    }
    append ret "\n <tbody>"
    while {[llength $data]} {
	append ret "\n  <tr>"
	for {set i 0} {$i < $ncols} {incr i} {

	    append ret "\n   <td><pre class='tdpre'>" \
		[::tsb::htmlquote [lindex $data $i]] "</pre></td>"
	}
	append ret "\n  </tr>"
	set data [lrange $data $ncols end]
    }
    append ret "\n </tbody>\n</table><br>\n"
    htmlraw $ret
}

# Insert various headers (<h1>, <h2> ...) and rulers.

proc h1 {str} {
    htmlraw "<h1>[::tsb::htmlquote $str]</h1>" 1
................................................................................
    set D_style {
	<style>
	body {
	    font-family: sans-serif, Arial, Tahoma, Helvetica;
	    font-size: 90%;
	}
	textarea {
	    font-family: Consolas, monospace;
	    font-size: 100%;
	}
	label {
	    font-family: Consolas, monospace;
	    margin: 1px;
	    padding: 1px;
	}
	pre {
................................................................................
	    white-space: pre-wrap;
	    white-space: -moz-pre-wrap;
	    white-space: -pre-wrap;
	    white-space: -o-pre-wrap;
	    word-wrap: break-word;
	}
	pre, code {
	    font-family: Consolas, monospace;
	    font-size: 100%;
	}
	.infield * {
	    vertical-align: middle;
	}
	.tin {
	    width: 85%;
	    resize: none;
................................................................................
	    padding: 4px;
	}
	.tin:focus {
	    border: 3px solid rgba(81, 203, 238, 1);
	    margin: 2px;
	    padding: 4px;
	}
	.tbl {
	    border: 1px solid;
	    border-collapse: collapse;
	    margin-left: 1em;
	    width: 90%;
	}
	.tbl th {
	    border: 1px solid;
	    border-collapse: collapse;
	}
	.tbl td {
	    border: 1px solid;
	    border-collapse: collapse;
	}
	.tdpre {
	    margin: 0.25em;
	}
	</style>
    }

    # SCRIPT
    set D_script {
	<script type="text/javascript">