Roxen.git
/
server
/
modules
/
graphics
/
gbutton.pike
version
»
Context lines:
10
20
40
80
file
none
3
Roxen.git/server/modules/graphics/gbutton.pike:20:
// 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.
123
2009
/
12
/
01
18
:
06
:
38
grubba Exp $";
+
constant cvs_version = "$Id: gbutton.pike,v 1.
124
2010
/
04
/
27
13
:
36
:
56
grubba 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:237:
}; #endif return f; } void start() { button_cache = roxen.ImageCache("gbutton", TIMER(draw_button)); do_ext = query("ext"); }
+
void stop()
+
{
+
destruct(button_cache);
+
}
+
string status() { array s=button_cache->status(); return sprintf("<b>Images in cache:</b> %d images<br />\n" "<b>Cache size:</b> %s", s[0], Roxen.sizetostring(s[1])); } mapping(string:function) query_action_buttons() { return ([ "Clear Cache":flush_cache ]); }