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

version» Context lines:

Roxen.git/server/modules/graphics/gbutton.pike:18:   // 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   // >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.21 2000/02/08 22:13:52 per Exp $"; + constant cvs_version = "$Id: gbutton.pike,v 1.22 2000/02/08 22:40:56 per Exp $";   constant thread_safe = 1;      #include <module.h>   inherit "module";   inherit "roxenlib";         roxen.ImageCache button_cache;      
Roxen.git/server/modules/graphics/gbutton.pike:139:    mapping icon;    object button_font = resolve_font( args->font );       Image.Layer background;    Image.Layer frame;    Image.Layer mask;       int left, right, top, bottom; /* offsets */    int req_width;    +  mapping ll = ([]); +     if( args->border_image )    {    array layers = roxen.load_layers(args->border_image, id); -  +     foreach( layers, object l )    { -  +  ll[l->get_misc_value( "name" )] = l;    switch( lower_case((l->get_misc_value( "name" )/" ")[0]) )    {    case "background": background = l; break;    case "frame": frame = l; break;    case "mask": mask = l; break;    }    }    }       // otherwise load default images    if ( !frame )    {    array layers = roxen.load_layers("roxen-images/gbutton.xcf", id);    foreach( layers, object l )    { -  +  ll[l->get_misc_value( "name" )] = l;    switch( lower_case((l->get_misc_value( "name" )/" ")[0]) )    {    case "background": background = l; break;    case "frame": frame = l; break;    case "mask": mask = l; break;    }    }    }      
Roxen.git/server/modules/graphics/gbutton.pike:288:    break;    }    break;    }       right = frame->xsize()-right;    frame = stretch_layer( frame, left, right, req_width );    if (mask != frame)    mask = stretch_layer( mask, left, right, req_width );    +  if( args->extra_layers ) +  { +  array l = ({ });    if( background ) -  +  l = ({ background }); +  foreach( args->extra_layers/",", string q ) +  l += ({ ll[q] }); +  l-=({ 0 }); +  background = Image.lay( l ); +  } +  +  +  if( background )    {    if( !background->alpha() )    background->set_image( background->image(),    Image.Image( background->xsize(),    background->ysize(),    ({255,255,255}) ) );    if( args->dim )    background->set_image(background->image(),    background->alpha() * 0.3 );    background = stretch_layer( background, left, right, req_width );
Roxen.git/server/modules/graphics/gbutton.pike:393:    "wi" : (int) args->width, // Min button width    "al" : args->align || "left", // Text alignment    "dim" : args->dim || // Button dimming    (< "dim", "disabled" >)[lower_case(args->state || "")],    "icn" : args->icon_src && fix_relative(args->icon_src, id), // Icon URL    "icd" : args->icon_data, // Inline icon data    "ica" : args->align_icon || "left", // Icon alignment    "font": (args->font||id->misc->defines->font||    roxen->query("default_font")),    "border_image":fi, +  "extra_layers":args["extra-layers"],    ]);      // array hsv = Image.Color( @new_args->bg )->hsv( );   // hsv[-1] = min( hsv[-1]+70, 255 );   // new_args->bob = (array)Image.Color.hsv( @hsv );   // hsv[-1] = max( hsv[-1]-140, 0 );   // new_args->bo = (array)Image.Color.hsv( @hsv );      // if(args->bordercolor)   // new_args->bo=parse_color(args->bordercolor); // Border color