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

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

#ifndef RVScrollHPP
#define RVScrollHPP

#pragma delphiheader begin
#pragma option push -w-
#include <RVStyle.hpp>	// Pascal unit
#include <Commctrl.hpp>	// Pascal unit
#include <Forms.hpp>	// Pascal unit
#include <Graphics.hpp>	// Pascal unit
#include <Controls.hpp>	// Pascal unit
#include <Classes.hpp>	// Pascal unit
#include <SysUtils.hpp>	// Pascal unit
#include <Messages.hpp>	// Pascal unit
#include <Windows.hpp>	// Pascal unit
#include <SysInit.hpp>	// Pascal unit
#include <System.hpp>	// Pascal unit

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

namespace Rvscroll
{
//-- type declarations -------------------------------------------------------
#pragma option push -b-
enum TRVOption { rvoAllowSelection, rvoSingleClick, rvoScrollToEnd, rvoClientTextWidth, rvoShowCheckpoints, 
	rvoShowPageBreaks, rvoTagsArePChars, rvoAutoCopyText, rvoAutoCopyUnicodeText, rvoAutoCopyRVF, rvoAutoCopyImage, 
	rvoAutoCopyRTF, rvoFormatInvalidate, rvoDblClickSelectsWord, rvoRClickDeselects };
#pragma option pop

typedef Set<TRVOption, rvoAllowSelection, rvoRClickDeselects>  TRVOptions;

#pragma option push -b-
enum TRVTabNavigationType { rvtnNone, rvtnTab, rvtnCtrlTab };
#pragma option pop

#pragma option push -b-
enum TRVPaletteAction { rvpaDoNothing, rvpaAssignPallette, rvpaCreateCopies, rvpaCreateCopiesEx };
#pragma option pop

#pragma option push -b-
enum TRVSaveFormat { rvsfText, rvsfHTML, rvsfRTF, rvsfRVF };
#pragma option pop

#pragma option push -b-
enum TRVLoadFormat { rvlfText, rvlfHTML, rvlfRTF, rvlfRVF };
#pragma option pop

#pragma option push -b-
enum TBackgroundStyle { bsNoBitmap, bsStretched, bsTiled, bsTiledAndScrolled, bsCentered };
#pragma option pop

#pragma option push -b-
enum TRVDisplayOption { rvdoImages, rvdoComponents, rvdoBullets };
#pragma option pop

typedef Set<TRVDisplayOption, rvdoImages, rvdoBullets>  TRVDisplayOptions;

#pragma option push -b-
enum TRVSearchOption { rvsroMatchCase, rvsroDown, rvsroWholeWord };
#pragma option pop

typedef Set<TRVSearchOption, rvsroMatchCase, rvsroWholeWord>  TRVSearchOptions;

#pragma option push -b-
enum TCPEventKind { cpeNone, cpeAsSectionStart, cpeWhenVisible };
#pragma option pop

#pragma option push -b-
enum TRVScrollBarStyle { rvssRegular, rvssFlat, rvssHotTrack };
#pragma option pop

class DELPHICLASS TRVScroller;
#pragma pack(push, 4)
class PASCALIMPLEMENTATION TRVScroller : public Controls::TCustomControl 
{
	typedef Controls::TCustomControl inherited;
	
private:
	Forms::TFormBorderStyle FBorderStyle;
	int FSmallStep;
	bool FTracking;
	bool FFullRedraw;
	bool FVScrollVisible;
	bool FHScrollVisible;
	bool FUpdatingScrollBars;
	int FVScrollMax;
	int FVScrollPage;
	int FHScrollMax;
	int FHScrollPage;
	TRVPaletteAction FDoInPaletteMode;
	Rvstyle::TRVBiDiMode FBiDiMode;
	HIDESBASE MESSAGE void __fastcall WMSetFocus(Messages::TWMSetFocus &Message);
	HIDESBASE MESSAGE void __fastcall WMHScroll(Messages::TWMScroll &Message);
	HIDESBASE MESSAGE void __fastcall WMVScroll(Messages::TWMScroll &Message);
	MESSAGE void __fastcall WMGetDlgCode(Messages::TWMNoParams &Message);
	HIDESBASE MESSAGE void __fastcall CMCtl3DChanged(Messages::TMessage &Message);
	HIDESBASE MESSAGE void __fastcall WMQueryNewPalette(Messages::TWMNoParams &Message);
	HIDESBASE MESSAGE void __fastcall WMPaletteChanged(Messages::TWMPaletteChanged &Message);
	int __fastcall GetVScrollMax(void);
	int __fastcall GetHScrollMax(void);
	void __fastcall SetVScrollVisible(bool vis);
	void __fastcall SetHScrollVisible(bool vis);
	void __fastcall SetBorderStyle(const Forms::TBorderStyle Value);
	void __fastcall SetDoInPaletteMode(TRVPaletteAction Value);
	void __fastcall SetVScrollPos(int Value);
	void __fastcall SetBiDiModeRV(const Rvstyle::TRVBiDiMode Value);
	Controls::TWinControl* __fastcall GetInplaceEditor(void);
	Classes::TPersistent* __fastcall GetChosenRVData(void);
	
protected:
	Classes::TNotifyEvent FOnVScrolled;
	Classes::TNotifyEvent FOnHScrolled;
	Byte FVDisableNoScroll;
	int HPos;
	int VPos;
	int XSize;
	int YSize;
	bool KeyboardScroll;
	Classes::TPersistent* FChosenItem;
	Classes::TPersistent* FChosenRVData;
	int FWheelStep;
	DYNAMIC bool __fastcall DoMouseWheelDown(Classes::TShiftState Shift, const Windows::TPoint &MousePos
		);
	DYNAMIC bool __fastcall DoMouseWheelUp(Classes::TShiftState Shift, const Windows::TPoint &MousePos)
		;
	virtual void __fastcall CreateParams(Controls::TCreateParams &Params);
	virtual void __fastcall CreateWnd(void);
	virtual void __fastcall DestroyWnd(void);
	DYNAMIC HPALETTE __fastcall GetPalette(void);
	DYNAMIC void __fastcall MouseDown(Controls::TMouseButton Button, Classes::TShiftState Shift, int X, 
		int Y);
	DYNAMIC void __fastcall KeyDown(Word &Key, Classes::TShiftState Shift);
	virtual void __fastcall SetVPos(int p, bool Redraw);
	virtual void __fastcall SetHPos(int p);
	void __fastcall ScrollChildren(int dx, int dy);
	virtual void __fastcall AfterVScroll(void);
	virtual void __fastcall AfterHScroll(void);
	DYNAMIC int __fastcall GetDefSmallStep(void);
	Windows::PLogPalette __fastcall AllocLogPalette(int ColorCount);
	void __fastcall FreeLogPalette(Windows::PLogPalette &lpLogPal);
	DYNAMIC Windows::PLogPalette __fastcall GenerateLogPalette(void);
	DYNAMIC void __fastcall UpdatePaletteInfo(void);
	virtual void __fastcall SetVSmallStep(int Value);
	__property bool Tracking = {read=FTracking, write=FTracking, nodefault};
	__property Classes::TNotifyEvent OnVScrolled = {read=FOnVScrolled, write=FOnVScrolled};
	__property Classes::TNotifyEvent OnHScrolled = {read=FOnHScrolled, write=FOnHScrolled};
	__property TRVPaletteAction DoInPaletteMode = {read=FDoInPaletteMode, write=SetDoInPaletteMode, nodefault
		};
	__property int VSmallStep = {read=FSmallStep, write=SetVSmallStep, nodefault};
	__property Controls::TWinControl* InplaceEditor = {read=GetInplaceEditor};
	__property Forms::TBorderStyle BorderStyle = {read=FBorderStyle, write=SetBorderStyle, nodefault};
	__property int WheelStep = {read=FWheelStep, write=FWheelStep, default=2};
	__property bool FullRedraw = {read=FFullRedraw, write=FFullRedraw, nodefault};
	__property bool VScrollVisible = {read=FVScrollVisible, write=SetVScrollVisible, nodefault};
	__property bool HScrollVisible = {read=FHScrollVisible, write=SetHScrollVisible, nodefault};
	__property int VScrollPos = {read=VPos, write=SetVScrollPos, nodefault};
	__property int HScrollPos = {read=HPos, write=SetHPos, nodefault};
	__property int VScrollMax = {read=GetVScrollMax, nodefault};
	__property int HScrollMax = {read=GetHScrollMax, nodefault};
	
public:
	HPALETTE RVPalette;
	tagLOGPALETTE *PRVLogPalette;
	void __fastcall SetFocusSilent(void);
	void __fastcall UpdateScrollBars(int XS, int YS, bool UpdateH, bool UseDNS);
	__property int AreaWidth = {read=XSize, nodefault};
	__property Classes::TPersistent* ChosenRVData = {read=GetChosenRVData};
	__property Classes::TPersistent* ChosenItem = {read=FChosenItem};
	void __fastcall ScrollToNoRedraw(int y);
	void __fastcall AssignChosenRVData(Classes::TPersistent* RVData, Classes::TPersistent* Item);
	void __fastcall SilentReplaceChosenRVData(Classes::TPersistent* RVData);
	void __fastcall UnassignChosenRVData(Classes::TPersistent* RVData);
	void __fastcall DestroyInplace(void);
	bool __fastcall FocusedEx(void);
	__fastcall virtual TRVScroller(Classes::TComponent* AOwner);
	__fastcall virtual ~TRVScroller(void);
	void __fastcall ScrollTo(int y);
	__property Rvstyle::TRVBiDiMode BiDiMode = {read=FBiDiMode, write=SetBiDiModeRV, default=0};
public:
		
	#pragma option push -w-inl
	/* TWinControl.CreateParented */ inline __fastcall TRVScroller(HWND ParentWindow) : Controls::TCustomControl(
		ParentWindow) { }
	#pragma option pop
	
};

#pragma pack(pop)

//-- var, const, procedure ---------------------------------------------------
#define rvdoALL (System::Set<TRVDisplayOption, rvdoImages, rvdoBullets> () << rvdoImages << rvdoComponents \
	<< rvdoBullets )
extern PACKAGE int __fastcall RV_GetYByTag(Controls::TControl* AControl);
extern PACKAGE void __fastcall RV_Tag2Y(Controls::TControl* AControl);

}	/* namespace Rvscroll */
#if !defined(NO_IMPLICIT_NAMESPACE_USE)
using namespace Rvscroll;
#endif
#pragma option pop	// -w-

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