vfs: check userland buffers before reading them.
[haiku.git] / src / apps / pairs / PairsWindow.h
blob651c3d78291d18c53f379e18bc2316f17e5dd706
1 /*
2 * Copyright 2008 Ralf Schülke, ralf.schuelke@googlemail.com.
3 * Copyright 2010 Adam Smith <adamd.smith@utoronto.ca>
4 * Copyright 2014 Haiku, Inc. All rights reserved.
6 * Distributed under the terms of the MIT License.
8 * Authors:
9 * Ralf Schülke, ralf.schuelke@googlemail.com
10 * John Scipione, jscipione@gmail.com
11 * Adam Smith, adamd.smith@utoronto.ca
13 #ifndef PAIRS_WINDOW_H
14 #define PAIRS_WINDOW_H
17 #include <Window.h>
20 class BMenu;
21 class BMessageRunner;
22 class PairsView;
25 class PairsWindow : public BWindow {
26 public:
27 PairsWindow();
28 virtual ~PairsWindow();
30 virtual void MessageReceived(BMessage* message);
32 void NewGame();
33 void SetGameSize(uint8 rows, uint8 cols);
35 private:
36 void _MakeGameView(uint8 rows, uint8 cols);
37 void _MakeMenuBar();
38 void _ResizeWindow(uint8 rows, uint8 cols);
40 BView* fBackgroundView;
41 PairsView* fPairsView;
42 BMenuBar* fMenuBar;
43 BMessageRunner* fPairComparing;
44 bool fIsFirstClick;
45 bool fIsPairsActive;
46 int32 fPairCardPosition;
47 int32 fPairCardTmpPosition;
48 int32 fButtonTmpPosition;
49 int32 fButtonPosition;
50 int32 fButtonClicks;
51 int32 fFinishPairs;
52 BMenu* fIconSizeMenu;
55 #endif // PAIRS_WINDOW_H