ScummVM API documentation
pda.h
1 
2 /* ScummVM - Graphic Adventure Engine
3  *
4  * ScummVM is the legal property of its developers, whose names
5  * are too numerous to list here. Please refer to the COPYRIGHT
6  * file distributed with this source distribution.
7  *
8  * This program is free software: you can redistribute it and/or modify
9  * it under the terms of the GNU General Public License as published by
10  * the Free Software Foundation, either version 3 of the License, or
11  * (at your option) any later version.
12  *
13  * This program is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  * GNU General Public License for more details.
17  *
18  * You should have received a copy of the GNU General Public License
19  * along with this program. If not, see <http://www.gnu.org/licenses/>.
20  *
21  */
22 
23 #ifndef BAGEL_BAGLIB_PDA_H
24 #define BAGEL_BAGLIB_PDA_H
25 
26 #include "bagel/baglib/base_pda.h"
27 #include "bagel/baglib/movie_object.h"
28 
29 namespace Bagel {
30 
31 #define PDA_INCREMENT 13
32 
33 class CBagPDA : public CBagStorageDevBmp, public SBBasePda {
34 protected:
35  int _activeHeight;
36  int _deactiveHeight;
37  static bool _flashingFl;
38  static bool _soundsPausedFl;
39 
40  static CBofList<CBagMovieObject *> *_movieList;
41 
42 public:
49  CBagPDA(CBofWindow *pParent = nullptr, const CBofRect &xRect = CBofRect(), bool bActivated = false);
50 
54  virtual ~CBagPDA();
55  static void initialize();
56 
57  ErrorCode attach() override;
58 
65  void setPosInWindow(int cx, int cy, int nDist = PDA_INCREMENT);
66 
74  ErrorCode update(CBofBitmap *pBmp, CBofPoint pt, CBofRect *pSrcRect = nullptr, int nMaskColor = -1) override;
75 
81  bool paintFGObjects(CBofBitmap *pBmp) override;
82 
83  ErrorCode loadFile(const CBofString &sFile) override;
84 
90  CBagObject *onNewButtonObject(const CBofString &sInit) override;
91 
100  void onLButtonUp(uint32 nFlags, CBofPoint *xPoint, void *info = nullptr) override;
101 
108  void onLButtonDown(uint32 nFlags, CBofPoint *xPoint, void *info = nullptr) override;
109 
110  bool isInside(const CBofPoint &xPoint) override;
111 
112  CBagObject *onNewUserObject(const CBofString &sInit) override;
113 
118  static void addToMovieQueue(CBagMovieObject *);
119 
124  static void removeFromMovieQueue(CBagMovieObject *);
125 
129  static bool isMovieWaiting();
130 
131  static bool isMoviePlaying() {
132  return _pdaMode == PDA_MOO_MODE;
133  }
134 
135  static void runWaitingMovie();
136 
140  bool showInventory() override;
141 
145  bool hideInventory() override;
146 
150  bool hideCurDisplay() override;
151 
155  bool restoreCurDisplay() override;
156 
157  ErrorCode attachActiveObjects() override;
158  ErrorCode detachActiveObjects() override;
159 
163  void handleZoomButton(bool bButtonDown);
164 };
165 
166 } // namespace Bagel
167 
168 #endif
Definition: base_pda.h:52
Definition: window.h:50
static bool isMovieWaiting()
bool hideCurDisplay() override
virtual ~CBagPDA()
Definition: bitmap.h:55
ErrorCode update(CBofBitmap *pBmp, CBofPoint pt, CBofRect *pSrcRect=nullptr, int nMaskColor=-1) override
bool paintFGObjects(CBofBitmap *pBmp) override
Definition: rect.h:36
bool restoreCurDisplay() override
Definition: object.h:85
static void removeFromMovieQueue(CBagMovieObject *)
Definition: movie_object.h:38
void onLButtonDown(uint32 nFlags, CBofPoint *xPoint, void *info=nullptr) override
void handleZoomButton(bool bButtonDown)
bool hideInventory() override
CBagObject * onNewButtonObject(const CBofString &sInit) override
Definition: string.h:38
Definition: pda.h:33
CBagPDA(CBofWindow *pParent=nullptr, const CBofRect &xRect=CBofRect(), bool bActivated=false)
static void addToMovieQueue(CBagMovieObject *)
Definition: bagel.h:31
Definition: point.h:34
void setPosInWindow(int cx, int cy, int nDist=13)
bool showInventory() override
Definition: list.h:60
void onLButtonUp(uint32 nFlags, CBofPoint *xPoint, void *info=nullptr) override
Definition: storage_dev_bmp.h:31