ScummVM API documentation
mainmenu.h
1 /* ScummVM - Graphic Adventure Engine
2  *
3  * ScummVM is the legal property of its developers, whose names
4  * are too numerous to list here. Please refer to the COPYRIGHT
5  * file distributed with this source distribution.
6  *
7  * This program is free software: you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation, either version 3 of the License, or
10  * (at your option) any later version.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with this program. If not, see <http://www.gnu.org/licenses/>.
19  *
20  */
21 
22 #ifndef HODJNPODJ_HNPLIBS_MAINMENU_H
23 #define HODJNPODJ_HNPLIBS_MAINMENU_H
24 
25 #include "graphics/mfc/afxwin.h"
26 #include "graphics/mfc/afxext.h"
27 #include "bagel/hodjnpodj/hnplibs/button.h"
28 #include "bagel/hodjnpodj/hnplibs/dibdoc.h"
29 #include "bagel/hodjnpodj/hnplibs/cbofdlg.h"
30 #include "bagel/hodjnpodj/hnplibs/menures.h"
31 #include "bagel/hodjnpodj/hnplibs/gamedll.h"
32 
33 namespace Bagel {
34 namespace HodjNPodj {
35 
36 typedef void (CALLBACK *FPFUNC)(CWnd *);
37 
38 #define NO_RULES 0x0001
39 #define NO_NEWGAME 0x0002
40 #define NO_OPTIONS 0x0004
41 #define NO_RETURN 0x0008
42 #define NO_QUIT 0x0010
43 #define NO_AUDIO 0x0020
44 
45 class CMainMenu : public CBmpDialog {
46 public:
47  CMainMenu(CWnd *, CPalette *, unsigned int, FPFUNC,
48  const char *, const char *pWavFileName = nullptr,
49  LPGAMESTRUCT pGameParams = nullptr);
50  void ClearDialogImage();
51 
52 // Implementation
53 protected:
54  virtual void DoDataExchange(CDataExchange* pDX) override; // DDX/DDV support
55 
56  // Generated message map functions
57  //{{AFX_MSG(CMainMenu)
58  virtual bool OnInitDialog() override;
59  virtual void OnOK() override;
60  virtual void OnCancel() override;
61  afx_msg bool OnEraseBkgnd(CDC *pDC);
62  afx_msg void OnPaint();
63  afx_msg void OnDestroy();
64  afx_msg void OnClickedRules() ;
65  afx_msg void OnClickedNewgame() ;
66  afx_msg void OnClickedOptions() ;
67  afx_msg void OnClickedAudio() ;
68  afx_msg void OnClickedReturn();
69  afx_msg void OnClickedQuit();
70  afx_msg void OnClickedHype();
71  //}}AFX_MSG
72  DECLARE_MESSAGE_MAP()
73 
74  FPFUNC _optionsFunction = nullptr;
75  const char *_rulesFilename = nullptr;
76  const char *_wavFilename = nullptr;
77  uint _flags = 0;
78  LPGAMESTRUCT _gameParams = nullptr;
79 
80 private:
81  CColorButton *_hypeButton = nullptr;
82  CColorButton *_rulesButton = nullptr;
83  CColorButton *_newGameButton = nullptr;
84  CColorButton *_optionsButton = nullptr;
85  CColorButton *_audioButton = nullptr;
86  CColorButton *_returnButton = nullptr;
87  CColorButton *_quitButton = nullptr;
88  CFont _hypeFont;
89 
90  //{{AFX_DATA(CMainMenu)
91  enum {
92  IDD = IDD_OPTIONS_DIALOG
93  };
94  // NOTE: the ClassWizard will add data members here
95  //}}AFX_DATA
96 
97  void clearButtons();
98 };
99 
100 } // namespace HodjNPodj
101 } // namespace Bagel
102 
103 #endif
Definition: afxwin.h:1141
Definition: minwindef.h:292
Definition: mainmenu.h:45
Definition: afxwin.h:602
Definition: afxwin.h:667
Definition: afxwin.h:721
Definition: cbofdlg.h:31
Definition: afxwin.h:27
Definition: button.h:141