
#ifndef floatstr_t_h
#define floatstr_t_h


class FloatStr
{
protected:
	float Value;
	float Stored_Value;
	float Min_Value;
	float Max_Value;
	float StepSize;
	
	int AfterDot;
	int MaxLength;

	int Value_BDot;
	int Value_ADot;

	char Text[30];
	char PreText[15];
	char Unit[5];
	char DimensionUnit[3];
public:
	void Init(float In_Value, float In_Min_Value, float In_Max_Value, float In_StepSize, int In_AfterDot, int In_MaxLength, char In_Text[20], char In_PreText[10], char In_Unit[5]);
	float Read_Value(void);
	void Write_Value(float In_Value);
	float Read_Stored_Value(void);
	void Write_Stored_Value(float In_Stored_Value);
	float Read_Min_Value(void);
	void Write_Min_Value(float In_Min_Value);
	float Read_Max_Value(void);
	void Write_Max_Value(float In_Max_Value);
	float Read_StepSize(void);
	void Write_StepSize(float In_StepSize);
		
	int Read_AfterDot(void);
	void Write_AfterDot(int In_AfterDot);
	int Read_MaxLength(void);
	void Write_MaxLength(int In_MaxLength);			
		
	char* Read_Text(void);
	char* Read_PreText(void);
	void Write_PreText(char In_PreText[10]);
	char* Read_Unit(void);
	void Write_Unit(char In_Unit[5]);
	char* Read_DimensionUnit(void);

	void RenderText(void);
	void DoStep(char Direction);

	int Read_IntBDot(void);
	int Read_IntADot(void);

};

#endif
