xref: /haiku/src/apps/sudoku/SudokuWindow.h (revision 1214ef1b2100f2b3299fc9d8d6142e46f70a4c3f)
1 /*
2  * Copyright 2007, Axel Dörfler, axeld@pinc-software.de. All rights reserved.
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 class BFile;
12 class BFilePanel;
13 class BMenuItem;
14 class GenerateSudoku;
15 class ProgressWindow;
16 class SudokuView;
17 
18 
19 class SudokuWindow : public BWindow {
20 public:
21 	SudokuWindow();
22 	virtual ~SudokuWindow();
23 
24 	virtual void MessageReceived(BMessage* message);
25 	virtual bool QuitRequested();
26 
27 private:
28 	status_t _OpenSettings(BFile& file, uint32 mode);
29 	status_t _LoadSettings(BMessage& settings);
30 	status_t _SaveSettings();
31 
32 	void _ResetStoredState();
33 	void _MessageDropped(BMessage *message);
34 	void _Generate(int32 level);
35 
36 	BFilePanel*		fOpenPanel;
37 	BFilePanel*		fSavePanel;
38 	ProgressWindow*	fProgressWindow;
39 	SudokuView*		fSudokuView;
40 	GenerateSudoku*	fGenerator;
41 	BMenuItem*		fRestoreStateItem;
42 	BMenuItem*		fUndoItem;
43 	BMenuItem*		fRedoItem;
44 	BMessage*		fStoredState;
45 };
46 
47 #endif	// SUDOKU_WINDOW_H
48