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/jwindow.hpp

    r57 r106  
    3838  image *screen;
    3939  ifield *first,*active,*grab;
    40   window_manager *wm;
    4140  jwindow *cur;
    4241  int no_selections_allowed;
    4342public :
    44   input_manager(image *Screen, window_manager *WM, ifield *First);
    45   void handle_event(event &ev, jwindow *j, window_manager *wm);
     43  input_manager(image *Screen, ifield *First);
     44  void handle_event(event &ev, jwindow *j);
    4645  ifield *get(int id);
    4746  void redraw();
     
    6463  int id;
    6564  ifield *next;
    66   virtual void area(int &x1, int &y1, int &x2, int &y2, window_manager *wm) = 0;
    67   virtual void draw_first(image *screen, window_manager *wm)              = 0;
    68   virtual void draw(int active, image *screen, window_manager *wm)        = 0;
    69   virtual void handle_event(event &ev, image *screen, window_manager *wm, input_manager *im) = 0;
     65  virtual void area(int &x1, int &y1, int &x2, int &y2) = 0;
     66  virtual void draw_first(image *screen)              = 0;
     67  virtual void draw(int active, image *screen)        = 0;
     68  virtual void handle_event(event &ev, image *screen, input_manager *im) = 0;
    7069  virtual int selectable() { return 1; }
    7170  virtual void remap(filter *f) { ; }
     
    9392  input_manager *inm;
    9493  void *local_info;     // pointer to info block for local system (may support windows)
    95   jwindow(int X, int Y, int L, int H, window_manager *wm, ifield *fields, char const *Name=NULL);
     94  jwindow(int X, int Y, int L, int H, ifield *fields, char const *Name=NULL);
    9695  void redraw(int hi, int med, int low, JCFont *fnt);
    9796  void resize(int L, int H);
Note: See TracChangeset for help on using the changeset viewer.