5 * Copyright (C) 2009, Apple Inc. All rights reserved.
9 #ifndef SelectionRect_h
10 #define SelectionRect_h
13 #include "TextDirection.h"
20 explicit SelectionRect(const IntRect
&);
21 SelectionRect(const IntRect
&, TextDirection
, int, int, int, bool, bool, bool, bool, bool);
24 IntRect
rect() const { return m_rect
; }
25 TextDirection
direction() const { return m_direction
; }
26 int minX() const { return m_minX
; }
27 int maxX() const { return m_maxX
; }
28 int lineNumber() const { return m_lineNumber
; }
29 bool isLineBreak() const { return m_isLineBreak
; }
30 bool isFirstOnLine() const { return m_isFirstOnLine
; }
31 bool isLastOnLine() const { return m_isLastOnLine
; }
32 bool containsStart() const { return m_containsStart
; }
33 bool containsEnd() const { return m_containsEnd
; }
35 void setRect(const IntRect
&r
) { m_rect
= r
; }
36 void setDirection(TextDirection d
) { m_direction
= d
; }
37 void setMinX(int x
) { m_minX
= x
; }
38 void setMaxX(int x
) { m_maxX
= x
; }
39 void setLineNumber(int n
) { m_lineNumber
= n
; }
40 void setIsLineBreak(bool b
) { m_isLineBreak
= b
; }
41 void setIsFirstOnLine(bool b
) { m_isFirstOnLine
= b
; }
42 void setIsLastOnLine(bool b
) { m_isLastOnLine
= b
; }
43 void setContainsStart(bool b
) { m_containsStart
= b
; }
44 void setContainsEnd(bool b
) { m_containsEnd
= b
; }
48 TextDirection m_direction
;