ScummVM API documentation
next_cd_dialog.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_DIALOGS_NEXT_CD_DIALOG_H
24 #define BAGEL_DIALOGS_NEXT_CD_DIALOG_H
25 
26 #include "bagel/spacebar/boflib/gui/dialog.h"
27 #include "bagel/spacebar/boflib/gui/button.h"
28 
29 namespace Bagel {
30 namespace SpaceBar {
31 
32 #define NUM_QUIT_BUTTONS 3
33 
34 class CBagQuitDialog : public CBofDialog {
35 public:
37 
38  void onInitDialog() override;
39 
40 protected:
41  void onPaint(CBofRect *pRect) override;
42  void onClose() override;
43  void onBofButton(CBofObject *pObject, int nState) override;
44 
45  void onKeyHit(uint32 lKey, uint32 lRepCount) override;
46 
47  // Data
48  //
49  CBofBmpButton *_pButtons[NUM_QUIT_BUTTONS];
50 };
51 
52 class CBagNextCDDialog : public CBofDialog {
53 public:
55 
56  void onInitDialog() override;
57 
58 protected:
59  void onPaint(CBofRect *pRect) override;
60  void onClose() override;
61  void onBofButton(CBofObject *, int nFlags) override;
62 
63  void onKeyHit(uint32 lKey, uint32 nRepCount) override;
64 
65  // Data
66  CBofBmpButton *_pButton;
67 };
68 
69 class CBagCreditsDialog : public CBofDialog {
70 public:
72 
73  void onInitDialog() override;
74 
75 protected:
76  void onPaint(CBofRect *pRect) override;
77  void onClose() override;
78 
79  void onKeyHit(uint32 lKey, uint32 lRepCount) override;
80  void onLButtonDown(uint32 nFlags, CBofPoint *pPoint, void * = nullptr) override;
81 
82  void onMainLoop() override;
83 
84  ErrorCode nextScreen();
85  ErrorCode displayCredits();
86  ErrorCode loadNextTextFile();
87  int linesPerPage();
88  void nextLine();
89  ErrorCode paintLine(int nLine, char *pszText);
90 
91  CBofBitmap *_pCreditsBmp;
92  CBofBitmap *_pSaveBmp;
93 
94  char *_pszNextLine;
95  char *_pszEnd;
96  char *_pszText;
97 
98  int _nLines;
99  int _nNumPixels;
100  int _iScreen;
101 
102  bool _bDisplay;
103 };
104 
105 } // namespace SpaceBar
106 } // namespace Bagel
107 
108 #endif
Definition: button.h:110
Definition: object.h:28
Definition: rect.h:35
Definition: next_cd_dialog.h:52
Definition: next_cd_dialog.h:34
Definition: afxwin.h:27
Definition: point.h:32
Definition: dialog.h:39
Definition: bitmap.h:57
Definition: credits_dialog.h:31