2 * Copyright 2015 Haiku, Inc. All rights reserved.
3 * Distributed under the terms of the MIT license.
6 * John Scipione, jscipione@gmail.com
8 #ifndef _DECIMAL_SPINNER_H
9 #define _DECIMAL_SPINNER_H
15 class BDecimalSpinner
: public BAbstractSpinner
{
17 BDecimalSpinner(BRect frame
, const char* name
,
18 const char* label
, BMessage
* message
,
19 uint32 resizingMode
= B_FOLLOW_LEFT_TOP
,
20 uint32 flags
= B_WILL_DRAW
| B_NAVIGABLE
);
21 BDecimalSpinner(const char* name
, const char* label
,
23 uint32 flags
= B_WILL_DRAW
| B_NAVIGABLE
);
24 BDecimalSpinner(BMessage
* data
);
25 virtual ~BDecimalSpinner();
27 static BArchivable
* Instantiate(BMessage
* data
);
28 virtual status_t
Archive(BMessage
* data
, bool deep
= true) const;
30 virtual status_t
GetSupportedSuites(BMessage
* message
);
32 virtual void AttachedToWindow();
34 virtual void Increment();
35 virtual void Decrement();
37 virtual void SetEnabled(bool enable
);
39 uint32
Precision() const { return fPrecision
; };
40 virtual void SetPrecision(uint32 precision
) { fPrecision
= precision
; };
42 double MinValue() const { return fMinValue
; }
43 virtual void SetMinValue(double min
);
45 double MaxValue() const { return fMaxValue
; }
46 virtual void SetMaxValue(double max
);
48 void Range(double* min
, double* max
);
49 virtual void SetRange(double min
, double max
);
51 double Step() const { return fStep
; }
52 virtual void SetStep(double step
) { fStep
= step
; };
54 double Value() const { return fValue
; };
55 virtual void SetValue(int32 value
);
56 virtual void SetValue(double value
);
57 virtual void SetValueFromText();
61 virtual void _ReservedDecimalSpinner20();
62 virtual void _ReservedDecimalSpinner19();
63 virtual void _ReservedDecimalSpinner18();
64 virtual void _ReservedDecimalSpinner17();
65 virtual void _ReservedDecimalSpinner16();
66 virtual void _ReservedDecimalSpinner15();
67 virtual void _ReservedDecimalSpinner14();
68 virtual void _ReservedDecimalSpinner13();
69 virtual void _ReservedDecimalSpinner12();
70 virtual void _ReservedDecimalSpinner11();
71 virtual void _ReservedDecimalSpinner10();
72 virtual void _ReservedDecimalSpinner9();
73 virtual void _ReservedDecimalSpinner8();
74 virtual void _ReservedDecimalSpinner7();
75 virtual void _ReservedDecimalSpinner6();
76 virtual void _ReservedDecimalSpinner5();
77 virtual void _ReservedDecimalSpinner4();
78 virtual void _ReservedDecimalSpinner3();
79 virtual void _ReservedDecimalSpinner2();
80 virtual void _ReservedDecimalSpinner1();
96 #endif // _DECIMAL_SPINNER_H