xref: /haiku/src/apps/pairs/PairsView.h (revision e221c09e508ffc3c62738140c9b6fc4fa211662a)
1 /*
2  * Copyright 2008, Ralf Schülke, teammaui@web.de. All rights reserved.
3  * Distributed under the terms of the MIT License.
4  */
5 
6 #ifndef PAIRS_VIEW_H
7 #define PAIRS_VIEW_H
8 
9 
10 #include <View.h>
11 class TopButton;
12 
13 class PairsView : public BView {
14 public:
15 								PairsView(BRect frame, const char* name,
16 									uint32 resizingMode);
17 
18 	virtual						~PairsView();
19 	virtual	void				AttachedToWindow();
20 	virtual	void				Draw(BRect updateRect);
21 	virtual	void				CreateGameBoard();
22 
23 			TopButton*			fDeckCard[16];
24 			int					GetIconFromPos(int pos);
25 
26 private:
27 			void				_SetPairsBoard();
28 			void				_ReadRandomIcons();
29 			void				_GenarateCardPos();
30 
31 			BMessage*			fButtonMessage;
32 			BBitmap*			fCard[8];
33 			int					fRandPos[16];
34 			int					fPosX[16];
35 			int					fPosY[16];
36 };
37 
38 
39 #endif	// PAIRS_VIEW_H
40