1/*
2 * Copyright 2006, Ingo Weinhold <bonefish@cs.tu-berlin.de>.
3 * All rights reserved. Distributed under the terms of the MIT License.
4 */
5
6#include <LayoutContext.h>
7
8
9// constructor
10BLayoutContextListener::BLayoutContextListener()
11{
12}
13
14// destructor
15BLayoutContextListener::~BLayoutContextListener()
16{
17}
18
19
20void BLayoutContextListener::_ReservedLayoutContextListener1() {}
21void BLayoutContextListener::_ReservedLayoutContextListener2() {}
22void BLayoutContextListener::_ReservedLayoutContextListener3() {}
23void BLayoutContextListener::_ReservedLayoutContextListener4() {}
24void BLayoutContextListener::_ReservedLayoutContextListener5() {}
25
26
27// #pragma mark -
28
29
30// constructor
31BLayoutContext::BLayoutContext()
32{
33}
34
35// destructor
36BLayoutContext::~BLayoutContext()
37{
38	// notify the listeners
39	for (int32 i = 0;
40		 BLayoutContextListener* listener
41		 	= (BLayoutContextListener*)fListeners.ItemAt(i);
42		 i++) {
43		listener->LayoutContextLeft(this);
44	}
45}
46
47// AddListener
48void
49BLayoutContext::AddListener(BLayoutContextListener* listener)
50{
51	if (listener)
52		fListeners.AddItem(listener);
53}
54
55// RemoveListener
56void
57BLayoutContext::RemoveListener(BLayoutContextListener* listener)
58{
59	if (listener)
60		fListeners.RemoveItem(listener);
61}
62