- Methods: All Methods Documented Methods Hide Methods
- Source: Display Source Hide Source
- Variables: Show Variables Hide Variables
Class ::xowiki::Link::image
::xowiki::Link::image create ... \
[ -border border ] \
[ -border-width border-width ] \
[ -bottom bottom ] \
[ -center center ] \
[ -float float ] \
[ -height height ] \
[ -left left ] \
[ -margin margin ] \
[ -margin-bottom margin-bottom ] \
[ -margin-left margin-left ] \
[ -margin-right margin-right ] \
[ -margin-top margin-top ] \
[ -padding padding ] \
[ -padding-bottom padding-bottom ] \
[ -padding-left padding-left ] \
[ -padding-right padding-right ] \
[ -padding-top padding-top ] \
[ -position position ] \
[ -right right ] \
[ -top top ] \
[ -width width ]
Class Relations
- class: ::xotcl::Class
- superclass: ::xowiki::Link
- subclass: ::xowiki::Link::localimage, ::xowiki::Link::file
::xotcl::Class create ::xowiki::Link::image \ -superclass ::xowiki::LinkMethods (to be applied on instances)
border (setter)
border-width (setter)
bottom (setter)
center (setter)
float (setter)
height (setter)
left (setter)
margin (setter)
margin-bottom (setter)
margin-left (setter)
margin-right (setter)
margin-top (setter)
padding (setter)
padding-bottom (setter)
padding-left (setter)
padding-right (setter)
padding-top (setter)
position (setter)
render (scripted)
set item_id [:resolve] #:log "-- image resolve for ${:page} returned $item_id (name=${:name}, label=${:label})" if {$item_id != 0} { set link [::${:package_id} pretty_link -download true -query ${:query} -absolute [expr {[${:page} exists absolute_links] ? [${:page} absolute_links] : 0}] -parent_id ${:parent_id} -page $item_id ${:name}] #:log "--l fully quali [${:page} absolute_links], link=$link [info commands ::$item_id]" ${:page} references resolved [list $item_id ${:type}] :render_found $link ${:label} } else { set last_page_id [${:page} set item_id] set object_type ::xowiki::File set name ${:name} set link [::${:package_id} make_link ${:package_id} edit-new object_type [list parent_id ${:parent_id}] [list title [ad_html_to_text -no_format -- ${:label}]] [list return_url [::xo::cc url]] autoname name last_page_id] set html [:render_not_found $link ${:label}] ${:page} references unresolved [list parent_id ${:parent_id} name ${:name} link_type ${:type} html $html] return $html }render_found (scripted)
set style ""; set pre ""; set post "" foreach a { float width height center padding padding-right padding-left padding-top padding-bottom margin margin-left margin-right margin-top margin-bottom border border-width position top bottom left right } { if {[info exists :$a]} { if {$a eq "center"} {set pre "<center>"; set post "</center>"; continue} append style "$a: [set :$a];" } } if {$style ne ""} { set style "style='$style'" } if {[info exists :geometry]} { append link "?geometry=${:geometry}" } #set label [string map [list ' "'"] $label] set href [expr {[info exists :href] ? ${:href} : ""}] set cls [:mk_css_class_and_id -default [expr {$link ne "" ? "image" : "refused-link"}]] if {$href ne ""} { set href [:resolve_href $href] if {[string match "java*" $href]} { set href . } if {[info exists :revision_id]} { append href ?revision_id=${:revision_id} } return [subst {$pre<a $cls href='[ns_quotehtml $href]'><img $cls src='[ns_quotehtml $link]' alt='$label' title='$label' $style></a>$post}] } else { if {[info exists :revision_id]} {append link ?revision_id=${:revision_id}} return [subst {$pre<img $cls src='[ns_quotehtml $link]' alt='$label' title='$label' $style>$post}] }resolve_href (scripted)
set l [${:page} create_link $href] if {[$l istype ::xowiki::ExternalLink]} { set href [$l href] } else { set href_item_id [$l resolve] set href [$l pretty_link $href_item_id] } return $hrefright (setter)
top (setter)
width (setter)
- Methods: All Methods Documented Methods Hide Methods
- Source: Display Source Hide Source
- Variables: Show Variables Hide Variables