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

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

#ifndef AHMTSpinEditHPP
#define AHMTSpinEditHPP
#include <Menus.hpp>
#include <AHMStdClass.hpp>
#include <StdCtrls.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 Ahmtspinedit
{
//-- type declarations -------------------------------------------------------
enum TAHMButtonState { bsUp, bsTopDown, bsBottomDown, bsDisabled };

class DELPHICLASS TAHMCustomSpinButton;
class PASCALIMPLEMENTATION TAHMCustomSpinButton : public Controls::TGraphicControl 
{
	typedef Controls::TGraphicControl inherited;
	
private:
	Graphics::TBitmap* FCache;
	TAHMButtonState FDown;
	TAHMButtonState FLastDown;
	bool FDragging;
	Classes::TNotifyEvent FOnTopClick;
	Graphics::TColor FaColor;
	Graphics::TColor FColor;
	Classes::TNotifyEvent FOnBottomClick;
	HIDESBASE void __fastcall SetColor(Graphics::TColor value);
	void __fastcall SetAColor(Graphics::TColor value);
	void __fastcall SetDown(TAHMButtonState Value);
	void __fastcall CreateStates(void);
	void __fastcall DrawState(TAHMButtonState State);
	HIDESBASE MESSAGE void __fastcall CMEnabledChanged(Messages::TMessage &Msg);
	
protected:
	virtual void __fastcall Paint(void);
	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);
	
public:
	__fastcall virtual TAHMCustomSpinButton(Classes::TComponent* AOwner);
	__fastcall virtual ~TAHMCustomSpinButton(void);
	__property TAHMButtonState Down = {read=FDown, write=SetDown, default=0};
	
__published:
	__property Enabled ;
	__property ShowHint ;
	__property Classes::TNotifyEvent OnBottomClick = {read=FOnBottomClick, write=FOnBottomClick};
	__property Classes::TNotifyEvent OnTopClick = {read=FOnTopClick, write=FOnTopClick};
	__property Graphics::TColor Color = {read=FColor, write=SetColor, default=-2147483633};
	__property Graphics::TColor ArrowColor = {read=FaColor, write=SetAColor, default=0};
};

class DELPHICLASS TAHMCustomSpinEdit;
class PASCALIMPLEMENTATION TAHMCustomSpinEdit : public Stdctrls::TCustomEdit 
{
	typedef Stdctrls::TCustomEdit inherited;
	
private:
	int FMinValue;
	int FMaxValue;
	int FLineSize;
	int FMultipleLineSize;
	bool FCutandPaste;
	void *FButton;
	Controls::TWinControl* FButtonWin;
	void __fastcall SetEditRect(void);
	void __fastcall SetInteger(int Index, int aValue);
	void __fastcall SetValue(int aValue);
	int __fastcall GetMinHeight(void);
	int __fastcall GetValue(void);
	int __fastcall CheckValue(int aValue);
	void __fastcall SetBColor(Graphics::TColor value);
	Graphics::TColor __fastcall GetBColor(void);
	void __fastcall SetAColor(Graphics::TColor value);
	Graphics::TColor __fastcall GetAColor(void);
	HIDESBASE MESSAGE void __fastcall CMEnabledChanged(Messages::TMessage &Msg);
	HIDESBASE MESSAGE void __fastcall CMEnter(Messages::TWMNoParams &Message);
	HIDESBASE MESSAGE void __fastcall CMExit(Messages::TWMNoParams &Message);
	MESSAGE void __fastcall WMCut(Messages::TWMNoParams &Message);
	MESSAGE void __fastcall WMPaste(Messages::TWMNoParams &Message);
	HIDESBASE MESSAGE void __fastcall WMSize(Messages::TWMSize &Message);
	
protected:
	virtual void __fastcall CreateParams(Controls::TCreateParams &Params);
	virtual void __fastcall CreateWnd(void);
	virtual void __fastcall DownClick(System::TObject* Sender);
	void __fastcall AdjustSize(void);
	virtual bool __fastcall IsValidChar(char Key);
	DYNAMIC void __fastcall KeyDown(Word &Key, Classes::TShiftState Shift);
	DYNAMIC void __fastcall KeyPress(char &Key);
	virtual void __fastcall UpClick(System::TObject* Sender);
	
public:
	__fastcall virtual TAHMCustomSpinEdit(Classes::TComponent* AOwner);
	__fastcall virtual ~TAHMCustomSpinEdit(void);
	__property void * Button = {read=FButton};
	
__published:
	__property AutoSelect ;
	__property AutoSize ;
	__property Color ;
	__property Ctl3D ;
	__property Graphics::TColor ButtonColor = {read=GetBColor, write=SetBColor, default=-2147483633};
	__property Graphics::TColor ArrowColor = {read=GetAColor, write=SetAColor, default=0};
	__property bool CutandPaste = {read=FCutandPaste, write=FCutandPaste, default=1};
	__property Enabled ;
	__property Font ;
	__property ImeMode ;
	__property ImeName ;
	__property int LineSize = {read=FLineSize, write=SetInteger, index=2, default=1};
	__property MaxLength ;
	__property int MaxValue = {read=FMaxValue, write=SetInteger, index=0, default=100};
	__property int MinValue = {read=FMinValue, write=SetInteger, index=1, default=0};
	__property int MultipleLineSize = {read=FMultipleLineSize, write=SetInteger, index=3, default=10};
	__property ParentColor ;
	__property ParentCtl3D ;
	__property ParentFont ;
	__property ParentShowHint ;
	__property PopupMenu ;
	__property ReadOnly ;
	__property ShowHint ;
	__property TabOrder ;
	__property TabStop ;
	__property int Value = {read=GetValue, write=SetValue, default=0};
	__property Visible ;
	__property OnChange ;
	__property OnClick ;
	__property OnDblClick ;
	__property OnDragDrop ;
	__property OnDragOver ;
	__property OnEndDrag ;
	__property OnEnter ;
	__property OnExit ;
	__property OnKeyDown ;
	__property OnKeyPress ;
	__property OnKeyUp ;
	__property OnMouseDown ;
	__property OnMouseMove ;
	__property OnMouseUp ;
public:
	/* TWinControl.CreateParented */ __fastcall TAHMCustomSpinEdit(HWND ParentWindow) : Stdctrls::TCustomEdit(
		ParentWindow) { }
	
};

enum TAHMSpinButtonState { sbUp, sbTopDown, sbBottomDown, sbDisabled };

class DELPHICLASS TAHMSpinButton;
class PASCALIMPLEMENTATION TAHMSpinButton : public Ahmtspinedit::TAHMCustomSpinButton 
{
	typedef Ahmtspinedit::TAHMCustomSpinButton inherited;
	
private:
	Ahmstdclass::TAHMAboutSControlStr FAboutStr;
	
__published:
	__property Ahmstdclass::TAHMAboutSControlStr About = {read=FAboutStr, write=FAboutStr};
public:
	/* TAHMCustomSpinButton.Create */ __fastcall virtual TAHMSpinButton(Classes::TComponent* AOwner) : 
		Ahmtspinedit::TAHMCustomSpinButton(AOwner) { }
	/* TAHMCustomSpinButton.Destroy */ __fastcall virtual ~TAHMSpinButton(void) { }
	
};

class DELPHICLASS TAHMSpinEdit;
class PASCALIMPLEMENTATION TAHMSpinEdit : public Ahmtspinedit::TAHMCustomSpinEdit 
{
	typedef Ahmtspinedit::TAHMCustomSpinEdit inherited;
	
private:
	Ahmstdclass::TAHMAboutSControlStr FAboutStr;
	
__published:
	__property Ahmstdclass::TAHMAboutSControlStr About = {read=FAboutStr, write=FAboutStr};
public:
	/* TAHMCustomSpinEdit.Create */ __fastcall virtual TAHMSpinEdit(Classes::TComponent* AOwner) : Ahmtspinedit::
		TAHMCustomSpinEdit(AOwner) { }
	/* TAHMCustomSpinEdit.Destroy */ __fastcall virtual ~TAHMSpinEdit(void) { }
	
public:
	/* TWinControl.CreateParented */ __fastcall TAHMSpinEdit(HWND ParentWindow) : Ahmtspinedit::TAHMCustomSpinEdit(
		ParentWindow) { }
	
};

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

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