
// ##########################################################################
// #                                                                        #
// #                              BtnNumberEditor                            #
// #                                                                        #
// #                            - Deklarationen -                           #
// #                                                                        #
// ##########################################################################


#ifndef _BtnNumberEditor_H
#define _BtnNumberEditor_H


#include"gui/extnumed.h"
#include"ui/vobjcoll.h"
#include"ui/scrolbar.h"

// IDS:

#define ID_BTNNUMED     1500
#define ID_BTNNUMED_SCR 1501
#define ID_BTNNUMED_EDT 1502


class BtnNumberEditor : public UI_VObjCollection
{

  public:

	 BtnNumberEditor (UI_VObjCollection*  parent,
							const UI_Rectangle& shape,
							UI_ViewID           id,
							unsigned            range = 10,
							unsigned            pr    =  0,
							char                sep   = ',',
							bool                sgn   = FALSE,
							double              step  = 1
						  );

	 double                 get_Step   () const;

	 void                   set_Step   (double);

	 bool                   increment  ();

	 bool                   decrement  ();

	 bool                   doStep     (double);

	 ExtNumberEditor&       editor     ();

	 const ExtNumberEditor& editor     () const;

	 const ExtNumberEditor& get_Editor ();


	protected:

	 virtual          ~BtnNumberEditor ();
	 virtual bool     MakeVisualElement();
	 virtual void     Initialize       ();
	 virtual bool     _ShapeRectChanged();
	 bool             scroll           ();
	 ExtNumberEditor* Editor;
	 UI_VScrollBar*   Scrl;
	 double           Step;
};

#endif _BtnNumberEditor_H
