/// <summary> /// Freezes the layout only if the number of lines has not changed. /// </summary> /// <param name="lines">The number of lines of text displayed.</param> /// <param name="allowUpdate">true to allow moving into frozen states, or false to thaw only.</param> internal void FreezeIfMatch(int lines, bool allowUpdate) { if (lines != Lines) { Lines = lines; if (frozen != FREEZE_THAWED) { freeze.enabled = false; thaw.enabled = true; frozen = FREEZE_THAWED; } } else if (allowUpdate) { if (frozen == FREEZE_THAWED) { frozen = FREEZE_PENDING; } else if (frozen == FREEZE_PENDING) { freeze.CopyFrom(thaw); thaw.enabled = false; freeze.enabled = true; frozen = FREEZE_FROZEN; } } }
/// <summary> /// Freezes the row layout. /// </summary> internal void Freeze() { if (root.activeInHierarchy) { freeze.CopyFrom(thaw); thaw.enabled = false; freeze.enabled = true; } }