xref: /haiku/src/apps/icon-o-matic/generic/gui/popup_control/InputSlider.h (revision 1acbe440b8dd798953bec31d18ee589aa3f71b73)
1 /*
2  * Copyright 2006, Haiku.
3  * Distributed under the terms of the MIT License.
4  *
5  * Authors:
6  *		Stephan Aßmus <superstippi@gmx.de>
7  */
8 
9 #ifndef INPUT_SLIDER_H
10 #define INPUT_SLIDER_H
11 
12 #include "PopupSlider.h"
13 
14 class NummericalTextView;
15 class BMessageFilter;
16 
17 class InputSlider : public PopupSlider {
18  public:
19 								InputSlider(const char* name = NULL,
20 											const char* label = NULL,
21 											BMessage* model = NULL,
22 											BHandler* target = NULL,
23 											int32 min = 0,
24 											int32 max = 100,
25 											int32 value = 0,
26 											const char* formatString = "%ld");
27 	virtual						~InputSlider();
28 
29 								// MView
30 	virtual	BRect				layout(BRect frame);
31 
32 								// BView
33 	virtual	void				MouseDown(BPoint where);
34 
35 								// PopupSlider
36 			void				SetEnabled(bool enabled);
37 								// override this to take some action
38 	virtual	void				ValueChanged(int32 newValue);
39 	virtual	void				DrawSlider(BRect frame, bool enabled);
40 
41  private:
42 
43 			NummericalTextView*	fTextView;
44 			BMessageFilter*		fTextViewFilter;
45 };
46 
47 #endif	// INPUT_SLIDER_H
48