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

version» Context lines:

Roxen.git/server/modules/graphics/gbutton.pike:4:   // Copyright © 1999-2001 Roxen IS. Author: Jonas Walldén, <jonasw@roxen.com>         // Usage:   //   // <gbutton   // bgcolor -- background color inside/outside button   // textcolor -- button text color   // href -- button URL   // alt -- alternative button alt text + // title -- button tooltip   // border -- image border   // state -- enabled|disabled button state   // textstyle -- normal|consensed text   // 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   // 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.102 2003/10/30 12:58:50 anders Exp $"; + constant cvs_version = "$Id: gbutton.pike,v 1.103 2003/12/15 15:51:58 jonasw 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:98: Inside #if defined(manual)
  <attr name='frame-image' value='path'><p>    Use this XCF-image as a frame for the button. The image is required    to have at least the following layers: background, mask and frame.</p>   "+/* <ex><gbutton frame-image='internal-roxen-tabframe'>foo</gbutton></ex> */#"   </attr>      <attr name='alt' value='string'><p>    Alternative button and alt text.</p>   </attr>    + <attr name='title' value='string'><p> +  Button tooltip.</p> + </attr> +    <attr name='href' value='uri'><p>    Button URI.</p>   </attr>      <attr name='textstyle' value='normal|condensed'><p>    Set to <i>normal</i> or <i>condensed</i> to alter text style.</p>   </attr>      <attr name='width' value=''><p>    Minimum button width.</p>
Roxen.git/server/modules/graphics/gbutton.pike:867:    constant name = "gbutton";    constant flags = RXML.FLAG_DONT_REPORT_ERRORS;    RXML.Type content_type = RXML.t_text(RXML.PXml);       class Frame {    inherit ButtonFrame;    array do_return(RequestID id) {    // Peek at img-align and remove it so it won't be copied by "*-*" glob    // in mk_url().    string img_align = args["img-align"]; +  string title = args->title;    m_delete(args, "img-align");       [string img_src, mapping new_args]=mk_url(id);       mapping img_attrs = ([ "src" : img_src,    "alt" : args->alt || (string)content,    "border" : args->border,    "hspace" : args->hspace,    "vspace" : args->vspace ]);    if (img_align)    img_attrs->align = img_align; -  +  if (title) +  img_attrs->title = title;       int no_draw = !id->misc->generate_images;    if (mapping size = button_cache->metadata( ({ new_args, (string)content }),    id, no_draw)) {    // Image in cache (no_draw above prevents generation on-the-fly, i.e.    // first image will lack sizes).    img_attrs->width = size->xsize;    img_attrs->height = size->ysize;    }