Ignore:
Timestamp:
Mar 16, 2008, 2:17:43 AM (11 years ago)
Author:
Sam Hocevar
Message:
  • Simplified the window creation arguments. Got rid of a lot of macros and hid stuff in private namespaces.

Inspired by Win32 Abuse changelog for January 28, 2001:

  • Well, in the process of adding changes necessary to

handle recovery from alt-tabbing away from Abuse
(which is why I was updating jwindow::redraw()),
the entire windowing system is getting an overhaul.
It's gonna be sweet when I'm done, though.

  • jwindow::redraw() has been changed to a virtual

function requiring no parameters. This'll make
it much easier to implement special specific-
purpose windows.

File:
1 edited

Legend:

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

    r109 r111  
    2525  screen->get_clip(cx1,cy1,cx2,cy2);
    2626  if (cx1<X) cx1=X;
    27   int w=cx2-cx1+1;
    28   int h=wm->font()->height()+4;
    29 
    30 
    31   bar=wm->new_window(X,Y,w-WINDOW_FRAME_LEFT-WINDOW_FRAME_RIGHT,
    32                      h-WINDOW_FRAME_TOP-WINDOW_FRAME_BOTTOM,NULL);
     27  int w = cx2 - cx1 - jwindow::left_border() - jwindow::right_border() + 1;
     28  int h = jwindow::top_border() + jwindow::bottom_border();
     29
     30  bar=wm->new_window(X, Y, w, 0, NULL);
    3331  bar->freeze();  // can't drag this window
    3432  bar->screen->wiget_bar(0,0,w-1,h-1,wm->bright_color(),wm->medium_color(),
     
    195193
    196194  win=wm->new_window(parent->x+x,parent->y+y,
    197                      w-WINDOW_FRAME_LEFT-WINDOW_FRAME_RIGHT,
    198                      h-WINDOW_FRAME_TOP-WINDOW_FRAME_BOTTOM,NULL);
     195                     w - jwindow::left_border() - jwindow::right_border(),
     196                     h - jwindow::top_border() - jwindow::bottom_border(),
     197                     NULL);
    199198  win->freeze();
    200199  win->screen->wiget_bar(0,0,w-1,h-1,wm->bright_color(),wm->medium_color(),wm->dark_color());
Note: See TracChangeset for help on using the changeset viewer.