Ignore:
Timestamp:
Mar 15, 2008, 12:55:44 AM (11 years ago)
Author:
Sam Hocevar
Message:
  • Rename the "eh" variable to "wm" because it's a window manager, not an event handler.
  • No longer pass the window manager to functions, there's only one.

Inspired by Win32 Abuse changelog for January 28, 2001:

  • Starting work on singleton code; will get rid of all

references to an arbitrary window_manager* because
there's only going to be one, and it's not ever
going to change.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • abuse/trunk/src/imlib/tools.cpp

    r56 r106  
    2121}
    2222
    23 void tool_picker::remap(palette *pal, window_manager *wm, image *screen)
     23void tool_picker::remap(palette *pal, image *screen)
    2424{
    2525  delete map;
    2626  map=new filter(old_pal,pal);
    27   draw_first(screen,wm);
     27  draw_first(screen);
    2828}
    2929
    3030tool_picker::tool_picker(int X, int Y, int ID,
    3131              int show_h, visual_object **Icons, int *Ids, int total_ic,
    32                          palette *icon_palette, palette *pal, window_manager *wm, ifield *Next) :
     32                         palette *icon_palette, palette *pal, ifield *Next) :
    3333  spicker(X,Y,ID,show_h,1,1,0,Next)
    3434{
     
    3939  for (int i=0;i<total_ic;i++)
    4040  {
    41     if (icons[i]->width(wm)>iw) iw=icons[i]->width(wm);
    42     if (icons[i]->height(wm)>ih) ih=icons[i]->height(wm);
     41    if (icons[i]->width()>iw) iw=icons[i]->width();
     42    if (icons[i]->height()>ih) ih=icons[i]->height();
    4343  }
    4444  map=new filter(icon_palette,pal);
     
    4747}
    4848
    49 void tool_picker::draw_item(window_manager *wm, image *screen, int x, int y, int num, int active)
     49void tool_picker::draw_item(image *screen, int x, int y, int num, int active)
    5050{
    5151  if (!active)
     
    5353  else
    5454    screen->bar(x,y,x+iw-1,y+ih-1,wm->bright_color());
    55   icons[num]->draw(screen,x,y,wm,map);
     55  icons[num]->draw(screen,x,y,map);
    5656}
    5757
Note: See TracChangeset for help on using the changeset viewer.