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/spacebar/baglib/base_pda.h"
27 #include "bagel/spacebar/baglib/movie_object.h"
28 
29 namespace Bagel {
30 namespace SpaceBar {
31 
32 #define PDA_INCREMENT 13
33 
34 class CBagPDA : public CBagStorageDevBmp, public SBBasePda {
35 protected:
36  int _activeHeight;
37  int _deactiveHeight;
38  static bool _flashingFl;
39  static bool _soundsPausedFl;
40 
41  static CBofList<CBagMovieObject *> *_movieList;
42 
43 public:
50  CBagPDA(CBofWindow *pParent = nullptr, const CBofRect &xRect = CBofRect(), bool bActivated = false);
51 
55  virtual ~CBagPDA();
56  static void initialize();
57 
58  ErrorCode attach() override;
59 
66  void setPosInWindow(int cx, int cy, int nDist = PDA_INCREMENT);
67 
75  ErrorCode update(CBofBitmap *pBmp, CBofPoint pt, CBofRect *pSrcRect = nullptr, int nMaskColor = -1) override;
76 
82  bool paintFGObjects(CBofBitmap *pBmp) override;
83 
84  ErrorCode loadFile(const CBofString &sFile) override;
85 
91  CBagObject *onNewButtonObject(const CBofString &sInit) override;
92 
101  void onLButtonUp(uint32 nFlags, CBofPoint *xPoint, void *info = nullptr) override;
102 
109  void onLButtonDown(uint32 nFlags, CBofPoint *xPoint, void *info = nullptr) override;
110 
111  bool isInside(const CBofPoint &xPoint) override;
112 
113  CBagObject *onNewUserObject(const CBofString &sInit) override;
114 
119  static void addToMovieQueue(CBagMovieObject *);
120 
125  static void removeFromMovieQueue(CBagMovieObject *);
126 
130  static bool isMovieWaiting();
131 
132  static bool isMoviePlaying() {
133  return _pdaMode == PDA_MOO_MODE;
134  }
135 
136  static void runWaitingMovie();
137 
141  bool showInventory() override;
142 
146  bool hideInventory() override;
147 
151  bool hideCurDisplay() override;
152 
156  bool restoreCurDisplay() override;
157 
158  ErrorCode attachActiveObjects() override;
159  ErrorCode detachActiveObjects() override;
160 
164  void handleZoomButton(bool bButtonDown);
165 };
166 
167 } // namespace SpaceBar
168 } // namespace Bagel
169 
170 #endif
Definition: pda.h:34
bool hideCurDisplay() override
Definition: base_pda.h:53
bool hideInventory() override
CBagObject * onNewButtonObject(const CBofString &sInit) override
void onLButtonDown(uint32 nFlags, CBofPoint *xPoint, void *info=nullptr) override
void handleZoomButton(bool bButtonDown)
Definition: window.h:53
bool paintFGObjects(CBofBitmap *pBmp) override
Definition: object.h:86
void onLButtonUp(uint32 nFlags, CBofPoint *xPoint, void *info=nullptr) override
Definition: rect.h:35
static bool isMovieWaiting()
Definition: movie_object.h:39
CBagPDA(CBofWindow *pParent=nullptr, const CBofRect &xRect=CBofRect(), bool bActivated=false)
static void removeFromMovieQueue(CBagMovieObject *)
Definition: string.h:38
Definition: afxwin.h:27
Definition: point.h:32
void setPosInWindow(int cx, int cy, int nDist=13)
static void addToMovieQueue(CBagMovieObject *)
Definition: storage_dev_bmp.h:32
Definition: list.h:60
bool restoreCurDisplay() override
Definition: bitmap.h:57
bool showInventory() override
ErrorCode update(CBofBitmap *pBmp, CBofPoint pt, CBofRect *pSrcRect=nullptr, int nMaskColor=-1) override