| 1277 | """A list of nodes (either horizontal or vertical).""" |
| 1278 | |
| 1279 | def __init__(self, elements: T.Sequence[Node]): |
| 1280 | super().__init__(0., 0., 0.) |
| 1281 | self.shift_amount = 0. # An arbitrary offset |
| 1282 | self.children = [*elements] # The child nodes of this list |
| 1283 | # The following parameters are set in the vpack and hpack functions |
| 1284 | self.glue_set = 0. # The glue setting of this list |
| 1285 | self.glue_sign = 0 # 0: normal, -1: shrinking, 1: stretching |
| 1286 | self.glue_order = 0 # The order of infinity (0 - 3) for the glue |
| 1287 | |
| 1288 | def __repr__(self) -> str: |
| 1289 | return "{}<w={:.02f} h={:.02f} d={:.02f} s={:.02f}>[{}]".format( |