source: wkhtmltox/trunk/fuentes/src/shared/outputter.hh @ 51

Last change on this file since 51 was 51, checked in by mabarracus, 4 years ago

wip

File size: 1.9 KB
Line 
1// -*- mode: c++; tab-width: 4; indent-tabs-mode: t; eval: (progn (c-set-style "stroustrup") (c-set-offset 'innamespace 0)); -*-
2// vi:set ts=4 sts=4 sw=4 noet :
3//
4// Copyright 2010, 2011 wkhtmltopdf authors
5//
6// This file is part of wkhtmltopdf.
7//
8// wkhtmltopdf is free software: you can redistribute it and/or modify
9// it under the terms of the GNU Lesser General Public License as published by
10// the Free Software Foundation, either version 3 of the License, or
11// (at your option) any later version.
12//
13// wkhtmltopdf is distributed in the hope that it will be useful,
14// but WITHOUT ANY WARRANTY; without even the implied warranty of
15// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16// GNU General Public License for more details.
17//
18// You should have received a copy of the GNU Lesser General Public License
19// along with wkhtmltopdf.  If not, see <http://www.gnu.org/licenses/>.
20
21#ifndef __OUTPUTTER_HH__
22#define __OUTPUTTER_HH__
23#include "commandlineparserbase.hh"
24#include <QString>
25#include <QVector>
26#include <stdio.h>
27
28class Outputter {
29public:
30        virtual ~Outputter() {}
31        virtual void beginSection(const QString & name) = 0;
32        virtual void endSection() = 0;
33        virtual void beginParagraph() = 0;
34        virtual void text(const QString & t) = 0;
35        virtual void bold(const QString & t) =  0;
36        virtual void italic(const QString & t) = 0;
37        virtual void link(const QString & l) = 0;
38        virtual void sectionLink(const QString & s) = 0;
39        virtual void endParagraph() = 0;
40        virtual void verbatim(const QString & t) = 0;
41        virtual void beginList(bool ordered=false) = 0;
42        virtual void endList() = 0;
43        virtual void listItem(const QString & t) = 0;
44        virtual void beginSwitch() = 0;
45        virtual void cswitch(const ArgHandler * h) = 0;
46        virtual void endSwitch() = 0;
47        void paragraph(const QString & t);
48        static Outputter * text(FILE * fd, bool doc=false, bool extended=false);
49        static Outputter * man(FILE * fd);
50        static Outputter * html(FILE * fd);
51};
52#endif //__OUTPUTTER_HH__
Note: See TracBrowser for help on using the repository browser.