2
* Copyright 2010 Inalogic Inc.
4
* This program is free software: you can redistribute it and/or modify it
5
* under the terms of the GNU Lesser General Public License version 3, as
6
* published by the Free Software Foundation.
8
* This program is distributed in the hope that it will be useful, but
9
* WITHOUT ANY WARRANTY; without even the implied warranties of
10
* MERCHANTABILITY, SATISFACTORY QUALITY or FITNESS FOR A PARTICULAR
11
* PURPOSE. See the applicable version of the GNU Lesser General Public
12
* License for more details.
14
* You should have received a copy of both the GNU Lesser General Public
15
* License version 3 along with this program. If not, see
16
* <http://www.gnu.org/licenses/>
18
* Authored by: Jay Taoko <jay.taoko_AT_gmail_DOT_com>
23
#ifndef SPINBOXDOUBLE_H
24
#define SPINBOXDOUBLE_H
26
#include "EditTextBox.h"
31
class SpinBoxDouble: public SpinBox_Logic
34
SpinBoxDouble (double Value = 0, double Step = 1, double MinValue = 0, double MaxValue = 100);
37
virtual long ProcessEvent (IEvent &ievent, long TraverseInfo, long ProcessEventInfo);
38
virtual void Draw (GraphicsEngine &GfxContext, bool force_draw);
39
virtual void DrawContent (GraphicsEngine &GfxContext, bool force_draw);
40
virtual void PostDraw (GraphicsEngine &GfxContext, bool force_draw);
42
virtual void ImplementIncrementBtn();
43
virtual void ImplementDecrementBtn();
44
virtual void ImplementValidateEntry();
46
void SetValue (double value);
47
double GetValue() const;
48
void SetStep (double i);
49
double GetStep() const;
50
double GetMinValue() const;
51
double GetMaxValue() const;
52
void SetRange (double MinValue, double Maxvalue);
54
sigc::signal<void, SpinBoxDouble * > sigIncrement;
55
sigc::signal<void, SpinBoxDouble * > sigDecrement;
56
sigc::signal<void, SpinBoxDouble * > sigValueChanged;
57
sigc::signal<void, double> sigValue;
60
void InitializeWidgets();
61
void InitializeLayout();
68
DoubleValidator m_DoubleValidator;
75
#endif // SPINBOXDOUBLE_H