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

version» Context lines:

Roxen.git/server/modules/graphics/graphic_text.pike:1: - constant cvs_version="$Id: graphic_text.pike,v 1.113 1998/03/06 11:12:10 per Exp $"; + constant cvs_version="$Id: graphic_text.pike,v 1.114 1998/03/07 20:01:03 noring Exp $";   constant thread_safe=1;      #include <module.h>   #include <stat.h>   inherit "module";   inherit "roxenlib";      #ifndef VAR_MORE   #define VAR_MORE 0   #endif /* VAR_MORE */    -  + static private int loaded; +  + static private string doc() + { +  return !loaded?"":replace(Stdio.read_bytes("modules/tags/doc/graphic_text") +  ||"", ({ "{", "}" }), ({ "&lt;", "&gt;" })); + } +    array register_module()   {    return ({ MODULE_LOCATION | MODULE_PARSER,    "Graphics text", -  +  ("Generates graphical texts.<p>" +  "See <tt>&lt;gtext help&gt;&lt;/gtext&gt;</tt> for " +  "more information.\n<p>"+doc()), + #if 0    "Defines a few new containers, which all render text to gifs "    "using the image module in pike.\n<p>"    "<b>&lt;gh1&gt;</b> to <b>&lt;gh6&gt;:</b> Headers<br>\n"    "<b>&lt;gh&gt;:</b> Header<br>\n"    "<b>&lt;gtext&gt;:</b> Graphical text<br>\n"    "<b>&lt;anfang&gt;:</b> Make the first character a "    "graphical one. Not all that useful, really.<br>\n"    "<br>\n"    "<b>Common arguments:</b>\n <pre>"    " verbatim Do not try to be typographically correct\n"
Roxen.git/server/modules/graphics/graphic_text.pike:101:    " &lt;gh1&gt;&lt;/gh&gt;, which would otherwise\n"    " parse the whole document.\n"    " help Display this text\n"    " scroll=width,steps,delay Make a horrible scrolltext\n"    " fadein=blur,steps,delay,initialdelay Make a (somewhat less) horrible fadein\n"    "\n"    "<b>Arguments passed on the the &lt;a&gt; tag (if href is specified):</b>\n "    " target=...\n"    " onClick=...\n"    "</pre>\n", + #endif    0,    1,    });   }         array (string) list_fonts()   {    array fnts;    catch(fnts = get_dir("fonts/32/") - ({".",".."}));
Roxen.git/server/modules/graphics/graphic_text.pike:703:       to_clean = to_clean[1..];    if(sizeof(to_clean))    call_out(clean_cache_dir, 0.1);    else    call_out(clean_cache_dir, 3600);   }      void start(int|void val, object|void conf)   { +  loaded = 1; +     if(conf)    {    mkdirhier( query( "cache_dir" )+".foo" );   #ifndef __NT__   #if efun(chmod)    chmod( query( "cache_dir" ), 0777 );   #endif   #endif    remove_call_out(clean_cache_dir);    call_out(clean_cache_dir, 10);
Roxen.git/server/modules/graphics/graphic_text.pike:1238:    else    return (string)num;   }      string tag_graphicstext(string t, mapping arg, string contents,    object id, object foo, mapping defines)   {   //Allow <accessed> and others inside <gtext>.       if(t=="gtext" && arg->help) -  return register_module()[2]; +  return doc();    else if(arg->help)    return "This tag calls &lt;gtext&gt; with different default values.";    if(arg->background)    arg->background = fix_relative(arg->background,id);    if(arg->texture)    arg->texture = fix_relative(arg->texture,id);    if(arg->magic_texture)    arg->magic_texture=fix_relative(arg->magic_texture,id);    if(arg->magic_background)    arg->magic_background=fix_relative(arg->magic_background,id);