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

// (DO NOT EDIT: machine generated header) 'IEGradientBar.pas' rev: 3.00

#ifndef IEGradientBarHPP
#define IEGradientBarHPP
#include <Menus.hpp>
#include <iedefs.hpp>
#include <ImageEnProc.hpp>
#include <Dialogs.hpp>
#include <Forms.hpp>
#include <Controls.hpp>
#include <Graphics.hpp>
#include <Classes.hpp>
#include <SysUtils.hpp>
#include <Messages.hpp>
#include <Windows.hpp>
#include <SysInit.hpp>
#include <System.hpp>

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

namespace Iegradientbar
{
//-- type declarations -------------------------------------------------------
enum TIEGradientDir { gdHorizontal, gdVertical };

enum TIEMouseInteractItemsGr { migDragGrip };

typedef Set<TIEMouseInteractItemsGr, migDragGrip, migDragGrip>  TIEMouseInteractGr;

class DELPHICLASS TIEGradientBar;
class PASCALIMPLEMENTATION TIEGradientBar : public Controls::TCustomControl 
{
	typedef Controls::TCustomControl inherited;
	
private:
	int fColorIndex;
	Graphics::TColor fBeginColor;
	Graphics::TColor fEndColor;
	Graphics::TColor fGradient[256];
	TIEGradientDir fDirection;
	Classes::TNotifyEvent fOnChange;
	TIEMouseInteractGr fMouseInteract;
	void __fastcall SetColorIndex(int v);
	void __fastcall SetBeginColor(Graphics::TColor v);
	void __fastcall SetEndColor(Graphics::TColor v);
	Graphics::TColor __fastcall GetColor(void);
	Iedefs::TRGB __fastcall GetRGB(void);
	void __fastcall SetDirection(TIEGradientDir v);
	void __fastcall SetMouseInteractGr(TIEMouseInteractGr v);
	TIEMouseInteractGr __fastcall GetMouseInteractGr(void);
	
protected:
	HIDESBASE MESSAGE void __fastcall WMSize(Messages::TWMSize &Message);
	HIDESBASE MESSAGE void __fastcall WMEraseBkgnd(Messages::TMessage &Message);
	DYNAMIC void __fastcall MouseMove(Classes::TShiftState Shift, int X, int Y);
	DYNAMIC void __fastcall MouseDown(Controls::TMouseButton Button, Classes::TShiftState Shift, int X, 
		int Y);
	DYNAMIC void __fastcall MouseUp(Controls::TMouseButton Button, Classes::TShiftState Shift, int X, int 
		Y);
	void __fastcall CalcGradient(void);
	void __fastcall DrawGrip(void);
	
public:
	virtual void __fastcall Paint(void);
	__fastcall virtual TIEGradientBar(Classes::TComponent* Owner);
	__fastcall virtual ~TIEGradientBar(void);
	__property int ColorIndex = {read=fColorIndex, write=SetColorIndex, nodefault};
	__property Graphics::TColor Color = {read=GetColor, nodefault};
	__property Iedefs::TRGB RGB = {read=GetRGB};
	
__published:
	__property Graphics::TColor BeginColor = {read=fBeginColor, write=SetBeginColor, default=0};
	__property Graphics::TColor EndColor = {read=fEndColor, write=SetEndColor, default=16777215};
	__property TIEGradientDir Direction = {read=fDirection, write=SetDirection, default=1};
	__property Classes::TNotifyEvent OnChange = {read=fOnChange, write=fOnChange};
	__property TIEMouseInteractGr MouseInteract = {read=GetMouseInteractGr, write=SetMouseInteractGr, default=1
		};
	__property Width ;
	__property Height ;
	__property Align ;
	__property DragCursor ;
	__property DragMode ;
	__property Enabled ;
	__property ParentShowHint ;
	__property PopupMenu ;
	__property ShowHint ;
	__property Visible ;
	__property OnClick ;
	__property OnDblClick ;
	__property OnDragDrop ;
	__property OnDragOver ;
	__property OnEndDrag ;
	__property OnMouseDown ;
	__property OnMouseMove ;
	__property OnMouseUp ;
	__property OnStartDrag ;
public:
	/* TWinControl.CreateParented */ __fastcall TIEGradientBar(HWND ParentWindow) : Controls::TCustomControl(
		ParentWindow) { }
	
};

//-- var, const, procedure ---------------------------------------------------

}	/* namespace Iegradientbar */
#if !defined(NO_IMPLICIT_NAMESPACE_USE)
using namespace Iegradientbar;
#endif
//-- end unit ----------------------------------------------------------------
#endif	// IEGradientBar
