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