$NetBSD: patch-ar,v 1.1 2004/02/18 23:09:03 kristerw Exp $ --- XVision/SimpleViews.cc.orig Wed Feb 18 23:21:00 2004 +++ XVision/SimpleViews.cc Wed Feb 18 23:28:53 2004 @@ -6,8 +6,8 @@ #include "XVisionGlobal.hh" #include -StaticText::StaticText(const char * _text, TextDirection _direction=tdNorth, - FontShape _fontshape=fsRegular) +StaticText::StaticText(const char * _text, TextDirection _direction, + FontShape _fontshape) : text(0), buffer1(0), buffer2(0), buffer3(0), direction(_direction), fontshape(_fontshape) { @@ -67,7 +67,7 @@ if (Visible && (!Hidden)) { // Hide(); // Show(); - (parent ? parent : this)->Redraw(); + if (parent) parent->Redraw(); else this->Redraw(); } } @@ -105,8 +105,8 @@ } Label::Label(const char * _text, const CommandType _cc, - const bool _AutoResize=TRUE, TextDirection _direction=tdNorth, - FontShape _fontshape=fsRegular) + const bool _AutoResize, TextDirection _direction, + FontShape _fontshape) : StaticText(_text, _direction, _fontshape) { AutoResize = _AutoResize; @@ -114,7 +114,7 @@ Selectable = TRUE; } -Padding::Padding(const Align direction=VAVertical, const int Size=20) +Padding::Padding(const Align direction, const int Size) { if (direction == VAVertical) SetSize(Point(1, Size)); @@ -123,14 +123,14 @@ MinSize = Area.Size; } -Title::Title(const char * _text, TextDirection _direction=tdNorth, - FontShape _fontshape=fsRegular) +Title::Title(const char * _text, TextDirection _direction, + FontShape _fontshape) : StaticText(_text, _direction, _fontshape) { SetColor(Pixel_t_Yellow, ciForeground); } -PictureView::PictureView(Picture * _picture=0, bool _DeleteP = TRUE, const CommandType _cc/* = cmInvalid */) +PictureView::PictureView(Picture * _picture, bool _DeleteP, const CommandType _cc/* = cmInvalid */) : picture(_picture), DeleteP(_DeleteP) { if (_cc != cmInvalid) { @@ -197,8 +197,8 @@ parent->SendDataChanged(); } -CheckBox::CheckBox(const char * _text, bool _Checked=FALSE, - bool * _Valuep=0, FontShape _fontshape=fsRegular) +CheckBox::CheckBox(const char * _text, bool _Checked, + bool * _Valuep, FontShape _fontshape) : Group(VAHorizontal), Checked(_Checked), Valuep(_Valuep) { AutoResize = TRUE; @@ -217,9 +217,9 @@ Status_v->Choose(); } -Selector::Selector(const char ** _Items, const int _NumItems, const int _SelectedItem=0, - const bool _AutoResize = TRUE, TextDirection _direction=tdNorth, - FontShape _fontshape=fsRegular) +Selector::Selector(const char ** _Items, const int _NumItems, const int _SelectedItem, + const bool _AutoResize , TextDirection _direction, + FontShape _fontshape) : Label(_Items[_SelectedItem], cmInvalid, _AutoResize, _direction, _fontshape), Items(_Items), NumItems(_NumItems), SelectedItem(_SelectedItem) { @@ -234,8 +234,8 @@ } InputLine::InputLine(const char * _text, const int _MAXTextLen, const CommandType _cc /* = cmInvalid */, - const bool _AutoResize = TRUE, TextDirection _direction=tdNorth, - FontShape _fontshape=fsRegular) + const bool _AutoResize, TextDirection _direction, + FontShape _fontshape) : Label(_text, _cc, _AutoResize, _direction, _fontshape), MAXTextLen(_MAXTextLen) { @@ -300,10 +300,10 @@ static const int invalid_number = -4888839; // can't initialize on this number InputNumber::InputNumber(const int _Number, const int _MinNumber, const int _MaxNumber, - int * const _Valuep=0, + int * const _Valuep, const CommandType _cc /* = cmInvalid */, - const bool _AutoResize = TRUE, TextDirection _direction=tdNorth, - FontShape _fontshape=fsRegular) + const bool _AutoResize, TextDirection _direction, + FontShape _fontshape) : Label(" ", _cc, _AutoResize, _direction, _fontshape), Number(invalid_number), Valuep(_Valuep), MinNumber(_MinNumber), MaxNumber(_MaxNumber) { @@ -335,7 +335,7 @@ Label::Deselect(); } -void InputNumber::SetNumber(const int _Number, bool DoCheck=TRUE) +void InputNumber::SetNumber(const int _Number, bool DoCheck) { if (DoCheck && (_Number > MaxNumber)) return;