Saltar al contenido principal
Inicio del contenido principal
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, __nextC, __timediff, abstract, ad_doc, ad_forward, ad_proc, appendC, arrayC, asHTML, autonameC, checkC, classC, cleanupC, configureC, contains, copy, db_1rowC, debug, defaultmethod, destroyC, destroy_on_cleanup, evalC, existsC, extractConfigureArg, filterC, filterguardC, filtersearchC, forwardC, hasclass, incrC, infoC, init, instvarC, invarC, isclassC, ismetaclassC, ismixinC, isobjectC, istypeC, lappendC, log, method, mixinC, mixinguardC, move, msg, noinitC, parametercmdC, procC, procsearchC, qn, requireNamespaceC, self, serialize, setC, substC, traceC, unsetC, uplevelC, upvarC, volatileC, vwaitC
    Methods to be applied on the class (in addition to the methods provided by the meta-class):
    __exitHandler, 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

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

    ::xo::Page 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]} {
          foreach file $::_xo_js_order  {
            if {[string match "*;*" $file]} {
              # it is not a file, but some javascipt statements
              append result "<script type='text/javascript' >" $file "</script>\n"
            } else {
              append result "<script src='$file' type='text/javascript'></script>\n"
            }
          }
        }
        return $result
      }
  • proc requireCSS

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

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

    ::xo::Page 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

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

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

    ::xo::Page 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]
Mi calendario