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]

::xowiki::IncludeletClass[i] ::xowiki::includelet::s5

Class Hierarchy of ::xowiki::includelet::s5

  • ::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::Context[i]
      Meta-class:
      ::xotcl::Class[i]
      Parameter for instances:
      actual_query (default " "), locale, package_id (default "0"), parameter_declaration (default "")
      Methods for instances:
      exists_query_parameter, export_vars, get_all_query_parameter, get_parameters, initialize, original_url_and_query, process_query_parameter, query_parameter
      Methods to be applied on the class:
      Methods provided by the meta-class
      • ::xowiki::Includelet[i]
        Meta-class:
        ::xotcl::Class[i]
        Parameter for instances:
        __decoration (default "portlet"), id, name (default ""), parameter_declaration (default ""), title (default "")
        Methods for instances:
        category_clause, get_page_order, include_head_entries, initialize, js_name, resolve_page_name, screen_name
        Methods to be applied on the class (in addition to the methods provided by the meta-class):
        available_includelets, describe_includelets, glob_clause, html_encode, html_id, html_to_text, js_encode, js_name, listing, locale_clause, parent_id_clause, publish_status_clause, require_YUI_CSS, require_YUI_JS
        • ::xowiki::includelet::s5[i]
          Meta-class:
          ::xowiki::IncludeletClass[i]
          Parameter for instances:
          __decoration (default "plain"), parameter_declaration (default " {-category_id} {-slideshow:boolean false} {-pagenr 0} {-style standard} {-menu_buttons "view edit copy create delete"} ")
          Methods for instances:
          render, render_overview, render_slideshow, slideshow_header
          Methods to be applied on the class:
          Methods provided by the meta-class

Class Relations

  • superclass: ::xowiki::Includelet[i]
::xowiki::IncludeletClass create ::xowiki::includelet::s5 \
     -superclass ::xowiki::Includelet \
     -parameter {{__decoration plain} {parameter_declaration {
          {-category_id}
          {-slideshow:boolean false}
          {-pagenr 0}
          {-style standard}
          {-menu_buttons "view edit copy create delete"}
        }}}

Methods

  • instproc render

    ::xowiki::policy5 instproc render {} {
        my get_parameters
        set page [my set __including_page]
    
        my set package_id $package_id
        my set style $style
        my set page $page
    
        lappend ::xowiki_page_item_id_rendered [$page item_id] ;# prevent recursive rendering
    
        set extra_where_clause ""
        set cnames ""
        if {[info exists category_id]} {
          foreach {cnames extra_where_clause} [my category_clause $category_id] break
        }
    
        set pages [::xowiki::Page instantiate_objects -sql  "select page_id, page_order, name, title, item_id  from xowiki_page_live_revision p  where parent_id = [$package_id folder_id]  and not page_order is NULL $extra_where_clause  [::xowiki::Page container_already_rendered item_id]" ]
        $pages mixin add ::xo::OrderedComposite::IndexCompare
        $pages orderby page_order
        if {$slideshow} {
          return [my render_slideshow $pages $cnames $pagenr]
        } else {
          return [my render_overview $pages $cnames $menu_buttons]
        }
      }
    
  • instproc render_overview

    ::xowiki::policy5 instproc render_overview {pages cnames menu_buttons} {
        my instvar package_id page
        set output ""
        if {$cnames ne ""} {
          append output "<div class='filter'>Filtered by categories: $cnames</div>"
        }
    
        #set return_url [::xo::cc url]
    
        set count -1
        foreach o [$pages children] {
          $o instvar page_order title page_id name title 
          incr count
    
          set level [expr {[regsub {[.]} $page_order . page_order] + 1}]
          set p [::xo::db::CrClass get_instance_from_db -item_id 0 -revision_id $page_id]
          $p destroy_on_cleanup
    
          set pagenr_link "presentation?slideshow=1&pagenr=$count"
          set menu [list]
          foreach b $menu_buttons {
    	if {[info command ::xowiki::includelet::$b] eq ""} {
    	  set b $b-item-button
    	}
            switch $b {
    	  view-item-button {append b " -link $pagenr_link"}
    	}
    	set html [$p include "$b -book_mode true"]
    	if {$html ne ""} {lappend menu $html}
          }
    
          set menu "<div style='float: right'>[join $menu {&nbsp;}]</div>"
          $p set unresolved_references 0
          #$p set render_adp 0
          set content [$p get_content]
          set content [string map [list "\\@" "\\\\@"] $content]
          #my log content=$content
          regexp {^.*:([^:]+)$} $name _ anchor
          append output "<h$level class='book'>"  $menu  "<a name='$anchor'></a><a href='$pagenr_link'>$page_order</a> $title</h$level>"  $content
        }
        return $output
      }
    
  • instproc render_slideshow

    ::xowiki::policy5 instproc render_slideshow {pages cnames pagenr} {
        my instvar package_id style page
        ::xo::cc set_parameter master 0
    
        set coverpage [my resolve_page_name en:cover]
        if {$coverpage eq ""} {
          set coverpage $page
        }
        set outtput ""
    
        if {$cnames ne ""} {
          #append output "<div class='filter'>Filtered by categories: $cnames</div>"
        }
        ::xo::cc set_parameter __no_footer 1
        set count 0
        foreach o [$pages children] {
          $o instvar page_order title page_id name title 
          set level [expr {[regsub {[.]} $page_order . page_order] + 1}]
          set p [::xo::db::CrClass get_instance_from_db -item_id 0 -revision_id $page_id]
          $p destroy_on_cleanup
          #$p set render_adp 0
          set content [$p get_content]
          #set content [string map [list "\{\{" "\\\{\{"] $content]
          set evenodd [expr {[incr count]%2 ? "even" : "odd"}]
          append output "<div class='slide $evenodd'>"  <h1> $title </h1> \n  $content  </div> \n
        } 
        # eval header here to get required header stuff
        set header [my slideshow_header  -title [$coverpage set title]  -creator [$coverpage set creator]  -presdate [lindex [$coverpage set last_modified] 0]  -footer [$page include "footer -decoration none"]  -s5dir "/resources/s5/$style/ui/default"]
    
        # use YAHOO event management to allow multiple event listener, and ensure, this ones is after s5's
        append output "<script type='text/javascript'>
          var pagenr = $pagenr;
    
          function ngo() { go(pagenr); }
    
          YAHOO.util.Event.addListener(window, 'load', ngo);
        </script>\n"
    
        return $header$output
      }
    
  • instproc slideshow_header

    ::xowiki::policy5 instproc slideshow_header {-title -creator -footer -s5dir -presdate} {
        set header_stuff [::xo::Page header_stuff]
        return [subst {<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <title>$title</title>
    <!-- metadata -->
    <meta name="generator" content="xowiki S5" />
    <meta name="version" content="\$Id\$" />
    <meta name="presdate" content="$presdate" />
    <meta name="author" content="$creator" />
    <!-- configuration parameters -->
    <meta name="defaultView" content="slideshow" />
    <meta name="controlVis" content="hidden" />
    <!-- style sheet links -->
    <link rel="stylesheet" href="$s5dir/slides.css" type="text/css" media="projection" id="slideProj" />
    <link rel="stylesheet" href="$s5dir/outline.css" type="text/css" media="screen" id="outlineStyle" />
    <link rel="stylesheet" href="$s5dir/print.css" type="text/css" media="print" id="slidePrint" />
    <link rel="stylesheet" href="$s5dir/opera.css" type="text/css" media="projection" id="operaFix" />
    <!-- embedded styles -->
    <style type="text/css" media="all">
    .imgcon {width: 525px; margin: 0 auto; padding: 0; text-align: center;}
    #anim {width: 270px; height: 320px; position: relative; margin-top: 0.5em;}
    #anim img {position: absolute; top: 42px; left: 24px;}
    img#me01 {top: 0; left: 0;}
    img#me02 {left: 23px;}
    img#me04 {top: 44px;}
    img#me05 {top: 43px;left: 36px;}
    </style>
    $header_stuff
    <script type="text/javascript" src="/resources/ajaxhelper/yui/utilities/utilities.js" ></script>
    <!--
    <script type="text/javascript" src="http://yui.yahooapis.com/2.4.1/build/utilities/utilities.js" ></script>
    -->
    <!-- S5 JS -->
    <script src="$s5dir/slides.js" type="text/javascript"></script>
    </head>
    <body>
    
    <div class="layout">
    <div id="controls"><!-- DO NOT EDIT --></div>
    <div id="currentSlide"><!-- DO NOT EDIT --></div>
    <div id="header"></div>
    
    <div id="footer">
    $footer
    </div>
    </div>
    
    <div class="presentation">
    }]
      }
    

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