1 #ifndef _WX_LEDNUMBERCTRL_H_
2 #define _WX_LEDNUMBERCTRL_H_
4 #include "wx/gizmos/gizmos.h"
7 #include <wx/control.h>
13 // ----------------------------------------------------------------------------
15 // ----------------------------------------------------------------------------
19 wxLED_ALIGN_LEFT
= 0x01,
20 wxLED_ALIGN_RIGHT
= 0x02,
21 wxLED_ALIGN_CENTER
= 0x04,
23 wxLED_ALIGN_MASK
= 0x04
26 #define wxLED_DRAW_FADED 0x08
28 // ----------------------------------------------------------------------------
30 // ----------------------------------------------------------------------------
32 class WXDLLIMPEXP_GIZMOS wxLEDNumberCtrl
: public wxControl
37 wxLEDNumberCtrl(wxWindow
*parent
, wxWindowID id
= wxID_ANY
,
38 const wxPoint
& pos
= wxDefaultPosition
,
39 const wxSize
& size
= wxDefaultSize
,
40 long style
= wxLED_ALIGN_LEFT
| wxLED_DRAW_FADED
);
43 bool Create(wxWindow
*parent
, wxWindowID id
= wxID_ANY
,
44 const wxPoint
& pos
= wxDefaultPosition
,
45 const wxSize
& size
= wxDefaultSize
,
48 wxLEDValueAlign
GetAlignment() const { return m_Alignment
; }
49 bool GetDrawFaded() const { return m_DrawFaded
; }
50 const wxString
&GetValue() const { return m_Value
; }
52 void SetAlignment(wxLEDValueAlign Alignment
, bool Redraw
= true);
53 void SetDrawFaded(bool DrawFaded
, bool Redraw
= true);
54 void SetValue(const wxString
&Value
, bool Redraw
= true);
59 wxLEDValueAlign m_Alignment
;
69 void DrawDigit(wxDC
&Dc
, int Digit
, int Column
);
70 void RecalcInternals(const wxSize
&CurrentSize
);
75 void OnEraseBackground(wxEraseEvent
&Event
);
76 void OnPaint(wxPaintEvent
&Event
);
77 void OnSize(wxSizeEvent
&Event
);