xref: /haiku/src/tests/kits/interface/layout/widget_layout_test/ViewContainer.h (revision 1e60bdeab63fa7a57bc9a55b032052e95a18bd2c)
1 /*
2  * Copyright 2007, Ingo Weinhold <bonefish@cs.tu-berlin.de>.
3  * All rights reserved. Distributed under the terms of the MIT License.
4  */
5 #ifndef WIDGET_LAYOUT_TEST_VIEW_CONTAINER_H
6 #define WIDGET_LAYOUT_TEST_VIEW_CONTAINER_H
7 
8 
9 #include <View.h>
10 
11 #include "View.h"
12 
13 
14 class ViewContainer : public BView, public View {
15 public:
16 								ViewContainer(BRect frame);
17 
18 	// BView hooks
19 
20 	virtual	void				MessageReceived(BMessage* message);
21 
22 	virtual	void				AllAttached();
23 
24 	virtual	void				Draw(BRect updateRect);
25 
26 	virtual	void				MouseDown(BPoint where);
27 	virtual	void				MouseUp(BPoint where);
28 	virtual	void				MouseMoved(BPoint where, uint32 code,
29 									const BMessage* message);
30 
31 	virtual	void				InvalidateLayout(bool descendants);
32 
33 	// View hooks
34 
35 	virtual	void				InvalidateLayout();
36 
37 	virtual	void				Draw(BView* container, BRect updateRect);
38 
39 	virtual	void				MouseDown(BPoint where, uint32 buttons,
40 									int32 modifiers);
41 	virtual	void				MouseUp(BPoint where, uint32 buttons,
42 									int32 modifiers);
43 	virtual	void				MouseMoved(BPoint where, uint32 buttons,
44 									int32 modifiers);
45 
46 private:
47 			void				_GetButtonsAndModifiers(uint32& buttons,
48 									int32& modifiers);
49 
50 private:
51 			View*				fMouseFocus;
52 };
53 
54 #endif	// WIDGET_LAYOUT_TEST_VIEW_CONTAINER_H
55