KEY1Dictionary.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 KEY1DICTIONARY_H_INCLUDED
11#define KEY1DICTIONARY_H_INCLUDED
12
13#include <boost/optional.hpp>
14
15#include "IWORKDictionary.h"
16#include "KEYTypes.h"
17
18namespace libetonyek
19{
20
36{
37
39 void pushStylesContext();
40 void collectStylesContext(const std::string &contextName);
41 void linkStylesContext(const boost::optional<std::string> &master);
42 void popStylesContext();
43
44 void storeImageStyle(IWORKStylePtr_t style, bool definition);
45 void storeLineStyle(IWORKStylePtr_t style, bool definition);
46 void storeShapeStyle(IWORKStylePtr_t style, bool definition);
47 void storeTextboxStyle(IWORKStylePtr_t style, bool definition);
48
52
56
58 std::deque<KEYSlidePtr_t> m_slides;
59
60protected:
62 {
64
66
67 std::deque<IWORKStylePtr_t> m_styles;
68
70 void storeStyle(IWORKStylePtr_t style, bool definition);
72 void link(const StyleContext &parentContext);
73 };
93 typedef std::unordered_map<ID_t, StylesContext> StylesContextMap_t;
95
96 std::deque<StylesContext> m_styleContexts;
98};
99
100}
101
102#endif // KEY1DICTIONARY_H_INCLUDED
103
104/* vim:set shiftwidth=2 softtabstop=2 expandtab: */
@ link
Definition IWORKToken.h:308
@ style
Definition IWORKToken.h:421
Definition IWORKBezierElement.cpp:21
std::unordered_map< ID_t, KEYSlidePtr_t > KEYSlideMap_t
Definition KEYTypes_fwd.h:34
std::shared_ptr< KEYPlaceholder > KEYPlaceholderPtr_t
Definition KEYTypes_fwd.h:28
std::shared_ptr< IWORKStyle > IWORKStylePtr_t
Definition IWORKStyle_fwd.h:23
IWORKDictionary()
Definition IWORKDictionary.cpp:15
Definition KEY1Dictionary.h:62
void storeStyle(IWORKStylePtr_t style, bool definition)
store a style
Definition KEY1Dictionary.cpp:124
IWORKStylePtr_t m_style
Definition KEY1Dictionary.h:65
std::deque< IWORKStylePtr_t > m_styles
Definition KEY1Dictionary.h:67
StyleContext()
Definition KEY1Dictionary.cpp:118
Definition KEY1Dictionary.h:75
KEYPlaceholderPtr_t m_pageNumberPlaceholder
Definition KEY1Dictionary.h:84
KEYPlaceholderPtr_t m_titlePlaceholder
Definition KEY1Dictionary.h:85
KEYPlaceholderPtr_t m_bodyPlaceholder
Definition KEY1Dictionary.h:83
StylesContext()
Definition KEY1Dictionary.cpp:147
StyleContext m_textboxContext
Definition KEY1Dictionary.h:81
StyleContext m_shapeContext
Definition KEY1Dictionary.h:80
StyleContext m_imageContext
Definition KEY1Dictionary.h:78
StyleContext m_lineContext
Definition KEY1Dictionary.h:79
KEYPlaceholderPtr_t getPageNumberPlaceholder()
Definition KEY1Dictionary.cpp:93
void collectStylesContext(const std::string &contextName)
Definition KEY1Dictionary.cpp:45
KEYSlideMap_t m_masterSlides
Definition KEY1Dictionary.h:57
void storeLineStyle(IWORKStylePtr_t style, bool definition)
Definition KEY1Dictionary.cpp:73
std::deque< StylesContext > m_styleContexts
Definition KEY1Dictionary.h:96
void storeImageStyle(IWORKStylePtr_t style, bool definition)
Definition KEY1Dictionary.cpp:68
void popStylesContext()
Definition KEY1Dictionary.cpp:35
KEYPlaceholderPtr_t getBodyPlaceholder()
Definition KEY1Dictionary.cpp:88
void storeBodyPlaceholder(KEYPlaceholderPtr_t placeHolder)
Definition KEY1Dictionary.cpp:103
void pushStylesContext()
Definition KEY1Dictionary.cpp:30
void storeTextboxStyle(IWORKStylePtr_t style, bool definition)
Definition KEY1Dictionary.cpp:83
void storeShapeStyle(IWORKStylePtr_t style, bool definition)
Definition KEY1Dictionary.cpp:78
std::unordered_map< ID_t, StylesContext > StylesContextMap_t
Definition KEY1Dictionary.h:93
std::deque< KEYSlidePtr_t > m_slides
Definition KEY1Dictionary.h:58
void storePageNumberPlaceholder(KEYPlaceholderPtr_t placeHolder)
Definition KEY1Dictionary.cpp:108
void linkStylesContext(const boost::optional< std::string > &master)
Definition KEY1Dictionary.cpp:55
KEY1Dictionary()
Definition KEY1Dictionary.cpp:15
StylesContextMap_t m_styleContextsMap
Definition KEY1Dictionary.h:97
KEYPlaceholderPtr_t getTitlePlaceholder()
Definition KEY1Dictionary.cpp:98
StylesContext & getCurrentStylesContext()
Definition KEY1Dictionary.cpp:25
void storeTitlePlaceholder(KEYPlaceholderPtr_t placeHolder)
Definition KEY1Dictionary.cpp:113

Generated for libetonyek by doxygen 1.13.2