// Borland C++ Builder
// Copyright (c) 1995, 2005 by Borland Software Corporation
// All rights reserved

// (DO NOT EDIT: machine generated header) 'Htmlpopup.pas' rev: 10.00

#ifndef HtmlpopupHPP
#define HtmlpopupHPP

#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 <Classes.hpp>	// Pascal unit
#include <Windows.hpp>	// Pascal unit
#include <Graphics.hpp>	// Pascal unit
#include <Messages.hpp>	// Pascal unit
#include <Controls.hpp>	// Pascal unit
#include <Forms.hpp>	// Pascal unit
#include <Sysutils.hpp>	// Pascal unit
#include <Picturecontainer.hpp>	// Pascal unit

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

namespace Htmlpopup
{
//-- type declarations -------------------------------------------------------
typedef void __fastcall (__closure *TAnchorClickEvent)(System::TObject* Sender, AnsiString Anchor);

#pragma option push -b-
enum TShadeDirection { sdHorizontal, sdVertical };
#pragma option pop

#pragma option push -b-
enum TAutoSizeType { asdHeight, asdWidth, asdBoth };
#pragma option pop

class DELPHICLASS THTMLPopupWindow;
class PASCALIMPLEMENTATION THTMLPopupWindow : public Controls::THintWindow 
{
	typedef Controls::THintWindow inherited;
	
private:
	Picturecontainer::THTMLPictureCache* FImageCache;
	Picturecontainer::TPictureContainer* FContainer;
	int FHoverLink;
	bool FHover;
	#pragma pack(push,1)
	Types::TRect FHoverRect;
	#pragma pack(pop)
	TAnchorClickEvent FOnAnchorClick;
	bool FShadeEnable;
	int FShadeSteps;
	Graphics::TColor FShadeStartColor;
	Graphics::TColor FShadeEndColor;
	Graphics::TColor FColor;
	TShadeDirection FShadeDirection;
	int FBorderSize;
	Controls::TImageList* FImages;
	bool FAutoHide;
	bool FAutoSize;
	TAutoSizeType FAutoSizeType;
	bool FAlwaysOnTop;
	int FMarginY;
	int FMarginX;
	HIDESBASE MESSAGE void __fastcall WMSetFocus(Messages::TWMSetFocus &Msg);
	HIDESBASE MESSAGE void __fastcall WMNCHitTest(Messages::TWMNCHitTest &Message);
	HIDESBASE MESSAGE void __fastcall CMMouseLeave(Messages::TMessage &Message);
	void __fastcall SetHover(const bool Value);
	void __fastcall SetAutoSizeEx(const bool Value);
	void __fastcall SetAlwaysOnTop(const bool Value);
	
protected:
	void __fastcall PaintShading(Graphics::TColor FromColor, Graphics::TColor ToColor, int Steps, bool Direction);
	virtual void __fastcall Paint(void);
	virtual void __fastcall CreateParams(Controls::TCreateParams &Params);
	
public:
	__fastcall virtual THTMLPopupWindow(Classes::TComponent* AOwner);
	__fastcall virtual ~THTMLPopupWindow(void);
	
__published:
	__property bool AlwaysOnTop = {read=FAlwaysOnTop, write=SetAlwaysOnTop, nodefault};
	__property bool AutoHide = {read=FAutoHide, write=FAutoHide, nodefault};
	__property bool AutoSize = {read=FAutoSize, write=SetAutoSizeEx, nodefault};
	__property TAutoSizeType AutoSizeType = {read=FAutoSizeType, write=FAutoSizeType, nodefault};
	__property int BorderSize = {read=FBorderSize, write=FBorderSize, nodefault};
	__property Graphics::TColor Color = {read=FColor, write=FColor, nodefault};
	__property Controls::TImageList* Images = {read=FImages, write=FImages};
	__property int MarginX = {read=FMarginX, write=FMarginX, nodefault};
	__property int MarginY = {read=FMarginY, write=FMarginY, nodefault};
	__property bool ShadeEnable = {read=FShadeEnable, write=FShadeEnable, nodefault};
	__property Graphics::TColor ShadeStartColor = {read=FShadeStartColor, write=FShadeStartColor, nodefault};
	__property Graphics::TColor ShadeEndColor = {read=FShadeEndColor, write=FShadeEndColor, nodefault};
	__property int ShadeSteps = {read=FShadeSteps, write=FShadeSteps, nodefault};
	__property TShadeDirection ShadeDirection = {read=FShadeDirection, write=FShadeDirection, nodefault};
	__property bool Hover = {read=FHover, write=SetHover, nodefault};
	__property Picturecontainer::TPictureContainer* PictureContainer = {read=FContainer, write=FContainer};
	__property TAnchorClickEvent OnAnchorClick = {read=FOnAnchorClick, write=FOnAnchorClick};
public:
	#pragma option push -w-inl
	/* TWinControl.CreateParented */ inline __fastcall THTMLPopupWindow(HWND ParentWindow) : Controls::THintWindow(ParentWindow) { }
	#pragma option pop
	
};


class DELPHICLASS THTMLPopup;
class PASCALIMPLEMENTATION THTMLPopup : public Classes::TComponent 
{
	typedef Classes::TComponent inherited;
	
private:
	Controls::TWinControl* FOwner;
	THTMLPopupWindow* FHTMLPopupWindow;
	int FHeight;
	int FWidth;
	Picturecontainer::TPictureContainer* FContainer;
	Classes::TStringList* FText;
	int FLeft;
	int FTop;
	bool FHover;
	TAnchorClickEvent FOnAnchorClick;
	bool FShadeEnable;
	int FShadeSteps;
	Graphics::TColor FShadeStartColor;
	Graphics::TColor FShadeEndColor;
	Graphics::TColor FColor;
	Graphics::TFont* FFont;
	TShadeDirection FShadeDirection;
	int FBorderSize;
	Controls::TImageList* FImages;
	bool FAutoHide;
	bool FAutoSize;
	TAutoSizeType FAutoSizeType;
	bool FAlwaysOnTop;
	int FMarginY;
	int FMarginX;
	int FRollUpSpace;
	void __fastcall SetText(const Classes::TStringList* Value);
	void __fastcall SetImages(const Controls::TImageList* Value);
	void __fastcall SetFont(const Graphics::TFont* Value);
	AnsiString __fastcall GetVersion();
	void __fastcall SetVersion(const AnsiString Value);
	int __fastcall GetVersionNr(void);
	
protected:
	void __fastcall WindowAnchorClick(System::TObject* Sender, AnsiString Anchor);
	virtual void __fastcall Notification(Classes::TComponent* AComponent, Classes::TOperation AOperation);
	void __fastcall CreatePopup(void);
	void __fastcall TextChanged(System::TObject* Sender);
	
public:
	__fastcall virtual THTMLPopup(Classes::TComponent* AOwner);
	__fastcall virtual ~THTMLPopup(void);
	void __fastcall Show(void);
	void __fastcall RollUp(void);
	void __fastcall RollDown(void);
	void __fastcall Hide(void);
	__property THTMLPopupWindow* PopupWindow = {read=FHTMLPopupWindow};
	
__published:
	__property bool AlwaysOnTop = {read=FAlwaysOnTop, write=FAlwaysOnTop, nodefault};
	__property bool AutoHide = {read=FAutoHide, write=FAutoHide, nodefault};
	__property bool AutoSize = {read=FAutoSize, write=FAutoSize, nodefault};
	__property TAutoSizeType AutoSizeType = {read=FAutoSizeType, write=FAutoSizeType, nodefault};
	__property int BorderSize = {read=FBorderSize, write=FBorderSize, nodefault};
	__property Graphics::TColor Color = {read=FColor, write=FColor, nodefault};
	__property Graphics::TFont* Font = {read=FFont, write=SetFont};
	__property bool Hover = {read=FHover, write=FHover, nodefault};
	__property Controls::TImageList* Images = {read=FImages, write=SetImages};
	__property int MarginX = {read=FMarginX, write=FMarginX, nodefault};
	__property int MarginY = {read=FMarginY, write=FMarginY, nodefault};
	__property int PopupLeft = {read=FLeft, write=FLeft, nodefault};
	__property int PopupTop = {read=FTop, write=FTop, nodefault};
	__property int RollUpSpace = {read=FRollUpSpace, write=FRollUpSpace, nodefault};
	__property bool ShadeEnable = {read=FShadeEnable, write=FShadeEnable, nodefault};
	__property Graphics::TColor ShadeStartColor = {read=FShadeStartColor, write=FShadeStartColor, nodefault};
	__property Graphics::TColor ShadeEndColor = {read=FShadeEndColor, write=FShadeEndColor, nodefault};
	__property int ShadeSteps = {read=FShadeSteps, write=FShadeSteps, nodefault};
	__property TShadeDirection ShadeDirection = {read=FShadeDirection, write=FShadeDirection, nodefault};
	__property Classes::TStringList* Text = {read=FText, write=SetText};
	__property Picturecontainer::TPictureContainer* PictureContainer = {read=FContainer, write=FContainer};
	__property int PopupWidth = {read=FWidth, write=FWidth, nodefault};
	__property int PopupHeight = {read=FHeight, write=FHeight, nodefault};
	__property TAnchorClickEvent OnAnchorClick = {read=FOnAnchorClick, write=FOnAnchorClick};
	__property AnsiString Version = {read=GetVersion, write=SetVersion};
};


//-- var, const, procedure ---------------------------------------------------
static const Shortint MAJ_VER = 0x1;
static const Shortint MIN_VER = 0x2;
static const Shortint REL_VER = 0x0;
static const Shortint BLD_VER = 0x0;

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

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