1*9ecf9d1cSIngo Weinhold /* 2*9ecf9d1cSIngo Weinhold * Copyright 2006, Ingo Weinhold <bonefish@cs.tu-berlin.de>. 3*9ecf9d1cSIngo Weinhold * All rights reserved. Distributed under the terms of the MIT License. 4*9ecf9d1cSIngo Weinhold */ 5*9ecf9d1cSIngo Weinhold 6*9ecf9d1cSIngo Weinhold #include "Layouter.h" 7*9ecf9d1cSIngo Weinhold 8*9ecf9d1cSIngo Weinhold 9*9ecf9d1cSIngo Weinhold // constructor LayoutInfo()10*9ecf9d1cSIngo WeinholdLayoutInfo::LayoutInfo() 11*9ecf9d1cSIngo Weinhold { 12*9ecf9d1cSIngo Weinhold } 13*9ecf9d1cSIngo Weinhold 14*9ecf9d1cSIngo Weinhold // destructor ~LayoutInfo()15*9ecf9d1cSIngo WeinholdLayoutInfo::~LayoutInfo() 16*9ecf9d1cSIngo Weinhold { 17*9ecf9d1cSIngo Weinhold } 18*9ecf9d1cSIngo Weinhold 19*9ecf9d1cSIngo Weinhold // ElementRangeSize 20*9ecf9d1cSIngo Weinhold float ElementRangeSize(int32 position,int32 length)21*9ecf9d1cSIngo WeinholdLayoutInfo::ElementRangeSize(int32 position, int32 length) 22*9ecf9d1cSIngo Weinhold { 23*9ecf9d1cSIngo Weinhold if (length == 1) 24*9ecf9d1cSIngo Weinhold return ElementSize(position); 25*9ecf9d1cSIngo Weinhold 26*9ecf9d1cSIngo Weinhold int lastIndex = position + length - 1; 27*9ecf9d1cSIngo Weinhold return ElementLocation(lastIndex) + ElementSize(lastIndex) 28*9ecf9d1cSIngo Weinhold - ElementLocation(position); 29*9ecf9d1cSIngo Weinhold } 30*9ecf9d1cSIngo Weinhold 31*9ecf9d1cSIngo Weinhold 32*9ecf9d1cSIngo Weinhold // #pragma mark - 33*9ecf9d1cSIngo Weinhold 34*9ecf9d1cSIngo Weinhold 35*9ecf9d1cSIngo Weinhold // constructor Layouter()36*9ecf9d1cSIngo WeinholdLayouter::Layouter() 37*9ecf9d1cSIngo Weinhold { 38*9ecf9d1cSIngo Weinhold } 39*9ecf9d1cSIngo Weinhold 40*9ecf9d1cSIngo Weinhold // destructor ~Layouter()41*9ecf9d1cSIngo WeinholdLayouter::~Layouter() 42*9ecf9d1cSIngo Weinhold { 43*9ecf9d1cSIngo Weinhold } 44