// CodeGear C++Builder
// Copyright (c) 1995, 2009 by Embarcadero Technologies, Inc.
// All rights reserved

// (DO NOT EDIT: machine generated header) 'Any_hint.pas' rev: 21.00

#ifndef Any_hintHPP
#define Any_hintHPP

#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 <Graphics.hpp>	// Pascal unit
#include <Classes.hpp>	// Pascal unit
#include <Controls.hpp>	// Pascal unit
#include <Forms.hpp>	// Pascal unit
#include <Dialogs.hpp>	// Pascal unit
#include <Stdctrls.hpp>	// Pascal unit
#include <Extctrls.hpp>	// Pascal unit
#include <Types.hpp>	// Pascal unit

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

namespace Any_hint
{
//-- type declarations -------------------------------------------------------
#pragma option push -b-
enum THintDirection { hdUpLeft, hdUpRight, hdDownLeft, hdDownRight };
#pragma option pop

#pragma option push -b-
enum TVAlignMent { vtaTopJustify, vtaBottomJustify, vtaCenter };
#pragma option pop

#pragma option push -b-
enum THintStyle { hsNormal, hsCariHint, hsAuto };
#pragma option pop

class DELPHICLASS TAnyHint;
typedef void __fastcall (__closure *TBeforeHintEvent)(TAnyHint* AnyHint, const Types::TRect &Rect, System::WideString Text);

typedef void __fastcall (__closure *TOwnerDraw)(TAnyHint* AnyHint, Graphics::TCanvas* Canvas, const Types::TRect &Rect, System::WideString Text);

typedef void __fastcall (__closure *TMeasureRect)(TAnyHint* AnyHint, Types::TRect &Rect, System::WideString Text);

class PASCALIMPLEMENTATION TAnyHint : public Classes::TComponent
{
	typedef Classes::TComponent inherited;
	
private:
	Graphics::TColor FBackColor;
	Graphics::TColor FBorderColor;
	Graphics::TFont* FFont;
	TOwnerDraw FOwnerDraw;
	TMeasureRect FMeasureRect;
	THintDirection FDirection;
	Classes::TAlignment FAlignment;
	Graphics::TBitmap* FGraphic;
	TBeforeHintEvent FBeforeHint;
	System::WideString FTitle;
	THintStyle FHintStyle;
	MESSAGE void __fastcall CMFontChanged(Messages::TMessage &Message);
	void __fastcall SetFont(const Graphics::TFont* Value);
	void __fastcall SetGraphic(const Graphics::TBitmap* Value);
	void __fastcall GraphicChange(System::TObject* Sender);
	
public:
	__fastcall virtual TAnyHint(Classes::TComponent* AOwner);
	__fastcall virtual ~TAnyHint(void);
	virtual void __fastcall Loaded(void);
	void __fastcall UpdateFont(void);
	
__published:
	__property Graphics::TFont* Font = {read=FFont, write=SetFont};
	__property Graphics::TColor BackColor = {read=FBackColor, write=FBackColor, default=15769725};
	__property Graphics::TColor BorderColor = {read=FBorderColor, write=FBorderColor, default=16777215};
	__property THintDirection Direction = {read=FDirection, write=FDirection, default=3};
	__property Classes::TAlignment Alignment = {read=FAlignment, write=FAlignment, default=0};
	__property System::WideString Title = {read=FTitle, write=FTitle};
	__property Graphics::TBitmap* Graphic = {read=FGraphic, write=SetGraphic};
	__property TOwnerDraw OnOwnerDraw = {read=FOwnerDraw, write=FOwnerDraw};
	__property TMeasureRect OnMeasureRect = {read=FMeasureRect, write=FMeasureRect};
	__property TBeforeHintEvent OnBeforeHint = {read=FBeforeHint, write=FBeforeHint};
	__property THintStyle HintStyle = {read=FHintStyle, write=FHintStyle, nodefault};
};


class DELPHICLASS TCariHint;
class PASCALIMPLEMENTATION TCariHint : public Controls::THintWindow
{
	typedef Controls::THintWindow inherited;
	
private:
	Graphics::TBitmap* TempBmp;
	unsigned FLastActive;
	TAnyHint* FAnyHint;
	THintDirection FDirection;
	bool FModified;
	Graphics::TBitmap* FGraphic;
	bool FUpdating;
	Classes::TAlignment FAlignment;
	THintStyle FHintStyle;
	Classes::TNotifyEvent FOnCancelHint;
	System::WideString FCaption;
	void __fastcall GraphicChange(System::TObject* Sender);
	TAnyHint* __fastcall FindAnyHint(void);
	Types::TRect __fastcall GetTextRect(Graphics::TCanvas* ACanvas, System::WideString Text, const Types::TRect &R, Classes::TAlignment HAlign, TVAlignMent VAlign);
	void __fastcall DrawHintText(Graphics::TCanvas* Canvas, const Types::TRect &R, System::WideString AText, bool IsCariHint);
	THintDirection __fastcall GetHintDirection(const Types::TRect &WorkRect, int AWidth, int AHeight, const Types::TPoint &Pos, bool IsCariHint);
	void __fastcall SetDirection(const THintDirection Value);
	void __fastcall SetGraphic(const Graphics::TBitmap* Value);
	void __fastcall StopTimer(void);
	MESSAGE void __fastcall HintNotify(Messages::TMessage &message);
	
protected:
	virtual void __fastcall Paint(void);
	virtual void __fastcall CreateParams(Controls::TCreateParams &Params);
	
public:
	__fastcall virtual TCariHint(Classes::TComponent* AOwner);
	__fastcall virtual ~TCariHint(void);
	virtual void __fastcall ActivateHint(const Types::TRect &Rect, const System::UnicodeString AHint);
	void __fastcall ActivateHintPos(const System::WideString AHint, const Types::TPoint &HintPos, int HidePause = 0x0);
	void __fastcall CancelHint(void);
	__property THintDirection Direction = {read=FDirection, write=SetDirection, nodefault};
	__property Graphics::TBitmap* Graphic = {read=FGraphic, write=SetGraphic};
	__property Classes::TAlignment Alignment = {read=FAlignment, write=FAlignment, nodefault};
	__property THintStyle HintStyle = {read=FHintStyle, write=FHintStyle, nodefault};
	__property System::WideString Caption = {read=FCaption, write=FCaption};
	__property Classes::TNotifyEvent OnCancelHint = {read=FOnCancelHint, write=FOnCancelHint};
public:
	/* TWinControl.CreateParented */ inline __fastcall TCariHint(HWND ParentWindow) : Controls::THintWindow(ParentWindow) { }
	
};


//-- var, const, procedure ---------------------------------------------------
static const Word CM_HINTNOTIFY = 0x465;

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

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