-
Notifications
You must be signed in to change notification settings - Fork 4
/
InputFieldBase.cpp
102 lines (83 loc) · 2.17 KB
/
InputFieldBase.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
/******************************************************************************
InputFieldBase.cpp
BASE CLASS = LayoutWidget
Copyright (C) 2023 by John Lindal.
******************************************************************************/
#include "InputFieldBase.h"
#include <jx-af/jx/JXWindowPainter.h>
#include <jx-af/jx/jXPainterUtil.h>
#include <jx-af/jcore/JColorManager.h>
#include <jx-af/jcore/jAssert.h>
/******************************************************************************
Constructor
******************************************************************************/
InputFieldBase::InputFieldBase
(
LayoutContainer* layout,
const HSizingOption hSizing,
const VSizingOption vSizing,
const JCoordinate x,
const JCoordinate y,
const JCoordinate w,
const JCoordinate h
)
:
LayoutWidget(true, layout, hSizing, vSizing, x,y, w,h)
{
InputFieldBaseX();
}
InputFieldBase::InputFieldBase
(
std::istream& input,
const JFileVersion vers,
LayoutContainer* layout,
const HSizingOption hSizing,
const VSizingOption vSizing,
const JCoordinate x,
const JCoordinate y,
const JCoordinate w,
const JCoordinate h
)
:
LayoutWidget(input, vers, layout, hSizing, vSizing, x,y, w,h)
{
InputFieldBaseX();
}
// private
void
InputFieldBase::InputFieldBaseX()
{
SetBorderWidth(kJXDefaultBorderWidth);
}
/******************************************************************************
Destructor
******************************************************************************/
InputFieldBase::~InputFieldBase()
{
}
/******************************************************************************
Draw (virtual protected)
******************************************************************************/
void
InputFieldBase::Draw
(
JXWindowPainter& p,
const JRect& rect
)
{
p.SetPenColor(JColorManager::GetWhiteColor());
p.SetFilling(true);
p.Rect(GetBounds());
}
/******************************************************************************
DrawBorder (virtual protected)
******************************************************************************/
void
InputFieldBase::DrawBorder
(
JXWindowPainter& p,
const JRect& frame
)
{
JXDrawDownFrame(p, frame, 2);
}