Roxen.git
/
server
/
modules
/
graphics
/
gbutton.pike
version
»
Context lines:
10
20
40
80
file
none
3
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.
67
2000
/
12
/
05
00
:
25
:
27
nilsson
Exp $";
+
constant cvs_version = "$Id: gbutton.pike,v 1.
68
2001
/
01/
12
16
:
16
:
10
anders
Exp $";
constant thread_safe = 1; #include <module.h> inherit "module"; roxen.ImageCache button_cache; constant module_type = MODULE_TAG; constant module_name = "GButton"; constant module_doc =
Roxen.git/server/modules/graphics/gbutton.pike:791:
[string img_src, mapping new_args]=mk_url(id); mapping img_attrs = ([ "src" : img_src, "alt" : args->alt || 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, id, 1)) {
+
if (mapping size = button_cache->metadata(
({
new_args,
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 if(args->href && !new_args->dim)