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] ::xowiki::Tree

Class Hierarchy of ::xowiki::Tree

  • ::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::OrderedComposite[i]
      Meta-class:
      ::xotcl::Class[i]
      Methods for instances:
      __compare, add, children, contains, delete, destroy, last_child, orderby, show
      Methods to be applied on the class:
      Methods provided by the meta-class
      • ::xowiki::Tree[i]
        Meta-class:
        ::xotcl::Class[i]
        Parameter for instances:
        id, name (default "")
        Methods for instances:
        add_item, add_pages, init, open_tree, render
        Methods to be applied on the class (in addition to the methods provided by the meta-class):
        include_head_entries, renderer

Class Relations

  • superclass: ::xo::OrderedComposite[i]
  • subclass: ::xowiki::TreeNode[i]
::xotcl::Class create ::xowiki::Tree \
     -superclass ::xo::OrderedComposite \
     -parameter {id {name ""}}

Methods

  • proc include_head_entries

    ::402169 proc include_head_entries {{-renderer mktree} args} {
        eval [my renderer $renderer] include_head_entries $args
      }
    
  • proc renderer

    ::402169 proc renderer style {
        set renderer TreeRenderer=$style
        if {![my isclass $renderer]} {
          error "No such renderer $renderer (avalialble [info commands ::xowiki::TreeRenderer=*]"
        }
        return $renderer
      }
    
  • instproc add_item

    ::402169 instproc add_item {-category -orderby -itemobj {-increasing:boolean true} {-open_item:boolean false}} {
        set items ${category}::items
        if {![my isobject $items]} { 
          ::xo::OrderedComposite create $items
          if {[info exists orderby]} {
            if {$orderby eq "page_order"} {
              $items mixin add ::xo::OrderedComposite::IndexCompare
            }
            set direction [expr {$increasing ? "increasing" : "decreasing"}]
            $items orderby -order $direction $orderby
          }
        }
        $items add $itemobj
        if {$open_item} {
          $category open_tree
          $itemobj set open_item 1
        }
      }
    
  • instproc add_pages

    ::402169 instproc add_pages {{-full false} {-remove_levels 0} {-book_mode false} {-open_page ""} {-expand_all false} -owner pages} {
        my instvar package_id
        set tree(-1) [self]
        my set open_node($tree(-1)) 1
        set pos 0
        foreach o [$pages children] {
          $o instvar page_order title name
          if {![regexp {^(.*)[.]([^.]+)} $page_order _ parent]} {set parent ""}
          set page_number [$owner page_number $page_order $remove_levels]
    
          set level [regsub -all {[.]} [$o set page_order] _ page_order_js]
          if {$full || [my exists open_node($parent)] || [my exists open_node($page_order)]} {
            set href [$owner href $book_mode $name]
    	set is_current [expr {$open_page eq $name}]
            set is_open [expr {$is_current || $expand_all}]
            set c [::xowiki::TreeNode new -orderby pos -pos [incr pos] -level $level  -object $o -owner [self]  -label $title -prefix $page_number -href $href  -highlight $is_current  -expanded $is_open  -open_requests 1]
            set tree($level) $c
    	for {set l [expr {$level - 1}]} {![info exists tree($l)]} {incr l -1} {}
            $tree($l) add $c
    	if {$is_open} {$c open_tree}
          }
        }
        return $tree(-1)
      }
    
  • instproc init

    ::402169 instproc init {} {
        # If there is no id specified, use the name as id.
        if {![my exists id]} {my id [my name]}
      }
    
  • instproc open_tree

    ::402169 instproc open_tree {} {;}
    
  • instproc render

    ::402169 instproc render {{-style mktree} {-js ""} {-context ""}} {
        set renderer [[self class] renderer $style]
        $renderer set context $context
        $renderer set js $js
        TreeNode instmixin $renderer
        set content [$renderer render [self]]
        TreeNode instmixin ""
        if {[$renderer set js] ne ""} {
          append content "\n<script type='text/javascript'>[$renderer set js]</script>\n"
        }
        return $content
      }
    

Instances

::nsf::__#NY[i]

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