KEY1DivElement.h Source File documentation

KEY1DivElement.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 KEY1DIVELEMENT_H_INCLUDED
11#define KEY1DIVELEMENT_H_INCLUDED
12
13#include "KEY1XMLContextBase.h"
14
15#include "IWORKEnum.h"
16#include "IWORKStyle.h"
17#include "KEY1SpanElement.h"
18
19namespace libetonyek
20{
21class KEY1ParserState;
22
23 class KEY1DivStyle
24{
25public:
26 explicit KEY1DivStyle(KEY1ParserState &state, IWORKStylePtr_t parentStyle);
27 bool readAttribute(int name, const char *value);
28 IWORKStylePtr_t getStyle();
29
30private:
31 KEY1ParserState &m_state;
32 IWORKStylePtr_t m_style;
33 IWORKStylePtr_t m_parentStyle;
34 IWORKPropertyMap m_propMap;
35};
36
37 class KEY1DivElement : public KEY1XMLElementContextBase
38{
39public:
40 KEY1DivElement(KEY1ParserState &state, IWORKStylePtr_t spanStyle, IWORKStylePtr_t parentStyle, bool &delayedLineBreak);
41
42protected:
43 void attribute(int name, const char *value) override;
44 IWORKXMLContextPtr_t element(int name) override;
45 void CDATA(const char *value) override;
46 void text(const char *value) override;
47 void endOfElement() override;
48
49 void ensureOpened();
50
51private:
52 KEY1SpanStyle m_spanStyle;
53 KEY1DivStyle m_style;
54 bool m_opened;
55 bool &m_delayedLineBreak;
56};
57
58}
59
60#endif // KEY1DIVELEMENT_H_INCLUDED
61
62/* vim:set shiftwidth=2 softtabstop=2 expandtab: */
IWORKEnum.h
IWORKStyle.h
KEY1SpanElement.h
KEY1XMLContextBase.h
libetonyek::IWORKPropertyMap
Represents a (hierarchical) property map.
Definition IWORKPropertyMap.h:25
libetonyek::KEY1DivElement::CDATA
void CDATA(const char *value) override
Definition KEY1DivElement.cpp:169
libetonyek::KEY1DivElement::element
IWORKXMLContextPtr_t element(int name) override
Definition KEY1DivElement.cpp:156
libetonyek::KEY1DivElement::ensureOpened
void ensureOpened()
Definition KEY1DivElement.cpp:193
libetonyek::KEY1DivElement::m_spanStyle
KEY1SpanStyle m_spanStyle
Definition KEY1DivElement.h:52
libetonyek::KEY1DivElement::endOfElement
void endOfElement() override
Definition KEY1DivElement.cpp:185
libetonyek::KEY1DivElement::m_delayedLineBreak
bool & m_delayedLineBreak
Definition KEY1DivElement.h:55
libetonyek::KEY1DivElement::text
void text(const char *value) override
Definition KEY1DivElement.cpp:175
libetonyek::KEY1DivElement::KEY1DivElement
KEY1DivElement(KEY1ParserState &state, IWORKStylePtr_t spanStyle, IWORKStylePtr_t parentStyle, bool &delayedLineBreak)
Definition KEY1DivElement.cpp:133
libetonyek::KEY1DivElement::m_opened
bool m_opened
Definition KEY1DivElement.h:54
libetonyek::KEY1DivElement::m_style
KEY1DivStyle m_style
Definition KEY1DivElement.h:53
libetonyek::KEY1DivElement::attribute
void attribute(int name, const char *value) override
Definition KEY1DivElement.cpp:142
libetonyek::KEY1DivStyle
Definition KEY1DivElement.h:24
libetonyek::KEY1DivStyle::getStyle
IWORKStylePtr_t getStyle()
Definition KEY1DivElement.cpp:125
libetonyek::KEY1DivStyle::m_propMap
IWORKPropertyMap m_propMap
Definition KEY1DivElement.h:34
libetonyek::KEY1DivStyle::m_state
KEY1ParserState & m_state
Definition KEY1DivElement.h:31
libetonyek::KEY1DivStyle::m_parentStyle
IWORKStylePtr_t m_parentStyle
Definition KEY1DivElement.h:33
libetonyek::KEY1DivStyle::KEY1DivStyle
KEY1DivStyle(KEY1ParserState &state, IWORKStylePtr_t parentStyle)
Definition KEY1DivElement.cpp:28
libetonyek::KEY1DivStyle::readAttribute
bool readAttribute(int name, const char *value)
Definition KEY1DivElement.cpp:36
libetonyek::KEY1DivStyle::m_style
IWORKStylePtr_t m_style
Definition KEY1DivElement.h:32
libetonyek::KEY1ParserState
Definition KEY1ParserState.h:45
libetonyek::KEY1SpanStyle
Definition KEY1SpanElement.h:24
libetonyek::IWORKToken::value
@ value
Definition IWORKToken.h:631
libetonyek::IWORKToken::name
@ name
Definition IWORKToken.h:585
libetonyek
Definition IWORKBezierElement.cpp:21
libetonyek::KEY1XMLElementContextBase
KEY1XMLContextBase< IWORKXMLContextElement > KEY1XMLElementContextBase
Definition KEY1XMLContextBase.h:39
libetonyek::IWORKXMLContextPtr_t
std::shared_ptr< IWORKXMLContext > IWORKXMLContextPtr_t
Definition IWORKXMLContext.h:20
libetonyek::IWORKStylePtr_t
std::shared_ptr< IWORKStyle > IWORKStylePtr_t
Definition IWORKStyle_fwd.h:23