Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
KEYText.h
Go to the documentation of this file.
1
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2
/*
3
* This file is part of the libetonyek project.
4
*
5
* This Source Code Form is subject to the terms of the Mozilla Public
6
* License, v. 2.0. If a copy of the MPL was not distributed with this
7
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
8
*/
9
10
#ifndef KEYTEXT_H_INCLUDED
11
#define KEYTEXT_H_INCLUDED
12
13
#include <deque>
14
15
#include "
KEYObject.h
"
16
#include "
KEYStyles_fwd.h
"
17
#include "
KEYText_fwd.h
"
18
19
namespace
libetonyek
20
{
21
22
class
KEYText
23
{
24
struct
Paragraph
;
25
typedef
boost::shared_ptr<Paragraph>
ParagraphPtr_t
;
26
27
public
:
28
typedef
std::deque<ParagraphPtr_t>
ParagraphList_t
;
29
30
public
:
31
KEYText
();
32
33
void
setLayoutStyle
(
const
KEYLayoutStylePtr_t
&
style
);
34
35
const
KEYGeometryPtr_t
&
getBoundingBox
()
const
;
36
void
setBoundingBox
(
const
KEYGeometryPtr_t
&boundingBox);
37
38
void
openParagraph
(
const
KEYParagraphStylePtr_t
&
style
);
39
void
closeParagraph
();
40
41
void
insertText
(
const
std::string
&
text
,
const
KEYCharacterStylePtr_t
&
style
);
42
void
insertTab
();
43
void
insertLineBreak
();
44
45
const
KEYLayoutStylePtr_t
&
getLayoutStyle
()
const
;
46
const
ParagraphList_t
&
getParagraphs
()
const
;
47
48
bool
empty
()
const
;
49
50
private
:
51
void
insertDeferredLineBreaks
();
52
53
private
:
54
KEYLayoutStylePtr_t
m_layoutStyle
;
55
ParagraphList_t
m_paragraphs
;
56
ParagraphPtr_t
m_currentParagraph
;
57
int
m_lineBreaks
;
58
59
KEYGeometryPtr_t
m_boundingBox
;
60
};
61
62
KEYObjectPtr_t
makeObject
(
const
KEYTextPtr_t
&
text
);
63
64
}
65
66
#endif // KEYTEXT_H_INCLUDED
67
68
/* vim:set shiftwidth=2 softtabstop=2 expandtab: */
Generated for libetonyek by
doxygen
1.8.3.1