www.pudn.com > mfcdraw.zip > SPIN.HPP


// Borland C++ Builder 
// Copyright (c) 1995, 1998 by Borland International 
// All rights reserved 
 
// (DO NOT EDIT: machine generated header) 'Spin.pas' rev: 3.00 
 
#ifndef SpinHPP 
#define SpinHPP 
#include  
#include  
#include  
#include  
#include  
#include  
#include  
#include  
#include  
#include  
#include  
#include  
#include  
 
//-- user supplied ----------------------------------------------------------- 
 
namespace Spin 
{ 
//-- type declarations ------------------------------------------------------- 
class DELPHICLASS TSpinButton; 
class DELPHICLASS TTimerSpeedButton; 
enum Spin__3 { tbFocusRect, tbAllowTimer }; 
 
typedef Set  TTimeBtnState; 
 
class PASCALIMPLEMENTATION TTimerSpeedButton : public Buttons::TSpeedButton  
{ 
	typedef Buttons::TSpeedButton inherited; 
	 
private: 
	Extctrls::TTimer* FRepeatTimer; 
	TTimeBtnState FTimeBtnState; 
	void __fastcall TimerExpired(System::TObject* Sender); 
	 
protected: 
	virtual void __fastcall Paint(void); 
	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); 
	 
public: 
	__fastcall virtual ~TTimerSpeedButton(void); 
	__property TTimeBtnState TimeBtnState = {read=FTimeBtnState, write=FTimeBtnState, nodefault}; 
public: 
		 
	/* TSpeedButton.Create */ __fastcall virtual TTimerSpeedButton(Classes::TComponent* AOwner) : Buttons:: 
		TSpeedButton(AOwner) { } 
	 
}; 
 
class PASCALIMPLEMENTATION TSpinButton : public Controls::TWinControl  
{ 
	typedef Controls::TWinControl inherited; 
	 
private: 
	TTimerSpeedButton* FUpButton; 
	TTimerSpeedButton* FDownButton; 
	TTimerSpeedButton* FFocusedButton; 
	Controls::TWinControl* FFocusControl; 
	Classes::TNotifyEvent FOnUpClick; 
	Classes::TNotifyEvent FOnDownClick; 
	TTimerSpeedButton* __fastcall CreateButton(void); 
	Graphics::TBitmap* __fastcall GetUpGlyph(void); 
	Graphics::TBitmap* __fastcall GetDownGlyph(void); 
	void __fastcall SetUpGlyph(Graphics::TBitmap* Value); 
	void __fastcall SetDownGlyph(Graphics::TBitmap* Value); 
	void __fastcall BtnClick(System::TObject* Sender); 
	void __fastcall BtnMouseDown(System::TObject* Sender, Controls::TMouseButton Button, Classes::TShiftState  
		Shift, int X, int Y); 
	void __fastcall SetFocusBtn(TTimerSpeedButton* Btn); 
	void __fastcall AdjustSize(int &W, int &H); 
	HIDESBASE MESSAGE void __fastcall WMSize(Messages::TWMSize &Message); 
	HIDESBASE MESSAGE void __fastcall WMSetFocus(Messages::TWMSetFocus &Message); 
	HIDESBASE MESSAGE void __fastcall WMKillFocus(Messages::TWMKillFocus &Message); 
	MESSAGE void __fastcall WMGetDlgCode(Messages::TWMNoParams &Message); 
	 
protected: 
	virtual void __fastcall Loaded(void); 
	DYNAMIC void __fastcall KeyDown(Word &Key, Classes::TShiftState Shift); 
	 
public: 
	__fastcall virtual TSpinButton(Classes::TComponent* AOwner); 
	virtual void __fastcall SetBounds(int ALeft, int ATop, int AWidth, int AHeight); 
	 
__published: 
	__property Align ; 
	__property Ctl3D ; 
	__property Graphics::TBitmap* DownGlyph = {read=GetDownGlyph, write=SetDownGlyph}; 
	__property DragCursor ; 
	__property DragMode ; 
	__property Enabled ; 
	__property Controls::TWinControl* FocusControl = {read=FFocusControl, write=FFocusControl}; 
	__property ParentCtl3D ; 
	__property ParentShowHint ; 
	__property PopupMenu ; 
	__property ShowHint ; 
	__property TabOrder ; 
	__property TabStop ; 
	__property Graphics::TBitmap* UpGlyph = {read=GetUpGlyph, write=SetUpGlyph}; 
	__property Visible ; 
	__property Classes::TNotifyEvent OnDownClick = {read=FOnDownClick, write=FOnDownClick}; 
	__property OnDragDrop ; 
	__property OnDragOver ; 
	__property OnEndDrag ; 
	__property OnEnter ; 
	__property OnExit ; 
	__property Classes::TNotifyEvent OnUpClick = {read=FOnUpClick, write=FOnUpClick}; 
public: 
	/* TWinControl.CreateParented */ __fastcall TSpinButton(HWND ParentWindow) : Controls::TWinControl( 
		ParentWindow) { } 
	/* TWinControl.Destroy */ __fastcall virtual ~TSpinButton(void) { } 
	 
}; 
 
class DELPHICLASS TSpinEdit; 
class PASCALIMPLEMENTATION TSpinEdit : public Stdctrls::TCustomEdit  
{ 
	typedef Stdctrls::TCustomEdit inherited; 
	 
private: 
	int FMinValue; 
	int FMaxValue; 
	Graphics::TCanvas* FCanvas; 
	int FIncrement; 
	TSpinButton* FButton; 
	bool FEditorEnabled; 
	int __fastcall GetMinHeight(void); 
	int __fastcall GetValue(void); 
	int __fastcall CheckValue(int NewValue); 
	void __fastcall SetValue(int NewValue); 
	void __fastcall SetEditRect(void); 
	HIDESBASE MESSAGE void __fastcall WMSize(Messages::TWMSize &Message); 
	HIDESBASE MESSAGE void __fastcall CMEnter(Messages::TWMNoParams &Message); 
	HIDESBASE MESSAGE void __fastcall CMExit(Messages::TWMNoParams &Message); 
	MESSAGE void __fastcall WMPaste(Messages::TWMNoParams &Message); 
	MESSAGE void __fastcall WMCut(Messages::TWMNoParams &Message); 
	 
protected: 
	DYNAMIC void __fastcall GetChildren(Classes::TGetChildProc Proc, Classes::TComponent* root); 
	virtual bool __fastcall IsValidChar(char Key); 
	virtual void __fastcall UpClick(System::TObject* Sender); 
	virtual void __fastcall DownClick(System::TObject* Sender); 
	DYNAMIC void __fastcall KeyDown(Word &Key, Classes::TShiftState Shift); 
	DYNAMIC void __fastcall KeyPress(char &Key); 
	virtual void __fastcall CreateParams(Controls::TCreateParams &Params); 
	virtual void __fastcall CreateWnd(void); 
	 
public: 
	__fastcall virtual TSpinEdit(Classes::TComponent* AOwner); 
	__fastcall virtual ~TSpinEdit(void); 
	__property TSpinButton* Button = {read=FButton}; 
	 
__published: 
	__property AutoSelect ; 
	__property AutoSize ; 
	__property Color ; 
	__property Ctl3D ; 
	__property DragCursor ; 
	__property DragMode ; 
	__property bool EditorEnabled = {read=FEditorEnabled, write=FEditorEnabled, default=1}; 
	__property Enabled ; 
	__property Font ; 
	__property int Increment = {read=FIncrement, write=FIncrement, default=1}; 
	__property MaxLength ; 
	__property int MaxValue = {read=FMaxValue, write=FMaxValue, nodefault}; 
	__property int MinValue = {read=FMinValue, write=FMinValue, nodefault}; 
	__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, nodefault}; 
	__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 TSpinEdit(HWND ParentWindow) : Stdctrls::TCustomEdit(ParentWindow 
		) { } 
	 
}; 
 
//-- var, const, procedure --------------------------------------------------- 
#define InitRepeatPause (Word)(400) 
#define RepeatPause (Byte)(100) 
 
}	/* namespace Spin */ 
#if !defined(NO_IMPLICIT_NAMESPACE_USE) 
using namespace Spin; 
#endif 
//-- end unit ---------------------------------------------------------------- 
#endif	// Spin