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, Idonex AB.   //    - constant cvs_version="$Id: graphic_text.pike,v 1.205 2000/02/19 06:12:32 nilsson Exp $"; + constant cvs_version="$Id: graphic_text.pike,v 1.206 2000/02/29 15:02:26 nilsson Exp $";      #include <module.h>   inherit "module";   inherit "roxenlib";         // ------------------- Module registration ---------------------      constant module_type = MODULE_PARSER;   constant module_name = "Graphics text";
Roxen.git/server/modules/graphics/graphic_text.pike:286:    "xpad",    "xsize",    "xspacing",    "ypad",    "ysize",    "yspacing"   });      constant theme=({"fgcolor","bgcolor","font"});    + constant hreffilter=(["split":1,"magic":1,"noxml":1,"alt":1]); +    mapping mk_gtext_arg(mapping arg, RequestID id) {       mapping p=([]); //Picture rendering arguments.    -  +  m_delete(arg,"src"); +  m_delete(arg,"width"); +  m_delete(arg,"height"); +     foreach(filearg, string tmp)    if(arg[tmp]) {    p[tmp]=fix_relative(arg[tmp],id);    m_delete(arg,tmp);    }       if(arg->border && search(arg->border,",")) {    p->border=arg->border;    m_delete(arg,"border");    }
Roxen.git/server/modules/graphics/graphic_text.pike:387:       string lp="%s", url="", ea="";       int input=0;    if(arg->submit)    {    input=1;    m_delete(arg,"submit");    }    -  if(!arg->noxml) { arg["/"]="/"; m_delete(arg, "noxml"); } -  if(!arg->border) arg->border=arg->border||"0"; -  +     if(arg->href)    {    url = arg->href; -  lp = replace(make_tag("a",arg),"%","%%")+"%s</a>"; +  lp = replace(make_tag("a",arg-hreffilter),"%","%%")+"%s</a>";    if(!p->fgcolor) p->fgcolor=id->misc->gtext_link||"#0000ff";    m_delete(arg, "href");    }    -  +  if(!arg->noxml) { arg["/"]="/"; m_delete(arg, "noxml"); } +  if(!arg->border) 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;    foreach(c/split-({""}), string word)    {    string fn = image_cache->store( ({ p, word }),id );
Roxen.git/server/modules/graphics/graphic_text.pike:436:    if(size) {    arg->width=(string)size->xsize;    arg->height=(string)size->ysize;    }       if(arg->magic)    {    string magic=replace(arg->magic,"'","`");    m_delete(arg,"magic");    -  if(!arg->fgcolor) p->fgcolor=id->misc->defines->theme_alink|| -  id->misc->defines->alink||"#ff0000"; +     if(p->bevel) p->pressed=1;       foreach(glob("magic-*", indices(arg)), string q)    {    p[q[6..]]=arg[q];    m_delete(arg, q);    }    -  +  if(!arg->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);    }       if(!id->supports->images) return sprintf(lp,arg->alt);       string sn="i"+id->misc->gtext_mi++;