2012-10-03 18:08:49 +04:00
|
|
|
/*============================================================================
|
|
|
|
CMake - Cross Platform Makefile Generator
|
|
|
|
Copyright 2000-2012 Kitware, Inc.
|
|
|
|
|
|
|
|
Distributed under the OSI-approved BSD License (the "License");
|
|
|
|
see accompanying file Copyright.txt for details.
|
|
|
|
|
|
|
|
This software is distributed WITHOUT ANY WARRANTY; without even the
|
|
|
|
implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
|
|
See the License for more information.
|
|
|
|
============================================================================*/
|
|
|
|
|
|
|
|
#ifndef cmWIXRichTextFormatWriter_h
|
|
|
|
#define cmWIXRichTextFormatWriter_h
|
|
|
|
|
2014-01-04 09:47:13 +04:00
|
|
|
#include <cmsys/FStream.hxx>
|
2012-10-03 18:08:49 +04:00
|
|
|
|
|
|
|
/** \class cmWIXRichtTextFormatWriter
|
|
|
|
* \brief Helper class to generate Rich Text Format (RTF) documents
|
|
|
|
* from plain text (e.g. for license and welcome text)
|
|
|
|
*/
|
|
|
|
class cmWIXRichTextFormatWriter
|
|
|
|
{
|
|
|
|
public:
|
2014-02-25 02:21:12 +04:00
|
|
|
cmWIXRichTextFormatWriter(std::string const& filename);
|
2012-10-03 18:08:49 +04:00
|
|
|
~cmWIXRichTextFormatWriter();
|
|
|
|
|
2014-02-25 02:21:12 +04:00
|
|
|
void AddText(std::string const& text);
|
2012-10-03 18:08:49 +04:00
|
|
|
|
|
|
|
private:
|
|
|
|
void WriteHeader();
|
|
|
|
void WriteFontTable();
|
2013-12-26 18:23:54 +04:00
|
|
|
void WriteColorTable();
|
2012-10-03 18:08:49 +04:00
|
|
|
void WriteGenerator();
|
|
|
|
|
|
|
|
void WriteDocumentPrefix();
|
|
|
|
|
2014-02-25 02:21:12 +04:00
|
|
|
void ControlWord(std::string const& keyword);
|
|
|
|
void NewControlWord(std::string const& keyword);
|
2012-10-03 18:08:49 +04:00
|
|
|
|
|
|
|
void StartGroup();
|
|
|
|
void EndGroup();
|
|
|
|
|
2013-12-26 18:23:54 +04:00
|
|
|
void EmitUnicodeCodepoint(int c);
|
|
|
|
void EmitUnicodeSurrogate(int c);
|
|
|
|
|
|
|
|
void EmitInvalidCodepoint(int c);
|
|
|
|
|
2014-01-04 09:47:13 +04:00
|
|
|
cmsys::ofstream File;
|
2012-10-03 18:08:49 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|