xref: /haiku/headers/os/interface/LayoutContext.h (revision c90684742e7361651849be4116d0e5de3a817194)
1 /*
2  * Copyright 2006, Haiku, Inc. All rights reserved.
3  * Distributed under the terms of the MIT License.
4  */
5 #ifndef	_LAYOUT_CONTEXT_H
6 #define	_LAYOUT_CONTEXT_H
7 
8 #include <List.h>
9 
10 class BLayoutContext;
11 
12 
13 class BLayoutContextListener {
14 public:
15 								BLayoutContextListener();
16 	virtual						~BLayoutContextListener();
17 
18 	virtual	void				LayoutContextLeft(BLayoutContext* context) = 0;
19 };
20 
21 
22 class BLayoutContext {
23 public:
24 								BLayoutContext();
25 								~BLayoutContext();
26 
27 			void				AddListener(BLayoutContextListener* listener);
28 			void				RemoveListener(
29 									BLayoutContextListener* listener);
30 
31 private:
32 			BList				fListeners;
33 };
34 
35 #endif	//	_LAYOUT_CONTEXT_H
36