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>
26
#include "IntegerValidator.h"
27
#include "SpinBox_Logic.h"
31
class SpinBox: public SpinBox_Logic
34
SpinBox(int Value = 0, int Step = 1, int MinValue = 0, int MaxValue = 100);
37
virtual long ProcessEvent(IEvent &ievent, long TraverseInfo, long ProcessEventInfo);
38
virtual void Draw(GraphicsContext& GfxContext, bool force_draw);
39
virtual void DrawContent(GraphicsContext& GfxContext, bool force_draw);
40
virtual void PostDraw(GraphicsContext& GfxContext, bool force_draw);
42
virtual void ImplementIncrementBtn();
43
virtual void ImplementDecrementBtn();
44
virtual void ImplementValidateEntry();
46
void SetValue(int value);
50
int GetMinValue() const;
51
int GetMaxValue() const;
52
void SetRange(int MinValue, int Maxvalue);
54
sigc::signal<void, const weaksmptr(SpinBox) > sigIncrement;
55
sigc::signal<void, const weaksmptr(SpinBox) > sigDecrement;
56
sigc::signal<void, const weaksmptr(SpinBox) > sigValueChanged;
57
sigc::signal<void, int> sigValue;
60
void InitializeWidgets();
61
void InitializeLayout();
65
smptr(HLayout) hlayout;
66
smptr(VLayout) vlayout;
68
IntegerValidator m_IntValidator;