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 BLayoutContextListener()10BLayoutContextListener::BLayoutContextListener() 11 { 12 } 13 14 // destructor ~BLayoutContextListener()15BLayoutContextListener::~BLayoutContextListener() 16 { 17 } 18 19 _ReservedLayoutContextListener1()20void BLayoutContextListener::_ReservedLayoutContextListener1() {} _ReservedLayoutContextListener2()21void BLayoutContextListener::_ReservedLayoutContextListener2() {} _ReservedLayoutContextListener3()22void BLayoutContextListener::_ReservedLayoutContextListener3() {} _ReservedLayoutContextListener4()23void BLayoutContextListener::_ReservedLayoutContextListener4() {} _ReservedLayoutContextListener5()24void BLayoutContextListener::_ReservedLayoutContextListener5() {} 25 26 27 // #pragma mark - 28 29 30 // constructor BLayoutContext()31BLayoutContext::BLayoutContext() 32 { 33 } 34 35 // destructor ~BLayoutContext()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 48 void AddListener(BLayoutContextListener * listener)49BLayoutContext::AddListener(BLayoutContextListener* listener) 50 { 51 if (listener) 52 fListeners.AddItem(listener); 53 } 54 55 // RemoveListener 56 void RemoveListener(BLayoutContextListener * listener)57BLayoutContext::RemoveListener(BLayoutContextListener* listener) 58 { 59 if (listener) 60 fListeners.RemoveItem(listener); 61 } 62