Subversion-Projekte lars-tiefland.php_share

Revision

Details | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
1 lars 1
/box-input-text-create {           % =>
2
  box-inline-create
3
  dup box-input-text-setup-methods
4
  dup /box-input-text add-type
5
} def
6
 
7
/box-input-text-get-min-width {    % => Context This
8
  2 copy /get-max-width call-method
9
  exch pop
10
  exch pop
11
} def
12
 
13
/box-input-text-line-break-allowed { % => This
14
  pop false
15
} def
16
 
17
/box-input-text-reflow {           % => Context Parent This
18
% Check if we need a line break here
19
 
20
  3 copy /maybe-line-break call-method
21
  pop
22
 
23
% Append to parent line box
24
 
25
  dup 2 index box-container-append-line
26
 
27
% Determine coordinates of upper-left corner
28
 
29
  2 copy
30
  box-generic-guess-corner       % => Context Parent This
31
 
32
% Determine the box width
33
 
34
  2 index 1 index
35
  /get-min-width call-method
36
  1 index put-full-width           % => Context Parent This
37
 
38
  2 index 1 index
39
  box-container-reflow-content
40
 
41
% vertical-align
42
 
43
  dup get-content 0 get
44
  get-default-baseline
45
  1 index get-extra-top add
46
  dup 2 index put-baseline
47
  1 index put-default-baseline
48
 
49
% Offset parent curernt X coordinate
50
 
51
  1 index get-current-x
52
  1 index get-full-width
53
  add
54
  2 index put-current-x
55
 
56
% Extend parent height
57
 
58
  dup get-bottom-margin
59
  1 index box-generic-extend-height
60
 
61
  pop pop pop
62
} def
63
 
64
/box-input-text-setup-methods {
65
  dup /Methods get
66
  dup /get-min-width      { box-input-text-get-min-width } put
67
  dup /line-break-allowed { box-input-text-line-break-allowed } put
68
  dup /reflow             { box-input-text-reflow } put
69
  dup /show               { box-input-text-show } put
70
  pop pop
71
} def
72
 
73
/box-input-text-show {             % => Viewport This
74
  box-container-show
75
} def
76