xref: /haiku/src/apps/sudoku/SudokuWindow.h (revision 3d2b15cdf9a4ad036e978f68a37cb1f09e7dda17)
1 /*
2  * Copyright 2007-2010, Axel Dörfler, axeld@pinc-software.de.
3  * Distributed under the terms of the MIT License.
4  */
5 #ifndef SUDOKU_WINDOW_H
6 #define SUDOKU_WINDOW_H
7 
8 
9 #include <Window.h>
10 
11 
12 class BFile;
13 class BFilePanel;
14 class BMenu;
15 class BMenuItem;
16 class GenerateSudoku;
17 class ProgressWindow;
18 class SudokuView;
19 
20 
21 class SudokuWindow : public BWindow {
22 public:
23 								SudokuWindow();
24 	virtual						~SudokuWindow();
25 
26 	virtual	void				MessageReceived(BMessage* message);
27 	virtual	bool				QuitRequested();
28 
29 private:
30 			status_t			_OpenSettings(BFile& file, uint32 mode);
31 			status_t			_LoadSettings(BMessage& settings);
32 			status_t			_SaveSettings();
33 
34 			void				_ResetStoredState();
35 			void				_MessageDropped(BMessage *message);
36 			void				_Generate(int32 level);
37 			int32				_Level() const;
38 			void				_SetLevel(int32 level);
39 
40 private:
41 			BFilePanel*			fOpenPanel;
42 			BFilePanel*			fSavePanel;
43 			ProgressWindow*		fProgressWindow;
44 			SudokuView*			fSudokuView;
45 			GenerateSudoku*		fGenerator;
46 			BMenuItem*			fRestoreStateItem;
47 			BMenuItem*			fUndoItem;
48 			BMenuItem*			fRedoItem;
49 			BMenu*				fNewMenu;
50 			BMessage*			fStoredState;
51 			uint32				fExportFormat;
52 };
53 
54 #endif	// SUDOKU_WINDOW_H
55