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

version» Context lines:

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.94 2002/04/15 08:53:48 jonasw Exp $"; + constant cvs_version = "$Id: gbutton.pike,v 1.95 2002/06/18 16:17:13 nilsson 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:223:       l->set_offset( 0,0 );    m->set_offset( x1,0 );    r->set_offset( w-r->xsize(),0 );    o = Image.lay( ({ l, m, r }) );    o->set_mode( oo->mode() );    o->set_alpha_value( oo->alpha_value() );    return o;   }    - array(Image.Layer) draw_button(mapping args, string text, object id) + array(Image.Layer)|mapping draw_button(mapping args, string text, object id)   {    Image.Image text_img;    mapping icon;       Image.Layer background;    Image.Layer frame;    Image.Layer mask;       int left, right, top, middle, bottom; /* offsets */    int req_width, noframe;
Roxen.git/server/modules/graphics/gbutton.pike:255:    switch( lower_case(l->get_misc_value( "name" )) )    {    case "background": background = l; break;    case "frame": frame = l; break;    case "mask": mask = l; break;    }    }    };       if( args->border_image ) -  set_image( roxen.load_layers(args->border_image, id) ); +  { +  array(Image.Layer)|mapping tmp = roxen.load_layers(args->border_image, id); +  if (mappingp(tmp)) +  if (tmp->error == 401) +  return tmp; +  else +  report_debug("GButton: Failed to load frame image: %O\n", +  args->border_image); +  set_image( tmp ); +  }          // otherwise load default images    if ( !frame && !background && !mask )    {    string data = Stdio.read_file("roxen-images/gbutton.xcf");    if (!data)    error ("Failed to load default frame image "    "(roxen-images/gbutton.xcf): " + strerror (errno()));    mixed err = catch {