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

version» Context lines:

Roxen.git/server/modules/graphics/gbutton.pike:3:   //   // 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 + // target -- target frame   // 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.104 2003/12/18 13:15:21 jonasw Exp $"; + constant cvs_version = "$Id: gbutton.pike,v 1.105 2003/12/29 09:52:48 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:107: Inside #if defined(manual)
  </attr>      <attr name='title' value='string'><p>    Button tooltip.</p>   </attr>      <attr name='href' value='uri'><p>    Button URI.</p>   </attr>    + <attr name='target' value='string'><p> +  Button target frame.</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>   </attr>      <attr name='align' value='left|center|right'><p>    Set text alignment. There are some alignment restrictions: when text
Roxen.git/server/modules/graphics/gbutton.pike:909:    // 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)    { -  mapping a_attrs = ([ "href" : args->href ]); +  mapping a_attrs = ([ "href" : args->href, +  ]); +  if (args->target) a_attrs->target = args->target;       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;    }    }   }