// Borland C++ Builder
// Copyright (c) 1995, 1999 by Borland International
// All rights reserved

// (DO NOT EDIT: machine generated header) 'RVFuncs.pas' rev: 4.00

#ifndef RVFuncsHPP
#define RVFuncsHPP

#pragma delphiheader begin
#pragma option push -w-
#include <RVGrIn.hpp>	// Pascal unit
#include <RVTypes.hpp>	// Pascal unit
#include <Graphics.hpp>	// Pascal unit
#include <jpeg.hpp>	// Pascal unit
#include <RVStr.hpp>	// Pascal unit
#include <RVStyle.hpp>	// Pascal unit
#include <Classes.hpp>	// Pascal unit
#include <Windows.hpp>	// Pascal unit
#include <SysUtils.hpp>	// Pascal unit
#include <SysInit.hpp>	// Pascal unit
#include <System.hpp>	// Pascal unit

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

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

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

typedef Graphics::TGraphic* __fastcall (*TRV_CreateGraphicsFunction)(TMetaClass* 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::POutlineTextmetricA __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 AnsiString __fastcall RV_ReplaceTabsA(const AnsiString s, int SpacesInTab);
extern PACKAGE AnsiString __fastcall RV_ReplaceTabsW(const AnsiString s, int SpacesInTab);
extern PACKAGE int __fastcall RV_CharPos(const char * Str, char Chr, int Length);
extern PACKAGE void __fastcall RV_ReplaceStr(AnsiString &str, AnsiString oldstr, AnsiString newstr);
	
extern PACKAGE void __fastcall RV_ReplaceStrA(AnsiString &str, AnsiString oldstr, AnsiString newstr)
	;
extern PACKAGE AnsiString __fastcall RV_GetHintStr(Rvstyle::TRVSaveFormat DocFormat, const AnsiString 
	Hint);
extern PACKAGE int __fastcall RV_GetDefSubSuperScriptSize(int NormalSize);
extern PACKAGE int __fastcall RV_GetDefSubSuperScriptSizeRev(int ScriptSize);
extern PACKAGE AnsiString __fastcall RV_IntToRoman(int Value);
extern PACKAGE AnsiString __fastcall RV_IntToAlpha(int Value);
extern PACKAGE AnsiString __fastcall RV_GetHTMLRGBStr(Graphics::TColor Color, bool Quotes);
extern PACKAGE AnsiString __fastcall RV_GetHTMLRGBStr2(Graphics::TColor Color, bool Quotes);
extern PACKAGE AnsiString __fastcall RV_GetCSSBkColor(Graphics::TColor Color);
extern PACKAGE AnsiString __fastcall RV_GetHTMLPath(const AnsiString Path);
extern PACKAGE void __fastcall RV_AddStrEx(AnsiString &s1, const AnsiString s2, const AnsiString Delimiter
	);
extern PACKAGE void __fastcall RV_AddStr(AnsiString &s1, const AnsiString s2);
extern PACKAGE void __fastcall RV_AddStrExA(AnsiString &s1, const AnsiString s2, const AnsiString Delimiter
	);
extern PACKAGE void __fastcall RV_AddStrA(AnsiString &s1, const AnsiString s2);
extern PACKAGE AnsiString __fastcall RV_GetHTMLFontCSS(Graphics::TFont* Font, bool UseFontName);
extern PACKAGE int __fastcall RV_HTMLGetFontSize(int pts);
extern PACKAGE AnsiString __fastcall RV_HTMLOpenFontTag(Rvstyle::TFontInfo* ts, Rvstyle::TFontInfo* 
	normalts, bool Relative, Rvstyle::TRVSaveOptions SaveOptions);
extern PACKAGE AnsiString __fastcall RV_HTMLOpenFontTag2(Graphics::TFont* fnt, Rvstyle::TFontInfo* normalts
	, bool UseFontName, Rvstyle::TRVSaveOptions SaveOptions);
extern PACKAGE AnsiString __fastcall RV_HTMLCloseFontTag(Rvstyle::TFontInfo* ts, Rvstyle::TFontInfo* 
	normalts, bool Relative);
extern PACKAGE AnsiString __fastcall RV_HTMLCloseFontTag2(Graphics::TFont* fnt, Rvstyle::TFontInfo* 
	normalts, bool UseFontName);
extern PACKAGE AnsiString __fastcall RV_MakeHTMLSymbolStrA(const AnsiString s);
extern PACKAGE AnsiString __fastcall RV_MakeHTMLSymbolStrRaw(const AnsiString s);
extern PACKAGE AnsiString __fastcall RV_MakeHTMLSymbolStr(const AnsiString s);
extern PACKAGE AnsiString __fastcall RV_MakeHTMLStr(const AnsiString str, bool SpecialCode, bool NextSpace
	);
extern PACKAGE AnsiString __fastcall RV_MakeHTMLValueStr(const AnsiString str);
extern PACKAGE AnsiString __fastcall RV_CharSet2HTMLLang(Graphics::TFontCharset CharSet);
extern PACKAGE AnsiString __fastcall RV_DecodeURL(const AnsiString s, bool DecodeLineBreaks);
extern PACKAGE AnsiString __fastcall RV_HTMLGetEndingSlash(Rvstyle::TRVSaveOptions SaveOptions);
extern PACKAGE AnsiString __fastcall RV_HTMLGetNoValueAttribute(const AnsiString Attr, Rvstyle::TRVSaveOptions 
	SaveOptions);
extern PACKAGE AnsiString __fastcall RV_HTMLGetIntAttrVal2(int Value, Rvstyle::TRVSaveOptions SaveOptions
	);
extern PACKAGE AnsiString __fastcall RV_HTMLGetIntAttrVal(int Value, Rvstyle::TRVSaveOptions SaveOptions
	);
extern PACKAGE AnsiString __fastcall RV_HTMLGetStrAttrVal(const AnsiString Value, Rvstyle::TRVSaveOptions 
	SaveOptions);
extern PACKAGE AnsiString __fastcall RVMakeRTFStr(const AnsiString s, bool SpecialCode, bool UseNamedEntities
	);
extern PACKAGE AnsiString __fastcall RVMakeRTFStrW(const WideString s, Rvstyle::TRVCodePage CodePage
	, bool SaveAnsi, bool ForceSaveAnsi, bool SpecialCode);
extern PACKAGE AnsiString __fastcall RVMakeRTFFileNameStr(const AnsiString s, Rvstyle::TRVCodePage CodePage
	, bool SaveAnsi);
extern PACKAGE AnsiString __fastcall MakeRTFIdentifierStr(const AnsiString s, Rvstyle::TRVCodePage CodePage
	, bool SaveAnsi);
extern PACKAGE AnsiString __fastcall MakeRTFBookmarkNameStr(const AnsiString s);
extern PACKAGE void __fastcall RVWriteUnicodeRTFStr(Classes::TStream* Stream, const AnsiString s, Rvstyle::TRVCodePage 
	CodePage, bool SaveAnsi, bool ForceSaveAnsi, bool SpecialCode, bool DoubleBSlashes);
extern PACKAGE bool __fastcall RVIsURL(const AnsiString s);
extern PACKAGE bool __fastcall RVIsEmail(const AnsiString 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(Windows::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(TMetaClass* 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 Windows::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 */
#if !defined(NO_IMPLICIT_NAMESPACE_USE)
using namespace Rvfuncs;
#endif
#pragma option pop	// -w-

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