Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   Related Pages  

swdisprtf.h

00001 /******************************************************************************
00002  *  swdisprtf.h   - definition of Class SWDispRTF-- an SWDisplay used to display
00003  *                              a verse in Rich Text Format.
00004  *
00005  * $Id: swdisprtf_8h-source.html,v 1.1 2003/02/28 21:21:58 mgruner Exp $
00006  *
00007  * Copyright 1998 CrossWire Bible Society (http://www.crosswire.org)
00008  *      CrossWire Bible Society
00009  *      P. O. Box 2528
00010  *      Tempe, AZ  85280-2528
00011  *
00012  * This program is free software; you can redistribute it and/or modify it
00013  * under the terms of the GNU General Public License as published by the
00014  * Free Software Foundation version 2.
00015  *
00016  * This program is distributed in the hope that it will be useful, but
00017  * WITHOUT ANY WARRANTY; without even the implied warranty of
00018  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00019  * General Public License for more details.
00020  *
00021  */
00022 
00023 //---------------------------------------------------------------------------
00024 #ifndef SWDispRTFH
00025 #define SWDispRTFH
00026 //---------------------------------------------------------------------------
00027 #include <vcl\SysUtils.hpp>
00028 #include <vcl\Controls.hpp>
00029 #include <vcl\Classes.hpp>
00030 #include <vcl\Forms.hpp>
00031 #include <vcl\ComCtrls.hpp>
00032 #include <vcl\StdCtrls.hpp>
00033 #include <swtext.h>
00034 #include "RxRichEditX.h"
00035 //---------------------------------------------------------------------------
00036 
00037 #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;} "
00038 #define defRTFHeadMargin          "{\\fs8\\cf1\\par\\pard} "
00039 #define defRTFTrailer         "{\\fs%d \\par }}"        // 24
00040 
00041 #define defRTFChapterMarkPre  "\\pard \\qc\\nowidctlpar{\\f1\\cf7\\fs%d\\b Chapter "    // 30
00042 #define defRTFChapterMarkPost "\\par\\fs%d\\par}"       // 10
00043 
00044 #define defRTFVerseMarkPre    "{\\fs%d\\cf1\\super "    //20
00045 #define defRTFVerseMarkPost   "}"
00046 
00047 #define defRTFVersePre        "{\\fs%d" // 24
00048 #define defRTFVersePost       " }"
00049 
00050 class SWDispRTF : public TRxRichEditX {
00051 protected:
00052 
00053   bool FExpandNewLine;
00054   CHARRANGE FCharRange;
00055   int fontSize;
00056 
00057   int __fastcall GetMySelStart ();
00058   void __fastcall SetMySelStart (int iselstart);
00059   int __fastcall getFontSize ();
00060   void __fastcall setFontSize (int iFontSize);
00061 protected:
00062     TMemoryStream * RTFStream;
00063 
00064   virtual void __fastcall Loaded (void);
00065 public:
00066     __fastcall SWDispRTF (TWinControl *Owner);
00067     __fastcall ~ SWDispRTF ();
00068 
00069   virtual char Display (SWModule & imodule);
00070   __property bool ExpandNewLine = { read = FExpandNewLine, write = FExpandNewLine };
00071 };
00072 
00073 //---------------------------------------------------------------------------
00074 #endif

Generated on Fri Feb 28 22:01:38 2003 for The Sword Project by doxygen1.3-rc3