(buffer: ByteBuffer, beginPos: number)
| 614 | // Setup from buffer |
| 615 | |
| 616 | public setup_beforeAdd(buffer: ByteBuffer, beginPos: number): void { |
| 617 | super.setup_beforeAdd(buffer, beginPos); |
| 618 | |
| 619 | buffer.seek(beginPos, 5); |
| 620 | |
| 621 | this._layout = buffer.readByte(); |
| 622 | this._selectionMode = buffer.readByte(); |
| 623 | |
| 624 | const i1 = buffer.readByte(); |
| 625 | this._align = i1 === 0 ? EAlignType.Left : (i1 === 1 ? EAlignType.Center : EAlignType.Right); |
| 626 | |
| 627 | const i2 = buffer.readByte(); |
| 628 | this._verticalAlign = i2 === 0 ? EVertAlignType.Top : (i2 === 1 ? EVertAlignType.Middle : EVertAlignType.Bottom); |
| 629 | |
| 630 | this._lineGap = buffer.getInt16(); |
| 631 | this._columnGap = buffer.getInt16(); |
| 632 | this._lineCount = buffer.getInt16(); |
| 633 | this._columnCount = buffer.getInt16(); |
| 634 | this._autoResizeItem = buffer.readBool(); |
| 635 | this._childrenRenderOrder = buffer.readByte() as EChildrenRenderOrder; |
| 636 | this._apexIndex = buffer.getInt16(); |
| 637 | |
| 638 | if (buffer.readBool()) { |
| 639 | this._listMargin.top = buffer.getInt32(); |
| 640 | this._listMargin.bottom = buffer.getInt32(); |
| 641 | this._listMargin.left = buffer.getInt32(); |
| 642 | this._listMargin.right = buffer.getInt32(); |
| 643 | } |
| 644 | |
| 645 | const overflow = buffer.readByte() as EOverflowType; |
| 646 | if (overflow === EOverflowType.Scroll) { |
| 647 | const savedPos = buffer.position; |
| 648 | buffer.seek(beginPos, 7); |
| 649 | this.setupScroll(buffer); |
| 650 | buffer.position = savedPos; |
| 651 | } else { |
| 652 | this.setupOverflow(overflow); |
| 653 | } |
| 654 | |
| 655 | if (buffer.readBool()) { |
| 656 | buffer.skip(8); // clipSoftness |
| 657 | } |
| 658 | |
| 659 | if (buffer.version >= 2) { |
| 660 | this.scrollItemToViewOnClick = buffer.readBool(); |
| 661 | this.foldInvisibleItems = buffer.readBool(); |
| 662 | } |
| 663 | |
| 664 | buffer.seek(beginPos, 8); |
| 665 | this._defaultItem = buffer.readS(); |
| 666 | this.readItems(buffer); |
| 667 | } |
| 668 | |
| 669 | protected readItems(buffer: ByteBuffer): void { |
| 670 | const cnt = buffer.getInt16(); |
nothing calls this directly
no test coverage detected