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

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

#ifndef RVScrollHPP
#define RVScrollHPP

#pragma delphiheader begin
#pragma option push -w-
#pragma option push -Vx
#include <RVTypes.hpp>	// Pascal unit
#include <RVStr.hpp>	// Pascal unit
#include <RVXPTheme.hpp>	// Pascal unit
#include <Commctrl.hpp>	// Pascal unit
#include <ActiveX.hpp>	// Pascal unit
#include <ImgList.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 TRVBiDiMode { rvbdUnspecified, rvbdLeftToRight, rvbdRightToLeft };
#pragma option pop

#pragma option push -b-
enum TRVOption { rvoAllowSelection, rvoSingleClick, rvoScrollToEnd, rvoClientTextWidth, rvoShowCheckpoints, 
	rvoShowPageBreaks, rvoShowSpecialCharacters, rvoShowHiddenText, rvoTagsArePChars, rvoAutoCopyText, 
	rvoAutoCopyUnicodeText, rvoAutoCopyRVF, rvoAutoCopyImage, rvoAutoCopyRTF, rvoFormatInvalidate, rvoDblClickSelectsWord, 
	rvoRClickDeselects, rvoDisallowDrag, rvoShowItemHints, rvoFastFormatting };
#pragma option pop

typedef Set<TRVOption, rvoAllowSelection, rvoFastFormatting>  TRVOptions;

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

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

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

#pragma option push -b-
enum TRVZoomMode { rvzmFullPage, rvzmPageWidth, rvzmCustom };
#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, rvsroFromStart, rvsroMultiItem };
#pragma option pop

typedef Set<TRVSearchOption, rvsroMatchCase, rvsroMultiItem>  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

#pragma option push -b-
enum TRVRTFHighlight { rtfhlIgnore, rtfhlFixedColors, rtfhlColorTable };
#pragma option pop

#pragma option push -b-
enum TRVSmartPopupType { rvsptDropDown, rvsptShowDialog, rvsptSimple };
#pragma option pop

#pragma option push -b-
enum TRVSmartPopupPosition { rvsppTopLeft, rvsppTopRight, rvsppBottomRight, rvsppBottomLeft };
#pragma option pop

class DELPHICLASS TRVScrollerInternalIfcObject;
class DELPHICLASS TRVScroller;
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;
	bool FUseXPThemes;
	bool FNoVScroll;
	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);
	MESSAGE void __fastcall WMThemeChanged(Messages::TMessage &Message);
	HIDESBASE MESSAGE void __fastcall WMNCPaint(Messages::TMessage &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);
	Controls::TWinControl* __fastcall GetInplaceEditor(void);
	Classes::TPersistent* __fastcall GetChosenRVData(void);
	virtual void __fastcall CreateThemeHandle(void);
	virtual void __fastcall FreeThemeHandle(void);
	void __fastcall SetUseXPThemes(const bool Value);
	
protected:
	TRVBiDiMode FBiDiMode;
	Classes::TNotifyEvent FOnVScrolled;
	Classes::TNotifyEvent FOnHScrolled;
	Byte FVDisableNoScroll;
	int HPos;
	int VPos;
	int XSize;
	int YSize;
	bool KeyboardScroll;
	Classes::TPersistent* FChosenItem;
	Classes::TPersistent* FChosenRVData;
	unsigned FTheme;
	int FScrollFactor;
	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 SetBiDiModeRV(const TRVBiDiMode Value);
	virtual void __fastcall CreateParams(Controls::TCreateParams &Params);
	virtual void __fastcall CreateWnd(void);
	DYNAMIC void __fastcall AfterCreateWnd1(void);
	DYNAMIC void __fastcall AfterCreateWnd2(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);
	virtual void __fastcall SetEnabled(bool Value);
	void __fastcall ScrollChildren(int dx, int dy);
	virtual void __fastcall AfterVScroll(void);
	virtual void __fastcall AfterHScroll(void);
	virtual void __fastcall BeforeScroll(void);
	virtual void __fastcall DoAfterResize(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);
	DYNAMIC bool __fastcall OleDragEnter(int X, int Y);
	DYNAMIC void __fastcall CallOleDragEnterEvent(const _di_IDataObject DataObj, int KeyState, const Windows::TPoint 
		&pt, int PossibleEffects, int &Effect);
	DYNAMIC void __fastcall OleDragLeave(void);
	DYNAMIC bool __fastcall OleDragOver(int X, int Y);
	DYNAMIC void __fastcall CallOleDragOverEvent(int KeyState, const Windows::TPoint &pt, int PossibleEffects
		, int &Effect);
	DYNAMIC void __fastcall ReleaseOleDropTargetObject(void);
	DYNAMIC int __fastcall OleDrop(const _di_IDataObject DataObj, bool FMove, int KeyState, const Windows::TPoint 
		&pt, int PossibleEffects);
	DYNAMIC bool __fastcall OleCanAcceptFormat(Word Format);
	__property bool Tracking = {read=FTracking, write=FTracking, default=1};
	__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, default=1};
	__property bool HScrollVisible = {read=FHScrollVisible, write=SetHScrollVisible, default=1};
	__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;
	__fastcall virtual TRVScroller(Classes::TComponent* AOwner);
	__fastcall virtual ~TRVScroller(void);
	void __fastcall UpdateScrollBars(int XS, int YS, bool UpdateH, bool UseDNS);
	void __fastcall ScrollToNoRedraw(int y);
	void __fastcall ScrollTo(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);
	bool __fastcall EnabledEx(void);
	void __fastcall SetFocusSilent(void);
	void __fastcall PaintTo_(HDC DC, int X, int Y);
	__property int AreaWidth = {read=XSize, nodefault};
	__property int AreaHeight = {read=YSize, nodefault};
	__property Classes::TPersistent* ChosenRVData = {read=GetChosenRVData};
	__property Classes::TPersistent* ChosenItem = {read=FChosenItem};
	__property TRVBiDiMode BiDiMode = {read=FBiDiMode, write=SetBiDiModeRV, default=0};
	__property bool UseXPThemes = {read=FUseXPThemes, write=SetUseXPThemes, default=1};
	__property Canvas ;
	__property bool NoVScroll = {read=FNoVScroll, write=FNoVScroll, default=0};
public:
	#pragma option push -w-inl
	/* TWinControl.CreateParented */ inline __fastcall TRVScroller(HWND ParentWindow) : Controls::TCustomControl(
		ParentWindow) { }
	#pragma option pop
	
};


class PASCALIMPLEMENTATION TRVScrollerInternalIfcObject : public System::TInterfacedObject 
{
	typedef System::TInterfacedObject inherited;
	
private:
	HRESULT InitRes;
	
protected:
	TRVScroller* FOwner;
	bool __fastcall OwnerDragEnter(int X, int Y);
	void __fastcall CallOwnerDragEnterEvent(const _di_IDataObject DataObj, int KeyState, const Windows::TPoint 
		&pt, int PossibleEffects, int &Effect);
	void __fastcall OwnerDragLeave(void);
	bool __fastcall OwnerDragOver(int X, int Y);
	void __fastcall CallOwnerDragOverEvent(int KeyState, const Windows::TPoint &pt, int PossibleEffects
		, int &Effect);
	virtual void __fastcall OwnerReleaseDropTargetObject(void);
	int __fastcall OwnerDrop(const _di_IDataObject DataObj, bool FMove, int KeyState, const Windows::TPoint 
		&pt, int PossibleEffects);
	bool __fastcall OwnerCanAcceptFormat(Word Format);
	
public:
	__fastcall virtual TRVScrollerInternalIfcObject(TRVScroller* AOwner);
	__fastcall virtual ~TRVScrollerInternalIfcObject(void);
};


//-- var, const, procedure ---------------------------------------------------
#define rvdoALL (System::Set<TRVDisplayOption, rvdoImages, 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 option pop	// -Vx

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