ScummVM API documentation
link_item.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 TITANIC_LINK_ITEM_H
23 #define TITANIC_LINK_ITEM_H
24 
25 #include "titanic/support/mouse_cursor.h"
26 #include "titanic/core/named_item.h"
27 #include "titanic/support/movie_clip.h"
28 #include "titanic/messages/messages.h"
29 
30 namespace Titanic {
31 
32 class CViewItem;
33 class CNodeItem;
34 class CRoomItem;
35 
36 class CLinkItem : public CNamedItem {
37  DECLARE_MESSAGE_MAP;
38 private:
43  CString formName();
44 protected:
45  int _roomNumber;
46  int _nodeNumber;
47  int _viewNumber;
48  int _linkMode;
49 public:
50  Rect _bounds;
51  CursorId _cursorId;
52 public:
53  static Movement getMovementFromCursor(CursorId cursorId);
54 public:
55  CLASSDEF;
56  CLinkItem();
57 
61  void save(SimpleFile *file, int indent) override;
62 
66  void load(SimpleFile *file) override;
67 
71  bool connectsTo(CViewItem *destView) const override;
72 
76  virtual void setDestination(int roomNumber, int nodeNumber,
77  int viewNumber, int linkMode);
78 
82  virtual CViewItem *getDestView() const;
83 
87  virtual CNodeItem *getDestNode() const;
88 
92  virtual CRoomItem *getDestRoom() const;
93 
97  CMovieClip *getClip() const;
98 
102  Movement getMovement() const;
103 
111  bool findPoint(Quadrant quadrant, Point &pt);
112 };
113 
114 } // End of namespace Titanic
115 
116 #endif /* TITANIC_LINK_ITEM_H */
Definition: movie_clip.h:41
Definition: simple_file.h:49
Definition: room_item.h:33
Definition: named_item.h:33
Definition: node_item.h:29
Definition: rect.h:35
Definition: rect.h:45
Definition: arm.h:30
Definition: string.h:40
Definition: view_item.h:32