xotcl.wu-wien.ac.at
Begin main content
Methods: Source: Variables:
[All Methods | Documented Methods | Hide Methods] [Display Source | Hide Source] [Show Variables | Hide Variables]

::xotcl::Class[i] ::xo::Page

Class Hierarchy of ::xo::Page

  • ::xotcl::Object[i]
    Meta-class:
    ::xotcl::Class[i]
    Methods for instances:
    __api_make_doc, __api_make_forward_doc, __timediff, abstract, ad_doc, ad_forward, ad_proc, appendC, arrayC, asHTML, autonameC, check, classC, cleanupC, configureC, containsC, copyC, db_0or1rowC, db_1rowC, debug, defaultmethodC, destroyC, destroy_on_cleanup, ds, evalC, existsC, extractConfigureArg, filterC, filterguardC, filtersearch, forward, hasclass, incrC, infoC, init, instvarC, invarC, isclass, ismetaclass, ismixin, isobject, istype, lappendC, log, method, mixinC, mixinguardC, moveC, msg, noinitC, objectparameter, parametercmdC, proc, procsearch, qn, requireNamespaceC, residualargsC, self, serialize, setC, set_instance_vars_defaults, show-object, substC, traceC, unknown, unsetC, uplevelC, upvarC, volatileC, vwait
    Methods to be applied on the class (in addition to the methods provided by the meta-class):
    getExitHandler, setExitHandler, unsetExitHandler
    • ::xo::Page[i]
      Meta-class:
      ::xotcl::Class[i]
      Methods to be applied on the class (in addition to the methods provided by the meta-class):
      get_property, header_stuff, requireCSS, requireJS, requireLink, requireStyle, set_property, sort_keys_by_value

Class Relations

  • superclass: ::xotcl::Object[i]
::xotcl::Class create ::xo::Page \
     -superclass ::xotcl::Object

Methods

  • proc get_property

    ::330096 proc get_property name {
        if {[array exists ::xo_property_${name}]} {
          return [array get ::xo_property_${name}]
        }
        return [list]
      }
    
  • proc header_stuff

    ::330096 proc header_stuff {} {
        set result ""
        foreach link [array names ::_xo_need_link] {
          append result "<link $link>\n"
        }
        foreach style [my sort_keys_by_value [array get ::_xo_need_style]] {
          append result "<style type='text/css'>$style</style>\n"
        }
        foreach file [my sort_keys_by_value [array get ::_xo_need_css]] {
          append result "<link type='text/css' rel='stylesheet' href='$file' media='all' >\n"
        }
        if {[info exists ::_xo_js_order]} {
          set statements ""
          foreach file $::_xo_js_order  {
            if {[string match "*;*" $file]} {
              # it is not a file, but some javascipt statements
              append statements $file \n
            } else {
              append result "<script src='$file' type='text/javascript'></script>\n"
            }
          }
          if {$statements ne ""} {
    	append result \n "<script type='text/javascript' >$statements</script>\n"
          }
        }
        return $result
      }
    
  • proc requireCSS

    ::330096 proc requireCSS {{-order 1} name} {
        set ::_xo_need_css($name) [expr {[array size ::_xo_need_css]+1000*$order}]
      }
    
  • proc requireJS

    ::330096 proc requireJS name {
        if {![info exists ::_xo_need_js($name)]} {lappend ::_xo_js_order $name}
        set ::_xo_need_js($name)  1
      }
    
  • proc requireLink

    ::330096 proc requireLink {-rel -type -title -href} {
        regsub -all ' $title "&apos;" title
        regsub -all ' $href "&apos;" href
        set key "rel='$rel' type='$type' title='$title' href='$href'"
        set ::_xo_need_link($key) 1
      }
    
  • proc requireStyle

    ::330096 proc requireStyle {{-order 1} s} {
        set ::_xo_need_style($s) [expr {[array size ::_xo_need_style]+1000*$order}]
      }
    
  • proc set_property

    ::330096 proc set_property {name element value} {
        set ::xo_property_${name}($element) $value
      }
    
  • proc sort_keys_by_value

    ::330096 proc sort_keys_by_value {{-comparison integer} {-direction increasing} pairs} {
        set result [list]
        set a [list]
        foreach {key value} $pairs {
          lappend a [list $key $value]
        }
        foreach pair [lsort -index 1 -$comparison -$direction $a] {
          lappend result [lindex $pair 0]
        }
        return $result
      }
    

Methods: Source: Variables:
[All Methods | Documented Methods | Hide Methods] [Display Source | Hide Source] [Show Variables | Hide Variables]