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.97 2002/09/05 12:28:17 jonasw Exp $"; + constant cvs_version = "$Id: gbutton.pike,v 1.98 2003/06/30 16:49:14 jonasw 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:256:    {    case "background": background = l; break;    case "frame": frame = l; break;    case "mask": mask = l; break;    }    }    };       if( args->border_image )    { -  array(Image.Layer)|mapping tmp = roxen.load_layers(args->border_image, id); +  array(Image.Layer)|mapping tmp; +  + #if constant(Sitebuilder) +  // Let SiteBuilder get a chance to decode its argument data +  if (Sitebuilder.sb_start_use_imagecache) { +  Sitebuilder.sb_start_use_imagecache(args, id); +  tmp = roxen.load_layers(args->border_image, id); +  Sitebuilder.sb_end_use_imagecache(args, id); +  } else + #endif +  { +  tmp = roxen.load_layers(args->border_image, id); +  } +     if (mappingp(tmp))    if (tmp->error == 401)    return tmp;    else    report_debug("GButton: Failed to load frame image: %O\n",    args->border_image);    set_image( tmp );    }      
Roxen.git/server/modules/graphics/gbutton.pike:783:    "extra_left_layers":args["extra-left-layers"],    "extra_right_layers":args["extra-right-layers"],    "extra_background_layers":args["extra-background-layers"],    "extra_mask_layers":args["extra-mask-layers"],    "extra_frame_layers":args["extra-frame-layers"],    "scale":args["scale"],    "format":args["format"],    "gamma":args["gamma"],    "crop":args["crop"],    ]); -  if( fi ) +  if( fi ) {    new_args->stat = get_file_stat( fi, id ); -  + #if constant(Sitebuilder) +  // The file we called get_file_stat() on above may be a SiteBuilder +  // file. If so we need to extend the argument data with e.g. +  // current language fork. +  if (Sitebuilder.sb_prepare_imagecache) +  new_args = Sitebuilder.sb_prepare_imagecache(new_args, fi, id); + #endif +  }       new_args->quant = args->quant || 128;    foreach(glob("*-*", indices(args)), string n)    new_args[n] = args[n];       // 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 );