2 * Copyright 2013, Stephan Aßmus <superstippi@gmx.de>.
3 * All rights reserved. Distributed under the terms of the MIT License.
11 #include "CharacterStyle.h"
17 TextSpan(const BString
& text
,
18 const CharacterStyle
& style
);
19 TextSpan(const TextSpan
& other
);
21 TextSpan
& operator=(const TextSpan
& other
);
22 bool operator==(const TextSpan
& other
) const;
23 bool operator!=(const TextSpan
& other
) const;
25 void SetText(const BString
& text
);
26 inline const BString
& Text() const
29 void SetStyle(const CharacterStyle
& style
);
30 inline const CharacterStyle
& Style() const
33 inline int32
CountChars() const
34 { return fCharCount
; }
36 bool Append(const BString
& text
);
37 bool Insert(int32 offset
, const BString
& text
);
38 bool Remove(int32 start
, int32 count
);
40 TextSpan
SubSpan(int32 start
, int32 count
) const;
43 void _TruncateInsert(int32
& start
) const;
44 void _TruncateRemove(int32
& start
,
50 CharacterStyle fStyle
;