%3 ::xowiki::TreeNode ::xowiki::TreeNode open_tree render some_child_has_items ::xowiki::Tree ::xowiki::Tree → include_head_entries → renderer add_item add_pages init open_tree render ::xowiki::TreeNode->::xowiki::Tree ::xo::OrderedComposite ::xo::OrderedComposite __compare __compare_tcl add children contains deep_copy delete destroy last_child orderby show ::xowiki::Tree->::xo::OrderedComposite ::xotcl::Object ::xotcl::Object ::xo::OrderedComposite->::xotcl::Object

Class ::xowiki::TreeNode

::xowiki::TreeNode[i] create ... \
           [ -count count ] \
           [ -expanded (default "false") ] \
           [ -highlight (default "false") ] \
           [ -href (default "") ] \
           [ -label label ] \
           [ -level level ] \
           [ -li_id li_id ] \
           [ -object object ] \
           [ -open_requests (default "0") ] \
           [ -owner owner ] \
           [ -pos pos ] \
           [ -prefix (default "") ] \
           [ -ul_class ul_class ] \
           [ -ul_id ul_id ]

Class Relations

  • class: ::xotcl::Class[i]
  • superclass: ::xowiki::Tree[i]
::xotcl::Class create ::xowiki::TreeNode \
     -superclass ::xowiki::Tree

Methods (to be applied on instances)

  • count (setter)

  • expanded (setter)

  • highlight (setter)

  • href (setter)

  • label (setter)

  • level (setter)

  • li_id (setter)

  • object (setter)

  • open_requests (setter)

  • open_tree (scripted)

    :open_requests 1
    :expanded true
    if {[info exists :__parent]} {${:__parent} open_tree}
  • owner (setter)

  • pos (setter)

  • prefix (setter)

  • render (scripted)

    set content ""
    if {[nsf::is object [self]::items]} {
      foreach i [[self]::items children] {
        append cat_content [:render_item -highlight [$i exists open_item] $i ]
      }
      foreach c [:children] {append cat_content [$c render] \n}
      append content [:render_node -open [expr {[:open_requests]>0}] $cat_content]
    } elseif {${:open_requests} > 0 || [:some_child_has_items]} {
      set cat_content ""
      foreach c [:children] {append cat_content [$c render] \n}
      append content [:render_node -open true $cat_content]
    
    }
    if {${:verbose}} {
      :log "TreeNode items [nsf::is object [self]::items] render open_requests ${:open_requests} -> $content"
    }
    return $content
  • some_child_has_items (scripted)

    foreach i [:children] {
      if {[nsf::is object ${i}::items]} {return 1}
      if {[$i some_child_has_items]} {return 1}
    }
    return 0
  • ul_class (setter)

  • ul_id (setter)