Roxen.git / server / modules / graphics / graphic_text.pike

version» Context lines:

Roxen.git/server/modules/graphics/graphic_text.pike:1:   // This is a roxen module. Copyright © 1996 - 2000, Roxen IS.   //    - constant cvs_version="$Id: graphic_text.pike,v 1.249 2000/09/28 02:18:15 nilsson Exp $"; + constant cvs_version="$Id: graphic_text.pike,v 1.250 2000/09/29 07:52:28 nilsson Exp $";      #include <module.h>   inherit "module";         // ------------------- Module registration ---------------------      constant module_type = MODULE_TAG;   constant module_name = "Graphic text";   constant module_doc =
Roxen.git/server/modules/graphics/graphic_text.pike:791:   // p->border=arg->border;   // m_delete(arg,"border");   // }       array i = indices( arg );    foreach(textarg, string tmp)    foreach( glob( tmp, i ), string a )    {    if(a[0..5]!="magic-") {    p[a]=arg[a]; // ,id -  i-=({a}); -  m_delete(arg,a); +  i-=({ m_delete(arg,a) });    }    }       foreach(theme, string tmp)    if( (id->misc->defines[tmp] || id->misc->defines["theme_"+tmp]) && !p[tmp])    p[tmp]=id->misc->defines["theme_"+tmp] || id->misc->defines[tmp];       if(!p->fgcolor) p->fgcolor="#000000";    if(!p->bgcolor) p->bgcolor="#ffffff";   
Roxen.git/server/modules/graphics/graphic_text.pike:827:    c=String.trim_all_whites(c);    m_delete(m, "nowhitespace");    }       m_delete(m, "noparse");    m_delete(m, "preparse");       c=replace(c, Roxen.replace_entities+({" "," ", "\n\n\n", "\n\n", "\r"}),    Roxen.replace_values+({" ", " ", "\n", "\n", ""}));    -  if(m->maxlen) { -  c = c[..(((int)m->maxlen||QUERY(deflen))-1)]; -  m_delete(m, "maxlen"); -  } +  if(m->maxlen) +  c = c[..(( (int)m_delete(m,"maxlen") || QUERY(deflen))-1)];       return c;   }         // ----------------- gtext tags and containers -------------------      class TagGTextURL {    inherit RXML.Tag;    constant name = "gtext-url";
Roxen.git/server/modules/graphics/graphic_text.pike:927:    foreach( ({ "class", "onClick", "onclick", "onMouseover", "onmouseover",    "onMouseout", "onmouseout" }), string name)    if(arg[name]) {    ea+=name+"=";    if(!has_value(arg[name], "\"")) ea+="\""+arg[name]+"\" ";    else if(!has_value(arg[name], "'")) ea+="'"+arg[name]+"' ";    else ea+="\""+replace(arg[name], "'", "&#39;")+"\" ";    m_delete(arg, name);    }    -  int xml=!arg->noxml; -  m_delete(arg, "noxml"); +  int xml=!m_delete(arg, "noxml");       if(!arg->border) arg->border="0";       if(arg->split)    {    string res="",split=arg->split;    if(lower_case(split)=="split") split=" ";    m_delete(arg,"split");    c=replace(c, "\n", " ");    int setalt=!arg->alt;
Roxen.git/server/modules/graphics/graphic_text.pike:967:    if(!arg->alt) arg->alt=replace(c,"\"","'");       arg->src=query_internal_location()+num+ext;    if(size) {    arg->width=(string)size->xsize;    arg->height=(string)size->ysize;    }       if(arg->magic)    { -  string magic=replace(arg->magic,"'","`"); -  m_delete(arg,"magic"); +  string magic=replace(m_delete(arg,"magic"), "'", "`");       if(p->bevel) p->pressed=1;       m_delete(p, "fgcolor");    foreach(glob("magic-*", indices(arg)), string q) -  { -  p[q[6..]]=arg[q]; -  m_delete(arg, q); -  } +  p[q[6..]]=m_delete(arg, q);       if(!p->fgcolor) p->fgcolor=id->misc->defines->theme_alink||    id->misc->defines->alink||"#ff0000";       string num2 = image_cache->store( ({ p, c }),id );    size = image_cache->metadata( num2, id );    if(size) {    arg->width=(string)max(arg->xsize,size->xsize);    arg->height=(string)max(arg->ysize,size->ysize);    }
Roxen.git/server/modules/graphics/graphic_text.pike:999:    if(!id->supports->images) return sprintf(lp,arg->alt);       string sn="i"+id->misc->gtext_mi++;    if(!id->supports->js_image_object) {    return (!input)?    ("<a"+ea+"href=\""+url+"\">"+Roxen.make_tag("img",arg+(["name":sn]),xml)+"</a>"):    Roxen.make_tag("input",arg+(["type":"image"]),xml);    }       arg->name=sn; -  string res="\n<script>\n"; +  string res="<script>\n";    if(!id->misc->gtext_magic_java) {    res += "function i(ri,hi,txt)\n"    "{\n"    " document.images[ri].src = hi.src;\n"    " if( txt != 0 )\n"    " setTimeout(\"top.window.status = '\"+txt+\"'\", 100);\n" -  "}\n"; +  "}";    }    id->misc->gtext_magic_java="yes";       return    res+    " "+sn+"l = new Image("+arg->width+", "+arg->height+");"+sn+"l.src = \""+arg->src+"\";\n"    " "+sn+"h = new Image("+arg->width+", "+arg->height+");"+sn+"h.src = \""+query_internal_location()+num2+ext+"\";\n"    "</script>\n"+    "<a"+ea+"href=\""+url+"\" "+    (input?"onClick='document.forms[0].submit();' ":"")