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.
57
2000/08/
15
20:
19:
02
mast
Exp $";
+
constant cvs_version = "$Id: gbutton.pike,v 1.
58
2000/08/
22
19:
00:35
nilsson
Exp $";
constant thread_safe = 1; #include <module.h> inherit "module"; roxen.ImageCache button_cache; constant module_type = MODULE_PARSER; constant module_name = "GButton"; constant module_doc =
Roxen.git/server/modules/graphics/gbutton.pike:757:
if (img_align) img_attrs->align = img_align; 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; }
-
result = Roxen.make_tag("img", img_attrs);
+
result = Roxen.make_tag("img", img_attrs
, !args->noxml
);
// Make button clickable if not dimmed if(args->href && !new_args->dim) { mapping a_attrs = ([ "href" : args->href ]); foreach(indices(args), string arg) if(has_value("target/onmousedown/onmouseup/onclick/ondblclick/" "onmouseout/onmouseover/onkeypress/onkeyup/" "onkeydown" / "/", lower_case(arg))) a_attrs[arg] = args[arg]; result = Roxen.make_container("a", a_attrs, result); } return 0; } } }