1 #ifndef _WX_LEDNUMBERCTRL_H_
2 #define _WX_LEDNUMBERCTRL_H_
4 #if defined(__GNUG__) && !defined(__APPLE__)
5 #pragma interface "wxLEDNumberCtrl.h"
8 #include "wx/gizmos/gizmos.h"
10 #include <wx/window.h>
11 #include <wx/control.h>
17 // ----------------------------------------------------------------------------
19 // ----------------------------------------------------------------------------
23 wxLED_ALIGN_LEFT
= 0x01,
24 wxLED_ALIGN_RIGHT
= 0x02,
25 wxLED_ALIGN_CENTER
= 0x04,
27 wxLED_ALIGN_MASK
= 0x04
30 #define wxLED_DRAW_FADED 0x08
32 // ----------------------------------------------------------------------------
34 // ----------------------------------------------------------------------------
36 class WXDLLIMPEXP_GIZMOS wxLEDNumberCtrl
: public wxControl
41 wxLEDNumberCtrl(wxWindow
*parent
, wxWindowID id
= wxID_ANY
,
42 const wxPoint
& pos
= wxDefaultPosition
,
43 const wxSize
& size
= wxDefaultSize
,
44 long style
= wxLED_ALIGN_LEFT
| wxLED_DRAW_FADED
);
47 bool Create(wxWindow
*parent
, wxWindowID id
= wxID_ANY
,
48 const wxPoint
& pos
= wxDefaultPosition
,
49 const wxSize
& size
= wxDefaultSize
,
52 wxLEDValueAlign
GetAlignment() const { return m_Alignment
; }
53 bool GetDrawFaded() const { return m_DrawFaded
; }
54 const wxString
&GetValue() const { return m_Value
; }
56 void SetAlignment(wxLEDValueAlign Alignment
, bool Redraw
= true);
57 void SetDrawFaded(bool DrawFaded
, bool Redraw
= true);
58 void SetValue(const wxString
&Value
, bool Redraw
= true);
63 wxLEDValueAlign m_Alignment
;
73 void DrawDigit(wxDC
&Dc
, int Digit
, int Column
);
74 void RecalcInternals(const wxSize
&CurrentSize
);
79 void OnEraseBackground(wxEraseEvent
&Event
);
80 void OnPaint(wxPaintEvent
&Event
);
81 void OnSize(wxSizeEvent
&Event
);