ScummVM API documentation
view.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 ULTIMA4_VIEWS_VIEW_H
23#define ULTIMA4_VIEWS_VIEW_H
24
25namespace Ultima {
26namespace Ultima4 {
27
28#define SCALED(n) ((n) * settings._scale)
29
30class Image;
31
36class View {
37public:
38 View(int x, int y, int width, int height);
39 virtual ~View() {}
40
44 virtual void reinit();
45
49 virtual void clear();
50
54 virtual void update();
55
59 virtual void update(int x, int y, int width, int height);
60
64 virtual void highlight(int x, int y, int width, int height);
65 virtual void unhighlight();
66
67protected:
68 Common::Rect _bounds;
69 Common::Rect _highlightBounds;
70 bool _highlighted;
71 void drawHighlighted();
72#ifdef IOS_ULTIMA4
73 friend void U4IOS::updateScreenView();
74#endif
75 static Image *_screen;
76};
77
78} // End of namespace Ultima4
79} // End of namespace Ultima
80
81#endif
Definition: image.h:65
Definition: view.h:36
virtual void highlight(int x, int y, int width, int height)
virtual void update(int x, int y, int width, int height)
virtual void update()
virtual void reinit()
virtual void clear()
Definition: rect.h:536