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

// (DO NOT EDIT: machine generated header) 'ahmtcolorpopup.pas' rev: 6.00

#ifndef ahmtcolorpopupHPP
#define ahmtcolorpopupHPP

#pragma delphiheader begin
#pragma option push -w-
#pragma option push -Vx
#include <Dialogs.hpp>	// Pascal unit
#include <ahmdialogclass.hpp>	// Pascal unit
#include <Graphics.hpp>	// Pascal unit
#include <Forms.hpp>	// Pascal unit
#include <Buttons.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 Ahmtcolorpopup
{
//-- type declarations -------------------------------------------------------
typedef void __fastcall (__closure *TAHMOnPaintButton)(System::TObject* Sender, const Types::TRect &Rect);

class DELPHICLASS TAHMDrawButton;
class PASCALIMPLEMENTATION TAHMDrawButton : public Controls::TGraphicControl 
{
	typedef Controls::TGraphicControl inherited;
	
private:
	int FGroupIndex;
	bool FDown;
	bool FDragging;
	bool FAllowAllUp;
	bool FMouseInControl;
	TAHMOnPaintButton FOnPaint;
	int FValue;
	AnsiString FCaption;
	void __fastcall UpdateExclusive(void);
	void __fastcall SetDown(bool Value);
	void __fastcall SetAllowAllUp(bool Value);
	void __fastcall SetGroupIndex(int Value);
	void __fastcall UpdateTracking(void);
	HIDESBASE MESSAGE void __fastcall WMLButtonDblClk(Messages::TWMMouse &Message);
	HIDESBASE MESSAGE void __fastcall CMEnabledChanged(Messages::TMessage &Message);
	MESSAGE void __fastcall CMButtonPressed(Messages::TMessage &Message);
	MESSAGE void __fastcall CMDialogChar(Messages::TWMKey &Message);
	HIDESBASE MESSAGE void __fastcall CMFontChanged(Messages::TMessage &Message);
	MESSAGE void __fastcall CMTextChanged(Messages::TMessage &Message);
	MESSAGE void __fastcall CMSysColorChange(Messages::TMessage &Message);
	HIDESBASE MESSAGE void __fastcall CMMouseEnter(Messages::TMessage &Message);
	HIDESBASE MESSAGE void __fastcall CMMouseLeave(Messages::TMessage &Message);
	HIDESBASE MESSAGE void __fastcall WMPAINT(Messages::TMessage &Message);
	void __fastcall SetValue(const int Value);
	
protected:
	Buttons::TButtonState FState;
	DYNAMIC void __fastcall MouseDown(Controls::TMouseButton Button, Classes::TShiftState Shift, int X, int Y);
	DYNAMIC void __fastcall MouseMove(Classes::TShiftState Shift, int X, int Y);
	DYNAMIC void __fastcall MouseUp(Controls::TMouseButton Button, Classes::TShiftState Shift, int X, int Y);
	virtual void __fastcall Paint(void);
	__property bool MouseInControl = {read=FMouseInControl, nodefault};
	__property AnsiString Caption = {read=FCaption, write=FCaption};
	
public:
	__fastcall virtual TAHMDrawButton(Classes::TComponent* AOwner);
	__fastcall virtual ~TAHMDrawButton(void);
	DYNAMIC void __fastcall Click(void);
	__property Canvas ;
	
__published:
	__property bool AllowAllUp = {read=FAllowAllUp, write=SetAllowAllUp, default=0};
	__property Enabled  = {default=1};
	__property int Value = {read=FValue, write=SetValue, nodefault};
	__property int GroupIndex = {read=FGroupIndex, write=SetGroupIndex, default=0};
	__property bool Down = {read=FDown, write=SetDown, default=0};
	__property Hint ;
	__property ShowHint ;
	__property OnClick ;
	__property TAHMOnPaintButton OnPaint = {read=FOnPaint, write=FOnPaint};
};


typedef void __fastcall (__closure *TAHMOnColorApply)(System::TObject* Sender, Graphics::TColor OldColor, Graphics::TColor NewColor);

#pragma option push -b-
enum TAHMColorTypes { BasicColors, AdvancedColors };
#pragma option pop

#pragma option push -b-
enum TAHMColorEdges { ceNormal, ceSoftRaised, ceFlatEtched, ceMonoEtched, ceSoftSunken, ceNormSunken, ceERaised, ceESoftRaised, ceSoftBump };
#pragma option pop

class DELPHICLASS TAHMColorRGB;
class PASCALIMPLEMENTATION TAHMColorRGB : public Classes::TPersistent 
{
	typedef Classes::TPersistent inherited;
	
private:
	Classes::TComponent* FOwner;
	Byte __fastcall GetBvalue(void);
	Byte __fastcall GetGvalue(void);
	Byte __fastcall GetRvalue(void);
	void __fastcall SetBValue(const Byte Value);
	void __fastcall SetGValue(const Byte Value);
	void __fastcall SetRValue(const Byte Value);
	
public:
	__fastcall virtual TAHMColorRGB(Classes::TComponent* AOwner);
	
__published:
	__property Byte RValue = {read=GetRvalue, write=SetRValue, stored=false, nodefault};
	__property Byte GValue = {read=GetGvalue, write=SetGValue, stored=false, nodefault};
	__property Byte BValue = {read=GetBvalue, write=SetBValue, stored=false, nodefault};
public:
	#pragma option push -w-inl
	/* TPersistent.Destroy */ inline __fastcall virtual ~TAHMColorRGB(void) { }
	#pragma option pop
	
};


class DELPHICLASS TAHMColorOptions;
class PASCALIMPLEMENTATION TAHMColorOptions : public Graphics::TGraphicsObject 
{
	typedef Graphics::TGraphicsObject inherited;
	
private:
	TAHMColorTypes FSelection;
	bool FSystemColors;
	bool FAdvanced;
	TAHMColorEdges FEdges;
	Classes::TComponent* FOwner;
	void __fastcall SetSelection(const TAHMColorTypes Value);
	void __fastcall SetSystemColors(const bool Value);
	void __fastcall SetAdvanced(const bool Value);
	void __fastcall SetEdges(const TAHMColorEdges Value);
	
public:
	__fastcall virtual TAHMColorOptions(Classes::TComponent* AOwner);
	
__published:
	__property TAHMColorTypes Selection = {read=FSelection, write=SetSelection, default=1};
	__property bool SystemColors = {read=FSystemColors, write=SetSystemColors, default=0};
	__property bool Advanced = {read=FAdvanced, write=SetAdvanced, default=1};
	__property TAHMColorEdges Edges = {read=FEdges, write=SetEdges, default=0};
public:
	#pragma option push -w-inl
	/* TPersistent.Destroy */ inline __fastcall virtual ~TAHMColorOptions(void) { }
	#pragma option pop
	
};


class DELPHICLASS TAHMClrButton;
class PASCALIMPLEMENTATION TAHMClrButton : public Graphics::TGraphicsObject 
{
	typedef Graphics::TGraphicsObject inherited;
	
private:
	bool FVisible;
	AnsiString FCaption;
	#pragma pack(push, 1)
	Types::TPoint FOffset;
	#pragma pack(pop)
	
	void __fastcall SetCaption(const AnsiString Value);
	void __fastcall SetVisible(const bool Value);
	
protected:
	__property Types::TPoint Offset = {read=FOffset};
	
public:
	__fastcall virtual TAHMClrButton(void);
	
__published:
	__property bool Visible = {read=FVisible, write=SetVisible, nodefault};
	__property AnsiString Caption = {read=FCaption, write=SetCaption};
public:
	#pragma option push -w-inl
	/* TPersistent.Destroy */ inline __fastcall virtual ~TAHMClrButton(void) { }
	#pragma option pop
	
};


class DELPHICLASS TAHMClrDetailBtn;
class PASCALIMPLEMENTATION TAHMClrDetailBtn : public TAHMClrButton 
{
	typedef TAHMClrButton inherited;
	
private:
	Graphics::TColor FColor;
	void __fastcall SetColor(const Graphics::TColor Value);
	
public:
	__fastcall virtual TAHMClrDetailBtn(void);
	
__published:
	__property Graphics::TColor Color = {read=FColor, write=SetColor, default=0};
public:
	#pragma option push -w-inl
	/* TPersistent.Destroy */ inline __fastcall virtual ~TAHMClrDetailBtn(void) { }
	#pragma option pop
	
};


class DELPHICLASS TAHMColorPopup;
class PASCALIMPLEMENTATION TAHMColorPopup : public Ahmdialogclass::TAHMDialogComponent 
{
	typedef Ahmdialogclass::TAHMDialogComponent inherited;
	
private:
	bool IsPopup;
	Forms::TCustomForm* AHMColorForm;
	TAHMColorOptions* FOptions;
	TAHMClrButton* FApplyBtn;
	TAHMClrButton* FMoreBtn;
	Graphics::TColor FCurrent;
	Graphics::TColor FSelected;
	bool FAutoClose;
	TAHMOnColorApply FOnApply;
	TAHMOnColorApply FOnCustomBtn2;
	TAHMOnColorApply FOnCustomBtn1;
	TAHMOnColorApply FOnColorChange;
	TAHMColorRGB* FCurrentAsRGB;
	AnsiString FCaption;
	TAHMClrDetailBtn* FCustomBtn1;
	TAHMClrDetailBtn* FCustomBtn2;
	TAHMOnColorApply FOnSelectionChange;
	void __fastcall DetailChange(System::TObject* Sender);
	void __fastcall SetCurrent(const Graphics::TColor Value);
	void __fastcall SetAutoClose(const bool Value);
	AnsiString __fastcall GetCurrentAsHtml();
	void __fastcall SetCurrentAsHTML(const AnsiString Value);
	AnsiString __fastcall GetCurrentAsHelp();
	void __fastcall SetCurrentAsHelp(const AnsiString Value);
	void __fastcall SetCurrentAsRGB(const TAHMColorRGB* Value);
	void __fastcall SetCaption(const AnsiString Value);
	
public:
	__fastcall virtual TAHMColorPopup(Classes::TComponent* AOwner);
	virtual void __fastcall Loaded(void);
	__fastcall virtual ~TAHMColorPopup(void);
	void __fastcall DropDown(Controls::TWinControl* AtControl);
	virtual bool __fastcall Execute(void);
	bool __fastcall Popup(int X, int Y);
	
__published:
	__property AnsiString Caption = {read=FCaption, write=SetCaption};
	__property Graphics::TColor Current = {read=FCurrent, write=SetCurrent, default=0};
	__property AnsiString CurrentAsHTML = {read=GetCurrentAsHtml, write=SetCurrentAsHTML, stored=false};
	__property AnsiString CurrentAsHELP = {read=GetCurrentAsHelp, write=SetCurrentAsHelp, stored=false};
	__property TAHMColorRGB* CurrentAsRGB = {read=FCurrentAsRGB, write=SetCurrentAsRGB, stored=false};
	__property TAHMColorOptions* Options = {read=FOptions, write=FOptions};
	__property TAHMClrButton* More = {read=FMoreBtn, write=FMoreBtn};
	__property TAHMClrDetailBtn* CustomBtn1 = {read=FCustomBtn1, write=FCustomBtn1};
	__property TAHMClrDetailBtn* CustomBtn2 = {read=FCustomBtn2, write=FCustomBtn2};
	__property TAHMClrButton* Apply = {read=FApplyBtn, write=FApplyBtn};
	__property TAHMOnColorApply OnCustomBtn1 = {read=FOnCustomBtn1, write=FOnCustomBtn1};
	__property TAHMOnColorApply OnCustomBtn2 = {read=FOnCustomBtn2, write=FOnCustomBtn2};
	__property TAHMOnColorApply OnApply = {read=FOnApply, write=FOnApply};
	__property bool AutoClose = {read=FAutoClose, write=SetAutoClose, default=0};
	__property TAHMOnColorApply OnColorChange = {read=FOnColorChange, write=FOnColorChange};
	__property TAHMOnColorApply OnSelectionChange = {read=FOnSelectionChange, write=FOnSelectionChange};
};


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

}	/* namespace Ahmtcolorpopup */
using namespace Ahmtcolorpopup;
#pragma option pop	// -w-
#pragma option pop	// -Vx

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