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

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

#ifndef DbrvHPP
#define DbrvHPP

#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 <Windows.hpp>	// Pascal unit
#include <Messages.hpp>	// Pascal unit
#include <Sysutils.hpp>	// Pascal unit
#include <Classes.hpp>	// Pascal unit
#include <Graphics.hpp>	// Pascal unit
#include <Controls.hpp>	// Pascal unit
#include <Forms.hpp>	// Pascal unit
#include <Dialogs.hpp>	// Pascal unit
#include <Rvscroll.hpp>	// Pascal unit
#include <Richview.hpp>	// Pascal unit
#include <Rvedit.hpp>	// Pascal unit
#include <Db.hpp>	// Pascal unit
#include <Dbctrls.hpp>	// Pascal unit
#include <Crvdata.hpp>	// Pascal unit
#include <Crvfdata.hpp>	// Pascal unit
#include <Rvstyle.hpp>	// Pascal unit
#include <Rvtypes.hpp>	// Pascal unit
#include <Rvclasses.hpp>	// Pascal unit
#include <Menus.hpp>	// Pascal unit
#include <Rvdocparams.hpp>	// Pascal unit
#include <Rvrtfprops.hpp>	// Pascal unit
#include <Stdctrls.hpp>	// Pascal unit
#include <Rvpopup.hpp>	// Pascal unit

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

namespace Dbrv
{
//-- type declarations -------------------------------------------------------
#pragma option push -b-
enum TRVDBFieldFormat { rvdbRVF, rvdbRTF, rvdbText };
#pragma option pop

typedef void __fastcall (__closure *TRVCustomFormatEvent)(Richview::TCustomRichView* Sender, Classes::TStream* Stream, bool &DoDefault);

class DELPHICLASS TDBRichView;
class PASCALIMPLEMENTATION TDBRichView : public Richview::TCustomRichView
{
	typedef Richview::TCustomRichView inherited;
	
private:
	Dbctrls::TFieldDataLink* FDataLink;
	bool FAutoDisplay;
	bool FFocused;
	bool FMemoLoaded;
	Classes::TNotifyEvent FOnNewDocument;
	Classes::TNotifyEvent FOnLoadDocument;
	TRVCustomFormatEvent FOnLoadCustomFormat;
	void __fastcall DataChange(System::TObject* Sender);
	System::UnicodeString __fastcall GetDataField();
	Db::TDataSource* __fastcall GetDataSource(void);
	Db::TField* __fastcall GetField(void);
	void __fastcall SetDataField(const System::UnicodeString Value);
	void __fastcall SetDataSource(Db::TDataSource* Value);
	MESSAGE void __fastcall CMGetDataLink(Messages::TMessage &Message);
	void __fastcall SetAutoDisplay(bool Value);
	
protected:
	virtual void __fastcall Loaded(void);
	virtual void __fastcall Notification(Classes::TComponent* AComponent, Classes::TOperation Operation);
	DYNAMIC void __fastcall DblClick(void);
	virtual void __fastcall Paint(void);
	
public:
	__fastcall virtual TDBRichView(Classes::TComponent* AOwner);
	__fastcall virtual ~TDBRichView(void);
	void __fastcall LoadField(void);
	__property Db::TField* Field = {read=GetField};
	DYNAMIC bool __fastcall ExecuteAction(Classes::TBasicAction* Action);
	DYNAMIC bool __fastcall UpdateAction(Classes::TBasicAction* Action);
	
__published:
	__property System::UnicodeString DataField = {read=GetDataField, write=SetDataField};
	__property Db::TDataSource* DataSource = {read=GetDataSource, write=SetDataSource};
	__property bool AutoDisplay = {read=FAutoDisplay, write=SetAutoDisplay, default=1};
	__property Classes::TNotifyEvent OnLoadDocument = {read=FOnLoadDocument, write=FOnLoadDocument};
	__property Classes::TNotifyEvent OnNewDocument = {read=FOnNewDocument, write=FOnNewDocument};
	__property TRVCustomFormatEvent OnLoadCustomFormat = {read=FOnLoadCustomFormat, write=FOnLoadCustomFormat};
	__property Align = {default=0};
	__property Anchors = {default=3};
	__property Constraints;
	__property Color = {default=536870911};
	__property Ctl3D;
	__property DragKind = {default=0};
	__property DragMode = {default=0};
	__property Enabled = {default=1};
	__property HelpContext = {default=0};
	__property ParentCtl3D = {default=1};
	__property ParentShowHint = {default=1};
	__property PopupMenu;
	__property ShowHint;
	__property TabOrder = {default=-1};
	__property TabStop = {default=1};
	__property Visible = {default=1};
	__property OnClick;
	__property OnContextPopup;
	__property OnDblClick;
	__property OnDragDrop;
	__property OnDragOver;
	__property OnEndDrag;
	__property OnEnter;
	__property OnExit;
	__property OnKeyDown;
	__property OnKeyPress;
	__property OnKeyUp;
	__property OnMouseMove;
	__property OnMouseWheel;
	__property OnMouseWheelDown;
	__property OnMouseWheelUp;
	__property OnResize;
	__property OnStartDrag;
	__property AnimationMode = {default=1};
	__property BackgroundBitmap;
	__property BackgroundStyle = {default=0};
	__property BiDiMode = {default=0};
	__property BorderStyle = {default=1};
	__property BottomMargin = {default=5};
	__property CPEventKind = {default=0};
	__property Cursor = {default=0};
	__property Delimiters;
	__property DocParameters;
	__property DoInPaletteMode;
	__property FirstJumpNo = {default=0};
	__property HScrollVisible = {default=1};
	__property LeftMargin = {default=5};
	__property MaxLength = {default=0};
	__property MaxTextWidth = {default=0};
	__property MinTextWidth = {default=0};
	__property Options = {default=654373};
	__property RightMargin = {default=5};
	__property RTFOptions = {default=14};
	__property RTFReadProperties;
	__property RVFOptions = {default=98435};
	__property RVFParaStylesReadMode = {default=2};
	__property RVFTextStylesReadMode = {default=2};
	__property Style;
	__property TabNavigation = {default=1};
	__property TopMargin = {default=5};
	__property Tracking = {default=1};
	__property UseXPThemes = {default=1};
	__property VAlign = {default=0};
	__property VScrollVisible = {default=1};
	__property WheelStep = {default=2};
	__property WordWrap = {default=1};
	__property OnAddStyle;
	__property OnCheckpointVisible;
	__property OnControlAction;
	__property OnCopy;
	__property OnGetItemCursor;
	__property OnImportPicture;
	__property OnItemAction;
	__property OnItemHint;
	__property OnJump;
	__property OnHScrolled;
	__property OnHTMLSaveImage;
	__property OnPaint;
	__property OnProgress;
	__property OnReadHyperlink;
	__property OnRVDblClick;
	__property OnRVFImageListNeeded;
	__property OnRVFControlNeeded;
	__property OnRVFPictureNeeded;
	__property OnRVMouseDown;
	__property OnRVMouseMove;
	__property OnRVMouseUp;
	__property OnRVRightClick;
	__property OnSaveComponentToFile;
	__property OnSaveHTMLExtra;
	__property OnSaveImage2;
	__property OnSaveItemToFile;
	__property OnSaveRTFExtra;
	__property OnSelect;
	__property OnSpellingCheck;
	__property OnVScrolled;
	__property OnWriteHyperlink;
	__property AllowSelection;
	__property SingleClick;
	__property OnURLNeeded;
public:
	/* TWinControl.CreateParented */ inline __fastcall TDBRichView(HWND ParentWindow) : Richview::TCustomRichView(ParentWindow) { }
	
};


class DELPHICLASS TDBRichViewEdit;
class PASCALIMPLEMENTATION TDBRichViewEdit : public Rvedit::TCustomRichViewEdit
{
	typedef Rvedit::TCustomRichViewEdit inherited;
	
private:
	Dbctrls::TFieldDataLink* FDataLink;
	bool FAutoDisplay;
	bool FFocused;
	bool FMemoLoaded;
	Rvclasses::TRVMemoryStream* FDataSaveStream;
	TRVDBFieldFormat FFieldFormat;
	bool FAutoDeleteUnusedStyles;
	Classes::TNotifyEvent FOnNewDocument;
	bool FIgnoreEscape;
	Classes::TNotifyEvent FOnLoadDocument;
	TRVCustomFormatEvent FOnLoadCustomFormat;
	TRVCustomFormatEvent FOnSaveCustomFormat;
	void __fastcall DataChange(System::TObject* Sender);
	void __fastcall EditingChange(System::TObject* Sender);
	System::UnicodeString __fastcall GetDataField();
	Db::TDataSource* __fastcall GetDataSource(void);
	Db::TField* __fastcall GetField(void);
	bool __fastcall DBGetReadOnly(void);
	void __fastcall SetDataField(const System::UnicodeString Value);
	void __fastcall SetDataSource(Db::TDataSource* Value);
	void __fastcall SetFocused(bool Value);
	void __fastcall DBSetReadOnly(bool Value);
	void __fastcall SetAutoDisplay(bool Value);
	void __fastcall UpdateData(System::TObject* Sender);
	HIDESBASE MESSAGE void __fastcall CMEnter(Messages::TWMNoParams &Message);
	HIDESBASE MESSAGE void __fastcall CMExit(Messages::TWMNoParams &Message);
	MESSAGE void __fastcall CMGetDataLink(Messages::TMessage &Message);
	void __fastcall BeginEditing(void);
	void __fastcall DoLoadField(bool Check);
	MESSAGE void __fastcall WMReload(Messages::TMessage &Msg);
	HIDESBASE MESSAGE void __fastcall CMWantSpecialKey(Messages::TWMKey &Message);
	
protected:
	virtual void __fastcall Loaded(void);
	virtual void __fastcall Notification(Classes::TComponent* AComponent, Classes::TOperation Operation);
	DYNAMIC void __fastcall DblClick(void);
	DYNAMIC void __fastcall KeyPress(System::WideChar &Key);
	virtual void __fastcall Paint(void);
	DYNAMIC void __fastcall DoFormat(void);
	
public:
	DYNAMIC void __fastcall DoChange(bool ClearRedo);
	virtual bool __fastcall BeforeChange(bool FromOutside);
	__fastcall virtual TDBRichViewEdit(Classes::TComponent* AOwner);
	__fastcall virtual ~TDBRichViewEdit(void);
	void __fastcall LoadField(void);
	__property Db::TField* Field = {read=GetField};
	DYNAMIC bool __fastcall ExecuteAction(Classes::TBasicAction* Action);
	DYNAMIC bool __fastcall UpdateAction(Classes::TBasicAction* Action);
	
__published:
	__property bool IgnoreEscape = {read=FIgnoreEscape, write=FIgnoreEscape, default=0};
	__property bool AutoDeleteUnusedStyles = {read=FAutoDeleteUnusedStyles, write=FAutoDeleteUnusedStyles, default=0};
	__property System::UnicodeString DataField = {read=GetDataField, write=SetDataField};
	__property Db::TDataSource* DataSource = {read=GetDataSource, write=SetDataSource};
	__property bool ReadOnly = {read=DBGetReadOnly, write=DBSetReadOnly, nodefault};
	__property bool AutoDisplay = {read=FAutoDisplay, write=SetAutoDisplay, default=1};
	__property TRVDBFieldFormat FieldFormat = {read=FFieldFormat, write=FFieldFormat, default=0};
	__property Classes::TNotifyEvent OnLoadDocument = {read=FOnLoadDocument, write=FOnLoadDocument};
	__property Classes::TNotifyEvent OnNewDocument = {read=FOnNewDocument, write=FOnNewDocument};
	__property TRVCustomFormatEvent OnLoadCustomFormat = {read=FOnLoadCustomFormat, write=FOnLoadCustomFormat};
	__property TRVCustomFormatEvent OnSaveCustomFormat = {read=FOnSaveCustomFormat, write=FOnSaveCustomFormat};
	__property AcceptDragDropFormats = {default=191};
	__property CustomCaretInterval = {default=0};
	__property EditorOptions = {default=18};
	__property UndoLimit = {default=-1};
	__property OnCaretGetOut;
	__property OnCaretMove;
	__property OnChange;
	__property OnChanging;
	__property OnCurParaStyleChanged;
	__property OnCurTextStyleChanged;
	__property OnDrawCustomCaret;
	__property OnMeasureCustomCaret;
	__property OnDropFiles;
	__property OnItemResize;
	__property OnItemTextEdit;
	__property OnOleDragEnter;
	__property OnOleDragLeave;
	__property OnOleDragOver;
	__property OnOleDrop;
	__property OnParaStyleConversion;
	__property OnPaste;
	__property OnStyleConversion;
	__property TabNavigation = {default=0};
	__property Align = {default=0};
	__property Anchors = {default=3};
	__property Constraints;
	__property Color = {default=536870911};
	__property Ctl3D;
	__property DragKind = {default=0};
	__property DragMode = {default=0};
	__property Enabled = {default=1};
	__property HelpContext = {default=0};
	__property ParentCtl3D = {default=1};
	__property ParentShowHint = {default=1};
	__property PopupMenu;
	__property ShowHint;
	__property TabOrder = {default=-1};
	__property TabStop = {default=1};
	__property UseXPThemes = {default=1};
	__property Visible = {default=1};
	__property OnClick;
	__property OnContextPopup;
	__property OnDblClick;
	__property OnDragDrop;
	__property OnDragOver;
	__property OnEndDrag;
	__property OnEnter;
	__property OnExit;
	__property OnKeyDown;
	__property OnKeyPress;
	__property OnKeyUp;
	__property OnMouseMove;
	__property OnMouseWheel;
	__property OnMouseWheelDown;
	__property OnMouseWheelUp;
	__property OnResize;
	__property OnStartDrag;
	__property AnimationMode = {default=1};
	__property BackgroundBitmap;
	__property BackgroundStyle = {default=0};
	__property BiDiMode = {default=0};
	__property BorderStyle = {default=1};
	__property BottomMargin = {default=5};
	__property Cursor = {default=-4};
	__property Delimiters;
	__property DocParameters;
	__property DoInPaletteMode;
	__property FirstJumpNo = {default=0};
	__property HScrollVisible = {default=1};
	__property LeftMargin = {default=5};
	__property OnSmartPopupClick;
	__property LiveSpellingMode = {default=1};
	__property MaxLength = {default=0};
	__property MaxTextWidth = {default=0};
	__property MinTextWidth = {default=0};
	__property Options = {default=654373};
	__property RightMargin = {default=5};
	__property RTFOptions = {default=14};
	__property RTFReadProperties;
	__property RVFOptions = {default=98435};
	__property RVFParaStylesReadMode = {default=2};
	__property RVFTextStylesReadMode = {default=2};
	__property SmartPopupProperties;
	__property Style;
	__property TopMargin = {default=5};
	__property Tracking = {default=1};
	__property VAlign = {default=0};
	__property VScrollVisible = {default=1};
	__property WheelStep = {default=2};
	__property WordWrap = {default=1};
	__property OnAddStyle;
	__property OnControlAction;
	__property OnCopy;
	__property OnGetItemCursor;
	__property OnImportPicture;
	__property OnItemAction;
	__property OnItemHint;
	__property OnJump;
	__property OnHScrolled;
	__property OnHTMLSaveImage;
	__property OnPaint;
	__property OnProgress;
	__property OnReadHyperlink;
	__property OnRVDblClick;
	__property OnRVFImageListNeeded;
	__property OnRVFControlNeeded;
	__property OnRVFPictureNeeded;
	__property OnRVMouseDown;
	__property OnRVMouseMove;
	__property OnRVMouseUp;
	__property OnRVRightClick;
	__property OnSaveComponentToFile;
	__property OnSaveHTMLExtra;
	__property OnSaveImage2;
	__property OnSaveItemToFile;
	__property OnSaveRTFExtra;
	__property OnSelect;
	__property OnSpellingCheck;
	__property OnVScrolled;
	__property OnWriteHyperlink;
	__property AllowSelection;
	__property SingleClick;
	__property OnURLNeeded;
public:
	/* TWinControl.CreateParented */ inline __fastcall TDBRichViewEdit(HWND ParentWindow) : Rvedit::TCustomRichViewEdit(ParentWindow) { }
	
};


//-- var, const, procedure ---------------------------------------------------
extern PACKAGE void __fastcall Register(void);

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

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