#ifndef LayoutBoxExtent_h
#define LayoutBoxExtent_h
#include "platform/LayoutUnit.h"
#include "platform/PlatformExport.h"
#include "platform/text/TextDirection.h"
#include "platform/text/WritingMode.h"
namespace WebCore {
class PLATFORM_EXPORT LayoutBoxExtent {
public:
LayoutBoxExtent() : m_top(0), m_right(0), m_bottom(0), m_left(0) { }
LayoutBoxExtent(LayoutUnit top, LayoutUnit right, LayoutUnit bottom, LayoutUnit left)
: m_top(top), m_right(right), m_bottom(bottom), m_left(left) { }
inline LayoutUnit top() const { return m_top; }
inline LayoutUnit right() const { return m_right; }
inline LayoutUnit bottom() const { return m_bottom; }
inline LayoutUnit left() const { return m_left; }
inline void setTop(LayoutUnit value) { m_top = value; }
inline void setRight(LayoutUnit value) { m_right = value; }
inline void setBottom(LayoutUnit value) { m_bottom = value; }
inline void setLeft(LayoutUnit value) { m_left = value; }
LayoutUnit logicalTop(WritingMode) const;
LayoutUnit logicalBottom(WritingMode) const;
LayoutUnit logicalLeft(WritingMode) const;
LayoutUnit logicalRight(WritingMode) const;
LayoutUnit before(WritingMode) const;
LayoutUnit after(WritingMode) const;
LayoutUnit start(WritingMode, TextDirection) const;
LayoutUnit end(WritingMode, TextDirection) const;
void setBefore(WritingMode, LayoutUnit);
void setAfter(WritingMode, LayoutUnit);
void setStart(WritingMode, TextDirection, LayoutUnit);
void setEnd(WritingMode, TextDirection, LayoutUnit);
LayoutUnit& mutableLogicalLeft(WritingMode);
LayoutUnit& mutableLogicalRight(WritingMode);
LayoutUnit& mutableBefore(WritingMode);
LayoutUnit& mutableAfter(WritingMode);
private:
LayoutUnit m_top;
LayoutUnit m_right;
LayoutUnit m_bottom;
LayoutUnit m_left;
};
}
#endif