#define int32	long
#define uint32	ulong
#define int16	short
#define uint16	ushort

class ZSlider : public BControl
{
	public:					
							ZSlider
							(
								BRect frame,
								const char *name,
								const char *label,
								const char *maxstr,
								void  (*SliderHook)(char *dest, int32 allowedsize, int32 value),
								BMessage *messsage,
								bool super = FALSE,
								uint32 resizeMask  = B_FOLLOW_LEFT | B_FOLLOW_TOP,
								uint32 flags = B_WILL_DRAW
							); 
			void			KeyDown(const char *data, int num);
			void			Draw(BRect updateRect);
			void			MouseDown(BPoint where);
			void 			AttachedToWindow();
	
			long			GetMinValue(void);
			long			GetMaxValue(void);
			BRect			GetButton(void);
			void			SetValue(int32 num);
			void			SetValueQuiet(int32 num);
			long			GetValue();		
			float 			GetMaxStrLngth();
			void			SetCrazy(bool s) { crazy=s; };
	
			void			SetMinValue(int32 val);
			void			SetMaxValue(int32 val);
			void			DrawButton(BView *view, BRect frame);
	virtual	void			EDraw(BView *view, BRect frame,float inset);

			void 	UpdateValue();

			int32 			Min;
			long			Max;
			long			Act;
			long			divisor;
			BPoint			mousepoint;
	
			char			Str[255];
			float 			MaxStrLngth;
			const char		*MaxStr;
			int32 			StrSiz;			
			BRect 			temp;
			BRect			foo;
			void  			(*sliderhook)(char *dest, int32 allowedsize, int32 value);
			
			float			fontheight;
			
			BMessage		*clickmsg;
			BRect			Bound;
			bool			emode;

			bool			crazy;			
			bool			flow;
			bool			mousedown;
			bool			notick;
	private:

	static	void 			MouseDown_(ZSlider *o);
			void 			MouseDown__(BPoint point);
};
