1
/******************************************************************************
2
* swdisprtf.h - definition of Class SWDispRTF-- an SWDisplay used to display
3
* a verse in Rich Text Format.
5
* $Id: swdisprtf.h,v 1.10 2002/07/30 11:33:17 scribe Exp $
7
* Copyright 1998 CrossWire Bible Society (http://www.crosswire.org)
8
* CrossWire Bible Society
10
* Tempe, AZ 85280-2528
12
* This program is free software; you can redistribute it and/or modify it
13
* under the terms of the GNU General Public License as published by the
14
* Free Software Foundation version 2.
16
* This program is distributed in the hope that it will be useful, but
17
* WITHOUT ANY WARRANTY; without even the implied warranty of
18
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19
* General Public License for more details.
23
//---------------------------------------------------------------------------
26
//---------------------------------------------------------------------------
27
#include <vcl\SysUtils.hpp>
28
#include <vcl\Controls.hpp>
29
#include <vcl\Classes.hpp>
30
#include <vcl\Forms.hpp>
31
#include <vcl\ComCtrls.hpp>
32
#include <vcl\StdCtrls.hpp>
34
#include "RxRichEditX.h"
35
//---------------------------------------------------------------------------
37
#define defRTFHeader "{\\rtf1\\ansi{\\fonttbl{\\f0\\froman\\fcharset0\\fprq2 Times New Roman;}{\\f1\\froman\\fcharset0\\fprq2 Times New Roman;}{\\f2\\froman\\fcharset0\\fprq2 Times New Roman;}{\\f3\\froman\\fcharset0\\fprq2 Times New Roman;}{\\f4\\froman\\fcharset0\\fprq2 Times New Roman;}{\\f7\\froman\\fcharset2\\fprq2 Symbol;}{\\f8\\froman\\fcharset2\\fprq2 Symbol;}}{\\colortbl;\\red0\\green0\\blue255;\\red0\\green200\\blue50;\\red0\\green0\\blue255;\\red0\\green200\\blue50;\\red0\\green0\\blue255;\\red255\\green0\\blue0;} "
38
#define defRTFHeadMargin "{\\fs8\\cf1\\par\\pard} "
39
#define defRTFTrailer "{\\fs%d \\par }}" // 24
41
#define defRTFChapterMarkPre "\\pard \\qc\\nowidctlpar{\\f1\\cf7\\fs%d\\b Chapter " // 30
42
#define defRTFChapterMarkPost "\\par\\fs%d\\par}" // 10
44
#define defRTFVerseMarkPre "{\\fs%d\\cf1\\super " //20
45
#define defRTFVerseMarkPost "}"
47
#define defRTFVersePre "{\\fs%d" // 24
48
#define defRTFVersePost " }"
50
class SWDispRTF : public TRxRichEditX {
57
int __fastcall GetMySelStart ();
58
void __fastcall SetMySelStart (int iselstart);
59
int __fastcall getFontSize ();
60
void __fastcall setFontSize (int iFontSize);
62
TMemoryStream * RTFStream;
64
virtual void __fastcall Loaded (void);
66
__fastcall SWDispRTF (TWinControl *Owner);
67
__fastcall ~ SWDispRTF ();
69
virtual char Display (SWModule & imodule);
70
__property bool ExpandNewLine = { read = FExpandNewLine, write = FExpandNewLine };
73
//---------------------------------------------------------------------------