# --------------------------------------------------------------------------- # common code for the interpreter class websh.interpclass # $Id$ # --------------------------------------------------------------------------- proc getDocFileName {filename} { return [file join [web::config document_root] websh $filename] } proc pageLink {url args} { if {[string match "*.ws3" $url]} { regsub {\.ws3$} $url ".html" url } set showName $url foreach {arg value} $args { switch -- $arg \ -show { set showName $value} \ -pre { set url "http://$url" } } web::put "$showName" } proc emailLink {email {showName ""}} { if { [string compare $showName ""] == 0 } {set showName $email } pageLink mailto:$email -show $showName } proc headRow {type mainTitle {rightTitle ""}} { if {$type == 1} { return } web::putx { { if {$type == 2} { web::putx { {if {[string length $mainTitle] > 0 } { web::putx {

{web::put $mainTitle}

} } else { web::putx { } }}
{if {[string length $rightTitle] > 0 } { web::putx {

{web::put $rightTitle}

} } else { web::putx { } }} } } if {$type == 3} { web::putx { {if {[string length $mainTitle] > 0 } { web::putx {

{web::put $mainTitle}

} } else { web::putx { } }} } } if {$type == 4} { web::putx { {if {[string length $mainTitle] > 0 } { web::putx {

{web::put $mainTitle}

} } else { web::putx { } }}
{if {[string length $rightTitle] > 0 } { web::putx {

{web::put $rightTitle}

} } else { web::putx { } }} } } } } } proc navBarElementSub {ref str flag} { if { $flag == 1 } { web::putx { - {web::put $str}
} return } if { $flag == 0 } { web::putx { - {web::put $str}
} return } if { $flag == 2 } { web::putx { - {web::put $str}
} return } } proc navBarElementOne {ref str flag} { if { $flag == 1 } { web::putx {{web::put $str}
} return } if { $flag == 0 } { web::putx {{web::put $str}
} return } if { $flag == 2 } { web::putx {{web::put $str}
} return } } proc navBarElement {ref str flag args} { web::putx { { navBarElementOne $ref $str $flag foreach {arg value isLink} $args { navBarElementSub $arg $value $isLink } }
} } proc navBarStart {} { web::putx { } } proc navBarEnd {} { web::putx {
} } proc redPointElement {text} { web::putx { {web::putx $text} } } proc newsBarElement {title {desc ""}} { web::putx { {web::putx $title}
{web::putx $desc} } } proc newsBarElementGrey {title {desc ""}} { web::putx { {web::putx $title}
{web::putx $desc} } } proc uppfeil {link args} { set aName "" set text "" foreach {arg value} $args { switch -- $arg \ -aName { set aName $value} \ -text { set text $value } } web::putx { {navBarStart} {navBarEnd} { if {[string compare $aName ""] == 0 } { web::putx {

{web::putx $text}

} } else { web::putx {

{web::putx $text}

} } } } } ## ============================================================================ ## navigation bars ## ============================================================================ proc navbar_prod {{where 0}} { web::putx { {navBarStart} {navBarElement "/websh/product.html" "product description" [expr $where != 0] \ "#history" "history" 1 \ "#tcl" "based on Tcl" 1 \ "#design" "design" 1} {navBarEnd} } # {navBarElement "TBD" "Websh in action" 2} # {navBarElement "TBD" "success stories" 2} # {navBarElement "TBD" "comparison chart" 2} } proc navbar_docu {{where 0}} { web::putx { {navBarStart} {navBarElement "/websh/docu.html" "documentation" [expr $where != 0]} {navBarElement "/websh/whitepaper.html" "white paper" [expr $where != 1]} {navBarElement "/websh/quickref.html" "quick reference" [expr $where != 2]} {navBarElement "/websh/examples.html" "examples" [expr $where != 4]} {navBarEnd} } } proc navbar_supp {{where 0}} { web::putx {
{navBarElement "/websh/support.html" "support" [expr $where != 0]} {navBarElement "/websh/faq.html" "faq" [expr $where != 1] \ "/websh/faq.html#generic" "generic questions" 1 \ "/websh/faq.html#technical" "tech questions" 1} \ {navBarElement "/websh/subscribe.html" "mailing list" [expr $where != 2]} {navBarElement "http://issues.apache.org/bugzilla/" "bug tracking system" [expr $where != 3]}
} } proc navbar_ress {{where 0}} { web::putx { {navBarStart} {navBarEnd} } } proc navbar_down {{where 0}} { web::putx { {navBarStart} {navBarEnd} } } proc navbar_null {} { web::putx {   } } ## ============================================================================ ## news bars ## ============================================================================ proc newsbar_supp {} { web::putx {
} } proc newsbar_ress {} { web::putx {
} } proc jslink {linkname generic onover onout width gif alt} { return "\"$alt\"" } proc startHtmlPage {} { web::putx { Websh - Welcome } } proc startHtmlBody {} { web::putx { } } proc putHeader {{mainSectionNr 0} {quickNaviNr 1}} { web::putx { } if {$quickNaviNr == 0} { web::putx { } } else { web::putx { } } web::putx {
Websh  
} if {$mainSectionNr == 0} { web::putx { } } if {$mainSectionNr == 1} { web::putx { } } if {$mainSectionNr == 2} { web::putx { } } if {$mainSectionNr == 3} { web::putx { } } if {$mainSectionNr == 4} { web::putx { } } if {$mainSectionNr == 5} { web::putx { } } web::putx {
{web::put [jslink /websh/product.html prod b_prod_b b_prod_a 120 b_prod_a.gif "product description"]} {web::put [jslink /websh/docu.html docu b_docu_b b_docu_a 100 b_docu_a.gif "documentation"]} {web::put [jslink /websh/support.html supp b_supp_b b_supp_a 70 b_supp_a.gif "support"]} {web::put [jslink /websh/resources.html ress b_ress_b b_ress_a 110 b_ress_a.gif "resources and links"]} {web::put [jslink /websh/download.html down b_down_b b_down_a 100 b_down_a.gif "download"]}
lines

{web::put [jslink /websh/docu.html docu b_docu_b b_docu_a 100 b_docu_a.gif "documentation"]} {web::put [jslink /websh/support.html supp b_supp_b b_supp_a 70 b_supp_a.gif "support"]} {web::put [jslink /websh/resources.html ress b_ress_b b_ress_a 110 b_ress_a.gif "resources and links"]} {web::put [jslink /websh/download.html down b_down_b b_down_a 100 b_down_a.gif "download"]}
{web::put [jslink /websh/product.html prod b_prod_b b_prod_a 120 b_prod_a.gif "product description"]}
{web::put [jslink /websh/support.html supp b_supp_b b_supp_a 70 b_supp_a.gif "support"]} {web::put [jslink /websh/resources.html ress b_ress_b b_ress_a 110 b_ress_a.gif "resources and links"]} {web::put [jslink /websh/download.html down b_down_b b_down_a 100 b_down_a.gif "download"]}
{web::put [jslink /websh/product.html prod b_prod_b b_prod_a 120 b_prod_a.gif "product description"]} {web::put [jslink /websh/docu.html docu b_docu_b b_docu_a 100 b_docu_a.gif "documentation"]}
{web::put [jslink /websh/resources.html ress b_ress_b b_ress_a 110 b_ress_a.gif "resources and links"]} {web::put [jslink /websh/download.html down b_down_b b_down_a 100 b_down_a.gif "download"]}
{web::put [jslink /websh/product.html prod b_prod_b b_prod_a 120 b_prod_a.gif "product description"]} {web::put [jslink /websh/docu.html docu b_docu_b b_docu_a 100 b_docu_a.gif "documentation"]} {web::put [jslink /websh/support.html supp b_supp_b b_supp_a 70 b_supp_a.gif "support"]}
{web::put [jslink /websh/download.html down b_down_b b_down_a 100 b_down_a.gif "download"]}
{web::put [jslink /websh/product.html prod b_prod_b b_prod_a 120 b_prod_a.gif "product description"]} {web::put [jslink /websh/docu.html docu b_docu_b b_docu_a 100 b_docu_a.gif "documentation"]} {web::put [jslink /websh/support.html supp b_supp_b b_supp_a 70 b_supp_a.gif "support"]} {web::put [jslink /websh/resources.html ress b_ress_b b_ress_a 110 b_ress_a.gif "resources and links"]}
We are sorry but we discontinued Websh support and development for lack of resources. Also the discussion mailing list was closed, so if you're interested in taking up this subproject within the Apache Tcl project to bring it back into life please contact private@tcl.apache.org
} } proc finishPage {{where 0}} { web::putx {

{ if {$where != 1 } { web::put {description |} } else { web::put {description |} } if {$where != 2 } { web::put { documentation |} } else { web::put { documentation |} } if {$where != 3 } { web::put { support |} } else { web::put { support |} } if {$where != 4 } { web::put { resources |} } else { web::put { resources |} } if {$where != 5 } { web::put { download |} } else { web::put { download |} } if {$where != 7 } { web::put { credits |} } else { web::put { credits |} } if {$where != 6 } { web::put { copyright} } else { web::put { copyright} } }

© Websh - an Apache Tcl project - part of the Apache Software Foundation
} }