ScummVM API documentation
opt_window.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_OPT_WINDOW_H
24 #define BAGEL_DIALOGS_OPT_WINDOW_H
25 
26 #include "bagel/spacebar/boflib/gui/dialog.h"
27 #include "bagel/spacebar/boflib/gui/button.h"
28 #include "bagel/spacebar/boflib/gui/scroll_bar.h"
29 #include "bagel/spacebar/boflib/gui/text_box.h"
30 
31 namespace Bagel {
32 namespace SpaceBar {
33 
34 struct SYSTEM_DATA {
35  int _nMusicVolume;
36  int _nSoundVolume;
37 
38  bool _bFlythroughs;
39  bool _bPanimations;
40  int _nCorrection;
41  int _nPanSpeed;
42 };
43 
44 #define NUM_SYS_BUTTONS 8
45 
46 class CBagOptWindow : public CBofDialog {
47 public:
48  CBagOptWindow();
49 
50  virtual ErrorCode attach();
51  virtual ErrorCode detach();
52 
56  void loadIniSettings();
57 
61  void saveOutNewSettings();
62 
66  void returnToDefaults();
67 
71  void putDialogData();
72 
76  void getDialogData();
77 
78 protected:
79  void onPaint(CBofRect *pRect) override;
80  void onInitDialog() override;
81 
82  void onBofScrollBar(CBofObject *pObject, int nPos) override;
83  void onBofButton(CBofObject *pObject, int nState) override;
84  void onKeyHit(uint32 lKey, uint32 lRepCount) override;
85 
86  // Data members
87  //
88  CBofBmpButton *_pButtons[NUM_SYS_BUTTONS];
89  SYSTEM_DATA _cSystemData;
90  ST_COLORSCHEME _cColorScheme;
91 
92  CBofCheckButton *_pFlythroughs;
93  CBofCheckButton *_pPanimations;
94 
95  CBofScrollBar *_pMidiVolumeScroll;
96  CBofScrollBar *_pWaveVolumeScroll;
97  CBofScrollBar *_pCorrectionScroll;
98  CBofScrollBar *_pPanSpeedScroll;
99  CBofPalette *_pSavePalette;
100 
101  bool _bDirty;
102 };
103 
104 const char *buildSysDir(const char *pszFile);
105 
106 } // namespace SpaceBar
107 } // namespace Bagel
108 
109 #endif
Definition: scroll_bar.h:44
Definition: button.h:45
Definition: button.h:110
Definition: opt_window.h:34
Definition: object.h:28
Definition: rect.h:35
Definition: palette.h:64
Definition: afxwin.h:27
Definition: opt_window.h:46
Definition: button.h:96
Definition: dialog.h:39