ScummVM API documentation
gui_drag_manager.h
1 /* ScummVM - Graphic Adventure Engine
2  *
3  * ScummVM is the legal property of its developers, whose names
4  * are too numerous to list here. Please refer to the COPYRIGHT
5  * file distributed with this source distribution.
6  *
7  * This program is free software: you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation, either version 3 of the License, or
10  * (at your option) any later version.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with this program. If not, see <http://www.gnu.org/licenses/>.
19  *
20  */
21 
22 #ifndef NUVIE_GUI_GUI_DRAG_MANAGER_H
23 #define NUVIE_GUI_GUI_DRAG_MANAGER_H
24 
25 #include "ultima/nuvie/gui/gui_status.h"
26 #include "ultima/nuvie/gui/gui_drag_area.h"
27 
28 namespace Ultima {
29 namespace Nuvie {
30 
31 // Drag Messages.
32 #define GUI_DRAG_OBJ 0
33 
34 class Screen;
35 
37 
38 protected:
39 
40  Screen *screen;
41 
42  GUI_DragArea *drag_source;
43  int message;
44  void *data;
45  bool is_out_of_range;
46 
47 public:
48 
50 
51  GUI_status start_drag(GUI_DragArea *src, int msg, void *d, unsigned char *icon_buf, uint16 w, uint16 h, uint8 bpp, bool out_of_range = false);
52  void drop(GUI_DragArea *drag_target, int x, int y);
53 
54 // let us find out where the drag originated, because we might
55 // need to do something different depending on where a dragged
56 // object is coming from.
57  GUI_DragArea *get_source();
58 
59  void draw(int x, int y);
60 };
61 
62 } // End of namespace Nuvie
63 } // End of namespace Ultima
64 
65 #endif
Definition: gui_drag_area.h:30
Definition: atari-screen.h:60
Definition: screen.h:41
Definition: detection.h:27
Definition: gui_drag_manager.h:36