WPSListener.h Source File documentation

WPSListener.h
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
2 /* libwps
3 * Version: MPL 2.0 / LGPLv2.1+
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 * Major Contributor(s):
10 * Copyright (C) 2006, 2007 Andrew Ziem
11 * Copyright (C) 2006 Fridrich Strba (fridrich.strba@bluewin.ch)
12 * Copyright (C) 2003-2005 William Lachance (william.lachance@sympatico.ca)
13 * Copyright (C) 2003 Marc Maurer (uwog@uwog.net)
14 *
15 * For minor contributions see the git repository.
16 *
17 * Alternatively, the contents of this file may be used under the terms
18 * of the GNU Lesser General Public License Version 2.1 or later
19 * (LGPLv2.1+), in which case the provisions of the LGPLv2.1+ are
20 * applicable instead of those above.
21 *
22 * For further information visit http://libwps.sourceforge.net
23 */
24
25 #ifndef WPSLISTENER_H
26 #define WPSLISTENER_H
27
28 #include <librevenge/librevenge.h>
29
30 #include "libwps_internal.h"
31
32 struct WPSParagraph;
33 struct WPSTabStop;
34
36 class WPSListener
37 {
38 public:
39 WPSListener() {}
40 virtual ~WPSListener();
41
42 virtual void setDocumentLanguage(int lcid)=0;
43
44 // ------ text data -----------
45
47 virtual void insertCharacter(uint8_t character)=0;
51 virtual void insertUnicode(uint32_t character)=0;
53 virtual void insertUnicodeString(librevenge::RVNGString const &str)=0;
55
56 virtual void insertTab()=0;
57 virtual void insertEOL(bool softBreak=false)=0;
58 virtual void insertBreak(const uint8_t breakType)=0;
59
60 // ------ text format -----------
62 virtual void setFont(const WPSFont &font)=0;
64 virtual WPSFont const &getFont() const=0;
65
66 // ------ paragraph format -----------
68 virtual bool isParagraphOpened() const=0;
70 virtual void setParagraph(const WPSParagraph &para)=0;
72 virtual WPSParagraph const &getParagraph() const=0;
73
74 // ------ frame --------------
76 virtual bool openGroup(WPSPosition const &pos)=0;
78 virtual void closeGroup()=0;
79
80 // ------- fields ----------------
82 virtual void insertField(WPSField const &field) = 0;
83 };
84
85 #endif
86 /* vim:set shiftwidth=4 softtabstop=4 noexpandtab: */
WPSListener::closeGroup
virtual void closeGroup()=0
close a group
WPSListener::WPSListener
WPSListener()
Definition: WPSListener.h:39
WPSListener::insertUnicodeString
virtual void insertUnicodeString(librevenge::RVNGString const &str)=0
adds a unicode string
WPSField
a field
Definition: libwps_internal.h:462
WPSListener::getFont
virtual const WPSFont & getFont() const =0
returns the actual font
WPSListener::insertEOL
virtual void insertEOL(bool softBreak=false)=0
WPSFont
define the font properties
Definition: WPSFont.h:36
WPSListener::isParagraphOpened
virtual bool isParagraphOpened() const =0
returns true if a paragraph or a list is opened
WPSTabStop
Definition: WPSParagraph.h:37
WPSListener::setFont
virtual void setFont(const WPSFont &font)=0
set the actual font
WPSListener::insertBreak
virtual void insertBreak(const uint8_t breakType)=0
WPSListener::insertTab
virtual void insertTab()=0
adds an unicode character to a string ( with correct encoding ).
WPSParagraph
class to store the paragraph properties
Definition: WPSParagraph.h:57
WPSListener::~WPSListener
virtual ~WPSListener()
Definition: WPSListener.cpp:29
WPSListener
virtual class for content listener
Definition: WPSListener.h:36
WPSListener::insertCharacter
virtual void insertCharacter(uint8_t character)=0
adds a basic character, ..
WPSListener::setParagraph
virtual void setParagraph(const WPSParagraph &para)=0
sets the actual paragraph
WPSListener::setDocumentLanguage
virtual void setDocumentLanguage(int lcid)=0
WPSListener::getParagraph
virtual const WPSParagraph & getParagraph() const =0
returns the actual paragraph
WPSListener::insertField
virtual void insertField(WPSField const &field)=0
adds a field
WPSListener::openGroup
virtual bool openGroup(WPSPosition const &pos)=0
open a group
WPSPosition
Class to define the position of an object (textbox, picture, ..) in the document.
Definition: WPSPosition.h:39
libwps_internal.h
WPSListener.h
WPSListener::insertUnicode
virtual void insertUnicode(uint32_t character)=0
adds an unicode character