%3 ::xo::tdom::Object ::xo::tdom::Object render ::xo::OrderedComposite ::xo::OrderedComposite __compare __compare_tcl add children contains deep_copy delete destroy last_child orderby show ::xo::tdom::Object->::xo::OrderedComposite ::xo::tdom::AttributeManager ::xo::tdom::AttributeManager ::xo::tdom::Object->::xo::tdom::AttributeManager ::xowiki::Tree ::xowiki::Tree → include_head_entries → renderer add_item add_pages init open_tree render ::xowiki::Tree->::xo::OrderedComposite ::ListWidget ::ListWidget render ::ListWidget->::xo::OrderedComposite ::xo::Chat ::xo::Chat active_user_list add_msg broadcast_msg check_age current_message_valid encode get_all get_new get_users init init_user_color json_encode json_encode_msg last_activity login logout noencode nr_active_users nsv_get register_nsvs render set_options subscribe sweeper urlencode usable_screen_name user_active user_color user_name ::xo::Chat->::xo::OrderedComposite ::xo::Table ::xo::Table __bulkactions actions column_names columns destroy format_csv render_with write_csv ::xo::Table->::xo::OrderedComposite ::xotcl::Object ::xotcl::Object ::xo::OrderedComposite->::xotcl::Object ::xowiki::TreeNode ::xowiki::TreeNode open_tree render some_child_has_items ::xowiki::TreeNode->::xowiki::Tree

Class ::xowiki::Tree

::xowiki::Tree[i] create ... \
           [ -id id ] \
           [ -name (default "") ] \
           [ -owner owner ] \
           [ -verbose (default "0") ]

Class Relations

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

Methods (to be applied on the object)

  • include_head_entries (scripted)

    [:renderer $renderer] include_head_entries {*}$args
  • renderer (scripted)

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

Methods (to be applied on instances)

  • add_item (scripted)

    set items ${category}::items
    if {![nsf::is object $items]} {
      ::xo::OrderedComposite create $items
      if {[info exists orderby]} {
        set direction [expr {$increasing ? "increasing" : "decreasing"}]
        $items orderby  -order $direction  -type [ad_decode $orderby page_order index dictionary]  $orderby
      }
    }
    $items add $itemobj
    if {$open_item} {
      $category open_tree
      $itemobj set open_item 1
    }
  • add_pages (scripted)

    #
    # Add the pages of the ordered composite to the tree.  Note that
    # it is intended to preserve the order criterion of the provided
    # ordered composite in "pages". If you want to change the order
    # set it already for the passed-in ordered composite via the
    # method "orderby" of the OrderedComposite.
    #
    set tree(-1) [self]
    set :open_node($tree(-1)) 1
    set pos 0
    if {${:verbose}} {
      :log "add_pages want to add [llength [$pages children]] pages"
    }
    set ul_class [expr {[dict exists $properties CSSclass_ul] ?
                        [dict get $properties CSSclass_ul] : ""}]
    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 {${:verbose}} {
        :log "... work on [$o set page_order] level $level full $full"
      }
      if {$full || [info exists :open_node($parent)] || [info 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  -level $level  -object $o  -owner [self]  -label $title  -prefix $page_number  -href $href  -highlight $is_current  -expanded $is_open  -open_requests 1  -verbose ${:verbose}  -ul_class $ul_class]
        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)
  • id (setter)

  • init (scripted)

    # If there is no id specified, use the name as id.
    if {![info exists :id]} {
      set :id ${:name}
    }
  • name (setter)

  • open_tree (scripted)

    ;
  • owner (setter)

  • render (scripted)

    set renderer [[self class] renderer $style]
    $renderer set context $context
    $renderer set js $js
    TreeNode instmixin $renderer
    set content [$renderer render -properties $properties [self]]
    TreeNode instmixin ""
    if {[$renderer set js] ne ""} {
      template::add_body_script -script [$renderer set js]
    }
    return $content
  • verbose (setter)