2016-09-27 22:01:08 +03:00
|
|
|
/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying
|
|
|
|
file Copyright.txt or https://cmake.org/licensing for details. */
|
2012-10-03 18:08:49 +04:00
|
|
|
#ifndef cmWIXRichTextFormatWriter_h
|
|
|
|
#define cmWIXRichTextFormatWriter_h
|
|
|
|
|
2016-09-01 21:05:48 +03:00
|
|
|
#include <cmConfigure.h>
|
|
|
|
|
2016-04-29 16:40:20 +03:00
|
|
|
#include "cmStandardIncludes.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
|