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

version» Context lines:

Roxen.git/server/modules/graphics/gbutton.pike:18:   // icon_src -- icon reference   // icon_data -- inline icon data   // align -- left|center|right text alignment   // align_icon -- left|center_before|center_after|right icon 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.5 1999/11/16 11:01:13 jonasw Exp $"; + constant cvs_version = "$Id: gbutton.pike,v 1.6 1999/11/16 13:53:02 jonasw Exp $";   constant thread_safe = 1;      #include <module.h>   inherit "module";   inherit "roxenlib";         roxen.ImageCache button_cache;   object button_font = resolve_font("haru 32");   object button_border;
Roxen.git/server/modules/graphics/gbutton.pike:291:    "vspace" : args->vspace ]);       if (mapping size = button_cache->metadata(new_args, 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;    }       // Make button clickable if not dimmed -  if (args->href && !new_args->dim) -  return make_container("a", ([ "href" : args->href ]), -  make_tag("img", img_attrs)); -  else +  if (args->href && !new_args->dim) { +  mapping a_attrs = ([ "href" : args->href ]); +  if (args->target) +  a_attrs->target = args->target; +  return make_container("a", a_attrs, make_tag("img", img_attrs)); +  } else    return make_tag("img", img_attrs);   }