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

// (DO NOT EDIT: machine generated header) 'FMX.TMSSpinner.pas' rev: 26.00 (Windows)

#ifndef Fmx_TmsspinnerHPP
#define Fmx_TmsspinnerHPP

#pragma delphiheader begin
#pragma option push
#pragma option -w-      // All warnings off
#pragma option -Vx      // Zero-length empty class member 
#pragma pack(push,8)
#include <System.hpp>	// Pascal unit
#include <SysInit.hpp>	// Pascal unit
#include <FMX.Types.hpp>	// Pascal unit
#include <FMX.Objects.hpp>	// Pascal unit
#include <System.Classes.hpp>	// Pascal unit
#include <System.Types.hpp>	// Pascal unit
#include <System.SysUtils.hpp>	// Pascal unit
#include <System.StrUtils.hpp>	// Pascal unit
#include <System.Math.hpp>	// Pascal unit
#include <System.UITypes.hpp>	// Pascal unit
#include <FMX.TMSBaseControl.hpp>	// Pascal unit
#include <System.DateUtils.hpp>	// Pascal unit
#include <FMX.Controls.hpp>	// Pascal unit
#include <System.UIConsts.hpp>	// Pascal unit
#include <FMX.Styles.hpp>	// Pascal unit
#include <FMX.Graphics.hpp>	// Pascal unit

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

namespace Fmx
{
namespace Tmsspinner
{
//-- type declarations -------------------------------------------------------
class DELPHICLASS TTMSFMXColumnShape;
class PASCALIMPLEMENTATION TTMSFMXColumnShape : public Fmx::Objects::TRectangle
{
	typedef Fmx::Objects::TRectangle inherited;
	
private:
	System::Uitypes::TAlphaColor FFocusColor;
	
public:
	__fastcall virtual TTMSFMXColumnShape(System::Classes::TComponent* AOwner);
	virtual void __fastcall Paint(void);
	
__published:
	__property System::Uitypes::TAlphaColor FocusColor = {read=FFocusColor, write=FFocusColor, default=-1};
	__property DisableFocusEffect = {default=0};
public:
	/* TShape.Destroy */ inline __fastcall virtual ~TTMSFMXColumnShape(void) { }
	
};


enum DECLSPEC_DENUM TTMSFMXSpinnerRangeType : unsigned char { srtNumber, srtDateTime, srtCustom };

enum DECLSPEC_DENUM TTMSFMXSpinnerStepType : unsigned char { sstNumber, sstSecond, sstMinute, sstHour, sstDay, sstMonth, sstYear };

class DELPHICLASS TTMSFMXSpinnerCustomItem;
class DELPHICLASS TTMSFMXSpinner;
#pragma pack(push,4)
class PASCALIMPLEMENTATION TTMSFMXSpinnerCustomItem : public System::Classes::TCollectionItem
{
	typedef System::Classes::TCollectionItem inherited;
	
private:
	TTMSFMXSpinner* FOwner;
	System::UnicodeString FText;
	void __fastcall SetText(const System::UnicodeString Value);
	
protected:
	HIDESBASE void __fastcall Changed(void);
	
public:
	__fastcall virtual TTMSFMXSpinnerCustomItem(System::Classes::TCollection* Collection);
	__fastcall virtual ~TTMSFMXSpinnerCustomItem(void);
	
__published:
	__property System::UnicodeString Text = {read=FText, write=SetText};
};

#pragma pack(pop)

class DELPHICLASS TTMSFMXSpinnerCustomItems;
class PASCALIMPLEMENTATION TTMSFMXSpinnerCustomItems : public Fmx::Tmsbasecontrol::TTMSFMXBaseCollection
{
	typedef Fmx::Tmsbasecontrol::TTMSFMXBaseCollection inherited;
	
public:
	TTMSFMXSpinnerCustomItem* operator[](int Index) { return Items[Index]; }
	
private:
	TTMSFMXSpinner* FOwner;
	System::Classes::TNotifyEvent FOnChange;
	HIDESBASE TTMSFMXSpinnerCustomItem* __fastcall GetItem(int Index);
	HIDESBASE void __fastcall SetItem(int Index, TTMSFMXSpinnerCustomItem* const Value);
	
protected:
	DYNAMIC System::Classes::TPersistent* __fastcall GetOwner(void);
	
public:
	__fastcall TTMSFMXSpinnerCustomItems(TTMSFMXSpinner* AOwner);
	HIDESBASE TTMSFMXSpinnerCustomItem* __fastcall Add(void);
	HIDESBASE TTMSFMXSpinnerCustomItem* __fastcall Insert(int Index);
	__property TTMSFMXSpinnerCustomItem* Items[int Index] = {read=GetItem, write=SetItem/*, default*/};
	virtual void __fastcall Update(System::Classes::TCollectionItem* Item);
	
__published:
	__property System::Classes::TNotifyEvent OnChange = {read=FOnChange, write=FOnChange};
public:
	/* TCollection.Destroy */ inline __fastcall virtual ~TTMSFMXSpinnerCustomItems(void) { }
	
};


class DELPHICLASS TTMSFMXColumnAppearance;
class PASCALIMPLEMENTATION TTMSFMXColumnAppearance : public System::Classes::TPersistent
{
	typedef System::Classes::TPersistent inherited;
	
private:
	TTMSFMXSpinner* FOwner;
	int FSpacing;
	System::Classes::TNotifyEvent FOnChange;
	int FTextSpacing;
	bool FAutoSize;
	void __fastcall SetSpacing(const int Value);
	void __fastcall SetTextSpacing(const int Value);
	void __fastcall SetAutoSize(const bool Value);
	
public:
	__fastcall TTMSFMXColumnAppearance(TTMSFMXSpinner* AOwner);
	__fastcall virtual ~TTMSFMXColumnAppearance(void);
	void __fastcall RefreshColumns(void);
	
__published:
	__property bool AutoSize = {read=FAutoSize, write=SetAutoSize, default=1};
	__property int Spacing = {read=FSpacing, write=SetSpacing, default=5};
	__property int TextSpacing = {read=FTextSpacing, write=SetTextSpacing, default=25};
	__property System::Classes::TNotifyEvent OnChange = {read=FOnChange, write=FOnChange};
};


class DELPHICLASS TTMSFMXColumn;
class PASCALIMPLEMENTATION TTMSFMXColumn : public System::Classes::TCollectionItem
{
	typedef System::Classes::TCollectionItem inherited;
	
private:
	System::TDateTime FSaveDateRangeto;
	System::TDateTime FSaveDateRangeFrom;
	int FDrawIndex;
	double FSp;
	bool FAnimating;
	bool FAnimate;
	bool FMouseDown;
	bool FMouseUp;
	double FTimeStart;
	double FTimeStop;
	int FDragY;
	int FScrollY;
	int FClickX;
	int FClickY;
	int FCurrentScPos;
	int FScPosTo;
	double FRangeFrom;
	double FRangeTo;
	double FSelectedValue;
	TTMSFMXSpinnerRangeType FRangeType;
	double FStep;
	System::UnicodeString FValueFormat;
	System::TDateTime FDateRangeTo;
	System::TDateTime FDateRangeFrom;
	System::UnicodeString FDateTimeValueFormat;
	TTMSFMXSpinnerStepType FStepType;
	bool FCyclic;
	Fmx::Graphics::TFont* FFont;
	float FWidth;
	System::Classes::TAlignment FTextAlign;
	bool FOnlyDate;
	TTMSFMXSpinner* FOwner;
	Fmx::Graphics::TBrush* FFontAppearance;
	TTMSFMXSpinnerCustomItems* FCustomItems;
	void __fastcall SetRangeFrom(const double Value);
	void __fastcall SetRangeTo(const double Value);
	void __fastcall SetSelectedValue(const double Value);
	void __fastcall SetRangeType(const TTMSFMXSpinnerRangeType Value);
	void __fastcall SetStep(const double Value);
	void __fastcall SetValueFormat(const System::UnicodeString Value);
	void __fastcall SetDateRangeFrom(const System::TDateTime Value);
	void __fastcall SetDateRangeTo(const System::TDateTime Value);
	void __fastcall SetDateTimeValueFormat(const System::UnicodeString Value);
	void __fastcall SetStepType(const TTMSFMXSpinnerStepType Value);
	void __fastcall SetCyclic(const bool Value);
	void __fastcall SetFont(Fmx::Graphics::TFont* const Value);
	System::TDateTime __fastcall GetSelectedDateTime(void);
	void __fastcall SetSelectedDateTime(const System::TDateTime Value);
	void __fastcall SetTextAlign(const System::Classes::TAlignment Value);
	void __fastcall SetOnlyDate(const bool Value);
	double __fastcall GetSelectedValue(void);
	void __fastcall SetWidth(const float Value);
	void __fastcall SetCustomItems(TTMSFMXSpinnerCustomItems* const Value);
	
protected:
	System::Types::TRectF __fastcall GetColumnRect(void);
	void __fastcall RefreshColumn(void);
	void __fastcall PaintColumn(System::TObject* Sender, Fmx::Graphics::TCanvas* Canvas, const System::Types::TRectF &ARect);
	void __fastcall Draw(Fmx::Graphics::TCanvas* ACanvas, const System::Types::TRectF &r);
	void __fastcall SetAnimatedValue(void);
	void __fastcall DoMouseDown(System::TObject* Sender, System::Uitypes::TMouseButton Button, System::Classes::TShiftState Shift, float X, float Y);
	void __fastcall DoMouseMove(System::TObject* Sender, System::Classes::TShiftState Shift, float X, float Y);
	void __fastcall DoMouseUp(System::TObject* Sender, System::Uitypes::TMouseButton Button, System::Classes::TShiftState Shift, float X, float Y);
	void __fastcall DoKeyDown(System::TObject* Sender, System::Word &Key, System::WideChar &KeyChar, System::Classes::TShiftState Shift);
	void __fastcall DoMouseWheel(System::TObject* Sender, System::Classes::TShiftState Shift, int WheelDelta, bool &Handled);
	
public:
	TTMSFMXColumnShape* __fastcall Shape(void);
	__fastcall virtual TTMSFMXColumn(System::Classes::TCollection* Collection);
	__fastcall virtual ~TTMSFMXColumn(void);
	void __fastcall UpdateColumn(void);
	void __fastcall ScrollToValue(double Value, bool Animation = true, int AnimationSpeed = 0x4);
	void __fastcall Next(bool Animation = true);
	void __fastcall Previous(bool Animation = true);
	double __fastcall IncSteps(double StartValue, int nr);
	int __fastcall StepsFromTo(double StartValue, double EndValue);
	double __fastcall GetStep(void);
	int __fastcall GetRangeCount(void);
	double __fastcall GetRangeTo(void);
	double __fastcall GetRangeFrom(void);
	__property System::TDateTime SelectedDateTime = {read=GetSelectedDateTime, write=SetSelectedDateTime};
	
__published:
	__property float Width = {read=FWidth, write=SetWidth};
	__property double RangeFrom = {read=FRangeFrom, write=SetRangeFrom};
	__property double RangeTo = {read=FRangeTo, write=SetRangeTo};
	__property System::TDateTime DateRangeFrom = {read=FDateRangeFrom, write=SetDateRangeFrom};
	__property System::TDateTime DateRangeTo = {read=FDateRangeTo, write=SetDateRangeTo};
	__property double Step = {read=FStep, write=SetStep};
	__property TTMSFMXSpinnerStepType StepType = {read=FStepType, write=SetStepType, default=0};
	__property double SelectedValue = {read=GetSelectedValue, write=SetSelectedValue};
	__property System::UnicodeString ValueFormat = {read=FValueFormat, write=SetValueFormat};
	__property System::UnicodeString DateTimeValueFormat = {read=FDateTimeValueFormat, write=SetDateTimeValueFormat};
	__property TTMSFMXSpinnerRangeType RangeType = {read=FRangeType, write=SetRangeType, default=0};
	__property bool OnlyDate = {read=FOnlyDate, write=SetOnlyDate, default=0};
	__property bool Cyclic = {read=FCyclic, write=SetCyclic, default=0};
	__property Fmx::Graphics::TFont* Font = {read=FFont, write=SetFont};
	__property Fmx::Graphics::TBrush* FontAppearance = {read=FFontAppearance, write=FFontAppearance};
	__property System::Classes::TAlignment TextAlign = {read=FTextAlign, write=SetTextAlign, default=2};
	__property TTMSFMXSpinnerCustomItems* CustomItems = {read=FCustomItems, write=SetCustomItems};
};


typedef void __fastcall (__closure *TTMSFMXSelectedValueChangedEvent)(System::TObject* Sender, int Column, double SelectedValue, TTMSFMXSpinnerRangeType RangeType);

class DELPHICLASS TTMSFMXColumns;
class PASCALIMPLEMENTATION TTMSFMXColumns : public Fmx::Tmsbasecontrol::TTMSFMXBaseCollection
{
	typedef Fmx::Tmsbasecontrol::TTMSFMXBaseCollection inherited;
	
public:
	TTMSFMXColumn* operator[](int Index) { return Items[Index]; }
	
private:
	TTMSFMXSpinner* FOwner;
	System::Classes::TNotifyEvent FOnChange;
	HIDESBASE TTMSFMXColumn* __fastcall GetItem(int Index);
	HIDESBASE void __fastcall SetItem(int Index, TTMSFMXColumn* const Value);
	
protected:
	DYNAMIC System::Classes::TPersistent* __fastcall GetOwner(void);
	
public:
	__fastcall TTMSFMXColumns(TTMSFMXSpinner* AOwner);
	HIDESBASE TTMSFMXColumn* __fastcall Add(void);
	HIDESBASE TTMSFMXColumn* __fastcall Insert(int Index);
	__property TTMSFMXColumn* Items[int Index] = {read=GetItem, write=SetItem/*, default*/};
	
__published:
	__property System::Classes::TNotifyEvent OnChange = {read=FOnChange, write=FOnChange};
public:
	/* TCollection.Destroy */ inline __fastcall virtual ~TTMSFMXColumns(void) { }
	
};


class PASCALIMPLEMENTATION TTMSFMXSpinner : public Fmx::Tmsbasecontrol::TTMSFMXBaseControl
{
	typedef Fmx::Tmsbasecontrol::TTMSFMXBaseControl inherited;
	
private:
	Fmx::Types::TTimer* FAnimateTimer;
	TTMSFMXColumns* FColumns;
	TTMSFMXColumnAppearance* FColumnAppearance;
	TTMSFMXSelectedValueChangedEvent FOnSelectedValueChanged;
	int FAnimationFactor;
	bool FSmoothScrolling;
	void __fastcall SetAnimationFactor(const int Value);
	void __fastcall SetSmoothScrolling(const bool Value);
	System::UnicodeString __fastcall GetVersion(void);
	int __fastcall GetVersionNr(void);
	
protected:
	virtual NativeUInt __fastcall GetInstance(void);
	void __fastcall Animate(System::TObject* Sender);
	void __fastcall RefreshColumns(void);
	TTMSFMXColumnShape* __fastcall DoesColumnExist(Fmx::Types::TFmxObject* AControl, System::UnicodeString ColumnName);
	void __fastcall UpdateColumns(Fmx::Types::TFmxObject* AControl);
	void __fastcall CleanUpColumns(Fmx::Types::TFmxObject* AControl);
	
public:
	__property Fmx::Types::TTimer* AnimateTimer = {read=FAnimateTimer};
	__fastcall virtual TTMSFMXSpinner(System::Classes::TComponent* AOwner);
	__fastcall virtual ~TTMSFMXSpinner(void);
	virtual void __fastcall Resize(void);
	virtual Fmx::Types::TFmxObject* __fastcall GetStyleObject(void)/* overload */;
	virtual void __fastcall Update(void);
	
__published:
	__property System::UnicodeString Version = {read=GetVersion};
	__property bool SmoothScrolling = {read=FSmoothScrolling, write=SetSmoothScrolling, default=0};
	__property int AnimationFactor = {read=FAnimationFactor, write=SetAnimationFactor, default=4};
	__property TTMSFMXColumns* Columns = {read=FColumns, write=FColumns};
	__property TTMSFMXColumnAppearance* ColumnAppearance = {read=FColumnAppearance, write=FColumnAppearance};
	__property TTMSFMXSelectedValueChangedEvent OnSelectedValueChanged = {read=FOnSelectedValueChanged, write=FOnSelectedValueChanged};
/* Hoisted overloads: */
	
protected:
	inline Fmx::Types::TFmxObject* __fastcall  GetStyleObject(const bool Clone){ return Fmx::Controls::TStyledControl::GetStyleObject(Clone); }
	
};


//-- var, const, procedure ---------------------------------------------------
static const System::Int8 MAJ_VER = System::Int8(0x1);
static const System::Int8 MIN_VER = System::Int8(0x5);
static const System::Int8 REL_VER = System::Int8(0x0);
static const System::Int8 BLD_VER = System::Int8(0x0);
}	/* namespace Tmsspinner */
}	/* namespace Fmx */
#if !defined(DELPHIHEADER_NO_IMPLICIT_NAMESPACE_USE) && !defined(NO_USING_NAMESPACE_FMX_TMSSPINNER)
using namespace Fmx::Tmsspinner;
#endif
#if !defined(DELPHIHEADER_NO_IMPLICIT_NAMESPACE_USE) && !defined(NO_USING_NAMESPACE_FMX)
using namespace Fmx;
#endif
#pragma pack(pop)
#pragma option pop

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