- Methods: All Methods Documented Methods Hide Methods
- Source: Display Source Hide Source
- Variables: Show Variables Hide Variables
Class ::xowiki::Tree
::xowiki::Tree create ... \
[ -id id ] \
[ -name (default "") ] \
[ -owner owner ] \
[ -verbose (default "0") ]
Class Relations
::xotcl::Class create ::xowiki::Tree \ -superclass ::xo::OrderedCompositeMethods (to be applied on the object)
include_head_entries (scripted)
[:renderer $renderer] include_head_entries {*}$argsrenderer (scripted)
set renderer TreeRenderer=$style if {![:isclass $renderer]} { error "No such renderer $renderer (avalialble [info commands ::xowiki::TreeRenderer=*]" } return $rendererMethods (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 $contentverbose (setter)
- Methods: All Methods Documented Methods Hide Methods
- Source: Display Source Hide Source
- Variables: Show Variables Hide Variables