2 * Copyright 2014, Stephan Aßmus <superstippi@gmx.de>.
3 * All rights reserved. Distributed under the terms of the MIT License.
6 #include "TextSelection.h"
9 TextSelection::TextSelection()
17 TextSelection::TextSelection(int32 anchor
, int32 caret
)
25 TextSelection::TextSelection(const TextSelection
& other
)
27 fAnchor(other
.fAnchor
),
34 TextSelection::operator=(const TextSelection
& other
)
39 fAnchor
= other
.fAnchor
;
40 fCaret
= other
.fCaret
;
46 TextSelection::operator==(const TextSelection
& other
) const
48 return (this == &other
)
49 || (fAnchor
== other
.fAnchor
&& fCaret
== other
.fCaret
);
54 TextSelection::operator!=(const TextSelection
& other
) const
56 return !(*this == other
);
61 TextSelection::SetAnchor(int32 anchor
)
68 TextSelection::SetCaret(int32 caret
)