2e1813940d
Closes PR pkg/29451.
122 lines
4.4 KiB
Text
122 lines
4.4 KiB
Text
$NetBSD: patch-ar,v 1.2 2005/06/14 16:33:13 jmmv Exp $
|
|
|
|
--- XVision/SimpleViews.cc.orig 1998-04-07 14:27:23.000000000 +0200
|
|
+++ XVision/SimpleViews.cc
|
|
@@ -5,9 +5,10 @@
|
|
#include "Application.hh"
|
|
#include "XVisionGlobal.hh"
|
|
#include <stdio.h>
|
|
+#include <string.h>
|
|
|
|
-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 +68,7 @@ void StaticText::SetText(const char * _t
|
|
if (Visible && (!Hidden)) {
|
|
// Hide();
|
|
// Show();
|
|
- (parent ? parent : this)->Redraw();
|
|
+ if (parent) parent->Redraw(); else this->Redraw();
|
|
}
|
|
}
|
|
|
|
@@ -105,8 +106,8 @@ void StaticText::Draw()
|
|
}
|
|
|
|
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 +115,7 @@ Label::Label(const char * _text, const C
|
|
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 +124,14 @@ Padding::Padding(const Align direction=V
|
|
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 +198,8 @@ void CheckBoxImg::Choose()
|
|
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 +218,9 @@ void CheckBox::SetChecked(bool _Checked)
|
|
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 +235,8 @@ void Selector::Choose()
|
|
}
|
|
|
|
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 +301,10 @@ void PictureSelector::SetItem(int _ItemN
|
|
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 +336,7 @@ void InputNumber::Deselect()
|
|
Label::Deselect();
|
|
}
|
|
|
|
-void InputNumber::SetNumber(const int _Number, bool DoCheck=TRUE)
|
|
+void InputNumber::SetNumber(const int _Number, bool DoCheck)
|
|
{
|
|
if (DoCheck && (_Number > MaxNumber))
|
|
return;
|