1 #ifndef _WX_LEDNUMBERCTRL_H_
2 #define _WX_LEDNUMBERCTRL_H_
5 #pragma interface "wxLEDNumberCtrl.h"
9 #define GIZMODLLEXPORT WXDLLEXPORT
11 #define GIZMODLLEXPORT
15 #include <wx/window.h>
16 #include <wx/control.h>
22 // ----------------------------------------------------------------------------
24 // ----------------------------------------------------------------------------
28 wxLED_ALIGN_LEFT
= 0x01,
29 wxLED_ALIGN_RIGHT
= 0x02,
30 wxLED_ALIGN_CENTER
= 0x04,
32 wxLED_ALIGN_MASK
= 0x04
35 #define wxLED_DRAW_FADED 0x08
37 // ----------------------------------------------------------------------------
39 // ----------------------------------------------------------------------------
41 class GIZMODLLEXPORT wxLEDNumberCtrl
: public wxControl
46 wxLEDNumberCtrl(wxWindow
*parent
, wxWindowID id
= -1,
47 const wxPoint
& pos
= wxDefaultPosition
,
48 const wxSize
& size
= wxDefaultSize
,
49 long style
= wxLED_ALIGN_LEFT
| wxLED_DRAW_FADED
);
52 bool Create(wxWindow
*parent
, wxWindowID id
= -1,
53 const wxPoint
& pos
= wxDefaultPosition
,
54 const wxSize
& size
= wxDefaultSize
,
57 wxLEDValueAlign
GetAlignment() const { return m_Alignment
; }
58 bool GetDrawFaded() const { return m_DrawFaded
; }
59 const wxString
&GetValue() const { return m_Value
; }
61 void SetAlignment(wxLEDValueAlign Alignment
, bool Redraw
= TRUE
);
62 void SetDrawFaded(bool DrawFaded
, bool Redraw
= TRUE
);
63 void SetValue(const wxString
&Value
, bool Redraw
= TRUE
);
68 wxLEDValueAlign m_Alignment
;
78 void DrawDigit(wxDC
&Dc
, int Digit
, int Column
);
79 void RecalcInternals(const wxSize
&CurrentSize
);
84 void OnEraseBackground(wxEraseEvent
&Event
);
85 void OnPaint(wxPaintEvent
&Event
);
86 void OnSize(wxSizeEvent
&Event
);