home *** CD-ROM | disk | FTP | other *** search
-
- // utils.h.dragbox
-
- // Dreamscape - C++ class library for RISC OS
- // Copyright (c) 1996 Mark Seaborn <mseaborn@argonet.co.uk>
- //
- // This library is free software; you can redistribute it and/or
- // modify it under the terms of the GNU Library General Public
- // License as published by the Free Software Foundation; either
- // version 2 of the License, or (at your option) any later version.
- // See the Dreamscape documentation for more information.
-
- #ifndef dreamscape_dragbox_H
- #define dreamscape_dragbox_H
-
- #include "window.h"
- #include "winhandlers.h"
-
- class DragBoxHandler {
- public:
- virtual void drag_box_finished(const WinBBox &box) = 0;
- };
-
- class DragBox: public DragHandler, private WindowRedrawable {
- Window *window;
- WinCoords start, pointer;
- int step;
- DragBoxHandler *handler;
-
- void redraw(const RedrawInfo &info) const;
-
- public:
- DragBox(BaseWindow *window, const WinCoords &start,
- DragBoxHandler *handler);
- virtual ~DragBox();
-
- void drag_in_progress(const DragInfo &info);
- void drag_finished(const DragInfo &info);
- void drag_aborted();
- };
-
- #endif
-