home *** CD-ROM | disk | FTP | other *** search
/ ARM Club 3 / TheARMClub_PDCD3.iso / hensa / programming / dreamscape / source / Dreamscape / Headers / utils / h / dragbox < prev    next >
Encoding:
Text File  |  1996-08-01  |  1.1 KB  |  43 lines

  1.  
  2. // utils.h.dragbox
  3.  
  4. // Dreamscape - C++ class library for RISC OS
  5. // Copyright (c) 1996 Mark Seaborn <mseaborn@argonet.co.uk>
  6. //
  7. // This library is free software; you can redistribute it and/or
  8. // modify it under the terms of the GNU Library General Public
  9. // License as published by the Free Software Foundation; either
  10. // version 2 of the License, or (at your option) any later version.
  11. // See the Dreamscape documentation for more information.
  12.  
  13. #ifndef dreamscape_dragbox_H
  14. #define dreamscape_dragbox_H
  15.  
  16. #include "window.h"
  17. #include "winhandlers.h"
  18.  
  19. class DragBoxHandler {
  20. public:
  21.   virtual void drag_box_finished(const WinBBox &box) = 0;
  22. };
  23.  
  24. class DragBox: public DragHandler, private WindowRedrawable {
  25.   Window *window;
  26.   WinCoords start, pointer;
  27.   int step;
  28.   DragBoxHandler *handler;
  29.  
  30.   void redraw(const RedrawInfo &info) const;
  31.  
  32. public:
  33.   DragBox(BaseWindow *window, const WinCoords &start,
  34.     DragBoxHandler *handler);
  35.   virtual ~DragBox();
  36.  
  37.   void drag_in_progress(const DragInfo &info);
  38.   void drag_finished(const DragInfo &info);
  39.   void drag_aborted();
  40. };
  41.  
  42. #endif
  43.