// CodeGear C++Builder
// Copyright (c) 1995, 2008 by CodeGear
// All rights reserved

// (DO NOT EDIT: machine generated header) 'Rvfuncs.pas' rev: 20.00

#ifndef RvfuncsHPP
#define RvfuncsHPP

#pragma delphiheader begin
#pragma option push
#pragma option -w-      // All warnings off
#pragma option -Vx      // Zero-length empty class member functions
#pragma pack(push,8)
#include <System.hpp>	// Pascal unit
#include <Sysinit.hpp>	// Pascal unit
#include <Ansistrings.hpp>	// Pascal unit
#include <Sysutils.hpp>	// Pascal unit
#include <Windows.hpp>	// Pascal unit
#include <Classes.hpp>	// Pascal unit
#include <Rvstyle.hpp>	// Pascal unit
#include <Rvstr.hpp>	// Pascal unit
#include <Jpeg.hpp>	// Pascal unit
#include <Graphics.hpp>	// Pascal unit
#include <Rvtypes.hpp>	// Pascal unit
#include <Rvgrin.hpp>	// Pascal unit

//-- user supplied -----------------------------------------------------------

namespace Rvfuncs
{
//-- type declarations -------------------------------------------------------
typedef bool __fastcall (*TCustomRVIsURLFunction)(const System::UnicodeString Word);

#pragma option push -b-
enum TRVLineStyle { rvlsNormal, rvlsRoundDotted, rvlsDotted, rvlsDashed, rvlsDashDotted, rvlsDashDotDotted, rvlsHidden };
#pragma option pop

typedef Graphics::TGraphic* __fastcall (*TRV_CreateGraphicsFunction)(Graphics::TGraphicClass GraphicClass);

typedef void __fastcall (*TRV_AfterImportGraphicsProc)(Graphics::TGraphic* Graphic);

//-- var, const, procedure ---------------------------------------------------
extern PACKAGE int RichViewPixelsPerInch;
static const Extended RVEps = 1.000000E-20;
extern PACKAGE TCustomRVIsURLFunction RVIsCustomURL;
extern PACKAGE TRV_CreateGraphicsFunction RV_CreateGraphics;
extern PACKAGE TRV_AfterImportGraphicsProc RV_AfterImportGraphic;
extern PACKAGE bool RichViewAlternativePicPrint;
extern PACKAGE Windows::POutlineTextmetricW __fastcall RV_GetOutlineTextMetrics(Graphics::TCanvas* Canvas, Rvgrin::TRVGraphicInterface* GraphicInterface);
extern PACKAGE int __fastcall RV_CopyTag(int SourceTag, bool TagsArePChars);
extern PACKAGE bool __fastcall RV_CompareTags(int Tag1, int Tag2, bool TagsArePChars);
extern PACKAGE Rvtypes::TRVAnsiString __fastcall RV_ReplaceTabsA(const Rvtypes::TRVAnsiString s, int SpacesInTab);
extern PACKAGE Rvtypes::TRVRawByteString __fastcall RV_ReplaceTabsW(const Rvtypes::TRVRawByteString s, int SpacesInTab);
extern PACKAGE int __fastcall RV_CharPos(const char * Str, char Chr, int Length);
extern PACKAGE void __fastcall RV_ReplaceStr(System::UnicodeString &str, System::UnicodeString oldstr, System::UnicodeString newstr);
extern PACKAGE void __fastcall RV_ReplaceStrA(Rvtypes::TRVAnsiString &str, Rvtypes::TRVAnsiString oldstr, Rvtypes::TRVAnsiString newstr);
extern PACKAGE System::UnicodeString __fastcall RV_GetHintStr(Rvstyle::TRVSaveFormat DocFormat, const System::UnicodeString Hint);
extern PACKAGE int __fastcall RV_GetDefSubSuperScriptSize(int NormalSize);
extern PACKAGE int __fastcall RV_GetDefSubSuperScriptSizeRev(int ScriptSize);
extern PACKAGE System::UnicodeString __fastcall RV_IntToRoman(int Value);
extern PACKAGE System::UnicodeString __fastcall RV_IntToAlpha(int Value);
extern PACKAGE Rvtypes::TRVAnsiString __fastcall RV_GetHTMLRGBStr(Graphics::TColor Color, bool Quotes);
extern PACKAGE System::UnicodeString __fastcall RV_GetHTMLRGBStr2(Graphics::TColor Color, bool Quotes);
extern PACKAGE Rvtypes::TRVAnsiString __fastcall RV_GetCSSBkColor(Graphics::TColor Color);
extern PACKAGE System::UnicodeString __fastcall RV_GetHTMLPath(const System::UnicodeString Path);
extern PACKAGE void __fastcall RV_AddStrEx(System::UnicodeString &s1, const System::UnicodeString s2, const System::UnicodeString Delimiter);
extern PACKAGE void __fastcall RV_AddStr(System::UnicodeString &s1, const System::UnicodeString s2);
extern PACKAGE void __fastcall RV_AddStrExA(Rvtypes::TRVAnsiString &s1, const Rvtypes::TRVAnsiString s2, const Rvtypes::TRVAnsiString Delimiter);
extern PACKAGE void __fastcall RV_AddStrA(Rvtypes::TRVAnsiString &s1, const Rvtypes::TRVAnsiString s2);
extern PACKAGE System::UnicodeString __fastcall RV_GetHTMLFontCSS(Graphics::TFont* Font, bool UseFontName);
extern PACKAGE int __fastcall RV_HTMLGetFontSize(int pts);
extern PACKAGE System::UnicodeString __fastcall RV_HTMLOpenFontTag(Rvstyle::TFontInfo* ts, Rvstyle::TFontInfo* normalts, bool Relative, Rvstyle::TRVSaveOptions SaveOptions);
extern PACKAGE System::UnicodeString __fastcall RV_HTMLOpenFontTag2(Graphics::TFont* fnt, Rvstyle::TFontInfo* normalts, bool UseFontName, Rvstyle::TRVSaveOptions SaveOptions);
extern PACKAGE Rvtypes::TRVAnsiString __fastcall RV_HTMLCloseFontTag(Rvstyle::TFontInfo* ts, Rvstyle::TFontInfo* normalts, bool Relative);
extern PACKAGE Rvtypes::TRVAnsiString __fastcall RV_HTMLCloseFontTag2(Graphics::TFont* fnt, Rvstyle::TFontInfo* normalts, bool UseFontName);
extern PACKAGE Rvtypes::TRVAnsiString __fastcall RV_MakeHTMLSymbolStrA(const Rvtypes::TRVAnsiString s);
extern PACKAGE Rvtypes::TRVAnsiString __fastcall RV_MakeHTMLSymbolStrRaw(const Rvtypes::TRVRawByteString s);
extern PACKAGE Rvtypes::TRVAnsiString __fastcall RV_MakeHTMLSymbolStr(const System::UnicodeString s);
extern PACKAGE Rvtypes::TRVAnsiString __fastcall RV_MakeHTMLStr(const Rvtypes::TRVAnsiString str, bool SpecialCode, bool NextSpace);
extern PACKAGE System::UnicodeString __fastcall RV_MakeHTMLValueStr(const System::UnicodeString str);
extern PACKAGE Rvtypes::TRVAnsiString __fastcall RV_CharSet2HTMLLang(Graphics::TFontCharset CharSet);
extern PACKAGE System::UnicodeString __fastcall RV_DecodeURL(const System::UnicodeString s, bool DecodeLineBreaks);
extern PACKAGE Rvtypes::TRVAnsiString __fastcall RV_HTMLGetEndingSlash(Rvstyle::TRVSaveOptions SaveOptions);
extern PACKAGE Rvtypes::TRVAnsiString __fastcall RV_HTMLGetNoValueAttribute(const Rvtypes::TRVAnsiString Attr, Rvstyle::TRVSaveOptions SaveOptions);
extern PACKAGE System::UnicodeString __fastcall RV_HTMLGetIntAttrVal2(int Value, Rvstyle::TRVSaveOptions SaveOptions);
extern PACKAGE Rvtypes::TRVAnsiString __fastcall RV_HTMLGetIntAttrVal(int Value, Rvstyle::TRVSaveOptions SaveOptions);
extern PACKAGE Rvtypes::TRVAnsiString __fastcall RV_HTMLGetStrAttrVal(const Rvtypes::TRVAnsiString Value, Rvstyle::TRVSaveOptions SaveOptions);
extern PACKAGE Rvtypes::TRVAnsiString __fastcall RVMakeRTFStr(const Rvtypes::TRVAnsiString s, bool SpecialCode, bool UseNamedEntities);
extern PACKAGE Rvtypes::TRVAnsiString __fastcall RVMakeRTFStrW(const Rvtypes::TRVUnicodeString s, Rvstyle::TRVCodePage CodePage, bool SaveAnsi, bool ForceSaveAnsi, bool SpecialCode);
extern PACKAGE Rvtypes::TRVAnsiString __fastcall RVMakeRTFFileNameStr(const System::UnicodeString s, Rvstyle::TRVCodePage CodePage, bool SaveAnsi);
extern PACKAGE Rvtypes::TRVAnsiString __fastcall MakeRTFIdentifierStr(const System::UnicodeString s, Rvstyle::TRVCodePage CodePage, bool SaveAnsi);
extern PACKAGE System::UnicodeString __fastcall MakeRTFBookmarkNameStr(const System::UnicodeString s);
extern PACKAGE void __fastcall RVWriteUnicodeRTFStr(Classes::TStream* Stream, const Rvtypes::TRVRawByteString s, Rvstyle::TRVCodePage CodePage, bool SaveAnsi, bool ForceSaveAnsi, bool SpecialCode, bool DoubleBSlashes);
extern PACKAGE bool __fastcall RVIsURL(const System::UnicodeString s);
extern PACKAGE bool __fastcall RVIsEmail(const System::UnicodeString s);
extern PACKAGE int __fastcall RV_XToDevice(int X, const Rvstyle::TRVScreenAndDevice &sad);
extern PACKAGE int __fastcall RV_YToDevice(int Y, const Rvstyle::TRVScreenAndDevice &sad);
extern PACKAGE int __fastcall RV_XToScreen(int X, const Rvstyle::TRVScreenAndDevice &sad);
extern PACKAGE int __fastcall RV_YToScreen(int Y, const Rvstyle::TRVScreenAndDevice &sad);
extern PACKAGE void __fastcall RV_RectToScreen(Types::TRect &R, const Rvstyle::TRVScreenAndDevice &sad);
extern PACKAGE void __fastcall RV_InfoAboutSaD(Rvstyle::TRVScreenAndDevice &sad, Graphics::TCanvas* Canvas, Rvgrin::TRVGraphicInterface* GraphicInterface);
extern PACKAGE int __fastcall RV_GetPixelsPerInch(void);
extern PACKAGE bool __fastcall RV_PointInRect(int X, int Y, int Left, int Top, int Width, int Height);
extern PACKAGE Rvstyle::TRVLength __fastcall RV_UnitsPerInch(Rvstyle::TRVUnits Units);
extern PACKAGE int __fastcall RV_UnitsToTwips(Rvstyle::TRVLength Value, Rvstyle::TRVUnits Units);
extern PACKAGE Rvstyle::TRVLength __fastcall RV_TwipsToUnits(int Value, Rvstyle::TRVUnits Units);
extern PACKAGE Graphics::TGraphic* __fastcall RV_CreateGraphicsDefault(Graphics::TGraphicClass GraphicClass);
extern PACKAGE void __fastcall RV_AfterImportGraphicDefault(Graphics::TGraphic* Graphic);
extern PACKAGE int __fastcall RV_GetLuminance(Graphics::TColor Color);
extern PACKAGE Graphics::TColor __fastcall RV_GetGray(Graphics::TColor Color);
extern PACKAGE Graphics::TColor __fastcall RV_GetPrnColor(Graphics::TColor Color);
extern PACKAGE Graphics::TColor __fastcall RV_GetColor(Graphics::TColor Color, Rvstyle::TRVColorMode ColorMode);
extern PACKAGE Graphics::TColor __fastcall RV_GetBackColor(Graphics::TColor Color, Rvstyle::TRVColorMode ColorMode);
extern PACKAGE bool __fastcall RV_IsGraphicTransparent(Graphics::TGraphic* gr);
extern PACKAGE void __fastcall RV_SetPaletteToPicture(Graphics::TGraphic* gr, Windows::PLogPalette PLogPal);
extern PACKAGE void __fastcall RV_BltTBitmapAsDib(HDC DestDc, int X, int Y, int PrintWidth, int PrintHeight, Graphics::TBitmap* bm);
extern PACKAGE void __fastcall RV_PictureToDeviceAlt(Graphics::TCanvas* Canvas, int X, int Y, int PrintWidth, int PrintHeight, Graphics::TBitmap* gr);
extern PACKAGE void __fastcall RV_PictureToDevice(Graphics::TCanvas* Canvas, int x, int y, int width, int height, Rvstyle::PRVScreenAndDevice sad, Graphics::TGraphic* gr, bool ToScreen, Rvgrin::TRVGraphicInterface* GraphicInterface);
extern PACKAGE void __fastcall ShadeRectangle(Graphics::TCanvas* Canvas, const Types::TRect &R, Graphics::TColor Color);
extern PACKAGE int __fastcall RV_Sign(int Value);
extern PACKAGE void __fastcall RVDrawCustomHLine(Graphics::TCanvas* Canvas, Graphics::TColor Color, TRVLineStyle LineStyle, int LineWidth, int Left, int Right, int Y, int PeriodLength, Rvgrin::TRVGraphicInterface* GraphicInterface);
extern PACKAGE int __fastcall RVGetDefaultUnderlineWidth(int FontSize);
extern PACKAGE void __fastcall RVDrawLineBetweenRects(int Left1, int Top1, int Width1, int Height1, int Left2, int Top2, int Width2, int Height2, Graphics::TCanvas* Canvas, Rvgrin::TRVGraphicInterface* GraphicInterface);

}	/* namespace Rvfuncs */
using namespace Rvfuncs;
#pragma pack(pop)
#pragma option pop

#pragma delphiheader end.
//-- end unit ----------------------------------------------------------------
#endif	// RvfuncsHPP
