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

version» Context lines:

Roxen.git/server/modules/graphics/gbutton.pike:18:   // icon-data -- inline icon data   // align -- left|center|right text alignment   // align-icon -- left|center-before|center-after|right icon alignment   // valign-icon -- above|middle|below icon vertical alignment   // >Button text</gbutton>   //   // Alignment restriction: when text alignment is either left or right, icons   // must also be aligned left or right.       - constant cvs_version = "$Id: gbutton.pike,v 1.92 2001/10/08 12:32:53 anders Exp $"; + constant cvs_version = "$Id: gbutton.pike,v 1.93 2001/10/09 16:58:44 nilsson Exp $";   constant thread_safe = 1;      #include <module.h>   inherit "module";      roxen.ImageCache button_cache;   int do_ext;      constant module_type = MODULE_TAG;   constant module_name = "Graphics: GButton";
Roxen.git/server/modules/graphics/gbutton.pike:785:       // if( new_args->stat && (fn = id->conf->real_file( fi, id ) ) )    // Roxen.add_cache_stat_callback( id, fn, new_args->stat );       string fn;   // werror("mkurl took %dµs\n", gethrtime()-t );      // t = gethrtime();    string img_src =    query_absolute_internal_location(id) + -  button_cache->store( ({ new_args, content }), id); +  button_cache->store( ({ new_args, (string)content }), id);       if(do_ext)    img_src += "." + (new_args->format || "gif");      // werror("argcache->store took %dµs\n", gethrtime()-t );    return ({ img_src, new_args });    }   }      class TagGButtonURL {
Roxen.git/server/modules/graphics/gbutton.pike:827:    inherit ButtonFrame;    array do_return(RequestID id) {    // Peek at img-align and remove it so it won't be copied by "*-*" glob    // in mk_url().    string img_align = args["img-align"];    m_delete(args, "img-align");       [string img_src, mapping new_args]=mk_url(id);       mapping img_attrs = ([ "src" : img_src, -  "alt" : args->alt || content, +  "alt" : args->alt || (string)content,    "border" : args->border,    "hspace" : args->hspace,    "vspace" : args->vspace ]);    if (img_align)    img_attrs->align = img_align;    -  if (mapping size = button_cache->metadata( ({ new_args, content }), +  if (mapping size = button_cache->metadata( ({ new_args, (string)content }),    id, 1)) {    // Image in cache (1 above prevents generation on-the-fly, i.e.    // first image will lack sizes).    img_attrs->width = size->xsize;    img_attrs->height = size->ysize;    }       result = Roxen.make_tag("img", img_attrs, !args->noxml);       // Make button clickable if not dimmed