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