~ubuntu-branches/debian/squeeze/sword/squeeze

« back to all changes in this revision

Viewing changes to include/swdisprtf.h

  • Committer: Bazaar Package Importer
  • Author(s): Daniel Glassey
  • Date: 2004-01-15 15:50:07 UTC
  • Revision ID: james.westby@ubuntu.com-20040115155007-n9mz4x0zxrs1isd3
Tags: upstream-1.5.7
ImportĀ upstreamĀ versionĀ 1.5.7

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/******************************************************************************
 
2
 *  swdisprtf.h   - definition of Class SWDispRTF-- an SWDisplay used to display
 
3
 *                              a verse in Rich Text Format.
 
4
 *
 
5
 * $Id: swdisprtf.h,v 1.10 2002/07/30 11:33:17 scribe Exp $
 
6
 *
 
7
 * Copyright 1998 CrossWire Bible Society (http://www.crosswire.org)
 
8
 *      CrossWire Bible Society
 
9
 *      P. O. Box 2528
 
10
 *      Tempe, AZ  85280-2528
 
11
 *
 
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.
 
15
 *
 
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.
 
20
 *
 
21
 */
 
22
 
 
23
//---------------------------------------------------------------------------
 
24
#ifndef SWDispRTFH
 
25
#define SWDispRTFH
 
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>
 
33
#include <swtext.h>
 
34
#include "RxRichEditX.h"
 
35
//---------------------------------------------------------------------------
 
36
 
 
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
 
40
 
 
41
#define defRTFChapterMarkPre  "\\pard \\qc\\nowidctlpar{\\f1\\cf7\\fs%d\\b Chapter "    // 30
 
42
#define defRTFChapterMarkPost "\\par\\fs%d\\par}"       // 10
 
43
 
 
44
#define defRTFVerseMarkPre    "{\\fs%d\\cf1\\super "    //20
 
45
#define defRTFVerseMarkPost   "}"
 
46
 
 
47
#define defRTFVersePre        "{\\fs%d" // 24
 
48
#define defRTFVersePost       " }"
 
49
 
 
50
class SWDispRTF : public TRxRichEditX {
 
51
protected:
 
52
 
 
53
  bool FExpandNewLine;
 
54
  CHARRANGE FCharRange;
 
55
  int fontSize;
 
56
 
 
57
  int __fastcall GetMySelStart ();
 
58
  void __fastcall SetMySelStart (int iselstart);
 
59
  int __fastcall getFontSize ();
 
60
  void __fastcall setFontSize (int iFontSize);
 
61
protected:
 
62
    TMemoryStream * RTFStream;
 
63
 
 
64
  virtual void __fastcall Loaded (void);
 
65
public:
 
66
    __fastcall SWDispRTF (TWinControl *Owner);
 
67
    __fastcall ~ SWDispRTF ();
 
68
 
 
69
  virtual char Display (SWModule & imodule);
 
70
  __property bool ExpandNewLine = { read = FExpandNewLine, write = FExpandNewLine };
 
71
};
 
72
 
 
73
//---------------------------------------------------------------------------
 
74
#endif