/
Paragraph.h
41 lines (29 loc) · 925 Bytes
/
Paragraph.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
/*
* Copyright 2013, Stephan Aßmus <superstippi@gmx.de>.
* All rights reserved. Distributed under the terms of the MIT License.
*/
#ifndef PARAGRAPH_H
#define PARAGRAPH_H
#include "List.h"
#include "ParagraphStyle.h"
#include "TextSpan.h"
typedef List<TextSpan, false> TextSpanList;
class Paragraph {
public:
Paragraph();
Paragraph(const ParagraphStyle& style);
Paragraph(const Paragraph& other);
Paragraph& operator=(const Paragraph& other);
bool operator==(const Paragraph& other) const;
bool operator!=(const Paragraph& other) const;
void SetStyle(const ParagraphStyle& style);
inline const ParagraphStyle& Style() const
{ return fStyle; }
inline const TextSpanList& TextSpans() const
{ return fTextSpans; }
bool Append(const TextSpan& span);
private:
ParagraphStyle fStyle;
TextSpanList fTextSpans;
};
#endif // PARAGRAPH_H