m_DigitMargin(-1),
m_LineLength(-1),
m_LineWidth(-1),
- m_DrawFaded(FALSE),
+ m_DrawFaded(false),
m_LeftStartPos(-1)
{
}
m_DigitMargin(-1),
m_LineLength(-1),
m_LineWidth(-1),
- m_DrawFaded(FALSE),
+ m_DrawFaded(false),
m_LeftStartPos(-1)
{
Create(parent, id, pos, size, style);
bool RetVal = wxControl::Create(parent, id, pos, size, style);
if ((style & wxLED_DRAW_FADED) != 0)
- SetDrawFaded(TRUE);
+ SetDrawFaded(true);
if ((style & wxLED_ALIGN_MASK) != 0)
SetAlignment((wxLEDValueAlign)(style & wxLED_ALIGN_MASK));
RecalcInternals(GetClientSize());
if (Redraw)
- Refresh(FALSE);
+ Refresh(false);
}
}
m_DrawFaded = DrawFaded;
if (Redraw)
- Refresh(FALSE);
+ Refresh(false);
}
}
{
if (Value != m_Value)
{
+#ifdef __WXDEBUG__
if (!Value.IsEmpty())
{
for(size_t i=0; i<Value.Length(); i++) {
wxT("wxLEDNumberCtrl can only display numeric string values."));
}
}
+#endif
m_Value = Value;
RecalcInternals(GetClientSize());
if (Redraw)
- Refresh(FALSE);
+ Refresh(false);
}
}
END_EVENT_TABLE()
-void wxLEDNumberCtrl::OnEraseBackground(wxEraseEvent &Event)
+void wxLEDNumberCtrl::OnEraseBackground(wxEraseEvent &WXUNUSED(event))
{
}
-void wxLEDNumberCtrl::OnPaint(wxPaintEvent &Event)
+void wxLEDNumberCtrl::OnPaint(wxPaintEvent &WXUNUSED(event))
{
wxPaintDC Dc(this);
DrawDigit(MemDc, DIGITALL, i);
// Draw the digits.
- switch (m_Value[i])
+ switch (m_Value.GetChar(i))
{
case '0' :
DrawDigit(MemDc, DIGIT0, i);
// just skip it
break;
default :
- wxFAIL_MSG(_("Unknown digit value"));
+ wxFAIL_MSG(wxT("Unknown digit value"));
break;
}
}
{
Dc.DrawLine(XPos + m_LineMargin*2, m_LineMargin,
XPos + m_LineLength, m_LineMargin);
- }
+ }
if (Digit & LINE2)
{
if ((Height * 0.07) < 1)
m_LineMargin = 1;
else
- m_LineMargin = Height * 0.07;
+ m_LineMargin = (int)(Height * 0.07);
if ((Height * 0.35) < 1)
m_LineLength = 1;
else
- m_LineLength = Height * 0.35;
+ m_LineLength = (int)(Height * 0.35);
m_LineWidth = m_LineMargin;
m_LeftStartPos = (ClientWidth - ValueWidth) / 2;
break;
default :
- wxFAIL_MSG(_("Unknown alignent value for wxLEDNumberCtrl."));
+ wxFAIL_MSG(wxT("Unknown alignent value for wxLEDNumberCtrl."));
break;
}
}