-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathblock_node.gen.go
230 lines (177 loc) · 5.75 KB
/
block_node.gen.go
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
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
// Code generated by PDFlexgo; DO NOT EDIT.
package pdflexgo
import "github.com/kjk/flex"
func (block *BlockElement) Width(width float64) *BlockElement {
block.getFlexNode().StyleSetWidth(float32(width))
return block
}
func (block *BlockElement) Height(height float64) *BlockElement {
block.getFlexNode().StyleSetHeight(float32(height))
return block
}
func (block *BlockElement) WidthPercent(width float64) *BlockElement {
block.getFlexNode().StyleSetWidthPercent(float32(width))
return block
}
func (block *BlockElement) HeightPercent(height float64) *BlockElement {
block.getFlexNode().StyleSetHeightPercent(float32(height))
return block
}
func (block *BlockElement) WidthAuto() *BlockElement {
block.getFlexNode().StyleSetWidthAuto()
return block
}
func (block *BlockElement) HeightAuto() *BlockElement {
block.getFlexNode().StyleSetHeightAuto()
return block
}
// ALIGN SELF
func (block *BlockElement) AlignSelfType(align Align) *BlockElement {
block.getFlexNode().StyleSetAlignSelf(flex.Align(align))
return block
}
func (block *BlockElement) AlignSelfAuto() *BlockElement {
block.AlignSelfType(AlignAuto)
return block
}
func (block *BlockElement) AlignSelfStart() *BlockElement {
block.AlignSelfType(AlignStart)
return block
}
func (block *BlockElement) AlignSelfCenter() *BlockElement {
block.AlignSelfType(AlignCenter)
return block
}
func (block *BlockElement) AlignSelfEnd() *BlockElement {
block.AlignSelfType(AlignEnd)
return block
}
func (block *BlockElement) AlignSelfStretch() *BlockElement {
block.AlignSelfType(AlignStretch)
return block
}
func (block *BlockElement) AlignSelfBaseline() *BlockElement {
block.AlignSelfType(AlignBaseline)
return block
}
func (block *BlockElement) AlignSelfSpaceBetween() *BlockElement {
block.AlignSelfType(AlignSpaceBetween)
return block
}
func (block *BlockElement) AlignSelfSpaceAround() *BlockElement {
block.AlignSelfType(AlignSpaceAround)
return block
}
// FLEX FUNCTIONS
func (block *BlockElement) FlexGrow(flexGrow float64) *BlockElement {
block.getFlexNode().StyleSetFlexGrow(float32(flexGrow))
return block
}
func (block *BlockElement) FlexShrink(flexShrink float64) *BlockElement {
block.getFlexNode().StyleSetFlexShrink(float32(flexShrink))
return block
}
func (block *BlockElement) FlexBasis(flexBasis float64) *BlockElement {
block.getFlexNode().StyleSetFlexBasis(float32(flexBasis))
return block
}
func (block *BlockElement) FlexBasisPercent(flexBasisPercent float64) *BlockElement {
block.getFlexNode().StyleSetFlexBasisPercent(float32(flexBasisPercent))
return block
}
func (block *BlockElement) FlexBasisAuto() *BlockElement {
flex.NodeStyleSetFlexBasisAuto(block.getFlexNode())
return block
}
func (block *BlockElement) FlexAuto() *BlockElement {
return block.
FlexGrow(1).
FlexShrink(1).
FlexBasisAuto()
}
func (block *BlockElement) FlexNone() *BlockElement {
return block.
FlexGrow(0).
FlexShrink(0).
FlexBasisAuto()
}
func (block *BlockElement) MinWidth(minWidth float64) *BlockElement {
block.getFlexNode().StyleSetMinWidth(float32(minWidth))
return block
}
func (block *BlockElement) MinWidthPercent(minWidthPercent float64) *BlockElement {
block.getFlexNode().StyleSetMinWidthPercent(float32(minWidthPercent))
return block
}
func (block *BlockElement) MinHeight(minHeight float64) *BlockElement {
block.getFlexNode().StyleSetMinHeight(float32(minHeight))
return block
}
func (block *BlockElement) MinHeightPercent(minHeightPercent float64) *BlockElement {
block.getFlexNode().StyleSetMinHeightPercent(float32(minHeightPercent))
return block
}
func (block *BlockElement) MaxWidth(maxWidth float64) *BlockElement {
block.getFlexNode().StyleSetMaxWidth(float32(maxWidth))
return block
}
func (block *BlockElement) MaxWidthPercent(maxWidthPercent float64) *BlockElement {
block.getFlexNode().StyleSetMaxWidthPercent(float32(maxWidthPercent))
return block
}
func (block *BlockElement) MaxHeight(maxHeight float64) *BlockElement {
block.getFlexNode().StyleSetMaxHeight(float32(maxHeight))
return block
}
func (block *BlockElement) MaxHeightPercent(maxHeightPercent float64) *BlockElement {
block.getFlexNode().StyleSetMaxHeightPercent(float32(maxHeightPercent))
return block
}
// ASPECT RATIO
func (block *BlockElement) AspectRatio(ratio float64) *BlockElement {
block.getFlexNode().StyleSetAspectRatio(float32(ratio))
return block
}
// POSITION TYPE
func (block *BlockElement) PositionType(_type PositionType) *BlockElement {
block.getFlexNode().StyleSetPositionType(flex.PositionType(_type))
return block
}
func (block *BlockElement) PositionTypeRelative() *BlockElement {
block.PositionType(PositionTypeRelative)
return block
}
func (block *BlockElement) PositionTypeAbsolute() *BlockElement {
block.PositionType(PositionTypeAbsolute)
return block
}
// POSITION TYPE
func (block *BlockElement) Position(_type PositionType) *BlockElement {
block.getFlexNode().StyleSetPositionType(flex.PositionType(_type))
return block
}
// POSITION
func (block *BlockElement) PositionTop(position float64) *BlockElement {
block.getFlexNode().StyleSetPosition(flex.EdgeTop, float32(position))
return block
}
func (block *BlockElement) PositionRight(position float64) *BlockElement {
block.getFlexNode().StyleSetPosition(flex.EdgeRight, float32(position))
return block
}
func (block *BlockElement) PositionBottom(position float64) *BlockElement {
block.getFlexNode().StyleSetPosition(flex.EdgeBottom, float32(position))
return block
}
func (block *BlockElement) PositionLeft(position float64) *BlockElement {
block.getFlexNode().StyleSetPosition(flex.EdgeLeft, float32(position))
return block
}
func (block *BlockElement) PositionAll(position float64) *BlockElement {
block.
PositionTop(position).
PositionRight(position).
PositionBottom(position).
PositionLeft(position)
return block
}